/* ==========================================
   LIVERY COLOR THEME MAPPINGS 
   ========================================== */
:root {
    /* Swift Standard Base Palette */
    --clr-bluebird: #2292ef;
    --clr-wood-pigeon: #4a5d6c;
    --clr-jackdaw: #0b1922;
    --clr-herring-gull: #ffffff;
    --clr-canvas: #f4f6f9;

    /* Theme Engine Variables */
    --primary: var(--clr-bluebird);
    --secondary: var(--clr-wood-pigeon);
    --dark: var(--clr-jackdaw);
    --light: var(--clr-herring-gull);
    --bg-body: var(--clr-canvas);
    
    /* Global Curves - Rounded transport design styling */
    --radius-soft: 12px;
    --radius-card: 16px;
}

/* Theme Variant Overrides */
body[data-theme="swift-express"] {
    --primary: #c31b6b;   
}

body[data-theme="wrekin"] {
    --primary: #4a5d6c;   
}

body[data-theme="swift-classic"] {
    --primary: #0c47ea;   
}

/* Everything else defaults to #2292EF implicitly */


/* ==========================================
   GLOBAL RESET & BASICS
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.hidden {
    display: none !important;
}

/* ==========================================
   HEADER NAVIGATION & MOBILE BURGER MENU
   ========================================== */
.site-header {
    background-color: var(--light);
    box-shadow: 0 4px 20px rgba(11, 25, 34, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 85px;
}

.nav-logo {
    height: 52px;
    width: auto;
    display: block;
}

.main-nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

.main-nav a {
    color: var(--dark);
    font-weight: 700;
    text-decoration: none;
    font-size: 1.05rem;
    transition: color 0.2s ease;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary);
}

.mobile-toggle {
    display: none; 
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--dark);
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.mobile-toggle.is-active span {
    background-color: var(--primary);
}

/* Alert Banner */
.service-alert {
    background-color: var(--secondary);
    color: var(--light);
    padding: 12px 0;
    font-size: 0.95rem;
    text-align: center;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

/* ==========================================
   HERO / BANNER LAYOUTS
   ========================================== */
.hero-section {
    background: linear-gradient(145deg, var(--dark) 0%, var(--secondary) 100%);
    color: var(--light);
    padding: 70px 0;
    border-bottom: 8px solid var(--primary);
}

.hero-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.centered-hero {
    justify-content: center;
    text-align: center;
    padding: 40px 0;
}

.hero-text h2 {
    font-size: 3.2rem;
    line-height: 1.15;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero-text p {
    font-size: 1.3rem;
    opacity: 0.85;
}

.centered-hero .hero-text p {
    max-width: 600px;
    margin: 0 auto;
}

/* Dynamic Operator Banner Settings */
.operator-banner {
    padding: 50px 0;
}

.banner-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#operator-title-name {
    font-size: 2.8rem;
    font-weight: 800;
    margin-top: 5px;
}

.badge {
    background-color: var(--primary);
    color: var(--light);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.branding-accent-img {
    height: 70px;
    opacity: 0.9;
}

/* ==========================================
   GENERAL UI COMPONENTS
   ========================================== */
.input-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.input-group label {
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--secondary);
}

.input-group input {
    padding: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    transition: border-color 0.2s;
}

.input-group input:focus, .input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-primary {
    background-color: var(--primary);
    color: var(--light);
    border: none;
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--radius-soft);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.1s, opacity 0.2s;
}

.btn-primary:hover {
    opacity: 0.95;
}

.btn-primary:active {
    transform: scale(0.99);
}

.btn-secondary {
    display: inline-block;
    background-color: #edf2f7;
    color: var(--dark);
    border: none;
    padding: 10px 20px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    margin-top: 15px;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
}

/* ==========================================
   GRID DESIGNS & CONTENT CARDS
   ========================================== */
.quick-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: -40px;
    margin-bottom: 80px;
    position: relative;
    z-index: 10;
}

.card {
    background-color: var(--light);
    padding: 35px;
    border-radius: var(--radius-card);
    box-shadow: 0 10px 25px rgba(11, 25, 34, 0.05);
    border-top: 6px solid var(--primary);
    text-decoration: none;
    color: var(--dark);
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(11, 25, 34, 0.1);
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--dark);
}

/* ==========================================
   SIMPLE PAGES, TRACKING & MAP
   ========================================== */
.simple-page-header {
    background-color: var(--dark);
    color: var(--light);
    padding: 60px 0;
    text-align: center;
    border-bottom: 6px solid var(--primary);
}

.simple-page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.simple-page-content {
    padding: 60px 20px;
    min-height: 40vh;
}

.fleet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.fleet-card {
    padding: 20px;
    border-top: 4px solid var(--primary);
}

.fleet-card h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

#network-map {
    width: 100%;
    height: 65vh; 
    min-height: 500px;
    border-radius: var(--radius-card);
    border: 4px solid var(--primary);
    box-shadow: 0 10px 25px rgba(11, 25, 34, 0.08);
    background-color: #e2e8f0;
    z-index: 1; 
}

/* ==========================================
   NETWORK DIRECTORY (HOMEPAGE SECTIONS)
   ========================================== */
.network-directory {
    margin-top: 20px;
    margin-bottom: 80px;
}

.directory-header {
    text-align: center;
    margin-bottom: 40px;
}

.directory-header h2 {
    font-size: 2.2rem;
    color: var(--dark);
    margin-bottom: 10px;
}

.directory-header p {
    color: var(--secondary);
    font-size: 1.1rem;
}

.directory-subtitle {
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
    font-weight: 800;
}

.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.directory-card {
    background-color: var(--light);
    color: var(--dark);
    padding: 20px;
    border-radius: var(--radius-soft);
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
    border-top: 4px solid var(--primary);
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.directory-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    color: var(--primary);
}

.highlight-classic { border-top-color: #0c47ea; }
.highlight-wrekin { border-top-color: #4a5d6c; }
.highlight-express { border-top-color: #c31b6b; }


/* ==========================================
   NEW OPERATOR METRICS DISPLAY BANNER
   ========================================== */
.operator-meta-banner {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background-color: #f8fafc;
    padding: 20px;
    border-radius: var(--radius-soft);
    margin-bottom: 35px;
    border: 1px solid #e2e8f0;
    border-left: 6px solid var(--secondary);
}

.meta-box {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--secondary);
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.meta-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
}

.routes-section-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark);
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 10px;
}


/* ==========================================
   DATA DISPLAYS (Shared Elements)
   ========================================== */
.page-content {
    margin-top: 40px;
    margin-bottom: 80px;
}

.data-display-card {
    border-top: 6px solid var(--primary);
}

.card-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.status-indicator-dot {
    width: 12px;
    height: 12px;
    background-color: #48bb78;
    border-radius: 50%;
    display: inline-block;
}

.loading-spinner-box, .error-box {
    padding: 40px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary);
}

.error-box {
    color: #e53e3e;
}


/* ==========================================
   ROUTE LISTINGS ON OPERATOR PAGE
   ========================================== */
.routes-flex-box {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.route-pill {
    background-color: var(--light);
    border: 1px solid #e2e8f0;
    border-left: 6px solid var(--primary);
    padding: 14px 18px;
    border-radius: 8px;
    color: var(--dark);
    box-shadow: 0 2px 6px rgba(11,25,34,0.03);
    flex: 1 1 calc(50% - 12px); 
    min-width: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.route-pill strong {
    font-size: 1.2rem;
    margin-bottom: 4px;
    line-height: 1.2;
}

.route-pill-dest {
    font-size: 0.9rem;
    color: var(--secondary);
    font-weight: 500;
    line-height: 1.4;
}

.route-pill-operator {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    margin-top: 8px;
    display: inline-block;
    align-self: flex-start;
    border-bottom: 1px dashed transparent;
    transition: border-color 0.2s, opacity 0.2s;
}

.route-pill-operator:hover {
    border-bottom-color: var(--primary);
    opacity: 0.85;
}

/* Hover effects for clickable route elements */
.route-pill-interactive {
    cursor: pointer;
}

.route-pill-interactive:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(11,25,34,0.08);
}


/* ==========================================
   ROUTE DETAIL PAGE COMPONENTS
   ========================================== */
.route-data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: var(--light);
    border-radius: var(--radius-soft);
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.route-data-table th, .route-data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #edf2f7;
}

.route-data-table th {
    background-color: #f8fafc;
    font-weight: 700;
    color: var(--secondary);
    width: 30%;
}

.route-data-table td {
    font-weight: 600;
    color: var(--dark);
}

.timetable-placeholder {
    background-color: #f8fafc;
    border: 2px dashed #cbd5e0;
    padding: 40px;
    text-align: center;
    border-radius: var(--radius-soft);
    color: var(--secondary);
    margin-top: 20px;
}


/* ==========================================
   FOOTER PATTERNS
   ========================================== */
.site-footer {
    background-color: var(--dark);
    color: var(--light);
    padding: 50px 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
}

.brand-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-logo {
    height: 45px;
    margin-bottom: 20px;
}

.brand-col h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.brand-col p {
    color: #a0aec0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.brand-col .copyright {
    margin-top: auto;
    font-size: 0.85rem;
    color: #718096;
}

/* ==========================================
   RESPONSIVE DESIGN RULES
   ========================================== */
@media (max-width: 992px) {
    .mobile-toggle {
        display: flex; 
    }
    
    .header-container {
        flex-direction: row; 
    }

    .main-nav {
        position: fixed;
        top: 85px; 
        left: -100%; 
        width: 300px;
        max-width: 80vw;
        height: calc(100vh - 85px);
        background-color: var(--light);
        box-shadow: 4px 0 15px rgba(11, 25, 34, 0.1);
        transition: left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        z-index: 999;
    }
    
    .main-nav.is-open {
        left: 0;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 40px 30px;
        gap: 25px;
        display: flex; 
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    .quick-links, .directory-grid {
        grid-template-columns: 1fr;
    }
    .data-grid {
        grid-template-columns: 1fr;
    }
    .banner-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .route-pill {
        flex: 1 1 100%;
    }

   /* ==========================================
   GLOBAL WARNING BANNER
   ========================================== */
.fictional-warning-banner {
    background-color: #dc2626; /* Bright Red */
    color: #ffffff;
    text-align: center;
    padding: 12px 20px;
    font-size: 1.15rem;
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 900; /* Extra bold */
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 999999; /* Forces it above all maps, headers, and menus */
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
   }
}
