/* ==========================================================================
   Multi-location UI (countries -> cities): header switcher, Services mega-menu, location bar,
   "other locations" strip and the location landing page (.lp-*).
   Loaded synchronously from header.php (it styles the nav, so it must not
   arrive late). Selectors are scoped to beat the legacy `.menu-list ul li a`
   rules in style.css without needing !important.
   ========================================================================== */

:root {
    --ace-red: #e52629;
    --ace-navy: #253e80;
    --ace-navy-deep: #1b2a4e;
    --ace-ink: #1d2433;
    --ace-muted: #5d6679;
    --ace-line: #e3e8f2;
    --ace-tint: #f4f6fb;
}

/* ---- shared: country badge ---------------------------------------------- */
.loc-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    padding: 4px 6px;
    border-radius: 5px;
    background: var(--ace-red);
    color: #fff;
    font: 800 11px/1 Inter, sans-serif;
    letter-spacing: .6px;
    text-transform: uppercase;
    flex: none;
}

.header .container { position: relative; }

/* ---- desktop spacing: make room for the switcher ------------------------ */
@media (min-width: 993px) {
    .menu-list ul { gap: 30px !important; align-items: center; }
    .menu-list > ul > li > a,
    .menu-list > ul > li > .loc-btn { font-size: 1rem; }
    .menu-list > ul > li:last-child > a { padding: 1.1rem 1.5rem; margin-left: .25rem; }
}
@media (min-width: 1400px) {
    .menu-list ul { gap: 36px !important; }
    .menu-list > ul > li > a { font-size: 1.05rem; }
}
@media (min-width: 993px) and (max-width: 1199px) {
    .menu-list ul { gap: 14px !important; }
    .menu-list > ul > li > a,
    .menu-list > ul > li > .loc-btn { font-size: .8rem; white-space: nowrap; }
    .loc-btn { padding: 8px 10px; gap: 6px; }
    .loc-btn .loc-code { min-width: 26px; font-size: 10px; }
    .menu-list > ul > li:last-child > a { padding: .9rem .9rem; margin-left: 0; }
}
@media (min-width: 993px) and (max-width: 1199px) {
    /* Industries is the last dropdown: open it towards the left so it never runs past the screen edge */
    .menu-list > ul > li.dropdown-menu-custom:nth-last-child(-n+4) .submenu { left: auto; right: 0; }
}
@media (min-width: 993px) and (max-width: 1080px) {
    .menu-list ul { gap: 10px !important; }
    .loc-btn-name { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---- location switcher button ------------------------------------------- */
.loc-switch { position: relative; }
.loc-switch[hidden] { display: none !important; } /* hidden for now, see nav.php */
.menu-list .loc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    color: #fff;
    font-family: Inter, sans-serif;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}
.menu-list .loc-btn:hover,
.menu-list .loc-switch.is-open .loc-btn { background: rgba(255, 255, 255, .2); border-color: #fff; }
.menu-list .loc-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.menu-list .loc-btn .fa-angle-down { font-size: .8em; transition: transform .2s; }
.menu-list .is-open > .loc-btn .fa-angle-down,
.menu-list .is-open > .mega-toggle .fa-angle-down { transform: rotate(180deg); }

/* ---- shared dropdown card ----------------------------------------------- */
.loc-panel,
.mega-panel {
    position: absolute;
    z-index: 9999;
    background: #fff;
    border-top: 5px solid var(--ace-red);
    box-shadow: 0 18px 48px rgba(16, 28, 64, .22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
.is-open > .loc-panel,
.is-open > .mega-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
}

.mega-kicker {
    margin: 0 0 8px;
    padding: 0 8px;
    color: var(--ace-muted);
    font: 700 11px/1 Inter, sans-serif;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

/* ---- location switcher panel -------------------------------------------- */
.loc-panel {
    top: calc(100% + 16px);
    right: 0;
    width: 320px;
    padding: 16px 12px 12px;
    border-radius: 0 0 12px 12px;
}
.loc-switch::after { /* hover/hit bridge between button and panel */
    content: "";
    position: absolute;
    left: 0; right: 0; top: 100%;
    height: 18px;
}
.menu-list .loc-panel a.loc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 8px;
    color: var(--ace-ink);
    text-transform: none;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 600;
    margin: 0;
    transition: background .15s;
}
.menu-list .loc-panel a.loc-item:hover { background: var(--ace-tint); color: var(--ace-ink); }
.menu-list .loc-panel a.loc-item.is-active { background: #eef2fb; }
.loc-item-text, .mega-tab-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.menu-list .loc-panel a.loc-item strong { font-weight: 700; color: var(--ace-navy-deep); font-size: 15px; }
.menu-list .loc-panel a.loc-item small { color: var(--ace-muted); font-size: 12px; font-weight: 500; }
.loc-item-check { color: var(--ace-red); opacity: 0; font-size: 13px; }
.loc-item.is-active .loc-item-check { opacity: 1; }

/* ---- Services mega-menu: country rail (with cities) + services pane ------------ */
.ace-mega { position: static; }
.ace-mega > a .fa-angle-down { transition: transform .2s; }
.mega-panel {
    top: 100%;
    left: 50%;
    width: min(1060px, calc(100vw - 32px));
    margin-top: -4px;
    display: grid;
    grid-template-columns: 340px 1fr;
    grid-template-rows: auto repeat(var(--ace-rows, 5), auto) 1fr;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    background: linear-gradient(90deg, var(--ace-tint) 339px, var(--ace-line) 339px, var(--ace-line) 340px, #fff 340px);
    border-radius: 0 0 14px 14px;
    transform: translate(-50%, 8px);
}
.is-open > .mega-panel { transform: translate(-50%, 0); }
.menu-list .ace-mega > a { position: relative; }
.menu-list .ace-mega.is-open > a::after {
    content: "";
    position: absolute;
    left: -24px; right: -24px; top: 100%;
    height: 34px;
}
.mega-panel .mega-kicker { grid-column: 1; grid-row: 1; position: relative; z-index: 1; margin: 0; padding: 28px 30px 12px; }
.mega-country { display: contents; }

.menu-list .mega-tab {
    grid-column: 1;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 14px 6px;
    padding: 14px 16px;
    border-left: 3px solid transparent;
    border-radius: 10px;
    color: var(--ace-ink);
    text-transform: none;
    font-family: Inter, sans-serif;
    cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.mega-country:last-of-type .mega-tab { margin-bottom: 24px; }
.menu-list .mega-tab:hover,
.menu-list .mega-tab.is-active { background: #fff; border-left-color: var(--ace-red); box-shadow: 0 2px 12px rgba(16, 28, 64, .09); }
.menu-list .mega-tab:focus-visible { outline: 2px solid var(--ace-navy); outline-offset: 1px; }
.mega-tab-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.menu-list .mega-tab strong { font-size: 18px; font-weight: 700; line-height: 1.2; color: var(--ace-navy-deep); }
.menu-list .mega-tab small { font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--ace-muted); }
.menu-list .mega-tab-cities a { color: var(--ace-muted); text-transform: none; font-size: 13px; font-weight: 500; padding: 0; margin: 0; }
.menu-list .mega-tab-cities a:hover,
.menu-list .mega-tab-cities a.is-previewing { color: var(--ace-red); text-decoration: underline; text-underline-offset: 3px; }
.menu-list .mega-tab-cities span { color: var(--ace-muted); font-size: 13px; font-weight: 500; }
.menu-list .mega-tab-cities .mega-dot { color: #aab3c7; padding: 0 2px; }
.menu-list .loc-btn, .menu-list .loc-btn span, .menu-list .loc-btn strong { color: #fff; }
.mega-tab-arrow { flex: none; color: #aab3c7; font-size: 14px; transition: transform .15s, color .15s; }
.mega-tab.is-active .mega-tab-arrow { color: var(--ace-red); transform: translateX(3px); }

.mega-pane {
    grid-column: 2;
    grid-row: 1 / -1;
    display: none;
    flex-direction: column;
    min-width: 0;
    padding: 28px 32px 0;
}
.mega-country.is-active .mega-pane { display: flex; animation: megaFade .22s ease; }
@keyframes megaFade { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; transform: none; } }
.mega-sub { display: none; }
.mega-sub.is-active { display: block; animation: megaFade .2s ease; }
.mega-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.mega-pane-head h3 { margin: 0; font: 800 26px/1.2 Inter, sans-serif; color: var(--ace-navy-deep); text-transform: none; }
.menu-list .mega-pane-head a {
    color: var(--ace-red);
    font: 700 15px/1 Inter, sans-serif;
    text-transform: none;
    white-space: nowrap;
}
.menu-list .mega-pane-head a:hover { color: var(--ace-navy); }

.mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; margin-bottom: 26px; }
.menu-list .mega-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--ace-ink);
    text-transform: none;
    font-size: 16px;
    line-height: 1.3;
    transition: background .15s, border-color .15s;
}
.menu-list a.mega-item:hover { background: var(--ace-tint); border-color: var(--ace-line); color: var(--ace-ink); }
.menu-list .mega-item.is-current { background: #eef2fb; border-color: #c9d4ee; }
.mega-item-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 50px; height: 50px;
    border-radius: 12px;
    background: #e9eefb;
    color: var(--ace-navy);
    font-size: 19px;
    transition: background .15s, color .15s;
}
a.mega-item:hover .mega-item-icon,
.mega-item.is-current .mega-item-icon { background: var(--ace-red); color: #fff; }
.mega-item-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.menu-list .mega-item strong { font-size: 18px; font-weight: 700; color: var(--ace-navy-deep); }
.menu-list .mega-item small { font-size: 14.5px; font-weight: 500; line-height: 1.4; color: var(--ace-muted); }
.mega-pane-foot > span { color: #fff; }
.mega-tab .loc-code { flex: none; min-width: 34px; text-align: center; }
.mega-pane-foot {
    margin: auto -32px 0;
    padding: 18px 32px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 22px;
    background: var(--ace-navy-deep);
    color: #fff;
    font: 700 16px/1.3 Inter, sans-serif;
}
.menu-list .mega-pane-foot a.mega-cta {
    padding: 12px 20px;
    border-radius: 8px;
    background: var(--ace-red);
    color: #fff;
    font: 700 15px/1 Inter, sans-serif;
    text-transform: none;
    margin: 0;
    white-space: nowrap;
    transition: background .15s;
}
.menu-list .mega-pane-foot a.mega-cta:hover { background: #fff; color: var(--ace-red); }

@media (min-width: 993px) and (max-width: 1199px) {
    .mega-panel { grid-template-columns: 300px 1fr; background: linear-gradient(90deg, var(--ace-tint) 299px, var(--ace-line) 299px, var(--ace-line) 300px, #fff 300px); }
    .mega-pane { padding: 24px 22px 0; }
    .mega-pane-foot { margin: auto -22px 0; padding: 16px 22px; }
    .mega-pane-head h3 { font-size: 22px; }
    .mega-grid { gap: 8px 14px; }
}

/* ---- mobile drawer: accordions instead of hover menus -------------------- */
@media (max-width: 992px) {
    .menu-list { overflow-y: auto; padding-bottom: 40px; }
    .menu-list > ul { align-items: stretch; padding-right: 20px; gap: 6px !important; }
    .menu-list > ul > li { width: 100%; }
    .menu-list > ul > li.loc-switch { order: -1; margin-bottom: 8px; }
    .menu-list > ul > li > a { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }

    /* existing dropdowns become accordions */
    .menu-list .dropdown-menu-custom .submenu {
        position: static;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 0 6px;
        border-top: 0;
        box-shadow: none;
        background: rgba(255, 255, 255, .07);
        border-radius: 8px;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transition: max-height .3s ease;
    }
    .menu-list .dropdown-menu-custom.is-open .submenu { max-height: 420px; }
    .menu-list .dropdown-menu-custom:hover .submenu { opacity: 1; }
    .menu-list .dropdown-menu-custom .submenu li a {
        color: #fff !important;
        font-size: 15px !important;
        text-transform: none;
        padding: 12px 16px !important;
    }
    .menu-list .is-open > a .fa-angle-down { transform: rotate(180deg); }

    /* location switcher */
    .loc-switch::after, .menu-list .ace-mega.is-open > a::after { display: none; }
    .menu-list .loc-btn { width: 100%; justify-content: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 15px; }
    .menu-list .loc-btn .fa-angle-down { margin-left: auto; }
    .loc-panel {
        position: static;
        width: 100%;
        max-height: 0;
        padding: 0 8px;
        border: 0;
        border-radius: 10px;
        background: #fff;
        box-shadow: none;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: max-height .3s ease, padding .3s ease, margin .3s ease;
    }
    .is-open > .loc-panel { max-height: 560px; padding: 12px 8px; margin-top: 8px; }
    .loc-panel .mega-kicker { display: none; }

    /* Services mega-menu: each country is an accordion row; open one to see its services */
    .mega-panel {
        position: static;
        width: 100%;
        max-height: 0;
        display: block;
        margin: 0;
        border: 0;
        border-radius: 10px;
        background: #fff;
        grid-template-rows: none;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        overflow: hidden;
        transform: none !important;
        transition: max-height .3s ease;
    }
    .is-open > .mega-panel { max-height: 3200px; margin: 6px 0 8px; overflow: visible; }
    .mega-panel .mega-kicker { display: none; }
    .mega-country { display: block; border-bottom: 1px solid var(--ace-line); }
    .mega-country:last-of-type { border-bottom: 0; }
    .menu-list .mega-tab { margin: 0; padding: 14px 12px; border-left: 3px solid transparent; border-radius: 0; background: #fff; box-shadow: none; }
    .menu-list .mega-tab.is-active { background: var(--ace-tint); box-shadow: none; }
    .menu-list .mega-tab strong { font-size: 16px; }
    .menu-list .mega-tab-cities a, .menu-list .mega-tab small { font-size: 12.5px; }
    .mega-tab.is-active .mega-tab-arrow { transform: rotate(90deg); }
    .mega-pane { grid-column: auto; grid-row: auto; padding: 6px 12px 14px; background: #fff; }
    .mega-pane-head { margin-bottom: 12px; flex-wrap: wrap; }
    .mega-pane-head h3 { font-size: 17px; }
    .menu-list .mega-pane-head a { font-size: 13px; }
    .mega-grid { grid-template-columns: 1fr; gap: 2px; margin-bottom: 0; }
    .menu-list .mega-item small { display: none; }
    .menu-list .mega-item { align-items: center; padding: 9px 8px; gap: 12px; }
    .menu-list .mega-item strong { font-size: 15px; }
    .menu-list .mega-item-icon { width: 38px; height: 38px; font-size: 16px; }
    .mega-pane-foot { margin: 14px -12px 0; padding: 14px 12px; flex-direction: column; align-items: flex-start; gap: 10px; font-size: 14px; }
    .menu-list .mega-pane-foot a.mega-cta { width: 100%; text-align: center; padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .loc-panel, .mega-panel, .mega-pane.is-active, .mega-sub.is-active { transition: none; animation: none; }
}

/* ==========================================================================
   Location bar (sits under each hero)
   ========================================================================== */
.loc-bar { position: relative; z-index: 6; margin-top: -34px; padding: 0 0 6px; }
.loc-bar-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 14px 40px rgba(16, 28, 64, .18);
}
.loc-bar-place {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: none;
    padding: 12px 18px;
    border-radius: 10px;
    background: var(--ace-navy-deep);
    color: #fff;
    font: 700 15px/1 Inter, sans-serif;
}
.loc-bar-place:hover { color: #fff; background: var(--ace-navy); }
.loc-bar-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; padding: 2px; }
.loc-bar-tabs::-webkit-scrollbar { display: none; }
.loc-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: none;
    padding: 12px 16px;
    border-radius: 10px;
    color: var(--ace-ink);
    font: 600 14px/1 Inter, sans-serif;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.loc-tab i { color: var(--ace-navy); font-size: 14px; }
.loc-tab:hover { background: var(--ace-tint); color: var(--ace-navy-deep); }
.loc-tab.is-active { background: var(--ace-red); color: #fff; }
.loc-tab.is-active i { color: #fff; }
@media (max-width: 767px) {
    .loc-bar { margin-top: -26px; }
    .loc-bar-inner { flex-direction: column; align-items: stretch; }
    .loc-bar-place { justify-content: center; }
}

/* ==========================================================================
   "Also available in" strip
   ========================================================================== */
.loc-others { padding: 70px 0; background: var(--ace-tint); }
.loc-others-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.loc-others-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px 22px 20px;
    background: #fff;
    border: 1px solid var(--ace-line);
    border-bottom: 4px solid var(--ace-navy);
    border-radius: 12px;
    color: var(--ace-ink);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.loc-others-card strong { margin-top: 6px; font: 800 20px/1.2 Inter, sans-serif; color: var(--ace-navy-deep); }
.loc-others-card small { color: var(--ace-muted); font: 500 13px/1.4 Inter, sans-serif; }
.loc-others-card .loc-code { align-self: flex-start; }
.loc-others-go { margin-top: 10px; color: var(--ace-red); font: 700 14px/1 Inter, sans-serif; }
.loc-others-go i { margin-left: 4px; transition: transform .2s; }
.loc-others-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(16, 28, 64, .12); border-bottom-color: var(--ace-red); color: var(--ace-ink); }
.loc-others-card:hover .loc-others-go i { transform: translateX(4px); }
@media (max-width: 991px) { .loc-others-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .loc-others-grid { grid-template-columns: 1fr; } .loc-others { padding: 48px 0; } }

/* ==========================================================================
   Location landing page (template-parts/location-services.php)
   ========================================================================== */
.lp-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 78vh;
    padding: 180px 0 120px;
    background-size: cover;
    background-position: center;
    color: #fff;
}
.lp-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(14, 22, 48, .92) 0%, rgba(14, 22, 48, .72) 55%, rgba(14, 22, 48, .35) 100%); }
.lp-hero .container { position: relative; z-index: 1; }
.lp-eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); font: 600 14px/1 Inter, sans-serif; letter-spacing: .3px; }
.lp-hero h1 { margin: 22px 0 18px; max-width: 900px; font: 800 clamp(34px, 5vw, 58px)/1.1 Inter, sans-serif; color: #fff; }
.lp-hero h1 span { color: #ff6b6e; }
.lp-hero p.lp-lead { max-width: 620px; margin-bottom: 30px; font: 400 18px/1.65 Inter, sans-serif; color: #e6ebf7; }
.lp-btn { display: inline-flex; align-items: center; gap: 8px; padding: 16px 28px; border-radius: 10px; font: 700 15px/1 Inter, sans-serif; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.lp-btn-red { background: var(--ace-red); color: #fff; border: 2px solid var(--ace-red); }
.lp-btn-red:hover { background: #fff; color: var(--ace-red); }
.lp-btn-ghost { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .6); }
.lp-btn-ghost:hover { background: #fff; color: var(--ace-navy-deep); border-color: #fff; }
.lp-btn-navy { background: var(--ace-navy); color: #fff; border: 2px solid var(--ace-navy); }
.lp-btn-navy:hover { background: transparent; color: var(--ace-navy); }

.lp-section { padding: 80px 0; }
.lp-section.is-tint { background: var(--ace-tint); }
.lp-head { max-width: 760px; margin: 0 auto 46px; text-align: center; }
.lp-head p { margin-top: 14px; color: var(--ace-muted); font: 400 17px/1.65 Inter, sans-serif; }

.lp-stats { padding: 56px 0 10px; }
.lp-stat { height: 100%; padding: 26px 22px; text-align: center; background: #fff; border-radius: 16px; box-shadow: 0 8px 28px rgba(16, 28, 64, .08); border-top: 4px solid var(--ace-red); }
.lp-stat i { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 14px; background: #e9eefb; color: var(--ace-navy); font-size: 22px; }
.lp-stat h3 { margin: 0; font: 800 20px/1.3 Inter, sans-serif; color: var(--ace-navy-deep); }

.lp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; }
.lp-card { grid-column: span 2; display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--ace-line); border-radius: 16px; transition: transform .25s, box-shadow .25s; }
.lp-card:nth-child(4), .lp-card:nth-child(5) { grid-column: span 3; }
.lp-card:hover { transform: translateY(-6px); box-shadow: 0 20px 44px rgba(16, 28, 64, .14); }
.lp-card-img { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ace-tint); }
.lp-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.lp-card:hover .lp-card-img img { transform: scale(1.06); }
.lp-card-badge { position: absolute; left: 18px; bottom: -22px; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 12px; background: var(--ace-red); color: #fff; font-size: 20px; box-shadow: 0 8px 18px rgba(229, 38, 41, .4); z-index: 1; }
.lp-card-body { display: flex; flex-direction: column; flex: 1; padding: 36px 24px 24px; }
.lp-card h3 { margin: 0 0 10px; font: 800 21px/1.25 Inter, sans-serif; color: var(--ace-navy-deep); }
.lp-card p { margin: 0 0 14px; color: var(--ace-muted); font: 400 15px/1.65 Inter, sans-serif; }
.lp-points { margin: 0 0 20px; padding: 0; list-style: none; }
.lp-points li { position: relative; padding: 5px 0 5px 24px; font: 500 14px/1.4 Inter, sans-serif; color: var(--ace-ink); }
.lp-points li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 10px; height: 6px; border-left: 2px solid var(--ace-red); border-bottom: 2px solid var(--ace-red); transform: rotate(-45deg); }
.lp-card-link { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--ace-red); font: 700 15px/1 Inter, sans-serif; }
.lp-card-link i { transition: transform .2s; }
.lp-card:hover .lp-card-link i { transform: translateX(5px); }
@media (max-width: 991px) {
    .lp-grid { grid-template-columns: repeat(2, 1fr); }
    .lp-card, .lp-card:nth-child(4), .lp-card:nth-child(5) { grid-column: span 1; }
    .lp-card:nth-child(5) { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .lp-grid { grid-template-columns: 1fr; }
    .lp-card:nth-child(5) { grid-column: auto; }
    .lp-section { padding: 56px 0; }
}

.lp-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; counter-reset: step; }
.lp-step { position: relative; padding: 26px 20px 22px; background: #fff; border: 1px solid var(--ace-line); border-radius: 14px; counter-increment: step; }
.lp-step::before { content: counter(step); display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 14px; border-radius: 50%; background: var(--ace-navy); color: #fff; font: 800 16px/1 Inter, sans-serif; }
.lp-step h4 { margin: 0 0 8px; font: 800 17px/1.3 Inter, sans-serif; color: var(--ace-navy-deep); }
.lp-step p { margin: 0; color: var(--ace-muted); font: 400 14px/1.6 Inter, sans-serif; }
@media (max-width: 1100px) { .lp-steps { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .lp-steps { grid-template-columns: 1fr; } }

.lp-cities { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.lp-city { padding: 26px 22px; background: #fff; border-radius: 14px; border: 1px solid var(--ace-line); border-left: 4px solid var(--ace-red); }
.lp-city i { color: var(--ace-red); font-size: 22px; }
.lp-city h4 { margin: 10px 0 8px; font: 800 20px/1.2 Inter, sans-serif; color: var(--ace-navy-deep); }
.lp-city p { margin: 0; color: var(--ace-muted); font: 400 14px/1.6 Inter, sans-serif; }
@media (max-width: 991px) { .lp-cities { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .lp-cities { grid-template-columns: 1fr; } }

.lp-why { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.lp-why-item { padding: 26px 22px; border-radius: 14px; background: var(--ace-navy-deep); color: #fff; }
.lp-why-item i { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 16px; border-radius: 12px; background: rgba(255, 255, 255, .12); font-size: 20px; }
.lp-why-item h4 { margin: 0 0 8px; font: 800 18px/1.3 Inter, sans-serif; color: #fff; }
.lp-why-item p { margin: 0; color: #c9d3ec; font: 400 14px/1.6 Inter, sans-serif; }
@media (max-width: 991px) { .lp-why { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .lp-why { grid-template-columns: 1fr; } }

.lp-cta { padding: 70px 0; background: linear-gradient(110deg, var(--ace-navy-deep), var(--ace-navy)); color: #fff; text-align: center; }
.lp-cta h2 { margin: 0 0 12px; font: 800 clamp(26px, 3.4vw, 38px)/1.2 Inter, sans-serif; color: #fff; }
.lp-cta p { max-width: 640px; margin: 0 auto 26px; color: #d6def2; font: 400 17px/1.6 Inter, sans-serif; }
.lp-cta .lp-btn + .lp-btn { margin-left: 10px; }
@media (max-width: 480px) { .lp-cta .lp-btn { width: 100%; justify-content: center; } .lp-cta .lp-btn + .lp-btn { margin: 10px 0 0; } }

/* ==========================================================================
   ACF-driven sections (inc/page-fields.php). Only rendered when the admin
   fills the matching fields; otherwise the template's original section shows.
   ========================================================================== */
.ace-block { padding: 70px 0; }
.ace-block.is-tint { background: var(--ace-tint); }
.ace-block .section-heading { margin-bottom: 18px; }
.ace-rich { color: var(--ace-ink); font: 400 17px/1.75 Inter, sans-serif; }
.ace-rich p { margin: 0 0 14px; }
.ace-rich ul, .ace-rich ol { margin: 0 0 16px 20px; }
.ace-rich li { margin-bottom: 6px; }
.ace-rich a { color: var(--ace-red); text-decoration: underline; }
.ace-block-img { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 14px 34px rgba(16, 28, 64, .14); }
.ace-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.ace-card { overflow: hidden; padding: 26px 22px; background: #fff; border: 1px solid var(--ace-line); border-top: 4px solid var(--ace-red); border-radius: 14px; transition: transform .2s, box-shadow .2s; }
.ace-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(16, 28, 64, .12); }
.ace-card-img { margin: -26px -22px 18px; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ace-tint); }
.ace-card-img img { width: 100%; height: 100%; object-fit: cover; }
.ace-card-icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 14px; border-radius: 12px; background: #e9eefb; color: var(--ace-navy); font-size: 20px; }
.ace-card h3 { margin: 0 0 8px; font: 800 19px/1.3 Inter, sans-serif; color: var(--ace-navy-deep); }
.ace-card p { margin: 0; color: var(--ace-muted); font: 400 15px/1.65 Inter, sans-serif; }
@media (max-width: 640px) { .ace-block { padding: 48px 0; } }

/* Main content (acefuture_render_article) */
.ace-article-inner { max-width: 940px; margin: 0 auto; }
.ace-article .section-heading { margin-bottom: 16px; }
.ace-rich h3 { margin: 26px 0 10px; font: 800 20px/1.3 Inter, sans-serif; color: var(--ace-navy-deep); }
.ace-rich h3:first-child { margin-top: 0; }
.ace-rich strong { color: var(--ace-navy-deep); }

/* ======================================================================================================
   Sections built from the content documents (Explore more, other document sections, closing call to action).
   Fonts and colours are the site's own: Open Sans headings (.section-heading), sans-serif text #666 / #555,
   card titles #212529, links Bootstrap blue, brand red #e52629 and navy #253e80.
   ====================================================================================================== */
.ace-extra { padding: 50px 0 40px; background: #fff; }
.ace-extra .section-heading { margin: 0 0 16px; text-align: center; line-height: 1.25; }
.ace-extra-intro, .ace-intro { max-width: 900px; margin: 0 auto 26px; text-align: center; color: #666; font: 400 18px/1.6 sans-serif; }
.ace-extra-intro { max-width: 760px; }
.ace-intro { margin-top: 14px; margin-bottom: 0; }
.ace-intro p { margin: 0 0 14px; }
.ace-intro h3 { margin: 26px 0 0; color: #212529; font: 700 28px/1.3 sans-serif; }
.ace-intro a, .ace-extra-intro a, .ace-extra-body a, .ace-more-text a { color: #0d6efd; }
.ace-intro a:hover, .ace-extra-body a:hover, .ace-more-text a:hover { text-decoration: underline; }

/* card grid (Explore more / industries lists) */
.ace-explore { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; max-width: 1140px; margin: 0 auto; }
.ace-explore-card {
    flex: 1 1 300px; max-width: calc(33.333% - 14px); box-sizing: border-box;
    display: flex; align-items: center; gap: 16px;
    padding: 20px 22px;
    background: #fff; border: 1px solid #e9ecef; border-radius: 14px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .06);
    color: #212529; text-decoration: none;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
a.ace-explore-card:hover { transform: translateY(-3px); border-color: var(--primary-color, #e52629); box-shadow: 0 12px 30px rgba(0, 0, 0, .13); color: #212529; }
.ace-explore-icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #eef2fb; color: var(--secondary-color, #253e80); font-size: 20px; transition: background .2s, color .2s; }
a.ace-explore-card:hover .ace-explore-icon { background: var(--primary-color, #e52629); color: #fff; }
.ace-explore-text { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; font: 400 16px/1.5 sans-serif; color: #555; }
.ace-explore-text strong { color: #212529; font: 600 18px/1.35 sans-serif; }
.ace-explore-text small { font-size: 15px; line-height: 1.5; color: #555; }
.ace-explore-text a { color: #0d6efd; }
.ace-explore-go { flex: none; color: var(--primary-color, #e52629); font-size: 15px; opacity: .55; transition: transform .2s, opacity .2s; }
a.ace-explore-card:hover .ace-explore-go { transform: translateX(4px); opacity: 1; }
.ace-explore-wide { flex: 1 1 100%; max-width: 100%; background: #f4f6fb; box-shadow: none; }
.ace-explore-wide .ace-explore-text { display: block; }
@media (max-width: 991px) { .ace-explore-card { max-width: calc(50% - 10px); } }
@media (max-width: 575px) {
    .ace-explore { gap: 14px; }
    .ace-explore-card { max-width: 100%; flex-basis: 100%; padding: 16px; gap: 14px; }
    .ace-explore-icon { width: 44px; height: 44px; font-size: 17px; }
    .ace-extra-intro, .ace-intro { font-size: 16px; }
    .ace-intro h3 { font-size: 21px; margin-top: 20px; }
}

/* other document sections (heading + text) */
.ace-more { padding: 40px 0 10px; background: #fff; }
.ace-more .section-heading { margin: 0 0 18px; text-align: center; line-height: 1.25; }
.ace-more-text { max-width: 900px; margin: 0 auto 30px; color: #666; font: 400 18px/1.7 sans-serif; }
.ace-more-text p { margin: 0 0 16px; }
.ace-more-text ul, .ace-more-text ol { margin: 0 0 16px; padding-left: 24px; }
.ace-more-text li { margin-bottom: 8px; }
.ace-more-text strong { color: #212529; }
.ace-more .ace-explore { margin-bottom: 30px; }

/* closing call to action: same band as the page's own "Ready to Work with ..." section */
.ace-cta { padding: 48px 20px; background: var(--secondary-color, #253e80); color: #fff; text-align: center; }
.ace-cta h2 { margin: 0 0 12px; color: #fff; font: 700 50px/56px system-ui, sans-serif; }
.ace-cta p { margin: 0 0 8px; color: #fff; font: 300 20px/30px system-ui, sans-serif; }
.ace-cta a:not(.custom-btn) { color: #fff; text-decoration: underline; }
@media (max-width: 767px) { .ace-cta { padding: 34px 16px; } .ace-cta h2 { font-size: 30px; line-height: 38px; } .ace-cta p { font-size: 17px; line-height: 26px; } }

/* links written in the documents, inside card text: the site's blue (the old template forces black) */
.card-section p a { color: #fff; font-weight: inherit; text-decoration: underline; text-underline-offset: 3px; }
.card-section p a:hover { color: #ffd9da; }
.cities-section .row { justify-content: center; }
.features-grid .item-desc a, .feature-content .item-desc a { color: #0d6efd !important; }
.city-card p a { color: #0d6efd; }

/* a link inside a card title looks like the plain title; underline on hover */
.ace-tlink { color: inherit !important; font-weight: inherit !important; text-decoration: none; }
.ace-tlink:hover { text-decoration: underline; }
/* "<city>" cards sections with fewer cards than columns (a city switched off): keep them centred */
.row:has(> .col > .city-card) { justify-content: center; }
.ace-cta-btn { margin-top: 14px; }

/* the projects slider keeps a 60px top space after the closing blue band (the cold room template gives it none) */
.ace-cta ~ .projects-slider-section { padding-top: 60px !important; }

/* short description under an "Industries ..." card title (from the content document) */
.ace-card-desc { margin: 10px 0 0; color: #555; font: 400 14.5px/1.5 sans-serif; text-align: center; }
.ace-card-desc a { color: #0d6efd; }
/* a row of stat boxes with fewer boxes than columns stays centred */
.row:has(> .col-md-3 > .stat-box) { justify-content: center; }

.ace-intro a { color: #0d6efd !important; }

/* three stat boxes (the document lists three) share the full row, like the kitchen page */
@media (min-width: 768px) { .row:has(> .col-md-3:nth-child(3):last-child) > .col-md-3 { width: 33.3333%; } }
