/**
 * 정적 페이지 공통 스타일
 * About, Policy, Contributors, Utility 섹션용
 * common.css 디자인 시스템 변수 사용
 * 2025-01-18: 구조 단순화 - 복잡한 calc/vw 제거
 */

/* 히어로 영역 (GNB 바로 아래) */
/* 2025-01-18: PC에서 숨김, 모바일에서만 표시 */
.page-hero {
    display: none;
    background: #f8f9fa;
    padding: 40px 0 30px;
}

.page-hero-inner {
    max-width: 1440px;
    margin: 0 auto;
    /* 2025-01-18: 컨텐츠 박스 내 텍스트와 좌측 여백 맞춤 (page-container 40px + page-body 40px) */
    padding: 0 80px;
}

/* Breadcrumb */
.breadcrumb {
    font-size: var(--font-md);
    color: var(--text-tertiary);
    margin-bottom: 0;
}

.breadcrumb a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--text-accent);
}

.breadcrumb .separator {
    margin: 0 8px;
    color: var(--text-muted);
}

.breadcrumb .current {
    color: var(--text-accent);
    font-weight: 500;
}

/* Page Title */
.page-title {
    font-size: var(--font-2xl);
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

.page-subtitle {
    font-size: var(--font-md);
    color: var(--text-tertiary);
    margin-top: 8px;
}

/* Page Main */
.page-main {
    min-height: calc(100vh - 200px);
    padding: 30px 0 60px;
    background-color: #f8f9fa;
}

.page-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

/* 2025-01-18: 좌측 사이드바 + 컨텐츠 레이아웃 */
/* 2025-01-18: 참조 프로젝트(한국화법학회) 스타일 정확히 적용 */
.page-layout {
    display: flex;
    gap: 32px;
}

/* 좌측 사이드바 */
.page-sidebar {
    width: 224px;
    flex-shrink: 0;
}

.sidebar-inner {
    position: sticky;
    top: 40px;
}

/* 사이드바 타이틀: 아이콘 + 텍스트 */
/* 2025-01-18: SVG 아이콘 32px, 대분류-서브메뉴 간격 16px */
.sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 64px;
    padding-left: 0;
    margin-bottom: 16px;
}

/* SVG 아이콘 스타일 - 32px 고정 */
.sidebar-title svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    color: var(--kjvr-primary);
}

.sidebar-title h3 {
    font-size: var(--font-lg-plus);
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    line-height: 1;
}

/* 사이드바 네비게이션 */
/* 2025-01-18: 메뉴 간격 8px */
.sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 메뉴 링크 - 아이콘(32px) + gap(8px) = 40px 정렬 */
/* 2025-01-18: 밑줄-글자 간격 2px */
.sidebar-nav li a {
    display: inline-block;
    padding-left: 40px;
    padding-bottom: 2px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--font-lg);
    /* 2025-01-18: color transition 제거 - 페이지 로드 시 색상 변화 안 보이게 */
    position: relative;
}

/* 메뉴 링크 밑줄 애니메이션 */
.sidebar-nav li a::after {
    content: '';
    position: absolute;
    left: 40px;
    bottom: 0;
    height: 2px;
    background: var(--kjvr-primary);
    width: 0;
    transition: width 0.3s ease;
}

.sidebar-nav li a:hover {
    color: var(--kjvr-primary);
}

.sidebar-nav li a:hover::after {
    width: calc(100% - 40px);
}

/* active 상태: 색상 + 밑줄 + 굵기 */
.sidebar-nav li.active a {
    color: var(--kjvr-primary);
    font-weight: 500;
}

.sidebar-nav li.active a::after {
    width: calc(100% - 40px);
}

/* 컨텐츠 영역 */
.page-content {
    flex: 1;
    min-width: 0;
}

/* Page Body */
.page-body {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Content Sections */
.content-section {
    margin-bottom: 64px;
}

.content-section:last-child {
    margin-bottom: 0;
}

.content-section h2 {
    font-size: var(--font-xl);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--kjvr-primary);
}

.content-section h3 {
    font-size: var(--font-lg-plus);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.content-section h4 {
    font-size: var(--font-lg);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.content-section p {
    font-size: var(--font-md);
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.content-section p:last-child {
    margin-bottom: 0;
}

/* 2025-01-18: strong 태그 두께 조정 */
.content-section strong {
    font-weight: 500;
}

.content-section .lead {
    font-size: var(--font-lg);
    color: var(--text-secondary);
    font-weight: 400;
}

/* Info Table */
/* 2025-01-18: 테이블 라인 진하게, 상단/하단 강조 */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    border-top: 1px solid #666;
    border-bottom: 1px solid #666;
}

.info-table th,
.info-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #ccc;
    font-size: var(--font-md);
}

.info-table thead th {
    border-bottom: 1px solid #999;
}

.info-table tbody tr:last-child td,
.info-table tr:last-child td {
    border-bottom: none;
}

.info-table th {
    width: 180px;
    font-weight: 500;
    color: var(--text-primary);
    background-color: #f8f9fa;
    vertical-align: top;
}

.info-table td {
    color: var(--text-secondary);
}

.info-table a {
    color: var(--text-accent);
    text-decoration: none;
}

.info-table a:hover {
    text-decoration: underline;
}

/* 2025-01-18: 테이블 반응형 래퍼 */
.table-responsive {
    overflow-x: auto;
}

/* 2025-01-18: 테이블 텍스트 정렬 */
.info-table .text-center {
    text-align: center;
}

/* 2025-01-18: th 기본 두께 조정 */
.info-table th {
    font-weight: 500;
}

/* Info Card */
.info-card {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.info-card p {
    margin-bottom: 8px;
    font-size: var(--font-md);
}

.info-card p:last-child {
    margin-bottom: 0;
}

.info-card a {
    color: var(--text-accent);
    text-decoration: none;
}

.info-card a:hover {
    text-decoration: underline;
}

/* Lists */
.content-section ul {
    margin: 16px 0;
    padding-left: 24px;
}

.content-section ul li {
    margin-bottom: 4px;
    line-height: 1.6;
    color: var(--text-secondary);
    font-size: var(--font-md);
    list-style-type: '-  ';
}

.content-section ol {
    margin: 16px 0;
    padding-left: 24px;
}

.content-section ol li {
    margin-bottom: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
    font-size: var(--font-md);
}

.index-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.index-list li {
    background: var(--kjvr-gray);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: var(--font-md);
    color: var(--text-secondary);
}

/* Editorial Board */
.editor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.editor-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    transition: box-shadow 0.2s;
}

.editor-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.editor-card.editor-chief {
    background: linear-gradient(135deg, rgba(140, 0, 82, 0.08) 0%, rgba(140, 0, 82, 0.02) 100%);
    border: 1px solid rgba(140, 0, 82, 0.2);
}

.editor-card h4 {
    font-size: var(--font-md);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.editor-card .affiliation {
    font-size: var(--font-md);
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.editor-card .email {
    font-size: var(--font-md);
}

.editor-card .email a {
    color: var(--text-accent);
    text-decoration: none;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: var(--font-md);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: var(--font-md);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--kjvr-primary);
    box-shadow: 0 0 0 3px rgba(140, 0, 82, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.btn-submit {
    background: var(--kjvr-primary);
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: var(--font-md);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-submit:hover {
    background: #6a003f;
}

/* Policy Sections */
.policy-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--kjvr-gray);
}

.policy-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Sitemap */
.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.sitemap-section h4 {
    font-size: var(--font-lg);
    font-weight: 500;
    color: var(--kjvr-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--kjvr-primary);
}

.sitemap-section ul {
    list-style: none;
    padding: 0;
}

.sitemap-section ul li {
    margin-bottom: 10px;
}

.sitemap-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-md);
    transition: color 0.2s;
}

.sitemap-section ul li a:hover {
    color: var(--text-accent);
}

/* Responsive */
/* 2025-01-18: 참조 프로젝트 기준 1024px에서 사이드바 숨김, 히어로 표시 */
@media (max-width: 1024px) {
    .page-hero {
        display: block;
    }

    .page-sidebar {
        display: none;
    }

    .page-layout {
        display: block;
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding: 30px 0 20px;
    }

    .page-hero-inner {
        /* 2025-01-18: 컨텐츠 박스 내 텍스트와 좌측 여백 맞춤 (page-container 20px + page-body 20px) */
        padding: 0 40px;
    }

    .page-main {
        padding: 20px 0 40px;
    }

    .page-container {
        padding: 0 20px;
    }

    .page-title {
        font-size: var(--font-xl);
    }

    .page-body {
        padding: 20px;
    }

    .info-table th {
        width: 120px;
    }

    .editor-grid {
        grid-template-columns: 1fr;
    }

    .sitemap-grid {
        grid-template-columns: 1fr;
    }
}
