/* === 1. 기본 및 전체 디자인 설정 === */
:root {
    --primary-color: #0d47a1; /* 더 깊은 파란색 */
    --secondary-color: #f2a900;
    --text-color: #333;
    --light-gray: #f8f9fa;
    --border-color: #e9ecef;
    --header-height: 80px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Roboto', 'Noto Sans KR', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { color: var(--primary-color); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
h1, h2, h3, h4 { margin-bottom: 1rem; font-weight: 700; line-height: 1.3; }

/* === 2. 요소별 섹션 디자인 === */

/* --- 최상단 바 --- */
.top-bar { background-color: #f1f1f1; padding: 8px 0; font-size: 0.9em; text-align: right; }

/* --- 헤더 --- */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 1000;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}
.logo img { height: 45px; }

/* --- 네비게이션 메뉴 --- */
.main-nav > ul { display: flex; gap: 5px; }
.main-nav li { position: relative; }
.main-nav li a {
    padding: 10px 15px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}
.main-nav li a:hover, .main-nav li a.active {
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
}
.submenu {
    display: none;
    position: absolute;
    top: 100%; left: 0;
    background-color: #fff;
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    min-width: 240px;
    padding: 5px;
    border-radius: 0 0 5px 5px;
}
.main-nav li:hover .submenu { display: block; }
.submenu a {
    font-weight: 400;
    text-transform: none;
    white-space: nowrap;
    width: 100%;
    display: block;
}
.menu-toggle { display: none; }

/* --- 메인 비주얼 (히어로 섹션) --- */
.hero-section { position: relative; text-align: center; color: white; background-color: #333; }
.hero-section img { width: 100%; height: 450px; object-fit: cover; opacity: 0.8; }
.hero-text {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 47, 85, 0.75);
    padding: 2rem 3rem;
    border-radius: 5px;
    width: 90%; max-width: 900px;
}
.hero-text h1 { font-size: 2.5rem; }
.hero-text p { font-size: 1.25rem; margin-top: 0.5rem; }

/* --- 메인 콘텐츠 (소개, 중요날짜) --- */
.main-content { padding: 50px 0; }
.content-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 50px; }
.primary-content h2 { color: var(--primary-color); border-bottom: 2px solid var(--border-color); padding-bottom: 10px; }
.topics-list li { list-style-type: '✓'; padding-left: 10px; margin-bottom: 8px; }

.sidebar .widget {
    background: var(--light-gray);
    padding: 25px;
    border-radius: 5px;
    margin-bottom: 30px;
    border-left: 4px solid var(--primary-color);
}
.sidebar .widget h3 { margin-top: 0; border-bottom: 1px solid #ddd; padding-bottom: 10px; }
.dates-list li { margin-bottom: 10px; }

/* --- 스폰서 --- */
.sponsors { background: var(--light-gray); padding: 50px 0; text-align: center; }
.sponsors h3 { color: #555; }
.sponsor-logos { display: flex; justify-content: center; align-items: center; gap: 50px; flex-wrap: wrap; margin-top: 25px; }
.sponsor-logos img { height: 50px; filter: grayscale(100%); opacity: 0.7; transition: all 0.3s; }
.sponsor-logos img:hover { filter: grayscale(0%); opacity: 1; }

/* --- 푸터 --- */
.site-footer { background: #2c3e50; color: #bdc3c7; padding: 40px 0; font-size: 0.95em; }
.site-footer a { color: #ecf0f1; }
.site-footer .container { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.footer-info p { margin-bottom: 8px; }
.footer-links h4 { color: #fff; margin-bottom: 15px; }
.footer-links li { margin-bottom: 8px; }

/* === 3. 반응형 (모바일) 디자인 === */
@media (max-width: 992px) {
    .content-grid { grid-template-columns: 1fr; }
    .hero-text h1 { font-size: 2rem; }
}

@media (max-width: 768px) {
    :root { --header-height: 60px; }
    .site-header .container { flex-wrap: wrap; }
    .main-nav { order: 3; width: 100%; margin-top: 10px; }
    .main-nav > ul { display: none; flex-direction: column; gap: 5px; }
    .main-nav > ul.active { display: flex; } /* 스크립트로 제어 */
    .submenu {
        position: static; display: block; border: none; box-shadow: none;
        background-color: var(--light-gray); padding-left: 20px;
    }
    .menu-toggle {
        display: block;
        background: none; border: 1px solid #ccc;
        color: #333; padding: 8px 12px; border-radius: 4px;
        font-size: 1.2rem; cursor: pointer;
    }
    .hero-text { padding: 1.5rem; }
    .hero-text h1 { font-size: 1.6rem; }
    .hero-text p { font-size: 1rem; }
    .site-footer .container { grid-template-columns: 1fr; }
}