/**
 * Grace Message 메인 스타일
 * 리스트 페이지: gm/grace-message-frontend.html 샘플과 동일 디자인
 * 기타: 설교자 상세(profile), 설교자 신청(apply) 공통
 */
:root {
    --grace-primary: #4f46e5;
    --grace-secondary: #06b6d4;
    --grace-dark: #1e293b;
    --grace-light: #f8fafc;
    --grace-border: #e2e8f0;
    --grace-text-primary: #1e293b;
    --grace-text-secondary: #64748b;
    --grace-success: #10b981;
    --grace-warning: #f59e0b;
}

/* ========== 리스트 페이지 (grace-message) ========== */
/* 액츠 사역자와 동일: 테마 시스템(body 클래스)으로 상단 여백 통제 → 히어로가 사이트 헤더에 붙게 */
.grace-public-wrap {
    margin: 0;
    padding: 0;
    padding-top: 0;
    box-sizing: border-box;
}

/* body 클래스 기반 (액츠 jmp-acts-minister-profile-page 방식) */
body.jmp-grace-message-main-page #content,
body.jmp-grace-message-main-page .site-content,
body.jmp-grace-message-main-page .entry-content,
body.jmp-grace-message-main-page .content-area,
body.jmp-grace-message-main-page #main,
body.jmp-grace-message-main-page .site-main,
body.jmp-grace-message-main-page main,
body.jmp-grace-message-main-page #primary,
body.jmp-grace-message-main-page .content,
body.jmp-grace-message-main-page .site-inner,
body.jmp-grace-message-main-page .page-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
    padding-left: 0;
    padding-right: 0;
}
body.jmp-grace-message-main-page #content .ast-container,
body.jmp-grace-message-main-page #content.content .ast-container,
body.jmp-grace-message-main-page .site-content .ast-container,
body.jmp-grace-message-main-page #content .content-area .ast-container,
body.jmp-grace-message-main-page .site-content .content-area .ast-container {
    padding-top: 0 !important;
    max-width: 100%;
}
body.jmp-grace-message-main-page .grace-public-wrap { margin-top: -4em !important; }
body.jmp-grace-message-main-page { padding-top: 0 !important; }
body.jmp-grace-message-main-page #page {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
body.jmp-grace-message-main-page .ast-separate-container,
body.jmp-grace-message-main-page.ast-separate-container {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
body.jmp-grace-message-main-page .site-header,
body.jmp-grace-message-main-page header[role="banner"],
body.jmp-grace-message-main-page #masthead,
body.jmp-grace-message-main-page .header-wrap {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}
body.jmp-grace-message-main-page #content > *:first-child,
body.jmp-grace-message-main-page .site-content > *:first-child,
body.jmp-grace-message-main-page main > *:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Astra 테마 정밀 제거: #primary 상단 4em, .entry-header 상단 4em, separate-container 패딩 */
body.jmp-grace-message-main-page #primary,
body.jmp-grace-message-main-page .site-content #primary,
body.jmp-grace-message-main-page .content-area #primary {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
}
body.jmp-grace-message-main-page.ast-separate-container #primary,
body.jmp-grace-message-main-page .ast-separate-container #primary {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
body.jmp-grace-message-main-page .entry-header,
body.jmp-grace-message-main-page .ast-page-builder-template .entry-header,
body.jmp-grace-message-main-page .site-main .entry-header {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
    display: none !important; /* 페이지 제목 제거 → 히어로가 헤더에 딱 붙게 */
}
body.jmp-grace-message-main-page .ast-page-builder-template .site-content > .ast-container {
    padding-top: 0 !important;
}
body.jmp-grace-message-main-page .site-main,
body.jmp-grace-message-main-page .ast-page-builder-template .site-main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
body.jmp-grace-message-main-page .hentry,
body.jmp-grace-message-main-page .site-main .hentry,
body.jmp-grace-message-main-page .ast-article-single {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* :has() 보조 (body 클래스 미적용 환경 대비) */
body:has(.grace-public-wrap) #content,
body:has(.grace-public-wrap) .site-content,
body:has(.grace-public-wrap) .entry-content,
body:has(.grace-public-wrap) .content-area,
body:has(.grace-public-wrap) #main,
body:has(.grace-public-wrap) .site-main,
body:has(.grace-public-wrap) main,
body:has(.grace-public-wrap) #primary,
body:has(.grace-public-wrap) .content,
body:has(.grace-public-wrap) .site-inner,
body:has(.grace-public-wrap) .page-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
body:has(.grace-public-wrap) #content .ast-container,
body:has(.grace-public-wrap) #content.content .ast-container,
body:has(.grace-public-wrap) .site-content .ast-container,
body:has(.grace-public-wrap) #content .content-area .ast-container,
body:has(.grace-public-wrap) .site-content .content-area .ast-container {
    padding-top: 0 !important;
}
body:has(.grace-public-wrap) .grace-public-wrap { margin-top: -4em !important; }
body:has(.grace-public-wrap) { padding-top: 0 !important; }
body:has(.grace-public-wrap) #page {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
body:has(.grace-public-wrap) .ast-separate-container,
body:has(.grace-public-wrap).ast-separate-container {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
body:has(.grace-public-wrap) .site-header,
body:has(.grace-public-wrap) header[role="banner"],
body:has(.grace-public-wrap) #masthead,
body:has(.grace-public-wrap) .header-wrap {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}
body:has(.grace-public-wrap) #content > *:first-child,
body:has(.grace-public-wrap) .site-content > *:first-child,
body:has(.grace-public-wrap) main > *:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Astra 테마 정밀 제거 (:has 보조) */
body:has(.grace-public-wrap) #primary,
body:has(.grace-public-wrap) .site-content #primary,
body:has(.grace-public-wrap) .content-area #primary {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
}
body:has(.grace-public-wrap).ast-separate-container #primary,
body:has(.grace-public-wrap) .ast-separate-container #primary {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
body:has(.grace-public-wrap) .entry-header,
body:has(.grace-public-wrap) .ast-page-builder-template .entry-header,
body:has(.grace-public-wrap) .site-main .entry-header {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
    display: none !important; /* 페이지 제목 제거 → 히어로가 헤더에 딱 붙게 */
}
body:has(.grace-public-wrap) .ast-page-builder-template .site-content > .ast-container {
    padding-top: 0 !important;
}
body:has(.grace-public-wrap) .site-main,
body:has(.grace-public-wrap) .ast-page-builder-template .site-main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
body:has(.grace-public-wrap) .hentry,
body:has(.grace-public-wrap) .site-main .hentry,
body:has(.grace-public-wrap) .ast-article-single {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* 액츠 사역자와 동일: 히어로·모든 요소가 하나의 컨테이너로 통일 */
.grace-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(10px, 3vw, 24px);
    box-sizing: border-box;
}

.grace-header {
    margin-top: 0;
    background: linear-gradient(135deg, var(--grace-primary) 0%, var(--grace-secondary) 100%);
    color: white;
    padding: 2rem 0 20px;
    margin-left: calc(-1 * clamp(10px, 3vw, 24px));
    margin-right: calc(-1 * clamp(10px, 3vw, 24px));
    padding-left: clamp(10px, 3vw, 24px);
    padding-right: clamp(10px, 3vw, 24px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

.grace-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.grace-logo {
    display: flex;
    align-items: center;
}

.grace-logo-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 50%, #c7d2fe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.grace-tagline {
    opacity: 0.9;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.grace-stats {
    display: flex;
    gap: 2rem;
    text-align: center;
}

.grace-stat-item span {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.grace-stat-item small {
    opacity: 0.9;
    font-size: 0.875rem;
}

.grace-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.grace-filter-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.grace-filter-btn:hover,
.grace-filter-btn.active {
    background: white;
    color: var(--grace-primary);
}

/* 히어로 밑: 재생기 50% + 추천 설교자 50%, 사이 여백 */
.grace-hero-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: stretch;
    margin-top: 20px;
    margin-bottom: 2rem;
    margin-left: calc(-1 * clamp(10px, 3vw, 24px));
    margin-right: calc(-1 * clamp(10px, 3vw, 24px));
    width: calc(100% + 2 * clamp(10px, 3vw, 24px));
    box-sizing: border-box;
}

/* 데스크톱: 재생기 영역 정확히 50%, 세로 16:9 비율 */
.grace-hero-player-wrap {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.grace-hero-player-wrap .grace-main-player {
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    overflow: hidden;
}

.grace-hero-player-wrap .player-wrapper--live {
    flex: 0 0 auto;
    position: relative;
    padding-top: 0;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.grace-hero-player-wrap .player-wrapper--live .joyn-player-wrapper {
    position: absolute;
    inset: 0;
}

.grace-hero-player-wrap .player-wrapper--live .joyn-player-wrapper iframe,
.grace-hero-player-wrap .player-wrapper--live .joyn-player-wrapper video {
    width: 100%;
    height: 100%;
    display: block;
}

.grace-player-placeholder .player-wrapper--live {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
}

/* 데스크톱: 추천 설교자 12명 4x3 */
.grace-hero-preachers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 0.5rem;
    min-height: 0;
    height: 100%;
}

.grace-hero-preacher-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-decoration: none;
    color: var(--grace-text-primary);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.grace-hero-preacher-card:hover {
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.grace-hero-preacher-thumb {
    width: 100%;
    flex: 1;
    min-height: 0;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.grace-hero-preacher-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grace-hero-preacher-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    font-size: 1.5rem;
}

.grace-hero-preacher-name {
    padding: 0.35rem 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* 모바일: 추천 설교자 펼침 버튼 (데스크톱에서는 숨김) */
.grace-hero-preachers-toggle {
    display: none;
}

@media (max-width: 900px) {
    .grace-hero-row {
        grid-template-columns: 1fr;
        margin-top: 0;
    }
    .grace-hero-player-wrap {
        width: 100%;
    }
    /* 모바일: 기본 3명만 표시, 펼치면 12명 */
    .grace-hero-preachers-wrap {
        width: 100%;
        text-align: center;
    }
    .grace-hero-preachers {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(4, minmax(100px, auto));
        gap: 0.5rem;
        min-height: 0;
    }
    .grace-hero-preachers-wrap:not(.is-expanded) .grace-hero-preachers {
        grid-template-rows: 1fr;
        overflow: hidden;
    }
    .grace-hero-preachers-wrap:not(.is-expanded) .grace-hero-preachers .grace-hero-preacher-card:nth-child(n+4) {
        display: none;
    }
    .grace-hero-preacher-card {
        min-height: 100px;
    }
    .grace-hero-preacher-thumb {
        min-height: 56px;
    }
    .grace-hero-preachers-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        width: auto;
        margin-top: 0.75rem;
        padding: 0.4rem 0.75rem;
        border: 1px solid var(--grace-border, #e2e8f0);
        border-radius: 6px;
        background: #fff;
        color: var(--grace-text-secondary, #64748b);
        font-size: 0.8125rem;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s, color 0.2s, border-color 0.2s;
        -webkit-tap-highlight-color: transparent;
    }
    .grace-hero-preachers-toggle:hover {
        background: var(--grace-light, #f8fafc);
        color: var(--grace-primary, #4f46e5);
        border-color: var(--grace-primary, #4f46e5);
    }
    .grace-hero-preachers-toggle i {
        font-size: 0.5rem;
        opacity: 0.9;
        transition: transform 0.25s;
    }
    .grace-hero-preachers-wrap.is-expanded .grace-hero-preachers-toggle i {
        transform: rotate(180deg);
    }
}

/* 메인 플레이어 (단독 사용 시) */
.grace-main-player {
    background: white;
    border-radius: 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    margin: -3rem auto 2rem;
    max-width: 1200px;
    position: relative;
}

.grace-main-player .player-wrapper {
    position: relative;
    padding-top: 56.25%;
    background: #000;
}

.grace-main-player .player-wrapper img,
.grace-main-player .player-wrapper iframe,
.grace-main-player .player-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grace-main-player .player-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    font-size: 4rem;
    text-decoration: none;
}

.grace-main-player .player-placeholder:hover { color: white; }

.grace-main-player .player-info {
    padding: 1.5rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), rgba(0,0,0,0.95));
    color: white;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.grace-main-player .player-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.grace-main-player .player-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.grace-main-player .player-meta i { color: var(--grace-warning); }

.now-playing-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    z-index: 2;
    animation: grace-pulse 2s infinite;
}

@keyframes grace-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 섹션 */
.grace-section { margin: 3rem 0; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.section-title-icon { color: var(--grace-warning); }

.section-title-icon--green { color: var(--grace-success); }

.view-all-btn {
    color: var(--grace-primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.view-all-btn:hover { color: var(--grace-secondary); }

.view-all-btn--disabled { color: var(--grace-text-secondary); cursor: default; pointer-events: none; }

/* 설교자 그리드 (리스트 페이지) */
.preachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.preacher-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s;
    position: relative;
    text-decoration: none;
    color: inherit;
    display: block;
}

.preacher-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.2);
}

.preacher-thumbnail {
    position: relative;
    padding-top: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.preacher-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preacher-thumb-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    font-size: 3rem;
}

.preacher-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.preacher-badge--recommended { background: var(--grace-warning); }

.preacher-badge--popular { background: var(--grace-success); }

.preacher-badge--new { background: var(--grace-primary); }

.preacher-info { padding: 1rem; text-align: center; }

.preacher-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--grace-text-primary);
}

.preacher-church {
    font-size: 0.875rem;
    color: var(--grace-text-secondary);
    margin-bottom: 0.5rem;
}

.preacher-stats {
    display: flex;
    justify-content: space-around;
    padding-top: 0.75rem;
    border-top: 1px solid var(--grace-border);
    font-size: 0.75rem;
    color: var(--grace-text-secondary);
}

.preacher-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preacher-stat strong {
    color: var(--grace-primary);
    font-size: 1rem;
}

/* 설교 리스트 (가로형) */
.grace-sermons-list-inner,
.sermons-list.grace-sermons-list-inner {
    display: grid;
    gap: 1rem;
    margin: 0;
}

.sermon-item {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-decoration: none;
    color: inherit;
}

.sermon-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateX(4px);
}

.sermon-item .sermon-thumbnail {
    width: 160px;
    min-width: 160px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    padding-top: 0;
}

.sermon-item .sermon-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sermon-item .sermon-thumb-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.8);
    font-size: 2rem;
}

.sermon-item .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
    transition: all 0.3s;
}

.sermon-item:hover .play-overlay { background: rgba(0,0,0,0.6); }

.sermon-item .play-button {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--grace-primary);
    font-size: 1.25rem;
}

.sermon-content { flex: 1; min-width: 0; }

.sermon-title {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--grace-text-primary);
}

.sermon-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--grace-text-secondary);
    margin-bottom: 0.5rem;
}

.sermon-meta i { margin-right: 0.25rem; }

.sermon-description {
    font-size: 0.875rem;
    color: var(--grace-text-secondary);
    line-height: 1.5;
}

.sermon-badges { display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap; }

.sermon-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-new { background: #dcfce7; color: #16a34a; }

.badge-popular { background: #fef3c7; color: #d97706; }

.badge-recommended { background: #dbeafe; color: #2563eb; }

.grace-no-content { padding: 2rem; text-align: center; color: var(--grace-text-secondary); }

/* 기존 메인·다른 페이지 호환 */
.grace-main { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }

.grace-header-stats {
    background: linear-gradient(135deg, var(--grace-primary), var(--grace-secondary));
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}
.grace-header-stats h2 { margin: 0 0 1rem; font-size: 1.5rem; }
.grace-header-stats .stats { display: flex; gap: 2rem; flex-wrap: wrap; }
.grace-header-stats .stats div { font-size: 0.95rem; }
.grace-header-stats .stats span { font-weight: 700; font-size: 1.25rem; }

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    border-radius: 50px;
    text-decoration: none;
}
.filter-btn:hover { background: rgba(255,255,255,0.3); color: white; }
.filter-btn.active { background: white; color: var(--grace-primary); }

.featured-preachers { margin: 2rem 0; }
.featured-preachers h3 { margin-bottom: 1rem; }

.sermons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.sermon-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.preacher-card .avatar,
.preacher-card h4,
.preacher-card p { margin: 0 0 0.5rem; }
.preacher-card .avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; margin-bottom: 0.75rem; }
.preacher-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.preacher-card .avatar .fas, .preacher-card .avatar .fa { font-size: 3rem; color: var(--grace-border); }
.grade-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--grace-light);
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-top: 0.5rem;
}
.sermon-card .thumbnail {
    position: relative;
    padding-top: 56.25%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}
.sermon-card .thumbnail img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.sermon-card .thumbnail .fas, .sermon-card .thumbnail .fa { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 3rem; color: rgba(255,255,255,0.9); }
.sermon-card .meta { display: flex; gap: 1rem; margin-top: 0.5rem; font-size: 0.875rem; color: #64748b; }
.sermon-card .bible-text { font-size: 0.875rem; color: #64748b; margin: 0.5rem 0; }

.sermon-thumbnail {
    position: relative;
    padding-top: 56.25%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}
.sermon-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-play, .btn-primary {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    background: var(--grace-primary);
    color: white;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 0.5rem;
    border: none;
    cursor: pointer;
}
.btn-play:hover, .btn-primary:hover { opacity: 0.9; color: white; }

/* 설교자 상세(프로필) */
.grace-preacher-profile { max-width: 900px; margin: 0 auto; padding: 1.5rem; }
.grace-preacher-profile .profile-header {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}
.grace-preacher-profile .profile-avatar { width: 100px; height: 100px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.grace-preacher-profile .profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.grace-preacher-profile .profile-avatar .fas, .grace-preacher-profile .profile-avatar .fa { font-size: 4rem; color: var(--grace-border); display: block; text-align: center; line-height: 100px; }
.grace-preacher-profile .profile-info h1 { margin: 0 0 0.25rem; font-size: 1.5rem; }
.grace-preacher-profile .profile-stats {
    display: flex;
    gap: 2rem;
    padding: 1rem 0;
    border-top: 1px solid var(--grace-border);
    border-bottom: 1px solid var(--grace-border);
    margin: 1rem 0;
}
.grace-preacher-profile .profile-stats div { text-align: center; }
.grace-preacher-profile .profile-stats span { display: block; font-weight: 700; font-size: 1.25rem; }
.grace-preacher-profile .profile-bio { margin: 1.5rem 0; }
.grace-preacher-profile .profile-bio h3 { margin-bottom: 0.5rem; }
.grace-preacher-profile .preacher-sermons h3 { margin: 1.5rem 0 1rem; }

/* 설교자 그리드(목록) */
.grace-preachers-grid { padding: 1rem 0; }
.grace-preachers-grid .preachers-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.grace-preachers-grid .preacher-card .affiliation { color: #64748b; font-size: 0.875rem; }
.grace-preachers-grid .preacher-card .stats { display: flex; gap: 1rem; margin-top: 0.75rem; font-size: 0.875rem; color: #64748b; }

/* 설교 목록(grace_sermons) */
.grace-sermons-list { padding: 1rem 0; }
.grace-sermons-list .sermons-grid { margin-top: 1rem; }
.grace-sermons-list .sermon-card .bible { font-size: 0.875rem; color: #64748b; margin: 0.5rem 0; }

/* 설교자 신청 폼 */
.grace-apply-form { max-width: 600px; margin: 0 auto; padding: 1.5rem; }
.grace-apply-form .form-group { margin-bottom: 1.25rem; }
.grace-apply-form label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.grace-apply-form input[type="text"],
.grace-apply-form input[type="url"],
.grace-apply-form input[type="email"],
.grace-apply-form select,
.grace-apply-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--grace-border);
    border-radius: 8px;
    box-sizing: border-box;
}
.grace-apply-form textarea { min-height: 120px; resize: vertical; }
.grace-apply-form .btn-submit {
    padding: 0.75rem 2rem;
    background: var(--grace-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.grace-apply-form .btn-submit:hover { opacity: 0.9; }

.grace-notice { padding: 1.5rem; border-radius: 8px; margin: 1rem 0; }
.grace-notice-info { background: #dbeafe; border-left: 4px solid #3b82f6; }
.grace-notice-warning { background: #fef3c7; border-left: 4px solid #f59e0b; }
.grace-error { padding: 1rem; color: #b91c1c; background: #fef2f2; border-radius: 8px; }

@media (max-width: 768px) {
    .grace-header-content {
        flex-direction: column;
        gap: 1rem;
    }
    .grace-stats {
        display: none;
    }
    /* 모바일: 필터 버튼(아이콘·텍스트) 작게 */
    .grace-filters {
        gap: 0.5rem;
        margin-top: 1rem;
    }
    .grace-filter-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
        gap: 0.35rem;
        border-width: 1px;
    }
    .grace-filter-btn i {
        font-size: 0.75em;
    }
    .preachers-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .sermon-item {
        flex-direction: column;
        align-items: stretch;
    }
    .sermon-item .sermon-thumbnail {
        width: 100%;
        min-width: 0;
        height: 180px;
    }
    .preachers-grid,
    .sermons-grid { grid-template-columns: 1fr; }
    .grace-preacher-profile .profile-header { flex-direction: column; text-align: center; }
    .grace-header-stats .stats { flex-direction: column; gap: 0.5rem; }
}
