/* ==========================================================================
   GoOnBus.ru — Design 3: Precision Transit Terminal & Wayfinding System (v3)
   Impeccable Design Standards: High contrast, purposeful motion, zero fluff.
   ========================================================================== */

:root {
    --gb-bg: #f8fafc;
    --gb-surface: #ffffff;
    --gb-surface-subtle: #f1f5f9;
    --gb-surface-dark: #090e17;
    --gb-surface-card-dark: rgba(15, 23, 42, 0.78);
    
    --gb-border: #e2e8f0;
    --gb-border-subtle: #f1f5f9;
    --gb-border-dark: rgba(255, 255, 255, 0.14);
    
    --gb-text-main: #0f172a;
    --gb-text-muted: #475569;
    --gb-text-light: #94a3b8;
    --gb-text-white: #ffffff;
    
    /* Brand Accent Colors */
    --gb-primary: #e71e43;
    --gb-primary-hover: #cf1336;
    --gb-primary-light: rgba(231, 30, 67, 0.08);
    
    --gb-blue: #0284c7;
    --gb-blue-hover: #0369a1;
    --gb-blue-light: rgba(2, 132, 199, 0.08);
    
    --gb-emerald: #059669;
    --gb-emerald-light: rgba(5, 150, 105, 0.1);
    
    --gb-amber: #d97706;
    --gb-amber-light: rgba(217, 119, 6, 0.1);
    
    /* Precision Shadows */
    --gb-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --gb-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
    --gb-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --gb-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --gb-shadow-dark: 0 16px 32px rgba(0, 0, 0, 0.45);
    
    /* Radii */
    --gb-radius-sm: 6px;
    --gb-radius-md: 10px;
    --gb-radius-lg: 14px;
    --gb-radius-full: 9999px;
    
    /* Transitions */
    --gb-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --gb-duration: 0.2s;
}

/* Browser Surfaces Theming */
::selection {
    background-color: var(--gb-primary);
    color: #ffffff;
}

/* Layout Container Reset & Bounds */
.site-header .wrapper,
.site-footer .wrapper {
    max-width: 1200px !important;
    padding: 0 20px !important;
    box-sizing: border-box;
}

.layout-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    color: var(--gb-text-main);
    background-color: var(--gb-bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
    max-width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ==========================================================================
   1. HERO TRANSIT COMMAND TERMINAL
   ========================================================================== */
.hero-terminal {
    position: relative;
    display: flow-root;
    background: #090e17 url(/i/city-search-bg.jpg) center center / cover no-repeat;
    padding: 44px 0 40px;
    color: var(--gb-text-white);
    border-bottom: 1px solid var(--gb-border-dark);
    overflow: hidden;
    box-sizing: border-box;
}

.hero-terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(9, 14, 23, 0.82) 0%, rgba(9, 14, 23, 0.92) 100%);
    pointer-events: none;
    z-index: 1;
}

.hero-terminal .container {
    position: relative;
    z-index: 2;
}

.hero-header {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 28px;
}

/* Live Telemetry Radar Strip */
.telemetry-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(5, 150, 105, 0.15);
    border: 1px solid rgba(52, 211, 153, 0.35);
    padding: 4px 14px;
    border-radius: var(--gb-radius-full);
    font-size: 12px;
    font-weight: 600;
    color: #34d399;
    letter-spacing: 0.3px;
    margin-bottom: 16px;
    backdrop-filter: blur(8px);
}

.radar-dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
}

.radar-dot::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 1.5px solid #10b981;
    animation: v3-radar-pulse 2s infinite var(--gb-ease);
}

@keyframes v3-radar-pulse {
    0% {
        transform: scale(0.6);
        opacity: 1;
    }
    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

.hero-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 10px;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 15px;
    color: var(--gb-text-light);
    margin: 0;
    line-height: 1.45;
}

/* Key Metrics HUD Cards */
.hud-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    max-width: 900px;
    margin: 0 auto 28px;
}

.hud-card {
    background: var(--gb-surface-card-dark);
    border: 1px solid var(--gb-border-dark);
    border-radius: var(--gb-radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    backdrop-filter: blur(12px);
    transition: transform var(--gb-duration) var(--gb-ease), border-color var(--gb-duration) var(--gb-ease);
}

.hud-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.hud-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--gb-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
}

.hud-icon.icon-cities {
    background: linear-gradient(135deg, #e71e43, #9f1239);
    box-shadow: 0 4px 12px rgba(231, 30, 67, 0.35);
}

.hud-icon.icon-routes {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.hud-icon.icon-radar {
    background: linear-gradient(135deg, #059669, #065f46);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

.hud-val {
    font-size: 19px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.hud-lbl {
    font-size: 12px;
    color: var(--gb-text-light);
    margin-top: 2px;
}

/* Precision Omnibox Search */
.search-box-wrap {
    max-width: 740px;
    margin: 0 auto 24px;
    position: relative;
}

.search-form {
    display: flex;
    background: #ffffff;
    border-radius: var(--gb-radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.2);
    padding: 6px 6px 6px 18px;
    align-items: center;
    transition: box-shadow var(--gb-duration) var(--gb-ease), transform var(--gb-duration) var(--gb-ease);
}

.search-form:focus-within {
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(231, 30, 67, 0.45);
    transform: translateY(-1px);
}

.search-icon-wrap {
    display: flex;
    align-items: center;
    color: var(--gb-text-muted);
    margin-right: 12px;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: var(--gb-text-main);
    background: transparent;
    font-weight: 500;
    padding: 10px 0;
    min-width: 0;
}

.search-input::placeholder {
    color: var(--gb-text-light);
    font-weight: 400;
}

.search-clear {
    display: none;
    background: var(--gb-surface-subtle);
    border: none;
    color: var(--gb-text-muted);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 8px;
    font-size: 14px;
    line-height: 1;
    transition: background var(--gb-duration) var(--gb-ease), color var(--gb-duration) var(--gb-ease);
}

.search-clear:hover {
    background: #e2e8f0;
    color: var(--gb-text-main);
}

.search-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--gb-primary);
    color: #ffffff;
    border: none;
    outline: none;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: var(--gb-radius-md);
    cursor: pointer;
    transition: background-color var(--gb-duration) var(--gb-ease), transform var(--gb-duration) var(--gb-ease);
    flex-shrink: 0;
}

.search-btn:hover {
    background-color: var(--gb-primary-hover);
    transform: scale(1.02);
}

.search-btn:active {
    transform: scale(0.98);
}

/* Predictive Search Dropdown */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: var(--gb-radius-md);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    z-index: 120;
    text-align: left;
    color: var(--gb-text-main);
}

.search-results-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 6px 0;
}

.search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px;
    color: var(--gb-text-main);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
}

.search-item:hover,
.search-item.is-selected {
    background-color: #fff1f2;
    color: var(--gb-primary);
    text-decoration: none;
}

.search-item-city {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-item-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--gb-radius-sm);
    background: rgba(231, 30, 67, 0.08);
    color: var(--gb-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-item-name {
    font-weight: 600;
}

.search-item-name mark {
    background: transparent;
    color: var(--gb-primary);
    font-weight: 800;
    text-decoration: underline;
}

.search-item-arrow {
    color: var(--gb-text-light);
    font-size: 14px;
    font-weight: 700;
    transition: transform 0.15s ease, color 0.15s ease;
}

.search-item:hover .search-item-arrow,
.search-item.is-selected .search-item-arrow {
    color: var(--gb-primary);
    transform: translateX(3px);
}

.search-dropdown-empty {
    padding: 16px;
    text-align: center;
    color: var(--gb-text-muted);
    font-size: 13px;
}

.search-dropdown-footer {
    padding: 7px 16px;
    background: var(--gb-surface-subtle);
    border-top: 1px solid var(--gb-border-subtle);
    font-size: 11px;
    color: var(--gb-text-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-dropdown-footer kbd {
    background: #ffffff;
    border: 1px solid var(--gb-border);
    border-radius: 3px;
    padding: 1px 4px;
    font-size: 10px;
    font-family: inherit;
    color: var(--gb-text-main);
}

/* Major Transit Hubs Quick Matrix */
.hubs-bar {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hubs-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gb-text-light);
    margin-right: 8px;
    vertical-align: middle;
}

.hubs-list {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    vertical-align: middle;
}

.hub-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 4px 11px;
    border-radius: var(--gb-radius-sm);
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--gb-duration) var(--gb-ease);
}

.hub-chip:hover {
    background: rgba(231, 30, 67, 0.22);
    border-color: rgba(231, 30, 67, 0.5);
    transform: translateY(-1px);
    color: #ffffff;
    text-decoration: none;
}

.hub-count {
    font-size: 11px;
    color: #94a3b8;
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 5px;
    border-radius: 4px;
}

/* ==========================================================================
   2. SMART STATION DECK (SAVED CITY PASSENGER HUB)
   ========================================================================== */
.station-deck {
    margin: 20px auto 0;
    background: #ffffff;
    border: 1px solid var(--gb-border);
    border-radius: var(--gb-radius-lg);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: box-shadow var(--gb-duration) var(--gb-ease), border-color var(--gb-duration) var(--gb-ease);
    max-width: 100%;
    box-sizing: border-box;
}

.station-deck.station-deck-hero {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.15);
    box-sizing: border-box;
}

.hero-header.hero-header-compact {
    margin-bottom: 14px;
}

.hero-header.hero-header-compact .hero-title {
    font-size: 24px;
    margin-bottom: 0;
}

/* Compact Omnibox Search for returning users */
.search-box-wrap.search-box-compact {
    max-width: 480px;
    margin: 14px auto 0;
}

.search-box-compact .search-form {
    padding: 2px 2px 2px 12px;
    border-radius: var(--gb-radius-full);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.search-box-compact .search-icon-wrap {
    margin-right: 8px;
}

.search-box-compact .search-input {
    font-size: 13px;
    padding: 6px 0;
}

.search-box-compact .search-btn {
    padding: 7px 16px;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: var(--gb-radius-full);
}

.station-deck:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    border-color: #cbd5e1;
}

.station-main-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    border-bottom: 1px solid var(--gb-border-subtle);
    gap: 12px;
    flex-wrap: wrap;
    max-width: 100%;
    box-sizing: border-box;
}

.station-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.station-city-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--gb-text-main);
    transition: all var(--gb-duration) var(--gb-ease);
}

.station-city-link:hover {
    color: var(--gb-primary);
    text-decoration: none;
}

.station-city-link:hover .station-name {
    color: var(--gb-primary);
}

.station-city-arrow {
    color: var(--gb-primary);
    opacity: 0.7;
    transition: transform var(--gb-duration) var(--gb-ease), opacity var(--gb-duration) var(--gb-ease);
    flex-shrink: 0;
}

.station-city-link:hover .station-city-arrow {
    transform: translateX(3px);
    opacity: 1;
}

.station-pin {
    width: 34px;
    height: 34px;
    border-radius: var(--gb-radius-md);
    background: linear-gradient(135deg, rgba(231, 30, 67, 0.12), rgba(231, 30, 67, 0.04));
    border: 1px solid rgba(231, 30, 67, 0.16);
    color: var(--gb-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.station-pin svg {
    width: 17px;
    height: 17px;
}

.station-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--gb-text-main);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-telemetry {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tele-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid var(--gb-border);
    padding: 0 10px;
    height: 32px;
    border-radius: var(--gb-radius-md);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gb-text-main);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    box-sizing: border-box;
    line-height: 1;
}

.tele-pill svg {
    color: #64748b;
    flex-shrink: 0;
}

.tele-pill .weather-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: var(--gb-text-main) !important;
    text-decoration: none !important;
    line-height: 1 !important;
}

.tele-pill .weather-icon {
    width: 20px !important;
    height: 20px !important;
    object-fit: contain !important;
    display: block !important;
}

.tele-pill .weather-temp {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: var(--gb-text-main) !important;
    font-variant-numeric: tabular-nums !important;
    line-height: 1 !important;
}

.clock-val {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--gb-text-main);
}

.station-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-station-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--gb-primary);
    color: #ffffff;
    padding: 7px 15px;
    border-radius: var(--gb-radius-sm);
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color var(--gb-duration) var(--gb-ease), transform var(--gb-duration) var(--gb-ease);
}

.btn-station-cta:hover {
    background-color: var(--gb-primary-hover);
    color: #ffffff;
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-station-reset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--gb-text-muted);
    border: 1px solid var(--gb-border);
    padding: 6px 12px;
    border-radius: var(--gb-radius-sm);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--gb-duration) var(--gb-ease);
}

.btn-station-reset:hover {
    background: var(--gb-surface-subtle);
    color: var(--gb-text-main);
    border-color: #cbd5e1;
    text-decoration: none;
}

/* Quick Route Chips / Number Tiles */
.station-routes-bar {
    padding: 6px 18px;
    background: #f8fafc;
    border-top: 1px solid var(--gb-border);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.routes-bar-head {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.routes-bus-svg {
    width: 18px;
    height: 16px;
    color: var(--gb-primary);
    display: block;
    flex-shrink: 0;
}

.routes-bar-title {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    letter-spacing: -0.15px;
    white-space: nowrap;
    line-height: 1.2;
}

.station-routes-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
    flex: 1;
    min-width: 0;
    padding: 3px 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.station-routes-grid::-webkit-scrollbar {
    display: none;
}

.v3-num-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 32px;
    padding: 0 8px;
    background: #ffffff;
    border: 1px solid var(--gb-border);
    border-radius: var(--gb-radius-sm);
    text-decoration: none;
    color: var(--gb-text-main);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all var(--gb-duration) var(--gb-ease);
    box-sizing: border-box;
    flex-shrink: 0;
    overflow: hidden;
}

.v3-num-tile.v3-num-tile--text {
    max-width: 140px;
    padding: 0 10px;
}

.v3-num-tile.v3-num-tile--text .tile-num-val {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.v3-num-tile:hover {
    border-color: var(--gb-primary);
    background: var(--gb-primary-light);
    color: var(--gb-primary);
    transform: translateY(-1px);
    text-decoration: none;
    box-shadow: 0 3px 8px rgba(231, 30, 67, 0.12);
}

.tile-num-val {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--gb-text-main);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.v3-num-tile:hover .tile-num-val {
    color: var(--gb-primary);
}

.v3-num-tile.v3-num-tile--favorite {
    border-color: #f59e0b;
    background: #fffbeb;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.16);
}

.v3-num-tile.v3-num-tile--favorite .tile-num-val {
    color: #92400e;
}

.v3-num-tile.v3-num-tile--favorite .tile-fav-star {
    display: inline-block;
    color: #f59e0b;
    font-size: 11.5px;
    margin-right: 3.5px;
    line-height: 1;
    vertical-align: middle;
}

.v3-num-tile.v3-num-tile--favorite:hover {
    border-color: #d97706;
    background: #fef3c7;
    box-shadow: 0 3px 8px rgba(217, 119, 6, 0.22);
}

.v3-num-tile.v3-num-tile--favorite:hover .tile-num-val {
    color: #b45309;
}

/* ==========================================================================
   3. CITY CATALOG DIRECTORY & LIVE FILTER (100% SEO + INSTANT CLIENT SEARCH)
   ========================================================================== */
.catalog-section {
    margin: 28px auto 36px;
    background: var(--gb-surface);
    border: 1px solid var(--gb-border);
    border-radius: var(--gb-radius-lg);
    box-shadow: var(--gb-shadow-sm);
    padding: 24px;
    box-sizing: border-box;
}

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

.catalog-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--gb-text-main);
    margin: 0;
}

/* Instant Catalog Quick Filter */
.catalog-filter-wrap {
    position: relative;
    width: 280px;
    max-width: 100%;
}

.catalog-filter-input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    border: 1px solid var(--gb-border);
    border-radius: var(--gb-radius-md);
    font-size: 13px;
    color: var(--gb-text-main);
    outline: none;
    background: var(--gb-bg);
    box-sizing: border-box;
    transition: border-color var(--gb-duration) var(--gb-ease), background var(--gb-duration) var(--gb-ease);
}

.catalog-filter-input:focus {
    border-color: var(--gb-primary);
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(231, 30, 67, 0.15);
}

.catalog-filter-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gb-text-light);
    pointer-events: none;
}

/* Alphabet Jumper Bar */
.alphabet-bar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    padding: 10px 0 16px;
    border-bottom: 1px solid var(--gb-border-subtle);
    margin-bottom: 20px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.alphabet-bar::-webkit-scrollbar {
    display: none;
}

.alpha-btn {
    flex: 1 1 0px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 30px;
    padding: 0;
    border-radius: var(--gb-radius-sm);
    background: var(--gb-surface-subtle);
    color: var(--gb-text-main);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--gb-duration) var(--gb-ease);
    flex-shrink: 0;
}

.alpha-btn:hover {
    background: var(--gb-primary-light);
    color: var(--gb-primary);
    text-decoration: none;
    transform: translateY(-1px);
}

.alpha-btn.active {
    background: var(--gb-primary);
    color: #ffffff;
}

/* 4-Column Balanced Grid */
.catalog-grid-wrap {
    position: relative;
    max-height: none !important;
    overflow: visible !important;
}

.catalog-expand-bar {
    display: none !important;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start;
}

.catalog-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.letter-group {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0 0 8px 0;
    scroll-margin-top: 85px;
    transition: all 0.3s ease;
}

.letter-group.highlight-letter {
    background: #f0fdf4;
    border-radius: var(--gb-radius-sm);
    padding: 6px 8px;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.letter-heading {
    font-size: 15px;
    font-weight: 800;
    color: var(--gb-primary);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--gb-border);
    margin-bottom: 8px;
}

.city-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.city-link {
    display: block;
    color: var(--gb-text-main);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    padding: 3px 6px;
    border-radius: 4px;
    transition: all var(--gb-duration) var(--gb-ease);
}

.city-link:hover {
    background: var(--gb-primary-light);
    color: var(--gb-primary);
    text-decoration: none;
    padding-left: 8px;
}

.no-filter-results {
    display: none;
    text-align: center;
    padding: 30px 10px;
    color: var(--gb-text-muted);
    font-size: 14px;
}

/* ==========================================================================
   4. TRANSIT NEWS & SERVICE UPDATES
   ========================================================================== */
.news-section {
    padding: 36px 0;
    border-top: 1px solid var(--gb-border);
    background: #ffffff;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--gb-text-main);
    margin: 0;
}

.section-more-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--gb-primary);
    text-decoration: none;
}

.section-more-link:hover {
    text-decoration: underline;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.news-card {
    background: var(--gb-surface);
    border: 1px solid var(--gb-border);
    border-radius: var(--gb-radius-md);
    padding: 12px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
    box-shadow: var(--gb-shadow-xs);
    transition: transform var(--gb-duration) var(--gb-ease), box-shadow var(--gb-duration) var(--gb-ease), border-color var(--gb-duration) var(--gb-ease);
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--gb-shadow-md);
    border-color: var(--gb-primary);
}

.news-media-wrap {
    position: relative;
    width: 120px;
    min-width: 120px;
    height: 90px;
    border-radius: var(--gb-radius-sm);
    overflow: hidden;
    background: #cbd5e1;
    flex-shrink: 0;
}

.news-media-wrap a {
    display: block;
    width: 100%;
    height: 100%;
}

.news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    transition: transform 0.3s ease;
}

.news-card:hover .news-img {
    transform: scale(1.04);
}

.news-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.news-city-tag {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-size: 10.5px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    text-decoration: none;
    line-height: 1.3;
    transition: all 0.2s ease;
}

.news-city-tag:hover {
    background: var(--gb-primary);
    color: #ffffff;
    border-color: var(--gb-primary);
    text-decoration: none;
}

.news-date {
    font-size: 11px;
    font-weight: 500;
    color: var(--gb-text-light);
    line-height: 1.2;
}

.news-item-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--gb-text-main);
    line-height: 1.35;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item-title a {
    color: var(--gb-text-main);
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-card:hover .news-item-title a {
    color: var(--gb-primary);
}

.news-snippet {
    font-size: 12px;
    color: var(--gb-text-muted);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   5. TRANSIT ARTICLES & GUIDES (BLOG)
   ========================================================================== */
.articles-section {
    padding: 36px 0;
    background: var(--gb-bg);
    border-top: 1px solid var(--gb-border);
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-row {
    display: flex;
    background: var(--gb-surface);
    border: 1px solid var(--gb-border);
    border-radius: var(--gb-radius-md);
    padding: 12px;
    gap: 16px;
    text-decoration: none;
    transition: all var(--gb-duration) var(--gb-ease);
}

.article-row:hover {
    border-color: var(--gb-primary);
    box-shadow: var(--gb-shadow-sm);
    text-decoration: none;
}

.article-row:hover .article-title {
    color: var(--gb-primary);
}

.article-thumb-wrap {
    width: 140px;
    min-width: 140px;
    height: 90px;
    border-radius: var(--gb-radius-sm);
    overflow: hidden;
    position: relative;
    background: #cbd5e1;
}

.article-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-city-tag {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(15, 23, 42, 0.8);
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 5px;
    border-radius: 3px;
}

.article-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.article-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gb-text-main);
    line-height: 1.35;
    margin: 0 0 4px;
}

.article-text {
    font-size: 13px;
    color: var(--gb-text-muted);
    line-height: 1.4;
    margin: 0;
}

/* ==========================================================================
   6. PASSENGER FAQ (KNOWLEDGE BASE)
   ========================================================================== */
.faq-section {
    padding: 36px 0 44px;
    background: #ffffff;
    border-top: 1px solid var(--gb-border);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--gb-bg);
    border: 1px solid var(--gb-border);
    border-radius: var(--gb-radius-md);
    overflow: hidden;
    transition: border-color var(--gb-duration) var(--gb-ease);
}

.faq-item.active {
    border-color: var(--gb-primary);
    background: #ffffff;
}

.faq-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    color: var(--gb-text-main);
    text-align: left;
    gap: 12px;
}

.faq-icon {
    transition: transform var(--gb-duration) var(--gb-ease);
    color: var(--gb-text-muted);
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--gb-primary);
}

.faq-body {
    display: none;
    padding: 0 20px 16px;
    font-size: 14px;
    color: var(--gb-text-muted);
    line-height: 1.55;
}

.faq-item.active .faq-body {
    display: block;
}

/* ==========================================================================
   7. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
    .hud-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .catalog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 800px) {
    .layout-wrap {
        padding-top: var(--header-h, 50px);
    }
}

@media (max-width: 768px) {
    .hero-terminal {
        padding: 24px 0 22px;
    }
    .hero-header {
        margin: 0 auto 18px;
    }
    .hero-title {
        font-size: 21px;
        line-height: 1.3;
        margin: 0 0 8px;
    }
    .hero-subtitle {
        font-size: 13px;
        line-height: 1.45;
    }
    .hud-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin: 0 auto 18px;
    }
    .hud-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 10px 4px;
        gap: 6px;
        border-radius: var(--gb-radius-sm);
    }
    .hud-icon {
        width: 34px;
        height: 34px;
        border-radius: var(--gb-radius-sm);
    }
    .hud-icon svg {
        width: 18px;
        height: 18px;
    }
    .hud-val {
        font-size: 13px;
        line-height: 1.2;
    }
    .hud-lbl {
        font-size: 10px;
        line-height: 1.2;
    }
    .search-box-wrap {
        margin: 0 auto 16px;
    }
    .search-form {
        padding: 4px 4px 4px 12px;
    }
    .search-input {
        font-size: 14px;
        padding: 8px 0;
    }
    .search-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    .hubs-bar {
        margin-top: 12px;
    }
    .hubs-list {
        justify-content: center;
        gap: 5px;
    }
    .hub-chip {
        font-size: 12px;
        padding: 3px 8px;
    }
    .alphabet-bar {
        display: flex;
        flex-wrap: wrap;
        gap: 5px 4px;
        overflow-x: visible;
        padding: 6px 0 14px;
        justify-content: flex-start;
    }

    .alpha-btn {
        flex: none;
        width: 32px;
        height: 32px;
        min-width: 0;
        font-size: 13px;
        border-radius: var(--gb-radius-sm);
    }

    .catalog-grid-wrap {
        max-height: none !important;
        overflow: visible !important;
        position: relative;
    }

    .catalog-expand-bar {
        display: none !important;
    }

    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .city-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
    }

    .city-link {
        font-size: 13px;
        padding: 4px 6px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .station-deck-hero {
        margin: 0 auto;
        border-radius: var(--gb-radius-md);
    }
    .hero-header.hero-header-compact {
        margin-bottom: 12px;
    }
    .hero-header.hero-header-compact .hero-title {
        font-size: 20px;
    }
    .station-main-row {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 10px 14px;
        flex-wrap: wrap;
    }
    .station-name {
        font-size: 16.5px;
    }
    .station-city-arrow {
        width: 14px;
        height: 14px;
    }
    .station-routes-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 14px;
    }
    .station-routes-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        width: 100%;
        overflow: visible;
        padding: 0;
    }
    .v3-num-tile {
        min-width: 38px;
        width: auto;
        height: 34px;
        padding: 0 9px;
        flex-shrink: 0;
        box-sizing: border-box;
    }
    .v3-num-tile.v3-num-tile--text {
        max-width: 135px;
        padding: 0 10px;
    }
    .v3-num-tile.v3-num-tile--text .tile-num-val {
        font-size: 11.5px;
        font-weight: 600;
        letter-spacing: -0.2px;
    }
    .v3-num-tile:nth-child(n+16) {
        display: none !important;
    }
    .tile-num-val {
        font-size: 14px;
    }
    .search-box-wrap.search-box-compact {
        margin-top: 12px;
    }
    .article-row {
        flex-direction: column;
    }
    .article-thumb-wrap {
        width: 100%;
        min-width: 100%;
        height: 140px;
    }
    .catalog-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .catalog-filter-wrap {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    .news-card {
        max-width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .news-media-wrap {
        width: 100px;
        min-width: 100px;
        height: 75px;
    }
    .news-card {
        padding: 10px;
        gap: 10px;
    }
    .news-item-title {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    .news-snippet {
        display: none;
    }
    .hero-terminal {
        padding: 20px 0 16px;
    }
    .hero-title {
        font-size: 18px;
        line-height: 1.3;
        margin: 0 0 6px;
    }
    .hero-subtitle {
        font-size: 12px;
        line-height: 1.4;
    }
    .hud-grid {
        gap: 6px;
        margin: 0 auto 12px;
    }
    .hud-card {
        padding: 6px 2px;
    }
    .hud-icon {
        width: 26px;
        height: 26px;
    }
    .hud-icon svg {
        width: 14px;
        height: 14px;
    }
    .hud-val {
        font-size: 11px;
    }
    .hud-lbl {
        font-size: 8.5px;
    }
    .search-input {
        font-size: 13px;
    }
    .search-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    .alphabet-bar {
        gap: 4px 3px;
        padding: 4px 0 12px;
    }
    .alpha-btn {
        width: 29px;
        height: 29px;
        font-size: 12px;
    }
    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .city-link {
        font-size: 12px;
        padding: 3px 4px;
    }
    .station-deck {
        border-radius: var(--gb-radius-md);
    }
    .hero-header.hero-header-compact .hero-title {
        font-size: 17px;
    }
    .station-main-row {
        padding: 9px 12px;
        gap: 8px;
    }
    .station-identity {
        gap: 8px;
    }
    .station-pin {
        width: 32px;
        height: 32px;
    }
    .station-pin svg {
        width: 16px;
        height: 16px;
    }
    .station-name {
        font-size: 16px;
    }
    .tele-pill {
        padding: 0 7px;
        height: 28px;
        font-size: 11.5px;
    }
    .station-routes-bar {
        padding: 8px 12px 10px;
        gap: 6px;
    }
    .station-routes-grid {
        gap: 5px;
    }
    .v3-num-tile {
        height: 36px;
    }
    .tile-num-val {
        font-size: 15px;
    }
    .search-box-compact .search-input {
        font-size: 12.5px;
        padding: 5px 0;
    }
    .search-box-compact .search-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
}

/* ==========================================================================
   HOME PAGE PWA APP SLIM BAR (НИЖЕ HERO БЛОКА)
   ========================================================================== */
.home-pwa-bar {
    margin: 16px 0 10px;
    position: relative;
    z-index: 10;
}

.home-pwa-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 18px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.home-pwa-bar-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
}

.home-pwa-bar-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.home-pwa-bar-text {
    font-size: 13.5px;
    color: #475569;
    line-height: 1.35;
}

.home-pwa-bar-text strong {
    color: #0f172a;
    font-weight: 700;
}

.home-pwa-bar-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
    transition: background 0.15s, transform 0.15s;
    white-space: nowrap;
}

.home-pwa-bar-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.home-pwa-bar-btn:active {
    transform: translateY(0);
}

@media screen and (max-width: 640px) {
    .home-pwa-bar-inner {
        padding: 8px 12px;
        gap: 10px;
    }
    .home-pwa-bar-icon {
        width: 26px;
        height: 26px;
    }
    .home-pwa-bar-text {
        font-size: 12px;
        line-height: 1.25;
    }
    .home-pwa-bar-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}


