/* ============================================================
   childrensday/style.css
   2026 어린이날 축제 전용 스타일
   (해피사이언스의 디자인 시스템을 공유 없이 독립 재현)
   ============================================================ */

:root {
    --cd-bg:          #ffffff;
    --cd-surface:     #f7f8fa;
    --cd-border:      #e0e0e0;

    --cd-primary:     #2c6fbb;
    --cd-primary-d:   #1a4f8a;
    --cd-secondary:   #e74c3c;
    --cd-accent:      #f39c12;
    --cd-green:       #27ae60;

    --cd-text:        #333333;
    --cd-muted:       #666666;
    --cd-light:       #999999;

    --cd-nav-h:       64px;
    --cd-radius:      6px;
    --cd-shadow:      0 2px 12px rgba(0, 0, 0, 0.08);
    --cd-shadow-hover:0 4px 20px rgba(44, 111, 187, 0.12);

    --cd-font:        'Noto Sans KR', 'Pretendard', sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--cd-nav-h); }
body {
    font-family: var(--cd-font);
    background: var(--cd-bg);
    color: var(--cd-text);
    font-size: 16px;
    line-height: 1.7;
    min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
a { color: var(--cd-primary); text-decoration: none; }
a:hover { color: var(--cd-primary-d); }

/* ---------- 네비게이션 (해피사이언스와 동일한 블랙 톤) ---------- */
.cd-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--cd-nav-h);
    background: #111111;
    border-bottom: 1px solid #333333;
    z-index: 1000;
    display: flex;
    align-items: center;
}
.cd-nav__inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 32px;
}
.cd-nav__brand {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 900;
    flex-shrink: 0;
    letter-spacing: -0.5px;
}
.cd-nav__brand-year {
    color: var(--cd-accent);
    font-weight: 900;
}
.cd-nav__brand:hover { color: #ffffff; opacity: 0.88; }
.cd-nav__menu {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: auto;
}
.cd-nav__item {
    position: relative;
    padding-bottom: 12px;
    margin-bottom: -12px;
}
.cd-nav__link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 20px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--cd-radius);
    transition: all 0.2s;
    white-space: nowrap;
}
.cd-nav__link:hover,
.cd-nav__link.is-active {
    color: var(--cd-primary);
    background: rgba(255, 255, 255, 0.1);
}
.cd-nav__link .arrow {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.2s;
}
.cd-nav__item:hover .cd-nav__link .arrow { transform: rotate(180deg); }

/* 드롭다운 — hover gap 보완용 ::before 포함 */
.cd-nav__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0px);
    left: 0;
    min-width: 200px;
    padding-top: 0;
    z-index: 100;
    background: #222222;
    border: 1px solid #444444;
    border-radius: var(--cd-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}
.cd-nav__item:hover .cd-nav__dropdown,
.cd-nav__item:focus-within .cd-nav__dropdown { display: block; }

.cd-nav__dropdown li a {
    display: block;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 400;
    border-bottom: 1px solid #333333;
    transition: all 0.2s;
}
.cd-nav__dropdown li:last-child a { border-bottom: none; }
.cd-nav__dropdown li a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    padding-left: 22px;
}

/* 햄버거 버튼 (데스크톱에서는 숨김) */
.cd-nav__hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0;
    z-index: 1100;
}
.cd-nav__hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.cd-nav__hamburger.is-open .cd-nav__hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.cd-nav__hamburger.is-open .cd-nav__hamburger-line:nth-child(2) {
    opacity: 0;
}
.cd-nav__hamburger.is-open .cd-nav__hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* 모바일 오버레이 */
.cd-nav__overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}
.cd-nav__overlay.is-visible { display: block; }

/* 메뉴 열림 시 바디 스크롤 잠금 */
html.cd-menu-open { overflow: hidden; }
html.cd-menu-open body { overflow: hidden; }

/* ---------- 본문 ---------- */
main { margin-top: var(--cd-nav-h); }

.cd-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.cd-section { padding: 64px 0; }

/* ---------- 페이지 헤더 ---------- */
.cd-page-header {
    padding: 48px 0 32px;
    border-bottom: 2px solid var(--cd-border);
    margin-bottom: 48px;
}
.cd-page-header__breadcrumb {
    font-size: 0.8rem;
    color: var(--cd-light);
    margin-bottom: 12px;
}
.cd-page-header__breadcrumb span {
    margin: 0 6px;
    color: #ccc;
}
.cd-page-header__title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--cd-text);
}
.cd-page-header__title em {
    color: var(--cd-primary);
    font-style: normal;
}
.cd-page-header__note {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--cd-secondary);
    font-weight: 600;
}

/* ---------- 섹션 타이틀 ---------- */
.cd-section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--cd-text);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--cd-border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.cd-section-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 24px;
    background: var(--cd-primary);
    border-radius: 2px;
}
.cd-sub-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--cd-primary);
    margin-bottom: 16px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cd-sub-title::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--cd-primary);
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---------- 그리드 ---------- */
.cd-grid { display: grid; gap: 24px; }
.cd-grid--2 { grid-template-columns: repeat(2, 1fr); }
.cd-grid--3 { grid-template-columns: repeat(3, 1fr); }
.cd-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .cd-grid--2, .cd-grid--3, .cd-grid--4 { grid-template-columns: 1fr; } }

/* ---------- 카드 ---------- */
.cd-card {
    background: #ffffff;
    border: 1px solid var(--cd-border);
    border-radius: var(--cd-radius);
    overflow: hidden;
    transition: all 0.3s;
}
.cd-card:hover {
    border-color: var(--cd-primary);
    box-shadow: var(--cd-shadow-hover);
    transform: translateY(-2px);
}
.cd-card--static:hover { transform: none; border-color: var(--cd-border); box-shadow: none; }
.cd-card__body { padding: 20px 24px; }

/* ---------- 테이블 ---------- */
.cd-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--cd-border);
    border-radius: var(--cd-radius);
}
.cd-table {
    width: 100%;
    border-collapse: collapse;
}
.cd-table th,
.cd-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--cd-border);
    font-size: 0.9rem;
    vertical-align: top;
}
.cd-table th {
    background: var(--cd-surface);
    color: var(--cd-primary);
    font-weight: 700;
    white-space: nowrap;
}
.cd-table td { color: var(--cd-text); }
.cd-table tbody tr:last-child td,
.cd-table tbody tr:last-child th { border-bottom: none; }
.cd-table tr:hover td { background: #f9fbfd; }

/* ---------- 정보 박스 ---------- */
.cd-info {
    background: var(--cd-surface);
    border-left: 4px solid var(--cd-primary);
    border-radius: 0 var(--cd-radius) var(--cd-radius) 0;
    padding: 20px 24px;
    margin: 24px 0;
}
.cd-info--warning {
    border-color: var(--cd-accent);
    background: #fffcf0;
}
.cd-info__title {
    font-weight: 700;
    color: var(--cd-primary);
    margin-bottom: 8px;
}
.cd-info--warning .cd-info__title { color: var(--cd-accent); }

/* ---------- 배지 ---------- */
.cd-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.cd-badge--primary   { background: var(--cd-primary);   color: #fff; }
.cd-badge--secondary { background: var(--cd-secondary); color: #fff; }
.cd-badge--accent    { background: var(--cd-accent);    color: #fff; }
.cd-badge--outline {
    background: rgba(44, 111, 187, 0.08);
    border: 1px solid var(--cd-primary);
    color: var(--cd-primary);
}

/* ---------- Coming Soon (비활성 버튼 대체) ---------- */
.cd-coming {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 28px;
    background: #eceef2;
    color: var(--cd-muted);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 2px;
    border-radius: 999px;
    text-transform: uppercase;
    user-select: none;
    cursor: not-allowed;
    border: 1px dashed #cdd3db;
}

/* ---------- 회차 슬롯 (체험 프로그램) ---------- */
.cd-slot {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    margin-top: 20px;
}
.cd-slot__cell {
    background: #ffffff;
    border: 1px solid var(--cd-border);
    border-radius: var(--cd-radius);
    padding: 16px 10px;
    text-align: center;
    transition: all 0.2s;
}
.cd-slot__cell:hover {
    border-color: var(--cd-primary);
    box-shadow: var(--cd-shadow);
}
.cd-slot__label {
    display: block;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--cd-secondary);
    margin-bottom: 4px;
}
.cd-slot__time {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cd-text);
}
@media (max-width: 900px) { .cd-slot { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .cd-slot { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 프로그램 행 (야외무대) ---------- */
.cd-program-list { display: flex; flex-direction: column; gap: 10px; }
.cd-program-row {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 18px 24px;
    background: #ffffff;
    border: 1px solid var(--cd-border);
    border-radius: var(--cd-radius);
    transition: all 0.2s;
}
.cd-program-row:hover {
    border-color: var(--cd-primary);
    box-shadow: var(--cd-shadow);
}
.cd-program-row__time {
    font-size: 1rem;
    font-weight: 800;
    color: var(--cd-primary);
}
.cd-program-row__name {
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--cd-text);
}
@media (max-width: 720px) {
    .cd-program-row { grid-template-columns: 1fr; gap: 6px; }
    .cd-program-row > .cd-badge { justify-self: start; }
}

/* ---------- 전동차 회차 블록 ---------- */
.cd-rounds {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
@media (max-width: 1100px) { .cd-rounds { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .cd-rounds { grid-template-columns: 1fr; } }

.cd-round {
    background: #ffffff;
    border: 1px solid var(--cd-border);
    border-radius: var(--cd-radius);
    overflow: hidden;
    transition: all 0.2s;
}
.cd-round:hover {
    border-color: var(--cd-primary);
    box-shadow: var(--cd-shadow);
}
.cd-round__head {
    padding: 14px 16px;
    background: var(--cd-primary);
    color: #ffffff;
}
.cd-round__session {
    font-size: 0.72rem;
    font-weight: 800;
    opacity: 0.88;
    letter-spacing: 1px;
}
.cd-round__time {
    font-size: 1rem;
    font-weight: 800;
    margin-top: 2px;
}
.cd-round__body { padding: 8px 0; }
.cd-round__row {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--cd-border);
}
.cd-round__row:last-child { border-bottom: none; }
.cd-round__lap { color: var(--cd-muted); font-weight: 600; }
.cd-round__laptime { color: var(--cd-text); }

/* ---------- 이벤트 카드 (공연·강연) ---------- */
.cd-event-card {
    position: relative;
    padding: 28px 24px 24px 28px;
    background: #ffffff;
    border: 1px solid var(--cd-border);
    border-radius: var(--cd-radius);
    transition: all 0.3s;
    overflow: hidden;
}
.cd-event-card::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 0;
    width: 4px;
    height: 40px;
    background: var(--cd-primary);
    border-radius: 0 2px 2px 0;
}
.cd-event-card:hover {
    border-color: var(--cd-primary);
    box-shadow: var(--cd-shadow-hover);
    transform: translateY(-2px);
}
.cd-event-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.cd-event-card__icon {
    font-size: 2rem;
    line-height: 1;
}
.cd-event-card__title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--cd-text);
    margin-bottom: 6px;
}
.cd-event-card__sub {
    font-size: 0.9rem;
    color: var(--cd-muted);
    margin-bottom: 14px;
}
.cd-event-card__time {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(44, 111, 187, 0.08);
    border: 1px solid var(--cd-primary);
    color: var(--cd-primary);
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 20px;
    margin-bottom: 16px;
}
.cd-event-card__footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

/* ---------- 도면 플레이스홀더 ---------- */
.cd-floorplan {
    position: relative;
    width: 100%;
    min-height: 360px;
    background: var(--cd-surface);
    border: 2px dashed var(--cd-border);
    border-radius: var(--cd-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
}
.cd-floorplan__icon { font-size: 2.8rem; margin-bottom: 12px; opacity: 0.6; }
.cd-floorplan__label {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--cd-primary);
    margin-bottom: 6px;
}
.cd-floorplan__note { font-size: 0.9rem; color: var(--cd-muted); margin-bottom: 18px; }

/* ---------- 맵 이미지 ---------- */
.cd-map-img {
    width: 100%;
    border: 1px solid var(--cd-border);
    border-radius: var(--cd-radius);
}

/* ---------- 푸터 ---------- */
.cd-footer {
    padding: 32px 0;
    background: #fafbfc;
    border-top: 1px solid var(--cd-border);
    text-align: center;
    font-size: 0.875rem;
    color: var(--cd-muted);
}
.cd-footer strong { color: var(--cd-text); font-weight: 700; }

/* ---------- 반응형 ---------- */
@media (max-width: 720px) {
    .cd-nav__inner { padding: 0 16px; gap: 16px; }
    .cd-container { padding: 0 16px; }
    .cd-page-header { padding: 32px 0 24px; margin-bottom: 32px; }
    .cd-page-header__title { font-size: 1.5rem; }
    .cd-section { padding: 40px 0; }

    /* 햄버거 표시 */
    .cd-nav__hamburger { display: flex; }

    /* 모바일 드로어 메뉴 (우측에서 슬라이드) */
    .cd-nav__menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        position: fixed;
        top: 0;
        right: 0;
        width: 260px;
        max-width: 80vw;
        height: 100vh;
        padding: calc(var(--cd-nav-h) + 12px) 0 24px;
        background: #111111;
        z-index: 1050;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        box-shadow: -4px 0 16px rgba(0, 0, 0, 0.3);
        margin-left: 0;
    }
    .cd-nav__menu.is-open { transform: translateX(0); }

    .cd-nav__item {
        padding-bottom: 0;
        margin-bottom: 0;
        border-bottom: 1px solid #333333;
        width: 100%;
    }
    .cd-nav__link {
        padding: 14px 22px;
        font-size: 0.95rem;
        width: 100%;
        justify-content: flex-start;
        text-align: left;
        border-radius: 0;
    }
    .cd-nav__link:hover,
    .cd-nav__link.is-active {
        background: rgba(255, 255, 255, 0.08);
    }
}
