/* Transit Portal — Rich Commercial Overhaul (2025) */

:root {
    --rich-primary: #0066cc;
    /* Professional Blue */
    --rich-primary-hover: #0052a3;
    --rich-surface: #ffffff;
    --rich-subtle: #f8fafc;
    --rich-border: #e2e8f0;
    --rich-text: #1e293b;
    --rich-text-muted: #64748b;

    --header-top-h: 36px;
    --header-main-h: 72px;
    --rich-header-h: calc(var(--header-top-h) + var(--header-main-h));

    --hero-h: 560px;
    --container-max: 1200px;

    /* Extended Spacing for Rich Layout */
    --space-16: 4rem;
    /* 64px */
    --space-20: 5rem;
    /* 80px */
}

/* Global Reset/Overrides */
.transit-body {
    background: var(--rich-subtle);
    color: var(--rich-text);
    font-family: 'Noto Sans KR', var(--font-family);
    overflow-x: hidden;
}

/* Rich Header Shell */
.rich-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--rich-surface);
    border-bottom: 1px solid var(--rich-border);
    transition: transform 0.3s ease, background 0.3s ease;
}

.header-top-bar {
    height: var(--header-top-h);
    background: #1a1a1a;
    color: #fff;
    font-size: 11px;
    display: flex;
    align-items: center;
}

.header-top-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    width: 100%;
    padding: 0 var(--space-4);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-4);
}

.header-top-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.15s;
}

.header-top-link:hover {
    color: #fff;
}

.header-main-bar {
    height: var(--header-main-h);
    display: flex;
    align-items: center;
}

.header-main-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    width: 100%;
    padding: 0 var(--space-4);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-nav {
    display: flex;
    gap: var(--space-6);
    align-items: center;
}

.header-nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--rich-text);
    text-decoration: none;
    position: relative;
    padding: 4px 0;
}

.header-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--rich-primary);
    transition: width 0.2s;
}

.header-nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.rich-hero {
    position: relative;
    height: var(--hero-h);
    background: url('/static/images/transit/hero_commercial.png') no-repeat center center;
    background-size: cover;
    margin-top: var(--rich-header-h);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rich-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.4));
}

.rich-hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 900px;
    padding: 0 var(--space-4);
    text-align: center;
    color: #fff;
}

.hero-title {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: var(--space-4);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Booking Widget Override (Commercial Style) */
.rich-booking-widget {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    margin-top: var(--space-8);
    color: var(--rich-text);
    text-align: left;
}

.rich-booking-tabs {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    border-bottom: 1px solid var(--rich-border);
}

.booking-tab {
    padding: var(--space-3) 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--rich-text-muted);
    border: 0;
    background: transparent;
    cursor: pointer;
    position: relative;
}

.booking-tab.is-active {
    color: var(--rich-primary);
}

.booking-tab.is-active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--rich-primary);
}

.rich-search-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr auto;
    gap: var(--space-3);
    align-items: end;
}

.rich-input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.rich-input-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--rich-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rich-input-wrapper {
    background: #fff;
    border: 1px solid var(--rich-border);
    border-radius: var(--radius-md);
    height: 52px;
    display: flex;
    align-items: center;
    padding: 0 var(--space-3);
    gap: var(--space-2);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.rich-input-wrapper:focus-within {
    border-color: var(--rich-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.rich-input-wrapper input {
    border: 0;
    background: transparent;
    width: 100%;
    font-size: 15px;
    font-weight: 500;
    outline: none;
}

.rich-input-wrapper .hz-icon {
    font-size: 20px;
    color: var(--rich-primary);
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 60;
    padding: var(--space-2);
    border-radius: var(--radius-lg);
    border: 1px solid var(--rich-border);
    background: var(--rich-surface);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
    pointer-events: none;
    visibility: hidden;
    transition: opacity 160ms cubic-bezier(0.22, 0.61, 0.36, 1), transform 180ms cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0ms linear 180ms;
    will-change: transform, opacity;
}

.is-open .dropdown-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    visibility: visible;
    transition-delay: 0ms;
}

.btn-search {
    height: 52px;
    background: var(--rich-primary);
    color: #fff;
    border: 0;
    border-radius: var(--radius-md);
    padding: 0 var(--space-10);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-search:hover {
    background: var(--rich-primary-hover);
}

/* Stepper & List Styles (from original) */
.stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--rich-border);
}

.stepper:last-child {
    border-bottom: 0;
}

.stepper .label {
    display: flex;
    flex-direction: column;
}

.stepper .label strong {
    font-size: 14px;
}

.stepper .label span {
    font-size: 11px;
    color: var(--rich-text-muted);
}

.stepper .controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stepper .controls button {
    width: 32px;
    height: 32px;
    border: 1px solid var(--rich-border);
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
}

.stepper .controls button:hover:not(:disabled) {
    border-color: var(--rich-primary);
    color: var(--rich-primary);
}

.seat-option {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
}

.seat-option:hover {
    background: var(--rich-subtle);
}

.seat-option.is-active {
    background: #e0f2fe;
    color: var(--rich-primary);
    font-weight: 600;
}

.seat-option .check {
    opacity: 0;
}

.seat-option.is-active .check {
    opacity: 1;
}

.suggest-item {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: left;
}

.suggest-item:hover {
    background: var(--rich-subtle);
    border-color: var(--rich-border);
}

.suggest-item .label {
    font-weight: 600;
    display: block;
}

.suggest-item .hint {
    font-size: 11px;
    color: var(--rich-text-muted);
}

/* Date Picker Layout */
.date-range-calendar {
    padding: 8px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.date-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    border: 0;
    background: transparent;
}

.date-cell:hover {
    background: var(--rich-subtle);
}

.date-cell.is-selected {
    background: var(--rich-primary);
    color: #fff;
    font-weight: 600;
}

.date-cell.is-in-range {
    background: #e0f2fe;
    border-radius: 0;
}

.date-cell.is-today {
    color: var(--rich-primary);
    font-weight: 700;
    text-decoration: underline;
}

/* Content Sections */
.rich-section {
    max-width: var(--container-max);
    margin: var(--space-16) auto;
    padding: 0 var(--space-4);
}

.section-title-rich {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: var(--space-8);
}

.dest-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

.dest-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
}

.dest-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.dest-img-wrap {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #eee;
}

.dest-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dest-info {
    padding: var(--space-4);
}

.dest-name {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 4px;
}

.dest-price {
    font-size: 14px;
    color: var(--rich-primary);
}

/* Promotional Cards */
.promo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
}

.promo-card {
    position: relative;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    height: 320px;
    display: flex;
    align-items: flex-end;
    text-decoration: none;
    color: #fff;
    box-shadow: var(--shadow-lg);
    transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.4s;
}

.promo-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.promo-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.promo-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.promo-card:hover .promo-bg img {
    transform: scale(1.05);
}

.promo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 60%);
    z-index: 2;
}

.promo-content {
    position: relative;
    z-index: 3;
    padding: var(--space-8);
    width: 100%;
}

.promo-badge {
    position: absolute;
    top: var(--space-6);
    left: var(--space-6);
    background: var(--rich-primary);
    color: #fff;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    z-index: 4;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.promo-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.promo-desc {
    font-size: 15px;
    opacity: 0.9;
    max-width: 80%;
}

/* Rich Footer */
.rich-footer {
    background: #1a1a1a;
    color: rgba(255, 255, 255, 0.6);
    padding: var(--space-20) 0 var(--space-10);
    margin-top: var(--space-20);
}

.footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-4);
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-12);
}

.footer-logo {
    margin-bottom: var(--space-6);
}

.footer-logo img {
    height: 24px;
    filter: brightness(0) invert(1);
}

.footer-group-title {
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: var(--space-6);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-links-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-link {
    font-size: 13px;
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}

.footer-link:hover {
    color: #fff;
}

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

/* Mobile Adjustments */
@media (max-width: 1024px) {
    .rich-search-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-4);
    }

    .swap-slot {
        display: none;
    }

    .btn-search {
        grid-column: span 2;
    }

    .dest-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .rich-header {
        position: relative;
    }

    .header-main-inner {
        flex-direction: row;
        height: auto;
        padding: 12px 16px;
        gap: 16px;
        justify-content: space-between;
    }

    .header-nav {
        display: none;
    }

    .rich-hero {
        height: auto;
        padding: 60px 0;
        margin-top: 0;
    }

    .hero-title {
        font-size: 28px;
        margin-bottom: var(--space-4);
    }

    .rich-booking-widget {
        padding: var(--space-4);
        margin-top: var(--space-4);
        border-radius: var(--radius-lg);
    }

    .rich-search-grid {
        grid-template-columns: 1fr;
    }

    .btn-search {
        grid-column: span 1;
        width: 100%;
    }

    .date-panel {
        width: calc(100vw - 32px) !important;
        left: 0 !important;
        right: 0 !important;
        overflow-x: auto;
    }

    .calendar-months {
        grid-template-columns: 1fr !important;
    }

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

    .promo-card {
        height: 240px;
    }

    .promo-title {
        font-size: 22px;
    }

    .rich-section {
        margin: var(--space-10) auto;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }
}