/* ============================================================
   Location Hub — Sub Navigation
   File: assets/css/hub/hub-subnav.css
   Scope: .hub-subnav__* classes only
   Figma: "Sub Navigation" node 2074:1114 — cream bg, city bar + phone,
   hairline border top+bottom (#C2C2C2), blue 2px underline under the
   active state name.
   ============================================================ */

.hub-subnav {
    background: var(--hub-cream);
    border-top: 1px solid var(--hub-border);
    border-bottom: 1px solid var(--hub-border);
    padding: 16px 0;
}

.hub-subnav__row {
    /* 3-column grid keeps the middle (state + cities) group truly centred
       in the full row regardless of how wide the phone or state label are —
       flex:1 + justify-content:center only centred within the leftover
       space after the phone's width, which visibly skewed the group left. */
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 20px;
}

.hub-subnav__cities {
    grid-column: 2;
    display: flex;
    align-items: center;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.hub-subnav__state {
    font-family: var(--hub-font-sans);
    font-size: 16px;
    font-weight: 700;
    color: var(--hub-navy);
    /* box-shadow underline avoids adding to the element's layout height,
       which would shift the visual text upward in a center-aligned flex row */
    box-shadow: 0 2px 0 0 var(--hub-blue);
}

.hub-subnav__city {
    font-family: var(--hub-font-sans);
    font-size: 16px;
    font-weight: 500;
    color: var(--hub-grey);
    text-decoration: none;
    transition: color 0.15s;
}

a.hub-subnav__city:hover {
    color: var(--hub-blue);
}

.hub-subnav__phone {
    grid-column: 3;
    justify-self: end; /* pin to the right edge of the row */
}

.hub-subnav__phone a {
    font-family: var(--hub-font-sans);
    font-size: 16px;
    font-weight: 500;
    color: var(--hub-navy);
    text-decoration: none;
    white-space: nowrap;
}

.hub-subnav__phone a:hover {
    color: var(--hub-blue);
}


/* ============================
   RESPONSIVE — SUB NAV
   ============================ */

@media (max-width: 768px) {
    .hub-subnav__cities {
        display: none;
    }

    .hub-subnav__row {
        /* only the phone remains visible — fall back to flex to centre it
           since the grid's middle column has nothing left to size itself on */
        display: flex;
        justify-content: center;
    }

    .hub-subnav__phone {
        justify-self: auto;
    }
}
