/* =========================================
   1. 고급 테마 컬러 및 폰트 변수
========================================= */
:root {
    --primary-color: #0f172a;
    /* 다크 네이비 */
    --accent-color: #c29d53;
    /* 브론즈 골드 */
    --text-main: #334155;
    --text-muted: #64748b;
    --bg-global: #f8fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

/* =========================================
   2. 기본 글로벌 스타일
========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    line-height: 1.75;
    color: var(--text-main);
    background-color: var(--bg-global);
}

a {
    text-decoration: none;
    transition: all 0.2s ease;
}

/* =========================================
   3. 헤더 및 GNB 네비게이션 (데스크톱 기준 표준 정의)
========================================= */
.site-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.02);
}

.header-container {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 80px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.hamburger-btn,
.close-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
    height: 100%;
    align-items: center;
}

.nav-item {
    position: relative;
    padding: 1rem 0.6rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 0.4rem;
    white-space: nowrap;
    display: block;
}

.nav-link:hover,
.nav-link.active-link {
    color: var(--primary-color);
}

/* 드롭다운 화살표 제거 요청 반영 */
.dropdown-toggle::after {
    content: '';
    display: inline-block;
}

/* =========================================
   3-1. 데스크톱 전용 GNB 인디케이터 및 드롭다운 (원복 및 보정)
========================================= */

@media (min-width: 768px) {

    /* [1] 모든 대메뉴(일반 메뉴 및 드롭다운 부모 메뉴 전체) 밑줄 기본 설정 */
    .nav-item .nav-link::after {
        content: '';
        position: absolute;
        bottom: 12px;
        left: 0.4rem;
        width: 0;
        height: 2px;
        background-color: var(--accent-color);
        transition: width 0.25s ease;
    }

    /* 
       [2] 대메뉴 밑줄이 활성화되는 조건:
       - 마우스를 올렸을 때 (:hover)
       - 자기 자신이 활성화되었을 때 (.active-link)
       - 드롭다운 하위 메뉴 중 하나라도 활성화되어 부모에게 .active 클래스가 붙었을 때 (밑줄 유지 핵심)
    */
    .nav-item:hover .nav-link::after,
    .nav-item .nav-link.active-link::after,
    .nav-item.dropdown.active .nav-link::after {
        width: calc(100% - 0.8rem);
    }

    /* 드롭다운 부모 메뉴가 활성화 되었을 때 글자 색상도 강조 */
    .nav-item.dropdown.active .nav-link {
        color: var(--primary-color);
    }

    /* [3] 데스크톱 프리미엄 드롭다운 메뉴 바디 */
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%) translateY(15px);
        background-color: var(--white);
        min-width: 240px;
        border: 1px solid rgba(15, 23, 42, 0.08);
        border-top: 3px solid var(--accent-color);
        border-radius: 0 0 8px 8px;
        box-shadow: 0 15px 35px rgba(15, 23, 42, 0.12);
        padding: 1rem 0;

        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
            transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
            visibility 0.25s;
        pointer-events: none;
    }

    /* [4] 드롭다운 내부 링크 (기본 상태) */
    .dropdown-menu a {
        display: block !important;
        padding: 0.8rem 2rem !important;
        font-size: 0.88rem;
        color: #475569;
        font-weight: 500;
        letter-spacing: 0.5px;
        text-align: left;
        position: relative;
        box-sizing: border-box;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* [5] 드롭다운 내부 active-link 활성화 상태 (글씨 굵게 & 골드 색상 보장) */
    .dropdown-menu a.active-link {
        font-weight: 700 !important;
        color: var(--accent-color) !important;
    }

    /* [6] 드롭다운 호버 상태 */
    .dropdown-menu a:hover {
        background-color: #f8fafc;
        color: var(--accent-color) !important;
        padding-left: 2.4rem !important;
    }

    /* [7] 호버 시 좌측 세로선 인디케이터 */
    .dropdown-menu a::before {
        content: '';
        position: absolute;
        left: 1.2rem;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 0;
        background-color: var(--accent-color);
        border-radius: 2px;
        transition: height 0.25s ease;
    }

    .dropdown-menu a:hover::before {
        height: 14px;
    }

    .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
        pointer-events: auto;
    }
}

/* =========================================
   4. 레이아웃 시스템 및 본문 카드 스타일
========================================= */
.container.main-content {
    max-width: 1240px;
    margin: 4rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 2.5rem;
}

.container.main-content-single {
    max-width: 900px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.card-section {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.01);
    margin-bottom: 2rem;
}

.center-section {
    text-align: center;
    padding: 5rem 2rem;
}

h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-color);
}

h3::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
}

.center-section h3::after {
    left: 50%;
    transform: translateX(-50%);
}

.lead-text {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.welcome-section p:not(:last-child) {
    margin-bottom: 1.75rem;
}

.sub-section-title {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: var(--white);
    text-align: center;
    padding: 6rem 2rem;
}

.hero .hero-subtitle {
    font-size: 0.95rem;
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
}

.hero h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.hero-meta .meta-item {
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
}

/* =========================================
   5. 컴포넌트 스타일 (테이블, 리스트, 박스 등)
========================================= */
.bronze-box {
    margin-top: 2rem;
    padding: 2rem;
    background-color: #fdfbf7;
    border-left: 4px solid var(--accent-color);
    border-radius: 0 8px 8px 0;
    text-align: left;
}

.centered-box {
    display: inline-block;
    max-width: 650px;
    margin: 2rem auto 0;
}

.box-title {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.venue-map {
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-top: 2rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #f1f5f9;
}

.venue-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.large-title {
    font-size: 1.6rem;
    color: var(--accent-color);
    text-align: center;
}

.chair-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
}

.chair-dept {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.box-subtitle {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.contact-list,
.styled-list {
    list-style: none;
}

.contact-list li,
.styled-list li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.contact-list li::before,
.styled-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.bullet-list {
    list-style-type: square;
    padding-left: 1.5rem;
}

.bullet-list li {
    margin-bottom: 0.7rem;
}

.news-list {
    list-style: none;
}

.news-list li {
    padding: 0.5rem 0 0.5rem 1rem;
    border-left: 2px solid var(--accent-color);
}

.news-date {
    display: block;
    font-weight: 600;
    color: var(--accent-color);
    font-size: 0.85rem;
}

.table-responsive {
    overflow-x: auto;
    margin-top: 1.5rem;
}

.program-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    font-size: 0.95rem;
}

.program-table th {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 500;
    padding: 14px;
    border: 1px solid var(--border-color);
}

.program-table td {
    padding: 14px;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.date-cell {
    font-weight: 600;
    color: var(--primary-color);
    background-color: #f8fafc;
    text-align: center;
}

.center-cell {
    text-align: center;
}

.highlight-cell {
    background-color: #fdfbf7;
    font-weight: 500;
    color: var(--accent-color);
}

.placeholder-box {
    padding: 4rem 2rem;
    background-color: var(--bg-global);
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    color: var(--text-muted);
}

.primary-headline {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.logo-grid {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.logo-placeholder-item {
    width: 200px;
    height: 90px;
    background-color: #f1f5f9;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.logo-placeholder-item:hover {
    border-color: var(--accent-color);
    background-color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.text-center {
    text-align: center;
}

.muted-text {
    color: var(--text-muted);
}

.notice-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 1rem;
}

/* =========================================
   6. 푸터 시스템
========================================= */
footer {
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.5);
    padding: 3rem 1rem;
    text-align: center;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container p {
    margin-bottom: 0.4rem;
}

/* =========================================
   7. 반응형 미디어 쿼리 (모바일 제어구간)
========================================= */
@media (max-width: 767px) {
    .hamburger-btn {
        display: block;
        color: var(--primary-color);
        font-size: 1.8rem;
    }

    .close-btn {
        display: block;
        color: var(--white);
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 2.2rem;
    }

    /* 우측 슬라이드형 사이드 바 */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        left: auto;
        width: 300px;
        height: 100vh;
        background-color: rgba(15, 23, 42, 0.98);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 6rem 2rem 2rem 2rem;
        gap: 1.2rem;
        /* 대메뉴간 여백 확보 */
        z-index: 2000;
        overflow-y: auto;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-item {
        width: 100%;
        padding: 0;
        text-align: left;
    }

    .nav-link {
        color: rgba(255, 255, 255, 0.85);
        font-size: 1.1rem;
        padding: 0.6rem 0.5rem;
        margin-bottom: 0.2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-link::after {
        display: none !important;
    }

    .nav-link:hover,
    .nav-link.active-link {
        color: var(--accent-color);
    }

    /* 모바일 아코디언 드롭다운 세로 정렬 및 간격 강제 */
    .dropdown-menu {
        position: static;
        transform: none !important;
        background-color: rgba(255, 255, 255, 0.04);
        box-shadow: none;
        border: none;
        border-radius: 0;
        width: 100%;
        padding: 0.5rem 0 !important;
        display: none;
        flex-direction: column !important;
        gap: 0.6rem !important;
        /* 서브메뉴간 여백 확보 */
    }

    .dropdown-menu.show {
        display: flex !important;
        /* 강제 세로 나열 작동 */
    }

    .dropdown-menu a {
        display: block !important;
        width: 100%;
        color: rgba(255, 255, 255, 0.7) !important;
        text-align: left;
        padding: 0.6rem 1.5rem !important;
        font-size: 0.95rem;
        border-bottom: none !important;
        box-sizing: border-box;
    }

    .dropdown-menu a::before {
        display: none !important;
    }

    .dropdown-menu a:hover {
        background-color: rgba(255, 255, 255, 0.02) !important;
        color: var(--accent-color) !important;
        padding-left: 1.5rem !important;
    }
}

/* --- 태블릿: 가로 메뉴를 유지하면서 간격 축소 --- */
@media (min-width: 768px) and (max-width: 1024px) {
    .header-container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    .nav-menu {
        gap: 0.1rem;
    }

    .nav-item {
        padding: 1rem 0.25rem;
    }

    .nav-link {
        padding: 0.5rem 0.2rem;
        font-size: 0.8rem;
        letter-spacing: 0.2px;
    }
}

/* --- 중형 태블릿 분기점 --- */
@media (max-width: 992px) {
    .container.main-content {
        grid-template-columns: 1fr;
        margin: 2rem auto;
    }
}

/* --- 스마트폰 모바일 분기점 --- */
@media (max-width: 767px) {
    .header-container {
        height: 70px;
        padding: 0 1.2rem;
    }

    .logo {
        font-size: 1.4rem;
    }

    .hero {
        padding: 4rem 1rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .card-section {
        padding: 2rem 1.5rem;
    }

    .venue-map {
        aspect-ratio: 4 / 3;
    }
}
