/**
 * Grace Message 설교자 프로필 - 풀 디자인
 * Acts 스타일 참조: gm/acts-preacher-profile.html
 */
.grace-preacher-profile {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 히어로 섹션 */
.grace-preacher-profile .profile-hero {
    background: linear-gradient(145deg, #5b4ee6 0%, #7c6cf5 40%, #a78bfa 100%);
    color: #fff;
    padding: 2.75rem 1.5rem 2.25rem;
    position: relative;
    overflow: hidden;
}

.grace-preacher-profile .profile-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255,255,255,0.15), transparent),
                url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="gp" width="30" height="30" patternUnits="userSpaceOnUse"><path d="M30 0 L0 0 0 30" fill="none" stroke="rgba(255,255,255,0.04)" stroke-width="1"/></pattern></defs><rect width="60" height="60" fill="url(%23gp)"/></svg>');
    pointer-events: none;
}

.grace-preacher-profile .profile-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.grace-preacher-profile .profile-header-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.grace-preacher-profile .profile-avatar-section {
    position: relative;
    flex-shrink: 0;
}

.grace-preacher-profile .profile-hero .profile-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0,0,0,0.05);
    object-fit: cover;
    background: linear-gradient(145deg, rgba(255,255,255,0.2), rgba(255,255,255,0.06));
    display: block;
}

.grace-preacher-profile .profile-hero .profile-avatar .fas,
.grace-preacher-profile .profile-hero .profile-avatar .fa {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255,255,255,0.9);
}

.grace-preacher-profile .profile-info-section {
    flex: 1;
    min-width: 0;
}

.grace-preacher-profile .profile-grade-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    margin-bottom: 0.75rem;
}

.grace-preacher-profile .profile-name {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 0.25rem;
    letter-spacing: -0.03em;
    line-height: 1.25;
}

.grace-preacher-profile .profile-title {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.grace-preacher-profile .profile-affiliation {
    font-size: 1rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
}

.grace-preacher-profile .profile-tagline {
    font-size: 0.95rem;
    font-style: italic;
    opacity: 0.95;
    line-height: 1.6;
    max-width: 600px;
    margin-bottom: 1.25rem;
}

/* 통계 대시보드 */
.grace-preacher-profile .stats-dashboard {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.grace-preacher-profile .stat-card {
    text-align: center;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 140px;
}

.grace-preacher-profile .stat-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.18);
}

.grace-preacher-profile .stat-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.5rem;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.grace-preacher-profile .stat-number {
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    display: block;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.grace-preacher-profile .stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 4px;
    flex-shrink: 0;
}

/* 메인 콘텐츠 */
.grace-preacher-profile .profile-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

.grace-preacher-profile .profile-section {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.grace-preacher-profile .profile-section h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--grace-primary, #4541FF);
    display: inline-block;
}

.grace-preacher-profile .profile-section h3 i {
    color: var(--grace-primary, #4541FF);
    margin-right: 8px;
}

.grace-preacher-profile .profile-bio {
    margin: 0;
}

.grace-preacher-profile .profile-bio p {
    font-size: 1rem;
    line-height: 1.8;
    color: #334155;
    margin: 0 0 0.75rem;
}

.grace-preacher-profile .profile-bio p:last-child {
    margin-bottom: 0;
}

/* 설교 목록 카드 스타일 */
.grace-preacher-profile .preacher-sermons {
    margin: 0;
}

.grace-preacher-profile .preacher-sermons h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--grace-primary, #4541FF);
}

.grace-preacher-profile .preacher-sermons .grace-sermons-list,
.grace-preacher-profile .preacher-sermons .sermons-grid {
    margin-top: 0.5rem;
}

/* 뉴스레터 구독 카드 */
.grace-preacher-profile .grace-newsletter-subscribe {
    margin-top: 0 !important;
    padding: 1.5rem !important;
    background: linear-gradient(135deg, rgba(69, 65, 255, 0.08), rgba(167, 136, 255, 0.08)) !important;
    border: 2px solid rgba(69, 65, 255, 0.2) !important;
    border-radius: 12px !important;
}

.grace-preacher-profile .grace-newsletter-subscribe h3 {
    margin-bottom: 0.5rem !important;
    font-size: 1.125rem !important;
    border: none !important;
    padding: 0 !important;
}

.grace-preacher-profile .grace-newsletter-btn {
    padding: 12px 24px;
    border-radius: 100px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--grace-primary, #4541FF), #A788FF);
    color: #fff;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.grace-preacher-profile .grace-newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(69, 65, 255, 0.35);
}

/* 기존 단순 헤더 숨김 (풀 디자인 사용 시) */
.grace-preacher-profile.profile-design-full .profile-header:not(.profile-hero-inner .profile-header-content) {
    display: none;
}

.grace-preacher-profile.profile-design-full .profile-stats:not(.stats-dashboard) {
    display: none;
}

/* ========== 샘플 acts-preacher-profile.html 동일 구조 ========== */
:root {
    --grace-primary: #4541FF;
    --grace-primary-light: #A788FF;
    --grace-primary-dark: #3730E3;
    --grace-dark: #222222;
    --grace-secondary: #333333;
    --grace-gray: #828282;
    --grace-light: #F2F2F2;
    --grace-border: #E0E0E0;
    --grace-white: #FFFFFF;
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 100px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* 히어로: 배지, 액션 버튼 */
.grace-preacher-profile .profile-badges {
    display: flex;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
    flex-wrap: wrap;
}

.grace-preacher-profile .profile-badges .badge {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.grace-preacher-profile .profile-badges .badge-grade {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.grace-preacher-profile .profile-badges .badge-verified {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.grace-preacher-profile .verified-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #D4AF37, #F4D366);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #fff;
    font-size: 20px;
}

.grace-preacher-profile .profile-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.grace-preacher-profile .profile-actions .btn {
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    text-decoration: none;
}

.grace-preacher-profile .profile-actions .btn-white {
    background: #fff;
    color: #5b4ee6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: all 0.2s;
}

.grace-preacher-profile .profile-actions .btn-white:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.grace-preacher-profile .profile-actions .btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.grace-preacher-profile .profile-actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.9);
}

.grace-preacher-profile .profile-actions .btn-favorite {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.grace-preacher-profile .profile-actions .btn-favorite.active {
    background: #EF4444;
    border-color: #EF4444;
}

/* 통계: 히어로 내 흰색 카드 스타일 (stat-number primary) */
.grace-preacher-profile .profile-hero .stats-dashboard.stats-dashboard-white {
    background: var(--grace-white);
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
    margin-top: 1.75rem;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.grace-preacher-profile .profile-hero .stats-dashboard.stats-dashboard-white .stat-card {
    background: linear-gradient(145deg, rgba(91, 78, 230, 0.04), rgba(167, 136, 255, 0.04));
    border-radius: 10px;
}

.grace-preacher-profile .profile-hero .stats-dashboard.stats-dashboard-white .stat-card:hover {
    background: linear-gradient(145deg, rgba(91, 78, 230, 0.08), rgba(167, 136, 255, 0.08));
}

.grace-preacher-profile .profile-hero .stats-dashboard.stats-dashboard-white .stat-icon {
    background: rgba(91, 78, 230, 0.12);
    color: #5b4ee6;
}

.grace-preacher-profile .profile-hero .stats-dashboard.stats-dashboard-white .stat-number {
    color: var(--grace-primary);
    font-size: 1.5rem;
}

.grace-preacher-profile .profile-hero .stats-dashboard.stats-dashboard-white .stat-label {
    color: var(--grace-gray);
    font-size: 12px;
    margin-top: 4px;
}

.grace-preacher-profile .stat-change {
    font-size: 12px;
    color: #10B981;
    margin-top: 4px;
    font-weight: 600;
}

/* 메인: 2단 레이아웃 (본문 + 사이드바) */
.grace-preacher-profile .main-wrapper {
    max-width: 1400px;
    margin: var(--spacing-lg) auto;
    padding: 0 var(--spacing-md);
    display: grid;
    grid-template-columns: 1fr minmax(280px, 400px);
    gap: var(--spacing-lg);
}

.grace-preacher-profile .main-content {
    min-width: 0;
}

/* 탭 네비게이션 */
.grace-preacher-profile .content-tabs {
    background: #fff;
    border-radius: 14px;
    padding: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    position: sticky;
    top: 60px;
    z-index: 90;
}

.grace-preacher-profile .tab-button {
    padding: 0.625rem 1rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.grace-preacher-profile .tab-button:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.grace-preacher-profile .tab-button.active {
    background: linear-gradient(135deg, #5b4ee6, #7c6cf5);
    color: #fff;
    box-shadow: 0 2px 8px rgba(91, 78, 230, 0.35);
}

.grace-preacher-profile .tab-content {
    display: none;
}

.grace-preacher-profile .tab-content.active {
    display: block;
    animation: graceTabFade 0.3s ease;
}

@keyframes graceTabFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 카드 */
.grace-preacher-profile .card {
    background: #fff;
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.grace-preacher-profile .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 3px solid var(--grace-border);
}

.grace-preacher-profile .card-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--grace-dark);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.grace-preacher-profile .card-title i {
    color: #5b4ee6;
    font-size: 1.5rem;
}

.grace-preacher-profile .card-action {
    color: var(--grace-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

/* 섹션 / info-table / tag-cloud */
.grace-preacher-profile .section-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--grace-dark);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 3px solid var(--grace-primary);
    display: inline-block;
}

.grace-preacher-profile .profile-text {
    font-size: 16px;
    line-height: 1.9;
    color: var(--grace-secondary);
    margin-bottom: var(--spacing-md);
}

.grace-preacher-profile .quote-block {
    background: linear-gradient(135deg, rgba(69, 65, 255, 0.08), rgba(167, 136, 255, 0.08));
    border-left: 5px solid var(--grace-primary);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    font-style: italic;
    color: var(--grace-dark);
    margin: var(--spacing-md) 0;
    font-size: 16px;
    line-height: 1.8;
}

.grace-preacher-profile .info-table {
    width: 100%;
    margin-bottom: var(--spacing-md);
}

.grace-preacher-profile .info-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--grace-border);
}

.grace-preacher-profile .info-row:last-child {
    border-bottom: none;
}

.grace-preacher-profile .info-label {
    font-weight: 800;
    color: var(--grace-gray);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.grace-preacher-profile .info-value {
    color: var(--grace-dark);
    font-size: 15px;
    font-weight: 600;
}

.grace-preacher-profile .tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-md);
}

.grace-preacher-profile .tag {
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(69, 65, 255, 0.1), rgba(167, 136, 255, 0.1));
    color: var(--grace-primary);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    border: 2px solid rgba(69, 65, 255, 0.2);
    transition: all 0.2s;
}

.grace-preacher-profile .tag:hover {
    background: linear-gradient(135deg, var(--grace-primary), var(--grace-primary-light));
    color: #fff;
    border-color: var(--grace-primary);
}

/* 설교 리스트 (샘플 스타일) */
.grace-preacher-profile .sermon-list {
    display: grid;
    gap: var(--spacing-md);
}

.grace-preacher-profile .sermon-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    transition: all 0.3s;
}

.grace-preacher-profile .sermon-item:hover {
    background: var(--grace-light);
    border-color: var(--grace-primary);
}

.grace-preacher-profile .sermon-thumbnail-wrapper {
    position: relative;
    flex-shrink: 0;
}

.grace-preacher-profile .sermon-thumbnail {
    width: 240px;
    height: 135px;
    border-radius: var(--radius-md);
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

/* 설교 탭 활성 시 전체 영역 사용 (사이드바 숨김) */
.grace-preacher-profile.sermons-tab-active .main-wrapper {
    grid-template-columns: 1fr;
}

.grace-preacher-profile.sermons-tab-active .sidebar {
    display: none;
}

/* 심플 프로필: 메인 콘텐츠 전체 영역 사용 */
.grace-preacher-profile.profile-simple-manual .main-content.main-content-full {
    max-width: none;
    width: 100%;
}

/* 설교 목록 - 리스트 레이아웃 2열, 100% 영역 (설교자 프로필) */
.grace-sermons-list-profile {
    width: 100%;
}

.grace-sermons-list-profile .sermons-profile-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    width: 100%;
}

/* 썸네일 형태: 카드 (썸네일 상단 + 정보 하단) */
.grace-sermons-list-profile .sermon-profile-row {
    display: flex;
    flex-direction: column;
    padding: 0;
    border: 1px solid var(--grace-border);
    border-radius: var(--radius-md);
    background: #fff;
    overflow: hidden;
}

.grace-sermons-list-profile .sermon-row-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--grace-light);
}

.grace-sermons-list-profile .sermon-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grace-sermons-list-profile .sermon-row-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 2.5rem;
    transition: background 0.2s;
}

.grace-sermons-list-profile .sermon-row-play:hover {
    background: rgba(0, 0, 0, 0.6);
}

.grace-sermons-list-profile .sermon-row-info {
    flex: 1;
    padding: 1rem;
    min-width: 0;
}

.grace-sermons-list-profile .sermon-row-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--grace-dark);
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.grace-sermons-list-profile .sermon-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--grace-text-secondary);
}

.grace-sermons-list-profile .sermon-row-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.grace-sermons-list-profile .sermon-row-bible {
    font-size: 0.8rem;
    color: var(--grace-text-secondary);
    margin: 0.5rem 0 0;
    line-height: 1.4;
}

.grace-sermons-list-profile .sermon-row-action {
    display: none;
}

.grace-sermons-list-profile .sermon-row-action .btn-play {
    width: 100%;
    padding: 10px 16px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    background: var(--grace-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.grace-sermons-list-profile .sermon-row-action .btn-play:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .grace-sermons-list-profile .sermons-profile-list {
        grid-template-columns: 1fr;
    }
}

/* 페이지네이션 */
.grace-sermons-pagination {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--grace-border);
}

.grace-sermons-pagination .pagination-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.grace-sermons-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-md);
    background: var(--grace-light);
    color: var(--grace-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.grace-sermons-pagination .page-link:hover:not(.disabled) {
    background: var(--grace-primary);
    color: #fff;
}

.grace-sermons-pagination .page-link.active {
    background: var(--grace-primary);
    color: #fff;
}

.grace-sermons-pagination .page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.grace-sermons-pagination .page-ellipsis {
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    color: var(--grace-text-secondary);
}

/* 설교 영상 모달 */
.grace-sermon-video-modal .grace-sermon-video-dialog {
    width: 90%;
    max-width: 900px;
    padding: 1rem;
}

.grace-sermon-video-modal .grace-sermon-player-container {
    min-height: 200px;
    margin-top: 0.5rem;
}

.grace-sermon-video-modal .grace-sermon-player-container .joyn-player-wrapper {
    max-width: 100%;
    margin: 0 auto;
}

.grace-sermon-modal-loading,
.grace-sermon-modal-error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--grace-text-secondary);
}

.grace-sermon-modal-error {
    color: var(--grace-warning);
}

.grace-preacher-profile .sermon-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.grace-preacher-profile .sermon-details {
    flex: 1;
}

.grace-preacher-profile .sermon-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--grace-dark);
    margin-bottom: var(--spacing-xs);
    line-height: 1.4;
}

.grace-preacher-profile .sermon-meta {
    display: flex;
    gap: var(--spacing-md);
    font-size: 13px;
    color: var(--grace-gray);
    margin-bottom: var(--spacing-sm);
    flex-wrap: wrap;
}

.grace-preacher-profile .sermon-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.grace-preacher-profile .sermon-stats {
    display: flex;
    gap: var(--spacing-md);
    font-size: 13px;
    color: var(--grace-gray);
    font-weight: 600;
}

/* 신앙 상담 섹션 */
.grace-preacher-profile .counsel-highlight {
    background: linear-gradient(135deg, rgba(69, 65, 255, 0.08), rgba(167, 136, 255, 0.08));
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 3px solid rgba(69, 65, 255, 0.2);
    margin-bottom: var(--spacing-md);
}

.grace-preacher-profile .counsel-highlight h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--grace-dark);
    margin-bottom: var(--spacing-sm);
}

.grace-preacher-profile .time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
}

.grace-preacher-profile .time-slot {
    padding: var(--spacing-md);
    background: #fff;
    border: 3px solid var(--grace-border);
    border-radius: var(--radius-md);
    text-align: center;
}

.grace-preacher-profile .time-slot.available {
    border-color: #10B981;
    background: rgba(16, 185, 129, 0.05);
}

.grace-preacher-profile .time-day {
    font-weight: 800;
    color: var(--grace-dark);
    margin-bottom: 4px;
    font-size: 16px;
}

.grace-preacher-profile .time-hours {
    font-size: 14px;
    color: var(--grace-gray);
    font-weight: 600;
}

/* 추천사 */
.grace-preacher-profile .testimonial-list {
    display: grid;
    gap: var(--spacing-md);
}

.grace-preacher-profile .testimonial-item {
    padding: var(--spacing-md);
    background: linear-gradient(135deg, rgba(69, 65, 255, 0.03), rgba(167, 136, 255, 0.03));
    border-left: 4px solid var(--grace-primary);
    border-radius: var(--radius-md);
}

.grace-preacher-profile .testimonial-text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--grace-secondary);
    font-style: italic;
    margin-bottom: var(--spacing-sm);
}

.grace-preacher-profile .testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.grace-preacher-profile .testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.grace-preacher-profile .testimonial-name {
    font-weight: 800;
    color: var(--grace-dark);
    font-size: 14px;
}

.grace-preacher-profile .testimonial-role {
    font-size: 12px;
    color: var(--grace-gray);
    font-weight: 600;
}

/* 갤러리 */
.grace-preacher-profile .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--spacing-sm);
}

.grace-preacher-profile .gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 1;
    box-shadow: var(--shadow-sm);
}

.grace-preacher-profile .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.grace-preacher-profile .gallery-item:hover img {
    transform: scale(1.05);
}

.grace-preacher-profile .gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-md);
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

/* 사이드바 */
.grace-preacher-profile .sidebar {
    position: sticky;
    top: 120px;
    align-self: flex-start;
}

.grace-preacher-profile .sidebar-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.grace-preacher-profile .sidebar-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--grace-dark);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.grace-preacher-profile .sidebar-title i {
    color: var(--grace-primary);
}

.grace-preacher-profile .contact-list {
    display: grid;
    gap: var(--spacing-sm);
}

.grace-preacher-profile .contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
}

.grace-preacher-profile .contact-item:hover {
    background: var(--grace-light);
}

.grace-preacher-profile .contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--grace-primary), var(--grace-primary-light));
    color: #fff;
    border-radius: 50%;
    font-size: 20px;
    flex-shrink: 0;
}

.grace-preacher-profile .contact-label {
    font-size: 12px;
    color: var(--grace-gray);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.grace-preacher-profile .contact-value {
    font-size: 15px;
    color: var(--grace-dark);
    font-weight: 700;
}

.grace-preacher-profile .social-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xs);
}

.grace-preacher-profile .social-link {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--grace-light);
    color: var(--grace-gray);
    border-radius: var(--radius-md);
    font-size: 22px;
    transition: all 0.3s;
    text-decoration: none;
}

.grace-preacher-profile .social-link:hover {
    background: var(--grace-primary);
    color: #fff;
}

.grace-preacher-profile .activity-feed {
    display: grid;
    gap: var(--spacing-sm);
}

.grace-preacher-profile .activity-item {
    padding: var(--spacing-sm);
    border-left: 4px solid var(--grace-primary);
    background: linear-gradient(to right, rgba(69, 65, 255, 0.05), transparent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.grace-preacher-profile .activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.grace-preacher-profile .activity-date {
    font-size: 12px;
    color: var(--grace-gray);
    font-weight: 700;
}

.grace-preacher-profile .activity-type {
    font-size: 12px;
    color: var(--grace-primary);
    font-weight: 700;
}

.grace-preacher-profile .activity-text {
    font-size: 14px;
    color: var(--grace-dark);
    font-weight: 600;
}

/* 모달 - profile 내부에 배치되어 .grace-preacher-profile .modal 선택자 적용 */
.grace-preacher-profile .modal,
#grace-counsel-modal {
    display: none !important;
    position: fixed !important;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.grace-preacher-profile .modal.show,
#grace-counsel-modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.grace-preacher-profile .modal-dialog {
    background: #fff;
    padding: var(--spacing-lg);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.grace-preacher-profile .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 3px solid var(--grace-border);
}

.grace-preacher-profile .modal-header h2 {
    font-size: 28px;
    font-weight: 900;
    color: var(--grace-dark);
    margin: 0;
}

.grace-preacher-profile .modal .close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--grace-light);
    font-size: 24px;
    cursor: pointer;
    border: none;
    color: var(--grace-gray);
}

.grace-preacher-profile .modal .close:hover {
    background: var(--grace-primary);
    color: #fff;
}

.grace-preacher-profile .form-group {
    margin-bottom: var(--spacing-md);
}

.grace-preacher-profile .form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 800;
    font-size: 14px;
    color: var(--grace-secondary);
}

.grace-preacher-profile .form-control {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--grace-border);
    border-radius: var(--radius-md);
    font-size: 15px;
    box-sizing: border-box;
}

.grace-preacher-profile textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.grace-preacher-profile .modal-footer {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 2px solid var(--grace-border);
}

.grace-preacher-profile .btn-primary {
    background: linear-gradient(135deg, var(--grace-primary), var(--grace-primary-light));
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.grace-preacher-profile .btn-secondary {
    background: var(--grace-light);
    color: var(--grace-dark);
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 992px) {
    .grace-preacher-profile .stats-dashboard {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .grace-preacher-profile .main-wrapper {
        grid-template-columns: 1fr;
        padding: 0 var(--spacing-sm);
    }
}

@media (max-width: 768px) {
    .grace-preacher-profile .profile-header-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .grace-preacher-profile .profile-hero .profile-avatar {
        width: 120px;
        height: 120px;
    }
    .grace-preacher-profile .profile-name {
        font-size: 1.75rem;
    }
    .grace-preacher-profile .profile-tagline {
        text-align: center;
    }
    .grace-preacher-profile .stats-dashboard {
        grid-template-columns: repeat(2, 1fr);
    }
    .grace-preacher-profile .main-wrapper {
        grid-template-columns: 1fr;
    }
    .grace-preacher-profile .sidebar {
        position: static;
    }
    .grace-preacher-profile .content-tabs {
        position: static;
    }
    .grace-preacher-profile .sermon-item {
        flex-direction: column;
    }
    .grace-preacher-profile .sermon-thumbnail {
        width: 100%;
    }
}
