/* Footer: "Our Offices" (footer.php .our-offices-address-section.fpx-offices) — every page.
   Full width: head row on the fluid footer gutter, then the five offices as one edge-to-edge row
   of columns split by hairlines (no cards). Numbered 01–05, big round flag, orange bar + warm tint
   on hover. Horizontal swipe row on small screens. Markup and text unchanged. */

section.our-offices-address-section.fpx-offices {
    --of-g: clamp(16px, 4.5vw, 88px);
    padding: 100px 0 0 !important;
    background: #000 !important;
}

section.fpx-offices > .container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ---------- head ---------- */
section.fpx-offices .fpx-head {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: space-between;
    gap: 24px 48px;
    margin: 0 0 48px !important;
    padding: 0 var(--of-g) !important;
}

section.fpx-offices .fpx-title {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0 !important;
    color: #fff !important;
    font-size: clamp(36px, 3.6vw, 56px) !important;
    line-height: 1.05 !important;
    letter-spacing: -.03em;
}

section.fpx-offices .fpx-title::before {
    content: "";
    width: 56px;
    height: 3px;
    border-radius: 3px;
    background: #ff9f0a;
}

section.fpx-offices .fpx-lead {
    max-width: 420px;
    margin: 0 !important;
    color: rgba(255, 255, 255, .6) !important;
    font-size: 16px !important;
    line-height: 1.7 !important;
    text-align: right !important;
}

/* ---------- office row ---------- */
section.fpx-offices .fpx-office-grid {
    counter-reset: of;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0 !important;
    margin: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, .12);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

section.fpx-offices .fpx-office {
    counter-increment: of;
    position: relative;
    display: flex !important;
    flex-direction: column;
    gap: 16px;
    min-height: 300px;
    margin: 0 !important;
    padding: 40px clamp(20px, 2.2vw, 40px) 44px !important;
    border: 0 !important;
    border-left: 1px solid rgba(255, 255, 255, .12) !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    transform: none !important;
    transition: background .4s ease !important;
}

section.fpx-offices .fpx-office:first-child {
    border-left: 0 !important;
    padding-left: var(--of-g) !important;
}

section.fpx-offices .fpx-office:last-child {
    padding-right: var(--of-g) !important;
}

/* number, top right */
section.fpx-offices .fpx-office::before {
    content: counter(of, decimal-leading-zero);
    position: absolute;
    top: 40px;
    right: clamp(20px, 2.2vw, 40px);
    color: rgba(255, 255, 255, .25);
    font-family: var(--bold);
    font-size: 14px;
    letter-spacing: .08em;
    transition: color .3s ease;
}

section.fpx-offices .fpx-office:last-child::before {
    right: var(--of-g);
}

/* orange bar on hover */
section.fpx-offices .fpx-office::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -1px;
    height: 2px;
    background: #ff9f0a;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .6s cubic-bezier(.22, 1, .36, 1);
}

section.fpx-offices .fpx-office:hover {
    background: linear-gradient(180deg, rgba(255, 159, 10, .1), rgba(255, 159, 10, 0)) !important;
}

section.fpx-offices .fpx-office:hover::after {
    transform: scaleX(1);
}

section.fpx-offices .fpx-office:hover::before {
    color: #ff9f0a;
}

section.fpx-offices .fpx-office-top {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start !important;
    gap: 22px !important;
}

section.fpx-offices .fpx-office-top img {
    flex: 0 0 56px !important;
    width: 56px !important;
    min-width: 56px !important;
    height: 56px !important;
    max-width: 56px !important;
    max-height: 56px !important;
    border: 2px solid rgba(255, 255, 255, .15);
    border-radius: 50% !important;
    object-fit: cover !important;
    transition: border-color .3s ease, transform .5s cubic-bezier(.34, 1.56, .64, 1);
}

section.fpx-offices .fpx-office:hover .fpx-office-top img {
    border-color: #ff9f0a;
    transform: scale(1.08) rotate(-6deg);
}

section.fpx-offices .fpx-office-name {
    color: #fff !important;
    font-family: var(--bold);
    font-size: 20px !important;
    line-height: 1.3 !important;
}

section.fpx-offices .fpx-office-addr {
    margin: 0 !important;
    color: rgba(255, 255, 255, .62) !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
}

section.fpx-offices .fpx-office-phone {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    color: #ff9f0a !important;
    font-family: var(--bold);
    font-size: 15px !important;
    text-decoration: none !important;
}

section.fpx-offices .fpx-office-phone:hover {
    color: #fff !important;
}

/* ---------- responsive ---------- */
@media (max-width: 1199px) {
    section.fpx-offices .fpx-office-grid {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(260px, 34%);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    section.fpx-offices .fpx-office-grid::-webkit-scrollbar {
        display: none;
    }

    section.fpx-offices .fpx-office {
        scroll-snap-align: start;
    }
}

@media (max-width: 767px) {
    section.our-offices-address-section.fpx-offices {
        padding-top: 72px !important;
    }

    section.fpx-offices .fpx-head {
        flex-direction: column;
        align-items: flex-start !important;
        margin-bottom: 32px !important;
        padding: 0 20px !important;
    }

    section.fpx-offices .fpx-lead {
        text-align: left !important;
    }

    section.fpx-offices .fpx-office-grid {
        grid-auto-columns: 78%;
    }

    section.fpx-offices .fpx-office,
    section.fpx-offices .fpx-office:first-child,
    section.fpx-offices .fpx-office:last-child {
        min-height: 260px;
        padding: 32px 20px 36px !important;
    }

    section.fpx-offices .fpx-office::before,
    section.fpx-offices .fpx-office:last-child::before {
        top: 32px;
        right: 20px;
    }
}

/* no 01–05 numbers */
section.fpx-offices .fpx-office::before {
    content: none !important;
    display: none !important;
}
