/* ==========================================================================
   OTABI ROUTE - Japan Bullet Train / Shinkansen Redesign Stylesheet
   ========================================================================== */

/* Hero & Search Header Section */
.shinkansen-hero {
    position: relative;
    background: linear-gradient(135deg, #070f26 0%, #0f1c3f 50%, #1b2a4a 100%);
    color: #ffffff;
    padding: 3.5rem 0 5rem;
    overflow: hidden;
}

.shinkansen-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(217, 4, 41, 0.15) 0%, rgba(2, 132, 199, 0.08) 50%, transparent 70%);
    pointer-events: none;
    border-radius: 50%;
    filter: blur(60px);
}

.shinkansen-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.shinkansen-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    background: rgba(2, 132, 199, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #7dd3fc;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    backdrop-filter: blur(8px);
}

.shinkansen-title {
    font-size: 2.75rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #ffffff 30%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.shinkansen-subtitle {
    font-size: 1.05rem;
    color: #94a3b8;
    max-width: 680px;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Premium Booking Search Box */
.search-card-wrapper {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 1.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    color: #0f172a;
}

[data-theme="dark"] .search-card-wrapper {
    background: rgba(17, 24, 39, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.search-form-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: center;
}

.search-field-box {
    position: relative;
    background: var(--bg-subtle, #f8fafc);
    border: 1.5px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

[data-theme="dark"] .search-field-box {
    background: #1e293b;
    border-color: #334155;
}

.search-field-box:focus-within,
.search-field-box:hover {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.search-field-box label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #64748b);
    margin-bottom: 0.35rem;
}

.search-field-box select,
.search-field-box input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main, #0f172a);
    outline: none;
    cursor: pointer;
}

[data-theme="dark"] .search-field-box select,
[data-theme="dark"] .search-field-box input {
    color: #f8fafc;
}

/* Swap Station Button */
.btn-swap-stations {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] .btn-swap-stations {
    background: #1e293b;
    border-color: #334155;
    color: #38bdf8;
}

.btn-swap-stations:hover {
    transform: rotate(180deg) scale(1.1);
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

/* Quick Station Pills */
.quick-stations-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
}

.quick-station-pill {
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    background: rgba(2, 132, 199, 0.08);
    border: 1px solid rgba(2, 132, 199, 0.2);
    color: #0284c7;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

[data-theme="dark"] .quick-station-pill {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.25);
    color: #38bdf8;
}

.quick-station-pill:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    transform: translateY(-1px);
}

/* Popular Routes Grid */
.popular-routes-section {
    padding: 4rem 0 3rem;
    background: var(--bg-primary, #f8fafc);
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title-tag {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #d90429;
    margin-bottom: 0.3rem;
}

.section-heading {
    font-size: 1.85rem;
    font-weight: 900;
    color: var(--text-main, #0f172a);
    line-height: 1.25;
}

.popular-routes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
}

.route-card {
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.route-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.1);
    border-color: #38bdf8;
}

.route-card-image {
    height: 160px;
    position: relative;
    overflow: hidden;
}

.route-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.route-card:hover .route-card-image img {
    transform: scale(1.08);
}

.route-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.3rem 0.7rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.route-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.route-stations-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.route-city-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main, #0f172a);
}

.route-arrow-icon {
    color: #d90429;
    font-size: 0.9rem;
}

.route-specs-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.82rem;
    color: var(--text-muted, #64748b);
    margin-bottom: 1.25rem;
}

.route-price-row {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle, #edf2f7);
}

.route-price-amount {
    font-size: 1.3rem;
    font-weight: 900;
    color: #d90429;
}

/* Results Section & Layout */
.results-section {
    padding: 3rem 0 5rem;
}

.results-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Smart Filters Panel */
.filters-sidebar {
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 20px;
    padding: 1.5rem;
    position: sticky;
    top: 90px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.filter-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-subtle, #edf2f7);
}

.filter-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-group-title {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-main, #0f172a);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-option-checkbox {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.88rem;
    color: var(--text-muted, #64748b);
    margin-bottom: 0.6rem;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.filter-option-checkbox:hover {
    color: var(--text-main, #0f172a);
}

.filter-option-checkbox input[type="checkbox"] {
    accent-color: #d90429;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Modern Train Cards in Stream */
.train-stream-card {
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.train-stream-card:hover {
    border-color: #38bdf8;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.train-card-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.train-identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.train-type-badge {
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-weight: 800;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-nozomi { background: #fee2e2; color: #991b1b; }
.badge-hikari { background: #e0f2fe; color: #075985; }
.badge-kodama { background: #fef3c7; color: #92400e; }
.badge-hayabusa { background: #dcfce7; color: #166534; }
.badge-kagayaki { background: #f3e8ff; color: #6b21a8; }
.badge-sakura { background: #fce7f3; color: #9d174d; }

[data-theme="dark"] .badge-nozomi { background: rgba(220, 38, 38, 0.25); color: #fca5a5; }
[data-theme="dark"] .badge-hikari { background: rgba(2, 132, 199, 0.25); color: #7dd3fc; }
[data-theme="dark"] .badge-kodama { background: rgba(217, 119, 6, 0.25); color: #fde68a; }
[data-theme="dark"] .badge-hayabusa { background: rgba(22, 163, 74, 0.25); color: #86efac; }
[data-theme="dark"] .badge-kagayaki { background: rgba(147, 51, 234, 0.25); color: #d8b4fe; }
[data-theme="dark"] .badge-sakura { background: rgba(219, 39, 119, 0.25); color: #fbcfe8; }

.fuji-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0369a1;
    font-size: 0.75rem;
    font-weight: 800;
}

[data-theme="dark"] .fuji-badge {
    background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 100%);
    color: #e0f2fe;
}

/* Timeline Layout */
.timeline-grid {
    display: grid;
    grid-template-columns: 140px 1fr 140px;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
}

.timeline-station {
    text-align: center;
}

.timeline-time {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-main, #0f172a);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.timeline-city {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted, #64748b);
}

.timeline-track-wrapper {
    text-align: center;
    position: relative;
}

.timeline-duration-tag {
    font-size: 0.8rem;
    font-weight: 800;
    color: #0284c7;
    margin-bottom: 0.4rem;
    display: inline-block;
}

.timeline-track-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 9999px;
    position: relative;
    margin: 0.5rem 0;
}

[data-theme="dark"] .timeline-track-bar {
    background: #334155;
}

.timeline-track-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #0284c7 0%, #d90429 100%);
    border-radius: 9999px;
}

.timeline-bullet-node {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    border: 3.5px solid #d90429;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 8px rgba(217, 4, 41, 0.4);
}

.node-left { left: 0; }
.node-right { right: 0; }

.timeline-direct-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: #16a34a;
}

/* Seat Tiers Selector Grid */
.seat-tiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.seat-tier-box {
    border: 1.5px solid var(--border-color, #e2e8f0);
    border-radius: 14px;
    padding: 0.75rem 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-primary, #f8fafc);
}

[data-theme="dark"] .seat-tier-box {
    background: #1e293b;
    border-color: #334155;
}

.seat-tier-box:hover {
    border-color: #0284c7;
    background: rgba(2, 132, 199, 0.05);
}

.seat-tier-box.selected {
    border-color: #d90429;
    background: rgba(217, 4, 41, 0.06);
    box-shadow: 0 0 0 2px rgba(217, 4, 41, 0.2);
}

.tier-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-muted, #64748b);
    display: block;
    margin-bottom: 0.2rem;
}

.seat-tier-box.selected .tier-title {
    color: #d90429;
}

.tier-price-val {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--text-main, #0f172a);
}

/* Shinkansen Types Section */
.train-types-section {
    padding: 4rem 0;
    background: var(--bg-surface, #ffffff);
}

.train-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.type-card {
    background: var(--bg-primary, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .type-card {
    background: #111827;
    border-color: #1e293b;
}

.type-card:hover {
    transform: translateY(-4px);
    border-color: #0284c7;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.type-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.type-title {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--text-main, #0f172a);
}

.type-speed-badge {
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: rgba(217, 4, 41, 0.1);
    color: #d90429;
}

.type-desc {
    font-size: 0.88rem;
    color: var(--text-muted, #64748b);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

/* Route Map Section */
.route-map-section {
    padding: 4rem 0;
    background: var(--bg-primary, #f8fafc);
}

.interactive-map-container {
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.shinkansen-lines-svg {
    width: 100%;
    height: 380px;
}

.map-node {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.map-node:hover {
    transform: scale(1.25);
}

/* Why Bullet Train Section */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.benefit-card {
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 20px;
    padding: 1.75rem;
    transition: all 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-4px);
    border-color: #0284c7;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.06);
}

.benefit-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.1) 0%, rgba(217, 4, 41, 0.1) 100%);
    color: #d90429;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
}

/* Travel Info Accordion */
.accordion-wrapper {
    max-width: 900px;
    margin: 2rem auto 0;
}

.accordion-item {
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.accordion-header {
    padding: 1.25rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.accordion-header:hover {
    color: #0284c7;
}

.accordion-content {
    padding: 0 1.5rem 1.25rem;
    font-size: 0.92rem;
    color: var(--text-muted, #64748b);
    line-height: 1.6;
    display: none;
}

.accordion-item.active .accordion-content {
    display: block;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
    color: #d90429;
}

/* Final CTA Section */
.shinkansen-cta-banner {
    background: linear-gradient(135deg, #070f26 0%, #1e1b4b 50%, #991b1b 100%);
    color: #ffffff;
    border-radius: 28px;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    margin-top: 4rem;
}

.cta-heading {
    font-size: 2.25rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

/* Responsive Rules */
@media (max-width: 1024px) {
    .search-form-row {
        grid-template-columns: 1fr 1fr;
    }
    .btn-swap-stations {
        display: none;
    }
    .results-layout {
        grid-template-columns: 1fr;
    }
    .filters-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
}

@media (max-width: 640px) {
    .shinkansen-title {
        font-size: 2rem;
    }
    .search-form-row {
        grid-template-columns: 1fr;
    }
    .timeline-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: left;
    }
    .timeline-station {
        text-align: left;
    }
}
