/* --------------------------------------------------------------------------
   Site footer (footer.php) — 2026 design
   --------------------------------------------------------------------------
   Home comp y 6778–7388 (1280 canvas): navy #151747 band with the branch
   strip on top, a brand column + four link columns (x 434 / 648 / 874 /
   1100), then a 57px lime legal bar. */

.site-footer {
    background-color: var(--color-navy);
    color: var(--color-lavender);
    font-family: var(--font-body);
}

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer ul.rail { margin-left: auto; margin-right: auto; padding: 0 var(--gutter); }   /* keep the rail centred + its gutters (the ul reset above zeroes them) */
.site-footer a { text-decoration: none; }

/* Parent-theme globals on the bare <footer> element (lmh-parent style.css /
   responsive.css): white bg, 75px padding, centred text, inline-block <li>
   with 15px margins, and `footer li a { color:#231f20 !important; Montserrat;
   uppercase }`. Neutralise them; link colours below carry !important for the
   same reason. */
.site-footer { padding: 0; text-align: left; }
.site-footer li { display: block; margin: 0; }
/* 0,0,4 — beats the parent's `footer li a` (0,0,3) but stays below every
   single-class component rule here, so those still win. */
body footer li a { font-family: var(--font-body); font-weight: inherit; font-size: inherit; text-transform: none; }

/* 1. Branch strip ---------------------------------------------------------- */
.site-footer__branches {
    /* 170px deep-navy band (most comps: y 5515–5685 on the service page) */
    min-height: 170px;
    padding: 41px 0 30px;
    border-top: 2px solid var(--color-navy-border);
    border-bottom: 2px solid var(--color-navy-border);
    background-color: var(--color-navy-deep);
}

.site-footer__branch-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 24px;
}

/* Each branch is centred in an equal column, so the strip sits centred on the rail. */
.site-footer__branch { min-width: 0; text-align: center; }

.site-footer__branch-name {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-white);
}

.site-footer__branch-name a { color: inherit !important; }
.site-footer__branch-name a:hover { color: var(--color-lime) !important; }
.site-footer__branch-pin { width: 18px; height: 18px; color: var(--color-lime); }

.site-footer__branch-address {
    display: block;
    font-size: 12px;
    font-weight: 500;
    line-height: 17px;
    letter-spacing: 0.02em;
    color: var(--color-lavender) !important;
}

a.site-footer__branch-address:hover { color: var(--color-white) !important; }

.site-footer__branch-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-family: var(--font-display);
    font-size: 19px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: var(--color-lime) !important;
}

.site-footer__branch-phone:hover { color: var(--color-white) !important; }
.site-footer__branch-phone-icon { width: 16px; height: 16px; }

/* 2. Main columns ---------------------------------------------------------- */
.site-footer__main {
    display: grid;
    /* comp columns start at x 434 / 648 / 874 / 1100 */
    grid-template-columns: 320px repeat(4, minmax(0, 1fr));
    gap: 0 40px;
    padding-top: 50px;
    padding-bottom: 46px;
}

.site-footer__logo img { display: block; width: 224px; height: auto; }

.site-footer__tagline {
    max-width: 300px;
    margin: 22px 0 0;
    font-size: 14px;
    line-height: 22px;
    color: var(--color-lavender);
}

.site-footer__emergency {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0 0;
    padding: 12px 22px 12px 16px;
    border: 1px solid var(--color-lime);
    border-radius: 10px;
    background-color: var(--color-navy-raised);
}

.site-footer__emergency-dot {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-lime);
    box-shadow: 0 0 0 4px rgba(155, 249, 33, 0.2);
}

.site-footer__emergency-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-white);
}

.site-footer__emergency-text {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--color-lime);
}

.site-footer__social { display: flex; gap: 10px; margin-top: 18px !important; }

.site-footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background-color: var(--color-navy-raised);
    color: var(--color-white) !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.site-footer__social-link:hover { background-color: var(--color-lime); color: var(--color-ink) !important; }
.site-footer__social-icon { width: 18px; height: 18px; }

.site-footer__heading {
    margin: 0 0 16px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-lime);
}

.site-footer__links li + li { margin-top: 12px; }

.site-footer__link {
    display: inline-block;
    font-size: 14px;
    line-height: 20px;
    color: var(--color-lavender) !important;
    transition: color 0.15s ease;
}

.site-footer__link:hover { color: var(--color-white) !important; }

/* 3. Lime legal bar -------------------------------------------------------- */
.site-footer__bar { background-color: var(--color-lime); }

.site-footer__bar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 32px;
    min-height: 57px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.site-footer__copyright,
.site-footer__legal a {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.02em;
    color: var(--color-ink) !important;
}

.site-footer__legal { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.site-footer__legal a:hover { text-decoration: underline !important; color: var(--color-ink) !important; }

/* 4. Data credit (DB-IP licence, must stay on every page) — a quiet link
   after the copyright in the legal bar. */
.site-footer__credit-link,
.site-footer__credit-link:visited { margin-left: 10px; color: var(--color-ink) !important; opacity: 0.7; text-decoration: none !important; }
.site-footer__credit-link:hover { opacity: 1; text-decoration: underline !important; }

/* Responsive --------------------------------------------------------------- */
@media (max-width: 1199.98px) {
    .site-footer__main { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 0; }
    .site-footer__brand { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: 0 40px; align-items: start; }
    .site-footer__brand > * { grid-column: 1; }
    .site-footer__tagline { margin-top: 18px; }
    .site-footer__branch-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
}

@media (max-width: 767.98px) {
    .site-footer__main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; padding-top: 44px; padding-bottom: 44px; }
    .site-footer__brand { display: block; }
    .site-footer__branch-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    /* Mobile: each branch is its own outlined card. */
    .site-footer__branch {
        padding: 16px 12px;
        border: 1px solid var(--color-navy-border);
        border-radius: var(--radius);
        background-color: rgba(27, 42, 107, 0.35);
    }
    .site-footer__bar-inner { justify-content: flex-start; }
}

@media (max-width: 479.98px) {
    .site-footer__branch-list { grid-template-columns: minmax(0, 1fr); }
}

.site-footer__col { padding-right: 0; }

/* 5. Mobile call bar — follows the visitor at the bottom of the screen ----- */
.mobile-call-bar { display: none; }

@media (max-width: 767.98px) {
    .mobile-call-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 900;
        display: block;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        background-color: var(--color-navy-deep);
        box-shadow: 0 -6px 20px rgba(4, 19, 75, 0.35);
        /* Parked below the screen until the page has loaded, then slid up by
           header.js (.is-ready). A transform, not a position change, so it is
           not a layout shift. The animation is the fallback if JS never runs. */
        transform: translateY(110%);
        animation: cb-callbar-in 0.35s ease-out 4s forwards;
    }
    .mobile-call-bar.is-ready {
        transform: translateY(0);
        animation: none;
        transition: transform 0.35s ease-out;
    }
    .mobile-call-bar__btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        min-height: 50px;
        border: 1px solid #5C9E26;
        border-radius: var(--radius-sm);
        background-color: var(--color-lime);
        color: var(--color-ink) !important;
        font-family: var(--font-body);
        font-size: 16px;
        font-weight: 700;
        text-decoration: none !important;
    }
    .mobile-call-bar__icon { width: 18px; height: 18px; }
    .mobile-call-bar__phone { font-family: var(--font-display); font-weight: 400; font-size: 18px; letter-spacing: 0.02em; }
    body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
}

@keyframes cb-callbar-in { to { transform: translateY(0); } }

@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
    .mobile-call-bar.is-ready { transition: none; }
    .mobile-call-bar { animation-duration: 0.01s; }
}

/* One branch in play (city page or a picked location, footer.php + locator.js):
   the strip narrows to that branch, centred. */
.site-footer__branch[hidden] { display: none; }
.site-footer__branch-list.is-single { grid-template-columns: minmax(0, 1fr) !important; }
