/**
 * 노선 안내 · planer 등 공통 레이아웃 CSS
 * Bootstrap 미사용 · 순수 HTML/CSS
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a56db;
    --primary-dark: #1341b0;
    --accent: #f0a500;
    --dark: #0d1b2a;
    --text: #333;
    --light-bg: #f4f7fc;
    --white: #fff;
    --shadow: 0 4px 24px rgba(26, 86, 219, 0.10);
    --content-max: 900px;
}

body {
    font-family: 'Segoe UI', 'Noto Sans KR', sans-serif;
    color: var(--text);
    background: var(--white);
}

body.nav-open {
    overflow: hidden;
}

/* ── 네비게이션 (상단 기본 메뉴) ── */
nav.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(13, 27, 42, 0.92);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    height: 64px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-logo span.accent {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

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

.nav-cta {
    background: var(--primary);
    color: var(--white) !important;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600 !important;
    transition: background 0.2s !important;
}

.nav-cta:hover {
    background: var(--primary-dark) !important;
    color: var(--white) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.pub-routes-main,
.pub-site-main {
    padding-top: 64px;
}

.section-label {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 12px;
}

.section-title {
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
}

.section-sub {
    text-align: center;
    color: #666;
    font-size: 1rem;
    margin-bottom: 48px;
}

/* ── 노선 섹션 ── */
.routes-section {
    padding: 80px 24px;
    background: var(--light-bg);
}

.routes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: var(--content-max);
    margin: 0 auto;
    width: 100%;
}

/* planer · 기타 단일 박스 — routes-grid 와 동일 폭 */
.routes-grid.routes-grid-single {
    display: block;
    grid-template-columns: none;
}

.route-card {
    background: var(--white);
    border-radius: 14px;
    padding: 28px 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s;
}

.route-card:hover {
    box-shadow: var(--shadow);
}

.route-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.route-badge {
    background: #e8f0fe;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
}

.route-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
}

.route-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}

.route-detail {
    font-size: 0.88rem;
    color: #777;
}

.route-arrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0;
    font-size: 0.9rem;
    color: #555;
}

.route-arrow span.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

.route-arrow span.line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, var(--primary), var(--accent));
}

/* ── 통계 배너 ── */
.stats-banner {
    background: linear-gradient(90deg, #0d1b2a 0%, #1a56db 100%);
    padding: 56px 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 32px;
    max-width: var(--content-max);
    margin: 0 auto;
    text-align: center;
}

.stat-item h2 {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--white);
}

.stat-item p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
}

.stat-accent {
    color: var(--accent) !important;
}

/* ── 푸터 ── */
footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.65);
    padding: 56px 24px 32px;
}

.footer-inner {
    max-width: var(--content-max);
    margin: 0 auto 40px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-brand h3 {
    color: var(--white);
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 0.88rem;
    line-height: 1.7;
}

.footer-col h4 {
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--accent);
}

.footer-bottom {
    max-width: var(--content-max);
    margin: 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.82rem;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
}

/* ── 스크롤 애니메이션 ── */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: none;
}

/* ── 반응형 · 모바일 ── */
@media (max-width: 768px) {
    nav.site-nav {
        padding: 0 16px;
        height: 56px;
    }

    .pub-routes-main,
    .pub-site-main {
        padding-top: 56px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        z-index: 99;
        flex-direction: column;
        gap: 0;
        padding: 8px 16px 20px;
        background: rgba(13, 27, 42, 0.98);
        backdrop-filter: blur(8px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        max-height: calc(100vh - 56px);
        overflow-y: auto;
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .nav-links a {
        display: block;
        padding: 14px 4px;
        font-size: 1rem;
    }

    .nav-links .nav-cta {
        display: block;
        margin-top: 8px;
        text-align: center;
    }

    .routes-section {
        padding: 48px 16px;
    }

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

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }
}
