/* =========================================
   Bus Routes Page
   ========================================= */

/* ---- Hero ---- */
.br-hero {
    padding: 150px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.br-hero::before {
content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    /* Add grid pattern ONLY to background */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Crect x='10' y='10' width='80' height='80' rx='20' fill='none' stroke='%23f1f3f9' stroke-width='1.5'/%3E%3C/svg%3E");
    background-size: 80px 80px;
    background-position: center top;
    
    /* Fade the background pattern at the edges */
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 80%);
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 80%);
}

.br-hero .container {
    position: relative;
    z-index: 1;
}

.br-hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--text-navy);
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin: 16px 0 20px;
}

.br-hero-sub {
    font-size: 1.15rem;
    color: var(--text-gray);
    max-width: 520px;
    margin: 0 auto 44px;
    line-height: 1.6;
}

/* ---- Search Widget ---- */
.br-search-box {
    display: flex;
    align-items: center;
    background: white;
    border: 1.5px solid #d8e0ec;
    border-radius: 50px;
    padding: 8px 8px 8px 32px;
    max-width: 800px;
    margin: 0 auto;
    gap: 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
}

.br-search-field {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0;
}

.br-search-field label {
    display: none;
}

.br-search-field input {
    border: none;
    outline: none;
    font-family: 'Sora', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-navy);
    background: transparent;
    width: 100%;
}

.br-search-field input::placeholder {
    color: #a0aab8;
    font-weight: 400;
}

.br-swap-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-navy);
    transition: background 0.2s;
    flex-shrink: 0;
    margin: 0 12px;
}

.br-swap-btn:hover {
    background: var(--bg-light);
}

.br-search-btn {
    background: var(--text-navy);
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-family: 'Sora', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.br-search-btn:hover {
    background: var(--brand-green-hover);
}

/* ---- Stats Bar ---- */
.br-stats-bar {
    background: var(--text-navy);
    padding: 26px 0;
}

.br-stats-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.br-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 52px;
}

.br-stat strong {
    font-size: 2rem;
    font-weight: 800;
    color: var(--brand-green);
    line-height: 1;
}

.br-stat span {
    font-size: 0.82rem;
    color: #889bb0;
    margin-top: 4px;
    font-weight: 500;
}

.br-stat-div {
    width: 1px;
    height: 38px;
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
}

/* ---- Main Layout ---- */
.br-section {
    padding: 70px 0 100px;
    background: #ffffff;
}

.br-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* ---- Filters Panel ---- */
.br-filters {
    background: #f8fafc;
    border: 1.5px solid #e8edf5;
    border-radius: 20px;
    padding: 28px;
    position: sticky;
    top: 100px;
}

.br-filter-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-navy);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8edf5;
}

.br-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8edf5;
}

.br-filter-header .br-filter-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.br-filter-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-navy);
    padding: 4px;
    border-radius: 6px;
    transition: background 0.2s;
}

.br-filter-toggle:hover {
    background: #e8edf5;
}

.br-filter-toggle svg {
    display: block;
    transition: transform 0.3s ease;
}

.br-filter-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.br-filter-group {
    margin-bottom: 24px;
}

.br-filter-group > label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-gray);
    margin-bottom: 12px;
}

.br-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.br-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    color: var(--text-navy);
    cursor: pointer;
    font-weight: 400;
}

.br-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand-green);
    cursor: pointer;
    flex-shrink: 0;
}

.br-select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d8e0ec;
    border-radius: 10px;
    font-family: 'Sora', sans-serif;
    font-size: 0.92rem;
    color: var(--text-navy);
    background: white;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.br-select:focus {
    border-color: var(--brand-green);
}

.br-apply-btn {
    width: 100%;
    background: var(--text-navy);
    color: white;
    border: none;
    padding: 13px;
    border-radius: 50px;
    font-family: 'Sora', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

.br-apply-btn:hover {
    background: #0f1e3a;
}

/* ---- Results ---- */
.br-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.br-count {
    font-size: 0.95rem;
    color: var(--text-gray);
}

.br-count strong {
    color: var(--text-navy);
}

.br-sort-select {
    padding: 8px 36px 8px 14px;
    border: 1.5px solid #d8e0ec;
    border-radius: 50px;
    font-family: 'Sora', sans-serif;
    font-size: 0.88rem;
    color: var(--text-navy);
    background: white;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

/* ---- Route Cards ---- */
.br-routes-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.br-route-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 28px;
    border: 1.5px solid #e8edf5;
    border-radius: 18px;
    background: white;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.br-route-card:hover {
    border-color: #c0cfe4;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.br-route-main {
    flex: 1;
    min-width: 0;
}

.br-route-cities {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

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

.br-city-dot {
    width: 10px;
    height: 10px;
    min-width: 10px;
    border-radius: 50%;
    background: var(--text-navy);
    border: 2px solid #e8edf5;
    box-shadow: 0 0 0 3px rgba(21,30,63,0.08);
}

.br-city-dot-end {
    background: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(253, 82, 2, 0.12);
}

.br-city strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-navy);
}

.br-city span {
    display: block;
    font-size: 0.78rem;
    color: var(--text-gray);
    margin-top: 1px;
}

.br-route-line {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.br-line-dash {
    flex: 1;
    height: 1px;
    background: repeating-linear-gradient(90deg, #d0d7e2 0px, #d0d7e2 6px, transparent 6px, transparent 12px);
}

.br-route-duration {
    padding: 4px 12px;
    border-radius: 50px;
    background: #f1f4f9;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-navy);
    white-space: nowrap;
    flex-shrink: 0;
}

.br-route-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.br-route-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-gray);
}

/* ---- Right Side of Card ---- */
.br-route-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    flex-shrink: 0;
}

.br-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.br-tags span {
    padding: 4px 12px;
    border-radius: 50px;
    background: #f1f4f9;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-navy);
}

.br-view-btn {
    display: inline-block;
    padding: 11px 22px;
    background: var(--text-navy);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
}

.br-view-btn:hover {
    background: #0f1e3a;
}

/* ---- Load More ---- */
.br-load-more {
    text-align: center;
    margin-top: 40px;
}

.br-load-btn {
    padding: 14px 40px;
    border: 1.5px solid #d8e0ec;
    border-radius: 50px;
    background: white;
    font-family: 'Sora', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-navy);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.br-load-btn:hover {
    border-color: var(--text-navy);
    background: #f8fafc;
}

/* ---- Popular Cities ---- */
.br-cities-section {
    background: var(--bg-light);
    padding: 80px 0 100px;
}

.br-cities-header {
    text-align: center;
    margin-bottom: 48px;
}

.br-cities-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-navy);
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.br-cities-header p {
    color: var(--text-gray);
    font-size: 1rem;
}

.br-cities-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
}

.br-city-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 26px 16px;
    background: white;
    border: 1.5px solid #e8edf5;
    border-radius: 18px;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.br-city-card:hover {
    border-color: rgba(253, 82, 2, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.06);
}

.br-city-icon {
    font-size: 2rem;
    margin-bottom: 4px;
}

.br-city-card strong {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-navy);
}

.br-city-card span {
    font-size: 0.8rem;
    color: var(--text-gray);
}

.br-search-row {
    display: contents;
}

/* ---- Responsive ---- */

/* =====================================================================
   RESPONSIVE — bus-routes.css
   320px mobile-small | 480px mobile | 768px tablet | 1024px laptop
   ===================================================================== */



/* laptop (≤ 1024px) */
@media (max-width: 1024px) {
    .br-layout { grid-template-columns: 1fr; }
    .br-filters { position: static; }
    .br-checkboxes { flex-direction: row; flex-wrap: wrap; gap: 12px; }
    .br-cities-grid { grid-template-columns: repeat(3, 1fr); }
    .br-stat { padding: 0 28px; }
}

/* tablet (≤ 768px) */
@media (max-width: 768px) {
    .br-hero { padding: 110px 0 60px; }
    .br-hero-title { font-size: 2rem; }
    .br-hero-sub { font-size: 1rem; }

    .br-search-box {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        border-radius: 16px;
        padding: 16px;
    }
    .br-search-row {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    .br-search-row:first-child {
        border-bottom: 1px solid #e8edf5;
        padding-bottom: 16px;
        margin-bottom: 16px;
    }
    .br-search-field { padding: 0; min-width: 0; border: none; flex: 1; }
    .br-swap-btn { margin: 0; flex-shrink: 0; }
    .br-search-btn { margin: 0; flex-shrink: 0; }

    /* Collapsible filter panel */
    .br-filter-toggle { display: flex; }
    .br-filter-body {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }
    .br-filter-body.open {
        max-height: 600px;
    }
    .br-filter-header { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
    .br-filters { padding: 20px; }


    .br-stats-inner { flex-wrap: wrap; gap: 20px; justify-content: center; }
    .br-stat { padding: 0 16px; }
    .br-stat-div { display: none; }

    .br-route-card { flex-direction: column; align-items: flex-start; gap: 20px; }
    .br-route-cities { flex-direction: column; align-items: flex-start; gap: 12px; }
    .br-route-line { display: none; }
    .br-route-right { align-items: flex-start; width: 100%; border-top: 1px solid #f0f3f8; padding-top: 16px; }
    .br-view-btn { width: 100%; text-align: center; display: block; }

    .br-cities-grid { grid-template-columns: repeat(2, 1fr); }
    .br-cities-header h2 { font-size: 1.8rem; }
}

/* mobile (≤ 480px) */
@media (max-width: 480px) {
    .br-hero-title { font-size: 2rem; }
    .br-stat strong { font-size: 1.5rem; }
    .br-route-card { padding: 18px; }
    .br-cities-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .br-city-card { padding: 18px 10px; }
}

/* mobile-small (≤ 320px) */
@media (max-width: 320px) {
    .br-hero-title { font-size: 1.6rem; }
    .br-search-box { padding: 12px; }
    .br-cities-grid { grid-template-columns: 1fr; }
}