.block-footer {
    position: relative;
    overflow: hidden;
}

.block-footer__inner {
    padding: var(--wp--preset--spacing--60) var(--wp--style--root--padding-right) var(--wp--preset--spacing--60) var(--wp--style--root--padding-left);
}

/* Top: link columns */
.block-footer__top {
    display: grid;
    gap: 1.5em;
    padding-bottom: var(--wp--preset--spacing--60);
    max-width: var(--wp--style--global--wide-size);
    margin-left: auto;
    margin-right: auto;
    font-size: var(--wp--preset--font-size--medium);
}

@media (max-width: 767px) {
    .block-footer__top {
        gap: 3rem 1rem;
        font-size: var(--wp--preset--font-size--normal); /* slightly smaller than Medium on mobile */
    }
}

@media (min-width: 480px) {
    .block-footer__top {
        grid-template-columns: 1fr 1fr;
    }

    .block-footer__column.block-footer__column--contact {
        grid-column: 1 / 3;
    }
}

@media (min-width: 768px) {
    .block-footer__top {
        grid-template-columns: repeat(4, 1fr);
    }

    .block-footer__column.block-footer__column--contact {
        grid-column: auto;
    }
}

/* Column 1 — contact info */
/* Address / phone / email: 100% white (the global paragraph colour is 80%) */
.block-footer .block-footer__contact-text,
.block-footer .block-footer__contact-text p,
.block-footer .block-footer__contact-text a {
    color: var(--wp--preset--color--white);
    opacity: 1;
}

.block-footer__contact-button {
    margin-top: var(--wp--preset--spacing--30);
}

/* On the dark footer, buttons invert on hover: a white fill wipes in with
   dark-blue (accent-4) text — the global accent-4 wipe would be invisible here. */
.block-footer__inner .btn-animate-chars__wipe {
    background-color: var(--wp--preset--color--white);
}

.block-footer__inner .wp-block-button .wp-block-button__link.btn-animate-chars:hover {
    border-color: var(--wp--preset--color--white);
    color: var(--wp--preset--color--accent-4) !important;
}

/* Logo — full width, below the columns */
.block-footer__logo-row {
    padding-top: var(--wp--preset--spacing--40);
    padding-bottom: var(--wp--preset--spacing--40);
    max-width: var(--wp--style--global--wide-size);
    margin-left: auto;
    margin-right: auto;
    border-bottom: 1px solid var(--wp--preset--color--current-10);
}

.block-footer__logo {
    display: block;
    width: 100%;
    height: auto;
}

/* Quote above the logo, right-aligned — script font of the home header */
.block-footer .block-footer__logo-quote {
    margin: 0 0 0.25em !important;
    text-align: right;
    font-size: clamp(48px, 6vw, 85px);
    line-height: 0.9;
    color: var(--wp--preset--color--white);
}

/* Logo links — sit inline next to the copyright in the bottom bar */
.block-footer__logo-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    font-size: var(--wp--preset--font-size--small);
}

.block-footer__logo-links a {
    text-decoration: none;
    color: var(--wp--preset--color--white);
}

/* Link columns */
.block-footer__column-title {
    font-size: var(--wp--preset--font-size--small);
    text-transform: uppercase;
    font-weight: var(--uppercase-font-weight);
    letter-spacing: var(--uppercase-letter-spacing);
    margin: 0 0 1rem 0 !important;
}

.block-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.block-footer__links a {
    text-decoration: none;
    color: var(--wp--preset--color--white); /* 100% white */
}

footer [data-underline-link] {
    font-weight: 400;
}

/* Column toggle — only acts as an accordion on mobile (initAccordionCSS in main.js) */
.block-footer__column-chevron {
    display: none;
}

@media (max-width: 767px) {
    .block-footer__top {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .block-footer__column.block-footer__column--contact {
        grid-column: auto;
    }

    .block-footer__column[data-accordion-status] {
        border-bottom: 1px solid var(--wp--preset--color--current-10);
    }

    .block-footer__column-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 1.25rem 0;
        cursor: pointer;
    }

    .block-footer__column-toggle .block-footer__column-title {
        margin: 0 !important;
    }

    .block-footer__column-chevron {
        display: block;
        flex-shrink: 0;
        transition: transform 0.6s cubic-bezier(0.625, 0.05, 0, 1);
    }

    [data-accordion-status="active"] .block-footer__column-chevron {
        transform: rotate(180deg);
    }

    /* Same grid-rows trick as the accordion block */
    [data-accordion-status] > .block-footer__column-body {
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows 0.6s cubic-bezier(0.625, 0.05, 0, 1);
    }

    [data-accordion-status="active"] > .block-footer__column-body {
        grid-template-rows: 1fr;
    }

    [data-accordion-status] .block-footer__column-body-inner {
        overflow: hidden;
        min-height: 0;
    }

    [data-accordion-status] .block-footer__column-body-inner > :last-child {
        margin-bottom: 1.25rem;
    }
}


/* Bottom bar */
.block-footer__bottom {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--30);
    align-items: flex-start;
    justify-content: space-between;
    padding-top: var(--wp--preset--spacing--40);
    max-width: var(--wp--style--global--wide-size);
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .block-footer__bottom {
        flex-direction: row;
        align-items: center;
    }
}

/* One row when it fits, wraps onto the next line when it doesn't */
.block-footer__bottom-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40);
}

/* "Built by Boldest" — subtle, same size and opacity as the copyright */
.block-footer__credit {
    font-size: var(--wp--preset--font-size--small);
    color: currentColor;
    opacity: 0.7;
    text-decoration: none;
    white-space: nowrap;
}

.block-footer__credit:hover {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.block-footer__copyright {
    font-size: var(--wp--preset--font-size--small);
    opacity: 0.7;
    white-space: nowrap;
}

/* Partner logos */
.block-footer__partner-logos {
    display: flex;
    flex-wrap: nowrap; /* always side by side */
    align-items: center;
    gap: var(--wp--preset--spacing--30);
}

.block-footer__partner-logo {
    display: block;
    height: 32px;
    width: auto;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.block-footer__partner-logo:hover {
    opacity: 1;
}

/* Mobile: smaller logos, shrinking to fit the row */
@media (max-width: 767px) {
    .block-footer__partner-logos {
        gap: var(--wp--preset--spacing--20);
    }

    .block-footer__partner-logo {
        flex: 0 1 auto;
        min-width: 0;
        max-width: 100%;
        height: auto;
        max-height: 24px;
        object-fit: contain;
    }
}

/* ── WhatsApp Modal (Osmo) ── */

.whatsapp-modal {
    z-index: 10000;
    pointer-events: none;
    flex-flow: column;
    justify-content: center;
    align-items: center;
    display: flex;
    position: fixed;
    inset: 0;
}

.whatsapp-modal__card {
    transition: all 0.6s cubic-bezier(0.625, 0.05, 0, 1);
    grid-column-gap: 1.25em;
    grid-row-gap: 1.25em;
    pointer-events: auto;
    background-color: #f8f6f3;
    color: #000;
    border-radius: 0;
    flex-flow: column;
    align-items: center;
    width: 20em;
    padding: 4.5em 2em 3.26em;
    display: flex;
    position: relative;
    transform: translateY(25%) rotate(0.001deg);
    opacity: 0;
    visibility: hidden;
}

[data-whatsapp-modal-status="active"] .whatsapp-modal__card {
    transform: translateY(0%) rotate(0.001deg);
    opacity: 1;
    visibility: visible;
}

.whatsapp-modal__qr-canvas {
    background-color: rgba(0, 0, 0, 0.1);
    width: 8.75em;
    height: 8.75em;
}

[data-whatsapp-modal-qr-canvas]:has(svg) {
    background-color: transparent;
}

[data-whatsapp-modal-qr-canvas] svg rect {
    fill: transparent;
}

.whatsapp-modal__text {
    grid-column-gap: 0.75em;
    grid-row-gap: 0.75em;
    flex-flow: column;
    align-items: center;
    padding-top: 1em;
    display: flex;
}

.whatsapp-modal__h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.75em;
    font-weight: 500;
    line-height: 1;
}

.whatsapp-modal__p {
    color: rgba(0, 0, 0, 0.6);
    text-align: center;
    font-size: 1em;
}

.whatsapp-modal__btn {
    color: #fff;
    cursor: pointer;
    background-color: var(--wp--preset--color--accent-5);
    border-radius: 100px;
    padding: 1rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-modal__btn-span {
    color: inherit;
    font-size: 1em;
    font-weight: 500;
    line-height: 1;
}

.whatsapp-modal__overlay-link,
.whatsapp-modal__overlay-toggle {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.whatsapp-modal__close {
    cursor: pointer;
    justify-content: center;
    align-items: center;
    width: 2em;
    height: 2em;
    display: flex;
    position: absolute;
    top: 1.5em;
    right: 1.5em;
}

.whatsapp-modal__close-bar {
    background-color: #000;
    width: 1.5em;
    height: 0.09375em;
    position: absolute;
    transform: rotate(-45deg);
}

.whatsapp-modal__close-bar.is--duplicate {
    transform: rotate(45deg);
}

.whatsapp-modal__dark {
    transition: all 0.6s cubic-bezier(0.625, 0.05, 0, 1);
    pointer-events: auto;
    background-color: rgba(0, 0, 0, 0.2);
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
}

[data-whatsapp-modal-status="active"] .whatsapp-modal__dark {
    opacity: 1;
    visibility: visible;
}

.whatsapp-modal__btn.is--large {
    font-size: 1.25em;
}

.whatsapp-modal__icon-svg {
    width: 1.75rem;
    height: 1.75rem;
    display: block;
    position: relative;
}

/* Floating contact buttons (phone above WhatsApp) — bottom right */
.block-footer__floating-buttons {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 99;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Phone icon is a stroke icon, a touch smaller than the WhatsApp glyph */
.block-footer__phone-btn .whatsapp-modal__icon-svg {
    padding: 0.125rem;
    box-sizing: border-box;
}

/* Fixed trigger button — bottom right */
.whatsapp-modal__btn.is--fixed {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 99;
}

/* Hide link on non-touch devices */
[data-whatsapp-modal-btn] [data-whatsapp-modal-link] {
    display: none;
}

/* Hide modal on touch devices, open link directly */
@media (hover: none) and (pointer: coarse) {
    [data-whatsapp-modal] {
        display: none;
    }

    [data-whatsapp-modal-trigger] [data-whatsapp-modal-toggle] {
        display: none;
    }

    [data-whatsapp-modal-trigger] [data-whatsapp-modal-link] {
        display: block;
    }
}
