/* ============================================================
   새 사이트 테마 (Uni 스타일 참고)
   - 크림 배경 + 오렌지 포인트 + 네이비 텍스트
   - 상단 네비게이션 + 모바일 슬라이드 사이드바
   ============================================================ */

:root {
    /* Azure Blue 팔레트 (docs/색상컨셉03.html) */
    --c-bg: #F5EEDF;
    --c-surface: #FCF7EC;
    --c-surface-alt: #ECE2CE;
    --c-primary: #3A6EA4;
    --c-primary-deep: #2A5179;
    --c-secondary: #8FA06B;
    --c-accent: #F2C03E;
    --c-ink: #243240;
    --c-muted: #6E7178;
    --c-border: #E4D9C3;
    --c-tint: #E9F0F7; /* primary의 옅은 배경(호버 등) */

    /* 호환용 별칭 — 이전 테마 변수명을 쓰는 페이지 CSS 지원 */
    --c-cream: var(--c-bg);
    --c-cream-light: var(--c-surface);
    --c-navy: var(--c-ink);
    --c-navy-soft: var(--c-muted);
    --c-orange: var(--c-primary);
    --c-orange-dark: var(--c-primary-deep);
    --c-yellow: var(--c-accent);
    --c-purple: var(--c-secondary);
    --c-pink: var(--c-accent);
    --c-blue: var(--c-primary);
    --c-line: var(--c-border);

    --c-outside: #E6DECF;
    --font-head: 'Poppins', 'Noto Sans KR', sans-serif;
    --font-body: 'Noto Sans KR', sans-serif;
    --font-menu: 'Gowun Dodum', 'Noto Sans KR', sans-serif;
    --header-h: 76px;
    --content-max: 1400px;

    /* ── 디자인 시스템 토큰 (디자인개선plan.md 3장) ──
       추가만 한 것이라 기존 화면에는 영향 없음. 페이지 리디자인에서 참조. */
    /* 간격 스케일 (4px 베이스) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-8: 48px;
    /* 반경 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 999px;
    /* 그림자 */
    --shadow-1: 0 1px 2px rgba(36, 50, 64, .06), 0 1px 3px rgba(36, 50, 64, .08);
    --shadow-2: 0 6px 20px rgba(36, 50, 64, .10);
    --shadow-3: 0 14px 35px rgba(36, 50, 64, .14);
    /* 포커스 링 */
    --ring: 0 0 0 3px rgba(58, 110, 164, .22);
}

html,
body {
    /* 콘텐츠(최대 1400px) 바깥 영역 배경 */
    background-color: var(--c-outside);
}

body {
    font-family: var(--font-body);
    color: var(--c-navy);
}

/* ------------------------------------------------------------
   상단 헤더 / 네비게이션
------------------------------------------------------------ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 2500;
    width: 100%;
    background: var(--c-cream-light);
    border-bottom: 1px solid var(--c-line);
}

.site-header-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    height: var(--header-h);
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 28px;
    box-sizing: border-box;
}

/* 로고 */
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--c-navy);
    flex-shrink: 0;
}

.site-logo-mark {
    width: 40px;
    height: 40px;
    display: block;
}

.site-logo-text {
    line-height: 1.05;
}

.site-logo-title {
    font-family: var(--font-head);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.site-logo-sub {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--c-navy-soft);
    letter-spacing: 0.5px;
}

/* 데스크톱 네비 */
.main-nav {
    display: flex;
    align-items: center;
    gap: 34px;
    margin-left: auto;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 0;
    font-size: 1.02rem;
    font-weight: 500;
    color: var(--c-navy);
    text-decoration: none;
    border-radius: 8px;
    transition: color 0.15s;
    background: none;
    border: none;
    font-family: var(--font-menu);
    cursor: pointer;
}

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

/* 드롭다운 */
.nav-item {
    position: relative;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 230px;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: 12px;
    box-shadow: 0 14px 35px rgba(31, 35, 51, 0.12);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 2600;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown a {
    display: block;
    padding: 10px 14px;
    font-family: var(--font-menu);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--c-navy);
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.12s, color 0.12s;
}

.nav-dropdown a:hover,
.nav-dropdown a.active {
    background: var(--c-tint);
    color: var(--c-orange);
}

/* 우측 액션 (로그인 등) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header-nickname {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--c-navy-soft);
    white-space: nowrap;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: var(--c-orange);
    color: #fff;
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, transform 0.1s;
}

.btn-cta:hover {
    background: var(--c-orange-dark);
}

.btn-cta:active {
    transform: scale(0.97);
}

/* 로그아웃 — 작고 둥근 버튼 */
.btn-logout {
    padding: 8px 18px;
    font-size: 0.85rem;
    border-radius: 18px;
}

/* 카카오 로그인 이미지 버튼 */
.kakao-login-link {
    display: inline-flex;
    flex-shrink: 0;
}

.kakao-login-link:active {
    transform: scale(0.97);
}

.kakao-login-img {
    height: 40px;
    width: auto;
    display: block;
    border-radius: 6px;
}

.kakao-login-img-wide {
    width: auto;
    height: 44px;
    display: block;
    border-radius: 8px;
    margin: 0 auto;
}

.msb-logout {
    align-self: center;
}

/* 햄버거 (모바일) */
.nav-burger {
    display: none;
    width: 42px;
    height: 42px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.nav-burger-icon {
    width: 28px;
    height: 28px;
    display: block;
}

/* ------------------------------------------------------------
   모바일 사이드바
------------------------------------------------------------ */

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -85vw;
    width: 78vw;
    max-width: 330px;
    height: 100vh;
    height: 100dvh;
    background: var(--c-cream-light);
    box-shadow: 4px 0 28px rgba(31, 35, 51, 0.18);
    z-index: 3100;
    transition: left 0.25s ease;
    padding: 22px 18px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mobile-sidebar.open {
    left: 0;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(31, 35, 51, 0.45);
    z-index: 3050;
}

.sidebar-overlay.show {
    display: block;
}

.mobile-sidebar .site-logo {
    margin-bottom: 18px;
}

.msb-divider {
    font-family: var(--font-menu);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--c-orange);
    margin: 18px 6px 6px;
}

.msb-link {
    display: block;
    padding: 11px 12px;
    font-family: var(--font-menu);
    font-size: 1rem;
    font-weight: 500;
    color: var(--c-navy);
    text-decoration: none;
    border-radius: 8px;
}

.msb-link:hover,
.msb-link.active {
    background: var(--c-tint);
    color: var(--c-orange);
}

.msb-auth {
    margin-top: auto;
    padding-top: 22px;
    border-top: 1px solid var(--c-line);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msb-nickname {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--c-navy);
}

/* ------------------------------------------------------------
   본문 공통
------------------------------------------------------------ */

.app-shell {
    flex: 1;
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    min-height: calc(100vh - var(--header-h));
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    background: var(--c-cream);
    box-shadow: 0 0 36px rgba(31, 35, 51, 0.07);
}

/* 섹션 공통 도우미 (인덱스 외 페이지에서도 사용 가능) */
.section-eyebrow {
    font-family: var(--font-head);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--c-navy);
    text-align: center;
    margin: 0 0 14px;
}

.section-title {
    font-family: var(--font-head);
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 600;
    letter-spacing: -1px;
    color: var(--c-navy);
    text-align: center;
    margin: 0 0 50px;
    line-height: 1.15;
}

.btn-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 34px;
    background: var(--c-primary-deep);
    color: #fff;
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-dark:hover {
    background: #1F3D5C;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: transparent;
    color: var(--c-orange);
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--c-orange);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.btn-outline:hover {
    background: var(--c-orange);
    color: #fff;
}

/* ------------------------------------------------------------
   사이트 푸터
------------------------------------------------------------ */

.site-footer {
    background: var(--c-primary-deep);
    color: #C3D0DD;
    padding: 46px 24px 30px;
}

.site-footer-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-brand-title {
    font-family: var(--font-head);
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}

.footer-brand-desc {
    font-size: 0.88rem;
    margin: 0;
    max-width: 360px;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links-title {
    font-family: var(--font-menu);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--c-accent);
    margin: 0 0 4px;
}

.footer-links a {
    color: #C3D0DD;
    font-family: var(--font-menu);
    font-size: 0.9rem;
    text-decoration: none;
}

.footer-links a:hover {
    color: #fff;
}

.site-footer-bottom {
    max-width: var(--content-max);
    margin: 34px auto 0;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    font-size: 0.82rem;
    color: #9FB3C6;
}

.site-footer-bottom a {
    color: #9FB3C6;
    text-decoration: none;
}

.site-footer-bottom a:hover {
    color: #fff;
}

/* ------------------------------------------------------------
   반응형
------------------------------------------------------------ */

@media (max-width: 1024px) {
    .main-nav {
        display: none;
    }

    .nav-burger {
        display: flex;
    }

    /* 모바일: 로그인/로그아웃은 사이드바에서, 햄버거만 우측 끝에 */
    .header-actions {
        margin-left: auto;
    }

    .header-actions .btn-cta,
    .header-actions .kakao-login-link,
    .header-actions .header-nickname {
        display: none;
    }

    .site-header-inner {
        height: 64px;
        padding: 0 16px;
    }

    :root {
        --header-h: 64px;
    }
}
