﻿/* ===========================================================
    1. RESET & SYSTEM VARIABLES
=========================================================== */
:root {
    --primary: #007bff;
    --primary-hover: #0056b3;
    --pink: #d63384;
    --pink-hover: #b82a6e;
    --bg-light: #f4f7f9;
    --glass: rgba(255, 255, 255, 0.98);
    --card-shadow: 0 10px 30px rgba(0,0,0,0.08);
    --input-height: 50px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-z: 10001;
    --overlay-z: 10000;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-light);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===========================================================
    2. HEADER & STICKY NAVIGATION
=========================================================== */
.top-header {
    width: 100%;
    background: var(--glass);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    z-index: 1000;
    position: sticky;
    top: 0;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    gap: 15px;
}

.header-logo img {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.header-title h1 {
    font-size: 22px;
    font-weight: 800;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Desktop Nav */
.main-nav {
    background: #fff;
    border-bottom: 4px solid var(--primary);
    position: relative;
    z-index: 990;
}

.nav-links {
    list-style: none;
    display: flex;
    justify-content: center;
}

    .nav-links li a {
        text-decoration: none;
        color: #222;
        font-weight: 750;
        font-size: 14px;
        padding: 15px 25px;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: var(--transition);
        text-transform: uppercase;
    }

        .nav-links li a:hover {
            color: var(--primary);
            background: rgba(0, 123, 255, 0.05);
        }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary);
    cursor: pointer;
}
/* HIDE CLOSE BUTTON ON DESKTOP */
.nav-close {
    display: none;
}
/* ===========================================================
    3. LOCATION HERO & SEARCH
=========================================================== */
.location-hero {
    background: linear-gradient(rgba(0, 123, 255, 0.02), rgba(0, 123, 255, 0.07)), white;
    padding: 60px 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
    border-radius: 0 0 40px 40px;
}

.network-badge {
    background: var(--pink);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(214, 51, 132, 0.2);
}

.search-container {
    position: relative;
    max-width: 600px;
    margin: 25px auto 0;
    display: flex;
    gap: 10px;
}

#locationSearch {
    flex: 1;
    height: var(--input-height);
    padding: 0 20px 0 50px;
    border-radius: 30px;
    border: 2px solid #ddd;
    font-size: 16px;
    outline: none;
    transition: var(--transition);
}

    #locationSearch:focus {
        border-color: var(--primary);
    }

.search-icon {
    position: absolute;
    left: 20px;
    top: 16px;
    color: var(--primary);
}

.btn-search {
    padding: 0 25px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
}

/* ===========================================================
    4. LOCATION CONTENT (SIDEBAR & GRID)
=========================================================== */
/* --- Desktop & Base Styles --- */
.location-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    padding: 40px 5%;
}

.location-sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.region-list {
    list-style: none;
    padding: 0;
    max-height: 70vh;
    overflow-y: auto; /* Scrollable list for desktop */
}

    .region-list li a {
        display: block;
        padding: 10px 15px;
        color: #444;
        text-decoration: none;
        border-bottom: 1px solid #eee;
        transition: 0.3s;
    }

        .region-list li a:hover {
            background: #f8f9fa;
            color: var(--primary);
        }

.location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.location-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #eee;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

    .location-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--card-shadow);
    }

.card-status {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #e7f3ff;
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    padding: 1px;
}

.card-top {
    padding: 25px;
    background: #fcfdfe;
    border-bottom: 1px solid #f0f0f0;
}

.network-route {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.route-point {
    display: flex;
    flex-direction: column;
}

.city-name {
    font-size: 18px;
    font-weight: 800;
    color: #111;
}

.city-tag {
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
}

.route-path {
    flex: 1;
    height: 2px;
    background: #e0e0e0;
    margin: 0 15px;
    position: relative;
}

    .route-path i {
        position: absolute;
        top: -10px;
        left: 0;
        color: var(--primary);
        animation: drive 3s infinite linear;
    }

@keyframes drive {
    0% {
        left: 0%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

.card-bottom {
    padding: 25px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 10px;
    color: #555;
}

    .info-row i {
        color: var(--primary);
        width: 20px;
    }

.btn-book {
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.2s;
}

    .btn-book:hover {
        background: var(--primary-hover);
    }

/* ===========================================================
    5. MOBILE DRAWER & OVERLAY (CRITICAL FOR EVENT FIRING)
=========================================================== */
@media (max-width: 900px) {
    .header-row {
        padding: 10px 20px;
    }

    .header-logo img {
        height: 50px;
    }

    .header-title h1 {
        font-size: 16px;
        text-align: left;
        flex: 1;
        margin-left: 10px;
    }

    .header-contact {
        display: none !important;
    }

    .menu-toggle {
        display: block;
        order: 3;
    }

    /* The Drawer Navigation */
    .main-nav {
        position: fixed;
        right: -320px;
        top: 0;
        width: 280px;
        height: 100vh;
        z-index: 9999;
        background: #fff;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: block !important;
        pointer-events: none;
    }

        .main-nav.active {
            right: 0;
            pointer-events: auto;
        }

    .nav-close {
        display: block;
        padding: 20px;
        text-align: right;
        font-size: 26px;
        color: var(--primary);
    }

    .nav-links {
        flex-direction: column;
        padding-top: 0;
    }

        .nav-links li a {
            padding: 18px 25px;
            border-bottom: 1px solid #f5f5f5;
            justify-content: flex-start;
            position: relative;
            pointer-events: auto !important;
        }

    /* The Overlay */
    .menu-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        visibility: hidden;
        opacity: 0;
        z-index: 0;
        transition: 0.3s;
        pointer-events: none;
    }

        .menu-overlay.active {
            visibility: visible;
            opacity: 1;
            pointer-events: auto;
        }

    /* --- LOCATION SECTION MOBILE FIX --- */

    .location-content {
        display: flex;
        flex-direction: column; /* Stack Sidebar on top of Grid */
        width: 100%;
        padding: 15px;
        margin-top: 10px;
    }

    /* Turn the 300+ city sidebar into a horizontal swipe bar */
    .location-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        padding: 10px 0;
        box-shadow: none;
        background: transparent;
        margin-bottom: 10px;
    }

        .location-sidebar h3 {
            font-size: 14px;
            margin-bottom: 10px;
            color: #666;
            padding-left: 5px;
        }

    .region-list {
        display: flex; /* Horizontal Layout */
        flex-direction: row;
        overflow-x: auto; /* Swipe left/right */
        gap: 10px;
        padding: 5px 0 15px 0;
        max-height: none;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Hide scrollbar for clean UI */
    }

        .region-list::-webkit-scrollbar {
            display: none;
        }

        .region-list li {
            flex: 0 0 auto; /* Stop cities from shrinking */
        }

            .region-list li a {
                background: #fff;
                border: 1px solid #ddd;
                border-radius: 50px; /* Pill/Chip style */
                padding: 6px 15px;
                font-size: 13px;
                white-space: nowrap;
                border-bottom: 1px solid #ddd; /* Reset desktop border */
            }

    /* Grid Adjustment */
    .location-grid {
        grid-template-columns: 1fr; /* One card per row */
        width: 100%;
        gap: 15px;
    }

    .location-card {
        width: 100%;
        margin: 0;
    }

    /* Route spacing fix */
    .network-route {
        font-size: 14px;
        gap: 5px;
        justify-content: space-between;
    }

    .route-line {
        flex: 1;
        min-width: 20px;
    }
}
