:root {
    --primary-red: #DC241F;
    --primary-red-hover: #b81b16;
    --bus-navy: #111827;
    --bg-light: #F8FAFC;
    --card-bg: #FFFFFF;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --warning-bg: #FEF3C7;
    --warning-border: #F59E0B;
    --warning-text: #92400E;
    --badge-blue: #0284C7;
    --badge-green: #16A34A;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.08);
}

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

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Header */
.app-header {
    background: #ffffff;
    border-bottom: 2px solid var(--primary-red);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.header-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.london-bus-svg {
    display: inline-block;
    vertical-align: middle;
    filter: drop-shadow(0 2px 4px rgba(220, 36, 31, 0.25));
    transition: transform 0.2s ease;
}

.brand-logo:hover .london-bus-svg {
    transform: scale(1.08) rotate(-1deg);
}

.logo-text {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--bus-navy);
    letter-spacing: -0.5px;
}

.logo-dot {
    color: var(--primary-red);
}

.header-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.city-dropdown select,
.language-dropdown select {
    background: #F1F5F9;
    border: 1px solid var(--border-color);
    padding: 0.42rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.city-dropdown select:hover,
.language-dropdown select:hover {
    border-color: #CBD5E1;
    background: #FFFFFF;
}

.btn-share-header {
    background: #F1F5F9;
    border: 1px solid var(--border-color);
    padding: 0.42rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--bus-navy);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.btn-share-header:hover {
    background: var(--primary-red);
    color: #FFFFFF;
    border-color: var(--primary-red);
}

.btn-share-header svg {
    stroke: currentColor;
}

/* Tab Navigation (Inspired by Balıkesir Otobüs) */
.tab-nav {
    display: flex;
    background: #E2E8F0;
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 1.75rem;
    gap: 4px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.65rem 0.5rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    background: #FFFFFF;
    color: var(--primary-red);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Tab contents */
.tab-content.hidden {
    display: none !important;
}

/* Main Container */
.main-content {
    max-width: 680px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
}

/* Hero */
.hero-section {
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.6px;
    color: var(--bus-navy);
    margin-bottom: 0.35rem;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Search Card */
.search-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.45rem;
}

.indicator {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.origin-dot { background-color: var(--badge-blue); }
.dest-dot { background-color: var(--primary-red); }

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input,
.input-group input {
    width: 100%;
    padding: 0.95rem 1rem;
    font-size: 1.05rem;
    font-weight: 500;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #FFFFFF;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.input-wrapper input::placeholder,
.input-group input::placeholder {
    color: #94A3B8 !important;
    font-weight: 400 !important;
    font-size: 0.98rem;
    opacity: 0.9;
}

#originInput {
    padding-right: 5.2rem;
}

#destInput,
#lineSelectInput {
    padding-right: 2.6rem;
}

[dir="rtl"] #originInput {
    padding-right: 1rem;
    padding-left: 5.2rem;
}

[dir="rtl"] #destInput,
[dir="rtl"] #lineSelectInput {
    padding-right: 1rem;
    padding-left: 2.6rem;
}

.input-wrapper input:focus,
.input-group input:focus {
    border-color: var(--primary-red);
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 36, 31, 0.12);
}

.btn-clear {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    background: #F1F5F9;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748B;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
    line-height: 1;
    z-index: 2;
}

.btn-clear:hover {
    background: #E2E8F0;
    color: #0F172A;
}

#clearOriginBtn {
    right: 3.5rem;
}

[dir="rtl"] #clearOriginBtn {
    right: auto;
    left: 3.5rem;
}

[dir="rtl"] #clearDestBtn {
    right: auto;
    left: 0.8rem;
}

.btn-location {
    position: absolute;
    right: 0.6rem;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.65rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

[dir="rtl"] .btn-location {
    right: auto;
    left: 0.6rem;
}

.btn-primary {
    width: 100%;
    background: var(--primary-red);
    color: #FFFFFF;
    border: none;
    padding: 1.1rem;
    font-size: 1.15rem;
    font-weight: 800;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 6px 16px rgba(220, 36, 31, 0.28);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-red-hover);
    transform: translateY(-1px);
}

.btn-arrow {
    font-size: 1.3rem;
    transition: transform 0.2s;
}

[dir="rtl"] .btn-arrow {
    transform: rotate(180deg);
}

/* Direction Toggle Modern Cards */
.direction-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-top: 1rem;
}

@media (max-width: 640px) {
    .direction-toggle {
        grid-template-columns: 1fr;
    }
}

.dir-radio {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #FFFFFF;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.dir-radio:hover {
    border-color: #94A3B8;
    background: #F8FAFC;
    transform: translateY(-1px);
}

.dir-radio-outbound.active,
.dir-radio-outbound:has(input:checked) {
    background: #EFF6FF;
    border-color: #2563EB;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.15);
}

.dir-radio-outbound input[type="radio"] {
    accent-color: #2563EB;
}

.dir-radio-outbound.active .dir-pill-title,
.dir-radio-outbound:has(input:checked) .dir-pill-title {
    background: #2563EB;
}

.dir-radio-inbound.active,
.dir-radio-inbound:has(input:checked) {
    background: #FEF2F2;
    border-color: #DC2626;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.15);
}

.dir-radio-inbound input[type="radio"] {
    accent-color: #DC2626;
}

.dir-radio-inbound.active .dir-pill-title,
.dir-radio-inbound:has(input:checked) .dir-pill-title {
    background: #DC2626;
}

.dir-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
}

.dir-card-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dir-pill-title {
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #0F172A;
    color: #FFFFFF;
    padding: 2px 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.dir-route-endpoints {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 2px;
}

.endpoint-line {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ep-icon {
    font-size: 0.78rem;
    flex-shrink: 0;
}

.ep-label {
    font-weight: 700;
    color: #64748B;
    flex-shrink: 0;
    font-size: 0.78rem;
}

.ep-name {
    font-weight: 700;
    color: #0F172A;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Map Status Badge */
.map-status-badge {
    margin-top: 1.25rem;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    padding: 0.85rem 1.15rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: #16A34A;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* Leaflet Map Box */
.map-view-box {
    width: 100%;
    height: 520px;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    margin-top: 1.25rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    z-index: 10;
}

/* Custom Leaflet Markers */
.bus-map-marker {
    background: var(--primary-red);
    color: #FFFFFF;
    border: 2px solid #FFFFFF;
    border-radius: 20px;
    padding: 3px 8px;
    font-weight: 800;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(220, 36, 31, 0.45);
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.bus-map-marker:hover {
    transform: scale(1.12);
}

.stop-map-marker {
    background: #0F172A;
    color: #FFFFFF;
    border: 2px solid #FFFFFF;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-weight: 800;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.stop-map-marker:hover {
    transform: scale(1.25);
    background: var(--primary-red);
}

.start-map-marker {
    background: #16A34A !important;
    color: #FFFFFF !important;
    border: 2.5px solid #FFFFFF !important;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-weight: 800;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(22, 163, 74, 0.55);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.start-map-marker:hover {
    transform: scale(1.22);
}

.end-map-marker {
    background: #DC2626 !important;
    color: #FFFFFF !important;
    border: 2.5px solid #FFFFFF !important;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-weight: 800;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.55);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.end-map-marker:hover {
    transform: scale(1.22);
}

/* Leaflet Popup Custom Polish */
.leaflet-popup-content-wrapper {
    border-radius: 14px !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18) !important;
    padding: 2px !important;
    font-family: inherit !important;
}

.leaflet-popup-content {
    margin: 12px 14px !important;
    line-height: 1.45 !important;
}

.bus-popup-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 6px;
}

.bus-popup-badge {
    background: #DC241F;
    color: #FFF;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
}

.bus-popup-row {
    font-size: 0.85rem;
    color: #475569;
    margin: 3px 0;
}

.bus-popup-eta {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #16A34A;
    background: #DCFCE7;
    padding: 3px 8px;
    border-radius: 6px;
}

/* Flow Arrow on Route Polyline */
.flow-arrow-marker {
    background: transparent;
    border: none;
}

.flow-arrow-inner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 900;
    line-height: 1;
    border: 1.5px solid #FFFFFF;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease;
}

/* De-cluttered Intermediate Stop Marker */
.stop-map-marker-dot {
    background: #0F172A;
    border: 2px solid #FFFFFF;
    border-radius: 50%;
    width: 13px;
    height: 13px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.stop-map-marker-dot:hover {
    transform: scale(1.6);
    background: #DC2626;
}

/* Next Arrival Card inside Bus Popup */
.bus-next-arrival-card {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 8px 10px;
    margin: 8px 0;
}

.next-arrival-header {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475569;
    margin-bottom: 3px;
}

.next-arrival-body {
    font-size: 0.88rem;
    color: #0F172A;
    line-height: 1.35;
}

.eta-highlight {
    background: #DCFCE7;
    color: #15803D;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 5px;
    display: inline-block;
}

.next-arrival-sub {
    font-size: 0.75rem;
    color: #64748B;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px dashed #E2E8F0;
}

/* Nearby Stops Cards */
.nearby-stops-container {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nearby-stop-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-subtle);
}

.stop-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.6rem;
}

.stop-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--bus-navy);
}

.stop-distance-badge {
    background: #F1F5F9;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
}

.serving-lines-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.6rem 0;
}

.line-tag {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: var(--primary-red);
    font-weight: 800;
    font-size: 0.88rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
}

.arrivals-list {
    margin-top: 0.85rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.arrival-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.92rem;
    font-weight: 600;
}

.arrival-line {
    font-weight: 800;
    color: var(--bus-navy);
}

.arrival-mins-badge {
    background: #DCFCE7;
    color: #15803D;
    font-weight: 800;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* Quick Picks */
.quick-picks {
    margin-top: 1.25rem;
}

.quick-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.route-pill {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    padding: 0.45rem 0.85rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.route-pill:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
    background: #FEF2F2;
}

/* Recommend / Viral Share Banner */
.share-app-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.25rem;
    margin-top: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.share-banner-content {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.share-banner-icon-badge {
    position: relative;
    width: 48px;
    height: 48px;
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.share-banner-icon-badge svg {
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
}

.share-banner-icon-badge .badge-sparkle {
    position: absolute;
    top: -5px;
    right: -6px;
    font-size: 0.85rem;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.share-banner-text h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--bus-navy);
    margin-bottom: 0.15rem;
}

.share-banner-text p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.35;
}

.btn-recommend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bus-navy);
    color: #FFFFFF;
    border: none;
    padding: 0.55rem 1rem;
    border-radius: 24px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-recommend:hover {
    background: var(--primary-red);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.btn-recommend svg {
    stroke: currentColor;
}

@media (max-width: 600px) {
    .share-app-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .btn-recommend {
        width: 100%;
        justify-content: center;
    }
}

/* Loading & States */
.state-container {
    text-align: center;
    padding: 3rem 1rem;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #E2E8F0;
    border-top: 4px solid var(--primary-red);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

/* Results Section */
.results-section {
    margin-top: 2.5rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.results-header-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.results-header h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--bus-navy);
}

.duration-badge {
    background: var(--bus-navy);
    color: #FFFFFF;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: 30px;
}

.btn-share-journey {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #EFF6FF;
    color: #1D4ED8;
    border: 1px solid #BFDBFE;
    padding: 0.45rem 0.85rem;
    border-radius: 20px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-share-journey:hover {
    background: #1D4ED8;
    color: #FFFFFF;
    border-color: #1D4ED8;
    box-shadow: 0 2px 6px rgba(29, 78, 216, 0.25);
}

.btn-share-journey svg {
    stroke: currentColor;
}

/* Timeline */
.journey-timeline {
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 2rem;
}

[dir="rtl"] .journey-timeline {
    padding-left: 0;
    padding-right: 2rem;
}

.journey-timeline::before {
    content: '';
    position: absolute;
    top: 25px;
    bottom: 25px;
    left: 17px;
    width: 4px;
    background: #CBD5E1;
    border-radius: 4px;
}

[dir="rtl"] .journey-timeline::before {
    left: auto;
    right: 17px;
}

/* Step Card */
.step-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.35rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-subtle);
    transition: transform 0.15s ease;
}

.step-card:hover {
    transform: translateX(3px);
}

[dir="rtl"] .step-card:hover {
    transform: translateX(-3px);
}

.step-node {
    position: absolute;
    left: -2.35rem;
    top: 1.25rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bus-navy);
    color: #FFFFFF;
    font-size: 0.95rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 4px var(--bg-light);
}

[dir="rtl"] .step-node {
    left: auto;
    right: -2.35rem;
}

.node-bus {
    background: var(--primary-red);
}

.step-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.4rem;
}

.step-title {
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--bus-navy);
}

.step-badge {
    background: #F1F5F9;
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
}

.badge-route {
    background: var(--primary-red);
    color: #FFFFFF;
    font-size: 0.95rem;
    padding: 0.3rem 0.75rem;
    border-radius: 8px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.step-desc {
    font-size: 1.05rem;
    color: #334155;
    font-weight: 500;
    line-height: 1.5;
}

/* Direction Warning Banner */
.warning-box {
    margin-top: 0.85rem;
    background: var(--warning-bg);
    border-left: 5px solid var(--warning-border);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--warning-text);
    line-height: 1.4;
}

[dir="rtl"] .warning-box {
    border-left: none;
    border-right: 5px solid var(--warning-border);
}

/* Demo Location Switcher */
.demo-location-box {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--border-color);
}

.demo-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.demo-loc-btn {
    background: #F8FAFC;
    border: 1px solid var(--border-color);
    padding: 0.45rem 0.85rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.15s ease;
}

.demo-loc-btn:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
    background: #FEF2F2;
}

.demo-loc-btn.active {
    background: var(--bus-navy);
    color: #FFFFFF;
    border-color: var(--bus-navy);
}

.demo-notice {
    margin-top: 1rem;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1E40AF;
}

/* Footer */
.app-footer {
    max-width: 680px;
    margin: 3rem auto 1rem;
    text-align: center;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: var(--primary-red);
    text-decoration: underline;
}

.dot-sep {
    color: #CBD5E1;
    font-size: 0.75rem;
}

.footer-copy {
    margin-top: 0.3rem;
    font-weight: 600;
}

.footer-pwa-refresh {
    margin: 0.75rem 0 0.4rem;
    display: flex;
    justify-content: center;
}

.btn-pwa-refresh {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.95rem;
    border-radius: 20px;
    background: #F1F5F9;
    border: 1px solid #CBD5E1;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-pwa-refresh:hover,
.btn-pwa-refresh:active {
    background: #E2E8F0;
    color: #0F172A;
    border-color: #94A3B8;
}

.refresh-spin-icon {
    font-size: 1rem;
    line-height: 1;
    display: inline-block;
}

/* Toast Notifications */
.app-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: #0F172A;
    color: #FFFFFF;
    padding: 0.75rem 1.35rem;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: fadeInUp 0.25s ease;
}

.app-toast.hidden {
    display: none !important;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translate(-50%, 15px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* Crowding and Occupancy Badge / Feedback in Map Popups */
.bus-crowd-section {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #E2E8F0;
}

.bus-crowd-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748B;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.bus-crowd-badge {
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.72rem;
}

.bus-crowd-badge.quiet {
    background: #DCFCE7;
    color: #15803D;
}

.bus-crowd-badge.moderate {
    background: #FEF3C7;
    color: #B45309;
}

.bus-crowd-badge.busy {
    background: #FEE2E2;
    color: #B91C1C;
}

.crowd-feedback-box {
    margin-top: 6px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 6px 8px;
}

.crowd-feedback-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 4px;
}

.crowd-btn-group {
    display: flex;
    gap: 4px;
}

.crowd-btn {
    flex: 1;
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    padding: 4px 2px;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.crowd-btn:hover {
    background: #0F172A;
    color: #FFFFFF;
    border-color: #0F172A;
}

.crowd-thankyou {
    font-size: 0.75rem;
    font-weight: 700;
    color: #16A34A;
    margin-top: 4px;
    text-align: center;
}

.btn-im-on-bus {
    background: transparent;
    border: 1px dashed #94A3B8;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-im-on-bus:hover {
    background: #0F172A;
    color: #FFFFFF;
    border-style: solid;
    border-color: #0F172A;
}

.ride-crowd-card {
    margin-top: 0.75rem;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 8px 12px;
}

.ride-crowd-prompt {
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Base Mobile Bottom Navigation (Hidden on desktop/tablet) */
.mobile-bottom-nav {
    display: none;
}

/* ==========================================================================
   NATIVE MOBILE (SEVİYE B) RESPONSIVE DESIGN (<= 600px)
   ========================================================================== */
@media (max-width: 600px) {
    /* Absolute guarantee against horizontal scroll */
    html, body {
        overflow-x: hidden !important;
        position: relative;
        width: 100vw;
    }

    /* Ultra-Compact Clean Header */
    .header-container {
        padding: 0.55rem 0.75rem;
        gap: 0.35rem;
    }

    .brand-logo {
        gap: 0.35rem;
        flex-shrink: 0;
    }

    .logo-text {
        font-size: 1.08rem;
        letter-spacing: -0.3px;
    }

    .london-bus-svg {
        width: 30px;
        height: 25px;
    }

    .header-controls {
        gap: 0.3rem;
    }

    .city-dropdown select,
    .language-dropdown select {
        padding: 0.32rem 0.45rem;
        font-size: 0.75rem;
        border-radius: 6px;
        max-width: 96px;
    }

    .btn-share-header {
        padding: 0;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        justify-content: center;
        flex-shrink: 0;
    }

    .btn-share-header .share-text {
        display: none;
    }

    /* Hide Top Tab Bar on Mobile (Clean Native App UX) */
    .tab-nav {
        display: none !important;
    }

    /* Body Padding for Bottom Floating Nav */
    .main-content {
        padding: 0.85rem 0.85rem calc(85px + env(safe-area-inset-bottom, 16px));
        max-width: 100%;
    }

    .app-footer {
        padding-bottom: calc(95px + env(safe-area-inset-bottom, 16px));
    }

    /* Floating Segmented Mobile Navigation Bar */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: calc(12px + env(safe-area-inset-bottom, 8px));
        left: 12px;
        right: 12px;
        max-width: 440px;
        margin: 0 auto;
        z-index: 1000;
        background: #E2E8F0;
        border: 1px solid #CBD5E1;
        border-radius: 18px;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.08);
        padding: 4px;
        gap: 4px;
        justify-content: space-between;
        align-items: center;
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    .mobile-nav-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 7px 4px;
        background: transparent;
        border: none;
        border-radius: 13px;
        color: #475569;
        cursor: pointer;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        font-family: inherit;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-nav-icon {
        stroke: currentColor;
        transition: transform 0.18s ease, stroke 0.18s ease;
    }

    .mobile-nav-label {
        font-size: 0.74rem;
        font-weight: 700;
        letter-spacing: -0.2px;
        line-height: 1.1;
    }

    .mobile-nav-btn.active {
        color: var(--primary-red) !important;
        background: #FFFFFF !important;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
        transform: translateY(-1px);
    }

    .mobile-nav-btn.active .mobile-nav-icon {
        transform: scale(1.1);
        stroke: var(--primary-red);
        stroke-width: 2.4;
    }

    .mobile-nav-btn.active .mobile-nav-label {
        font-weight: 800;
    }

    .mobile-nav-btn:active {
        transform: scale(0.95);
    }

    /* Form & Cards Optimization */
    .hero-title {
        font-size: 1.55rem;
        line-height: 1.25;
    }

    .hero-subtitle {
        font-size: 0.86rem;
        margin-bottom: 1.1rem;
    }

    .search-card {
        padding: 1rem 0.9rem;
        border-radius: 16px;
    }

    .input-wrapper input {
        font-size: 0.95rem;
        padding: 0.75rem 0.85rem;
    }

    .btn-primary {
        padding: 0.85rem 1rem;
        font-size: 0.98rem;
    }

    .pill-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .route-pill {
        font-size: 0.76rem;
        padding: 0.4rem 0.65rem;
    }

    .nearby-stops-container {
        grid-template-columns: 1fr;
    }
}

/* ================= MONETIZATION & PARTNER ATTRACTION CARDS ================= */
.monetization-slot {
    margin-top: 1.75rem;
    min-height: 100px;
}

.adsense-box {
    background: #FAFAFA;
    border: 1px dashed #E2E8F0;
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    text-align: center;
    overflow: hidden;
}

.partner-attraction-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    border: 1px solid #E2E8F0;
    border-left: 5px solid var(--primary-red);
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.5rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

[dir="rtl"] .partner-attraction-card {
    border-left: 1px solid #E2E8F0;
    border-right: 5px solid var(--primary-red);
}

.partner-attraction-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
}

.partner-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.partner-badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #FEF3C7;
    color: #92400E;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
}

.partner-official-tag {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.partner-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--bus-navy);
    margin: 0;
    line-height: 1.3;
}

.partner-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.45;
}

.partner-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.15rem;
}

.partner-pill {
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #DBEAFE;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
}

.btn-partner-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary-red);
    color: #FFFFFF !important;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 800;
    margin-top: 0.35rem;
    transition: all 0.2s ease;
    align-self: flex-start;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-partner-cta:hover {
    background: var(--primary-red-hover, #B91C1C);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.btn-partner-cta svg {
    stroke: #FFFFFF;
}

@media (max-width: 600px) {
    .partner-attraction-card {
        padding: 1.1rem;
    }
    .btn-partner-cta {
        width: 100%;
    }
}

/* ================= COOKIE CONSENT BANNER (GDPR / CONSENT MODE V2) ================= */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 560px;
    margin: 0 auto;
    z-index: 2000;
    animation: slideUpCookie 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpCookie {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cookie-banner-inner {
    background: #0F172A;
    color: #F8FAFC;
    border: 1px solid #334155;
    border-radius: 20px;
    padding: 1.15rem 1.35rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.cookie-content {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.cookie-icon {
    font-size: 1.6rem;
    line-height: 1;
    flex-shrink: 0;
}

.cookie-text strong {
    display: block;
    font-size: 0.94rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    color: #FFFFFF;
}

.cookie-text p {
    font-size: 0.84rem;
    color: #94A3B8;
    margin: 0;
    line-height: 1.45;
}

.cookie-text a {
    color: #93C5FD;
    text-decoration: underline;
    font-weight: 700;
}

.cookie-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
}

.btn-cookie {
    padding: 0.5rem 1.1rem;
    border-radius: 12px;
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
}

.btn-cookie-accept {
    background: var(--primary-red);
    color: #FFFFFF;
}

.btn-cookie-accept:hover {
    filter: brightness(1.15);
}

.btn-cookie-secondary {
    background: #1E293B;
    color: #CBD5E1;
    border: 1px solid #475569;
}

.btn-cookie-secondary:hover {
    background: #334155;
    color: #FFFFFF;
}

@media (max-width: 600px) {
    .cookie-banner {
        bottom: calc(75px + env(safe-area-inset-bottom, 12px));
        left: 10px;
        right: 10px;
    }
    .cookie-actions {
        width: 100%;
    }
    .btn-cookie {
        flex: 1;
        text-align: center;
    }
}

/* ================= POLICY & LEGAL PAGES ================= */
.policy-body {
    background: #F8FAFC;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.policy-main {
    flex: 1;
    max-width: 820px;
    width: 100%;
    margin: 1.5rem auto 3.5rem;
    padding: 0 1rem;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 1rem;
}

.btn-back-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #F1F5F9;
    border: 1px solid var(--border-color);
    padding: 0.45rem 0.95rem;
    border-radius: 20px;
    color: var(--bus-navy);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-back-home:hover {
    background: #E2E8F0;
    color: var(--primary-red);
}

.policy-card {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 2.25rem 2.5rem;
    box-shadow: var(--shadow-card);
}

.policy-card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.25rem;
    margin-bottom: 1.75rem;
}

.policy-badge {
    display: inline-block;
    background: #EFF6FF;
    color: #1D4ED8;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    margin-bottom: 0.65rem;
}

.policy-h1 {
    font-size: 1.95rem;
    font-weight: 800;
    color: var(--bus-navy);
    line-height: 1.25;
    margin-bottom: 0.4rem;
}

.policy-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.policy-body-text {
    line-height: 1.7;
    color: #334155;
    font-size: 0.96rem;
}

.policy-body-text h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--bus-navy);
    margin-top: 2rem;
    margin-bottom: 0.65rem;
    border-bottom: 1px solid #F1F5F9;
    padding-bottom: 0.35rem;
}

.policy-body-text p {
    margin-bottom: 1rem;
}

.policy-body-text ul {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.policy-body-text li {
    margin-bottom: 0.45rem;
}

.policy-body-text a {
    color: #1D4ED8;
    text-decoration: underline;
}

.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.contact-info-card {
    background: #F8FAFC;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.35rem;
}

.contact-info-card h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--bus-navy);
    margin-bottom: 0.5rem;
}

.contact-info-card a {
    color: var(--primary-red);
    font-weight: 700;
}

.contact-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

@media (max-width: 600px) {
    .policy-card {
        padding: 1.5rem 1.1rem;
    }
    .policy-h1 {
        font-size: 1.5rem;
    }
}

/* ========================================================
   SAVED PLACES / FAVORITES & TAKE ME HOME STYLES
   ======================================================== */
.take-me-home-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1E293B, #0F172A);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    animation: fadeIn 0.3s ease-out;
}

.take-me-home-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.take-me-home-icon {
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.4rem;
    border-radius: 10px;
    flex-shrink: 0;
}

.take-me-home-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.take-me-home-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #F8FAFC;
    line-height: 1.2;
}

.take-me-home-dest {
    font-size: 0.75rem;
    color: #94A3B8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.15rem;
}

.btn-take-me-home {
    background: var(--primary-red);
    color: #FFFFFF;
    border: none;
    border-radius: 9999px;
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn-take-me-home:hover {
    transform: scale(1.04);
    background: #B91C1C;
}

/* Saved Places Quick Chips Bar inside Search Card */
.saved-places-group {
    margin: 0.65rem 0 1rem;
}

.saved-places-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.saved-places-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.saved-places-chips {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.saved-places-chips::-webkit-scrollbar {
    display: none;
}

.place-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bus-navy);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    user-select: none;
}

.place-chip:hover {
    background: #E2E8F0;
    border-color: #CBD5E1;
}

.place-chip.configured {
    background: #EFF6FF;
    border-color: #BFDBFE;
    color: #1D4ED8;
}

.place-chip.configured:hover {
    background: #DBEAFE;
    border-color: #93C5FD;
}

.place-chip-action {
    opacity: 0.4;
    font-size: 0.7rem;
    margin-left: 0.15rem;
    padding: 0.1rem 0.2rem;
    border-radius: 4px;
    transition: opacity 0.15s;
}

.place-chip-action:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.08);
}

.place-chip.add-chip {
    background: transparent;
    border: 1px dashed #94A3B8;
    color: var(--text-muted);
}

.place-chip.add-chip:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
    background: #FEF2F2;
}

/* Modal Overlay & Card */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.modal-overlay.hidden {
    display: none !important;
}

.modal-card {
    background: #FFFFFF;
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 440px;
    padding: 1.5rem;
    position: relative;
    animation: slideUpModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--bus-navy);
    margin: 0;
}

.modal-close-btn {
    background: #F1F5F9;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #64748B;
    cursor: pointer;
    transition: background 0.15s;
}

.modal-close-btn:hover {
    background: #E2E8F0;
    color: var(--bus-navy);
}

.modal-field {
    margin-bottom: 1.1rem;
    position: relative;
}

.modal-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--bus-navy);
    margin-bottom: 0.45rem;
}

.place-type-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.preset-btn {
    padding: 0.35rem 0.65rem;
    background: #F8FAFC;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

.preset-btn:hover {
    background: #F1F5F9;
}

.preset-btn.active {
    background: #EFF6FF;
    border-color: #3B82F6;
    color: #1D4ED8;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.custom-name-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-top: 0.3rem;
}

.custom-name-input:focus,
.modal-field input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(220, 36, 31, 0.15);
}

.modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.btn-delete {
    margin-right: auto;
    background: transparent;
    border: none;
    color: #DC2626;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: background 0.15s;
}

.btn-delete:hover {
    background: #FEE2E2;
}

.btn-modal-secondary {
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    color: #475569;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-modal-secondary:hover {
    background: #E2E8F0;
}

.btn-modal-primary {
    background: var(--primary-red);
    border: none;
    color: #FFFFFF;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-modal-primary:hover {
    background: #B91C1C;
}

/* Autocomplete suggestions dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #FFFFFF;
    border: 1.5px solid #CBD5E1;
    border-radius: 12px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.16);
    max-height: 260px;
    overflow-y: auto;
    z-index: 1050;
    padding: 4px 0;
}

.autocomplete-item {
    padding: 0.7rem 0.95rem;
    font-size: 0.88rem;
    color: var(--bus-navy);
    cursor: pointer;
    border-bottom: 1px solid #F1F5F9;
    transition: background 0.15s, border-left-color 0.15s;
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: left;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background: #F8FAFC;
}

.ac-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.ac-icon {
    font-size: 1.05rem;
    flex-shrink: 0;
}

.ac-title {
    font-weight: 600;
    color: #0F172A;
    flex-grow: 1;
}

.ac-badge-landmark {
    background: #FEF3C7;
    color: #92400E;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.ac-badge-airport {
    background: #E0E7FF;
    color: #3730A3;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    flex-shrink: 0;
}

.ac-badge-station {
    background: #E0F2FE;
    color: #0369A1;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    flex-shrink: 0;
}

.ac-badge-hospital {
    background: #FEE2E2;
    color: #991B1B;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    flex-shrink: 0;
}

.ac-badge-park {
    background: #DCFCE7;
    color: #166534;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    flex-shrink: 0;
}

.ac-badge-shopping {
    background: #F3E8FF;
    color: #6B21A8;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    flex-shrink: 0;
}

.ac-badge-education {
    background: #EFF6FF;
    color: #1D4ED8;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    flex-shrink: 0;
}

.ac-badge-culture {
    background: #FDF2F8;
    color: #9D174D;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    flex-shrink: 0;
}

.ac-badge-sports {
    background: #FFF7ED;
    color: #C2410C;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    flex-shrink: 0;
}

.ac-subtitle {
    font-size: 0.75rem;
    color: #64748B;
    padding-left: 26px;
}

.ac-transfer-note {
    font-size: 0.72rem;
    color: #0369A1;
    background: #F0F9FF;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
    margin-left: 26px;
    display: inline-block;
}

.autocomplete-item .match-modes {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-left: 0.4rem;
}

/* One-Tap Direction Swap Button */
.swap-locations-wrapper {
    display: flex;
    justify-content: flex-end;
    margin: -0.4rem 0.5rem -0.4rem auto;
    position: relative;
    z-index: 5;
}

.btn-swap-locations {
    background: #FFFFFF;
    border: 1.5px solid #CBD5E1;
    border-radius: 20px;
    padding: 0.3rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.15s ease;
}

.btn-swap-locations:hover {
    background: #F8FAFC;
    color: var(--primary-red);
    border-color: #94A3B8;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
}

.btn-swap-locations svg {
    color: #0284C7;
}

/* Hopper Fare & Night Service Badges */
.transit-perk-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.55rem 0.85rem;
    border-radius: 10px;
    font-size: 0.83rem;
    font-weight: 600;
    margin: 0.6rem 0;
}

.badge-hopper-fare {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.badge-night-service {
    background: #EEF2FF;
    color: #3730A3;
    border: 1px solid #C7D2FE;
}

.badge-long-journey {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
}

/* Step Walking Actions & Inline Map */
.step-walk-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.step-walk-btn-nav, .step-walk-btn-map {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 11px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.step-walk-btn-nav {
    background: #16A34A;
    color: #FFFFFF;
}

.step-walk-btn-nav:hover {
    background: #15803D;
    color: #FFFFFF;
}

.step-walk-btn-map {
    background: #F1F5F9;
    color: #334155;
    border-color: #CBD5E1;
}

.step-walk-btn-map:hover {
    background: #E2E8F0;
    color: #0F172A;
}

.step-inline-map {
    width: 100%;
    height: 180px;
    border-radius: 10px;
    margin-top: 10px;
    border: 1.5px solid #CBD5E1;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Disambiguation prompt card */
.disambig-card {
    background: #F8FAFC;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.25rem;
}
.disambig-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0F172A;
    margin-bottom: 0.4rem;
}
.disambig-desc {
    font-size: 0.82rem;
    color: #64748B;
    margin-bottom: 0.75rem;
}
.disambig-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.disambig-chip {
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    padding: 0.45rem 0.85rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #0284C7;
    cursor: pointer;
    transition: all 0.15s;
}
.disambig-chip:hover {
    background: #0284C7;
    color: #FFFFFF;
    border-color: #0284C7;
}

/* ========================================================
   ALL LINES DIRECTORY PAGE STYLES
   ======================================================== */
.lines-container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.lines-header-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.75rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.lines-search-wrapper {
    margin-top: 1.25rem;
    position: relative;
}

.lines-search-input {
    width: 100%;
    padding: 0.85rem 1.1rem;
    font-size: 1rem;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    background: #F8FAFC;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.lines-search-input:focus {
    outline: none;
    border-color: var(--primary-red);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(220, 36, 31, 0.12);
}

.lines-count-badge {
    display: inline-block;
    background: #EFF6FF;
    color: #1D4ED8;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    margin-bottom: 0.5rem;
}

.lines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.85rem;
}

.line-directory-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.75rem 0.9rem;
    text-decoration: none;
    color: var(--bus-navy);
    transition: all 0.15s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.line-directory-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-red);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.line-badge-large {
    background: var(--primary-red);
    color: #FFFFFF;
    font-size: 0.95rem;
    font-weight: 800;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    min-width: 44px;
    text-align: center;
    flex-shrink: 0;
}

.line-info-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.line-card-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--bus-navy);
    line-height: 1.2;
}

.line-card-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.line-card-arrow {
    font-size: 0.9rem;
    color: #94A3B8;
    transition: transform 0.15s, color 0.15s;
}

.line-directory-card:hover .line-card-arrow {
    transform: translateX(3px);
    color: var(--primary-red);
}

.btn-all-lines-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.75rem;
    background: #F1F5F9;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--bus-navy);
    text-decoration: none;
    transition: background 0.15s;
}

.btn-all-lines-link:hover {
    background: #E2E8F0;
    color: var(--primary-red);
}

/* ==========================================================================
   PWA Smart Floating Install Banner & iOS Sheet
   ========================================================================== */
.pwa-install-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #181c24;
    color: #ffffff;
    border-radius: 40px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12);
    z-index: 9998;
    max-width: 92vw;
    width: auto;
    animation: pwaSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pwaSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 30px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.pwa-install-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-red);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}

.pwa-install-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pwa-install-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.01em;
}

.pwa-install-desc {
    font-size: 0.78rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
}

.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-pwa-install {
    background: var(--primary-red);
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn-pwa-install:hover {
    background: var(--primary-red-hover);
    transform: scale(1.04);
}

.btn-pwa-dismiss {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.15s ease;
}

.btn-pwa-dismiss:hover {
    color: #ffffff;
}

/* iOS Install Sheet */
.ios-install-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.ios-install-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.ios-install-sheet {
    position: relative;
    background: #1e293b;
    color: #fff;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 500px;
    padding: 24px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
    animation: pwaSheetUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pwaSheetUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.ios-install-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.ios-install-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.ios-install-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 22px;
}

.ios-step {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #0f172a;
    padding: 12px 16px;
    border-radius: 14px;
}

.ios-step p {
    margin: 0;
    font-size: 0.9rem;
    color: #e2e8f0;
}

.btn-ios-got-it {
    width: 100%;
    background: var(--primary-red);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 600px) {
    .pwa-install-banner {
        bottom: 16px;
        width: calc(100% - 24px);
        padding: 8px 14px;
        gap: 10px;
    }
    .pwa-install-desc {
        max-width: 180px;
    }
    .btn-pwa-install {
        padding: 6px 14px;
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   GEO & Semantic Authority Section
   ========================================================================== */
.geo-insights-section {
    background: #F8FAFC;
    border-top: 1px solid #E2E8F0;
    border-bottom: 1px solid #E2E8F0;
    padding: 3.5rem 1.5rem;
    margin-top: 3rem;
}

.geo-container {
    max-width: 1100px;
    margin: 0 auto;
}

.geo-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 2.5rem;
}

.geo-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: #EEF2F6;
    color: #475569;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    letter-spacing: 0.3px;
}

.geo-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--bus-navy);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.geo-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.geo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.geo-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 1.4rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.geo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06);
}

.geo-icon {
    font-size: 1.6rem;
    line-height: 1;
    flex-shrink: 0;
    padding-top: 0.1rem;
}

.geo-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.geo-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--bus-navy);
}

.geo-card-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
}

@media (max-width: 768px) {
    .geo-insights-section {
        padding: 2.5rem 1rem;
        margin-top: 2rem;
    }
    .geo-title {
        font-size: 1.35rem;
    }
    .geo-grid {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }
}

/* ================= POPULAR BUS LINES & ROUTES SECTION ================= */
.popular-lines-section {
    margin-top: 2.5rem;
    margin-bottom: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E2E8F0;
}

.popular-lines-header {
    margin-bottom: 1.5rem;
}

.popular-lines-badge {
    display: inline-block;
    background: #FEF2F2;
    color: var(--primary-red);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(220, 36, 31, 0.2);
    margin-bottom: 0.5rem;
}

.popular-lines-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--bus-navy);
    margin: 0.25rem 0 0.45rem 0;
    line-height: 1.3;
}

.popular-lines-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.popular-lines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.popular-line-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 1.15rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.popular-line-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-red);
}

.popular-line-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.popular-line-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 32px;
    padding: 0 0.6rem;
    background: var(--primary-red);
    color: #FFFFFF;
    font-weight: 800;
    font-size: 0.98rem;
    border-radius: 8px;
    letter-spacing: -0.2px;
}

.popular-line-tag {
    font-size: 0.74rem;
    font-weight: 700;
    background: #F1F5F9;
    color: #475569;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    white-space: nowrap;
}

.popular-line-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex-grow: 1;
}

.popular-line-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--bus-navy);
    line-height: 1.35;
}

.popular-line-highlights {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0.25rem 0 0 0;
}

.highlights-icon {
    font-size: 0.85rem;
    margin-right: 0.2rem;
}

.popular-line-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.85rem;
    padding-top: 0.65rem;
    border-top: 1px dashed #E2E8F0;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-red);
}

.action-arrow {
    transition: transform 0.2s ease;
}

.popular-line-card:hover .action-arrow {
    transform: translateX(3px);
}

.popular-lines-footer-cta {
    display: flex;
    justify-content: center;
    margin-top: 1.25rem;
}

.btn-view-all-lines {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: #FFFFFF;
    color: var(--bus-navy);
    border: 1.5px solid #CBD5E1;
    border-radius: 12px;
    padding: 0.85rem 1.6rem;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-view-all-lines:hover {
    background: #F8FAFC;
    border-color: var(--primary-red);
    color: var(--primary-red);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

@media (max-width: 640px) {
    .popular-lines-grid {
        grid-template-columns: 1fr;
    }
    .popular-lines-title {
        font-size: 1.2rem;
    }
    .btn-view-all-lines {
        width: 100%;
        text-align: center;
    }
}

/* Nearby Radar Map */
.nearby-map-wrapper {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    margin-bottom: 1.25rem;
    overflow: hidden;
    box-shadow: 0 4px 15px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.nearby-map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
}

.nearby-map-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1E293B;
}

.btn-toggle-map {
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-toggle-map:hover {
    background: #F1F5F9;
    color: #0F172A;
}

.nearby-map-box {
    width: 100%;
    height: 240px;
    z-index: 5;
    transition: height 0.3s ease;
}

.nearby-map-box.collapsed {
    height: 0px !important;
}

/* User GPS Pulsing Dot */
.user-gps-pulse {
    width: 16px;
    height: 16px;
    background: #2563EB;
    border: 2.5px solid #FFFFFF;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    animation: gpsPulse 1.8s infinite;
}

@keyframes gpsPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(37, 99, 235, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

/* Nearby Stop Pin Marker */
.nearby-stop-pin {
    background: #DC2626;
    color: #FFFFFF;
    border: 2px solid #FFFFFF;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-weight: 800;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.nearby-stop-pin:hover, .nearby-stop-pin.active-pin {
    transform: scale(1.25);
    background: #B91C1C;
    box-shadow: 0 3px 12px rgba(220, 38, 38, 0.5);
}

/* Stop Card Map and Walk Buttons */
.stop-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.btn-map-focus {
    background: #EFF6FF;
    color: #1D4ED8;
    border: 1px solid #BFDBFE;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: all 0.15s ease;
}

.btn-map-focus:hover {
    background: #DBEAFE;
}

.btn-walk-nav {
    background: #F0FDF4;
    color: #15803D;
    border: 1px solid #BBF7D0;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: all 0.15s ease;
}

.btn-walk-nav:hover {
    background: #DCFCE7;
    color: #166534;
}

.popup-walk-btn {
    display: inline-block;
    margin-top: 6px;
    background: #15803D;
    color: #FFFFFF !important;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease;
}

.popup-walk-btn:hover {
    background: #166534;
}

/* ================= LIVE RIDE COMPANION ================= */
.live-ride-card {
    background: #FFFFFF;
    border: 2px solid #2563EB;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    padding: 0.9rem 1rem;
    margin-top: 1rem;
    position: relative;
    z-index: 1000;
    transition: all 0.25s ease;
}

.ride-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 0.65rem;
    border-bottom: 1px solid #F1F5F9;
    padding-bottom: 0.5rem;
}

.ride-bus-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #0F172A;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ride-bus-badge {
    background: #2563EB;
    color: #FFFFFF;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 800;
    flex-shrink: 0;
}

.ride-dir-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #334155;
}

.btn-exit-ride {
    background: #F1F5F9;
    border: 1px solid #CBD5E1;
    color: #64748B;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.btn-exit-ride:hover {
    background: #FEE2E2;
    color: #DC2626;
    border-color: #FCA5A5;
}

/* Alight Warning Banner */
.ride-alight-alert {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border: 2px solid #F59E0B;
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.6rem;
    animation: pulseAlight 1.8s infinite ease-in-out;
}

@keyframes pulseAlight {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
}

.alight-bell-anim {
    font-size: 1.6rem;
    animation: ringBell 0.8s infinite alternate ease-in-out;
}

@keyframes ringBell {
    from { transform: rotate(-12deg); }
    to { transform: rotate(12deg); }
}

.alight-alert-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.alight-alert-text strong {
    color: #92400E;
    font-size: 0.92rem;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.alight-alert-text span {
    color: #78350F;
    font-size: 0.82rem;
    font-weight: 600;
}

/* Stat Row */
.ride-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0.6rem;
}

.ride-stat-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.ride-stat-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.ride-stat-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ride-stat-label {
    font-size: 0.72rem;
    color: #64748B;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ride-stat-value {
    font-size: 0.92rem;
    color: #0F172A;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ride-stat-counter {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    padding: 4px 10px;
    border-radius: 10px;
}

.ride-counter-number {
    font-size: 1.15rem;
    font-weight: 900;
    color: #1D4ED8;
    line-height: 1;
}

.ride-counter-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #3B82F6;
    margin-top: 2px;
}

/* Progress Bar */
.ride-progress-track {
    width: 100%;
    height: 6px;
    background: #E2E8F0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.65rem;
}

.ride-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563EB, #10B981);
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* Mini Crowd Strip */
.ride-crowd-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 0.45rem;
    border-top: 1px dashed #E2E8F0;
    flex-wrap: wrap;
}

.crowd-strip-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748B;
}

.crowd-strip-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-crowd-mini {
    background: #F8FAFC;
    border: 1px solid #CBD5E1;
    color: #1E293B;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-crowd-mini:hover {
    background: #E2E8F0;
}

.btn-crowd-mini.voted {
    background: #DCFCE7;
    border-color: #86EFAC;
    color: #166534;
}

/* Ride Button in Journey Guide Steps */
.btn-start-ride-companion {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #16A34A;
    color: #FFFFFF;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    margin-top: 8px;
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.25);
    transition: all 0.15s ease;
}

.btn-start-ride-companion:hover {
    background: #15803D;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(22, 163, 74, 0.35);
}

.btn-start-ride-popup {
    display: block;
    width: 100%;
    margin-top: 8px;
    background: #16A34A;
    color: #FFFFFF;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 7px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 2px 5px rgba(22, 163, 74, 0.3);
    transition: background 0.15s ease;
}

.btn-start-ride-popup:hover {
    background: #15803D;
}






