/* --- EXTENDED FOOTER — on top of footer.css ---
   Every rule is scoped to .site-footer--extended (only footer-extended.html.twig renders it),
   so footers built from footer.html.twig are not affected. */

.site-footer.site-footer--extended {
    max-width: var(--footer-box-max-width, var(--content-max-width, var(--footer-max-width, 1200px)));
}

.site-footer--extended .footer-container {
    max-width: var(--footer-container-max-width, none);
}

/* Photo behind the footer (data.bgImage) */
.site-footer--extended.site-footer--has-bg {
    background-image: linear-gradient(var(--footer-bg-overlay, transparent), var(--footer-bg-overlay, transparent)), var(--footer-bg-image);
    background-size: cover;
    background-position: var(--footer-bg-position, center);
}

/* Optional darkening that runs on below the footer (--footer-spill-*: a top band over a full
   veil, optionally wider than the page). Nothing is drawn while --footer-spill-height is unset. */
.site-footer--extended::after {
    content: '';
    position: absolute;
    top: 100%;
    left: calc(-1 * var(--footer-spill-overflow-x, 0px));
    right: calc(-1 * var(--footer-spill-overflow-x, 0px));
    height: var(--footer-spill-height, 0);
    background:
        linear-gradient(var(--footer-spill-band-overlay, transparent), var(--footer-spill-band-overlay, transparent)) top / 100% var(--footer-spill-band-height, 0) no-repeat,
        var(--footer-spill-overlay, transparent);
    pointer-events: none;
}

/* Banner card (data.banner); the footer reserves the space the card pulls up over the content above */
.site-footer--extended.site-footer--has-banner {
    margin-top: calc(var(--footer-banner-overlap, 0px) + var(--footer-banner-space-above, 0px));
}

/* Keep the banner's negative top margin inside the footer (no margin collapsing
   with the footer's own margin when the footer has no top padding). */
.site-footer--extended.site-footer--has-banner .footer-container {
    display: flow-root;
}

.site-footer--extended .footer-banner {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin: calc(-1 * var(--footer-banner-overlap, 0px)) 0 var(--footer-banner-margin-bottom, 60px);
    padding: var(--footer-banner-padding, 60px 100px);
    background: var(--footer-banner-bg, var(--color-primary));
    color: var(--footer-banner-text-color, var(--color-text-light, #FFFFFF));
    border-radius: var(--footer-banner-radius, 0);
}

.site-footer--extended .footer-banner-title {
    margin: 0;
    max-width: var(--footer-banner-title-max-width, 600px);
    font-size: var(--footer-banner-title-size, 48px);
    font-weight: var(--footer-banner-title-weight, 700);
    line-height: var(--footer-banner-title-line-height, 1.25);
}

.site-footer--extended .footer-banner-top {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--footer-banner-top-size, 50px);
    height: var(--footer-banner-top-size, 50px);
    margin: var(--footer-banner-top-margin, 0);
    border: 2px solid currentColor;
    border-radius: 50%;
    color: inherit;
}

.site-footer--extended .footer-banner-top svg {
    width: 60%;
    height: 60%;
}

.site-footer--extended .footer-top-logo {
    height: var(--footer-top-logo-height, 50px);
    width: auto;
    object-fit: contain;
}

.site-footer--extended .footer-back-to-top-link {
    color: var(--footer-back-to-top-color, var(--color-primary));
}

/* Columns */
.site-footer--extended .footer-grid {
    grid-template-columns: var(--footer-grid-template, repeat(var(--footer-grid-columns, 6), 1fr));
    gap: var(--footer-grid-gap, 30px);
    margin-bottom: var(--footer-grid-margin-bottom, 60px);
}

.site-footer--extended .footer-col-logo {
    display: block;
    height: var(--footer-col-logo-height, 64px);
    width: auto;
}

.site-footer--extended .footer-col-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--footer-links-gap, 12px);
}

.site-footer--extended .footer-link {
    font-size: var(--footer-link-size, 13px);
    font-weight: var(--footer-link-weight, inherit);
    line-height: var(--footer-link-line-height, normal);
    opacity: var(--footer-link-opacity, 0.75);
}

/* Socials */
.site-footer--extended .footer-social-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    opacity: var(--footer-social-opacity, 0.85);
    transition: opacity 0.2s;
}

.site-footer--extended .footer-social-img {
    display: block;
    width: var(--footer-social-icon-size, 16px);
    height: var(--footer-social-icon-size, 16px);
}

/* Bottom bar */
.site-footer--extended .footer-bottom {
    padding: var(--footer-bottom-padding, 30px 0 0);
    flex-direction: var(--footer-bottom-direction, column);
    justify-content: var(--footer-bottom-justify, normal);
    align-items: var(--footer-bottom-align, center);
    gap: var(--footer-bottom-gap, 20px);
    background: var(--footer-bottom-bg, transparent);
}

/* the band runs to both viewport edges: one paint (border-image outset) over the box and past
   it, so a translucent colour shows no seam at the box edges */
.site-footer--extended .footer-bottom--bleed {
    background: none;
    border-image: linear-gradient(var(--footer-bottom-bg, transparent), var(--footer-bottom-bg, transparent)) fill 0 / 0 / 0 100vmax;
}

.site-footer--extended .footer-bottom .footer-socials {
    border-top: none;
    padding-top: 0;
    margin-bottom: 0;
    gap: var(--footer-bottom-socials-gap, 16px);
}

.site-footer--extended .footer-legal-links {
    gap: var(--footer-legal-gap, 35px);
    justify-content: var(--footer-legal-justify, center);
    max-width: var(--footer-legal-max-width, none);
    flex-wrap: var(--footer-legal-wrap, wrap);
}

.site-footer--extended .footer-legal-link {
    font-size: var(--footer-legal-size, 12px);
    font-weight: var(--footer-legal-weight, inherit);
    opacity: var(--footer-legal-opacity, 0.55);
}

.site-footer--extended .footer-copyright,
.site-footer--extended .footer-copyright p {
    text-align: var(--footer-copyright-align, center);
}

.site-footer--extended .footer-copyright {
    order: var(--footer-copyright-order, 0);
    max-width: var(--footer-copyright-max-width, none);
}

/* Region pill (data.region) */
.site-footer--extended .footer-region {
    display: inline-flex;
    align-items: center;
    gap: var(--footer-region-gap, 10px);
    margin-left: var(--footer-region-margin-left, 0);
    margin-right: var(--footer-region-margin-right, 0);
    padding: var(--footer-region-padding, 11px 15px);
    border: var(--footer-region-border, 1px solid currentColor);
    border-radius: var(--footer-region-radius, 26px);
    color: inherit;
    font-size: var(--footer-region-size, 12px);
    text-decoration: none;
}

.site-footer--extended .footer-region-flag {
    width: var(--footer-region-flag-size, 24px);
    height: var(--footer-region-flag-size, 24px);
}

@media (max-width: 768px) {
    .site-footer.site-footer--extended {
        padding: var(--footer-padding-mobile, var(--footer-padding, 80px 5% 40px 5%));
    }
    .site-footer--extended.site-footer--has-banner {
        margin-top: calc(var(--footer-banner-overlap, 0px) + var(--footer-banner-space-above-mobile, var(--footer-banner-space-above, 0px)));
    }
    .site-footer--extended .footer-grid {
        grid-template-columns: var(--footer-grid-template-mobile, repeat(var(--footer-grid-columns-mobile, 2), 1fr));
        gap: var(--footer-grid-gap-mobile, 30px);
        margin-bottom: var(--footer-grid-margin-bottom-mobile, var(--footer-grid-margin-bottom, 60px));
    }
    .site-footer--extended .footer-col-logo {
        height: var(--footer-col-logo-height-mobile, var(--footer-col-logo-height, 64px));
    }
    .site-footer--extended .footer-col-links {
        gap: var(--footer-links-gap-mobile, var(--footer-links-gap, 12px));
    }
    .site-footer--extended .footer-link {
        font-size: var(--footer-link-size-mobile, var(--footer-link-size, 13px));
        line-height: var(--footer-link-line-height-mobile, var(--footer-link-line-height, normal));
    }
    .site-footer--extended .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: var(--footer-bottom-gap-mobile, var(--footer-bottom-gap, 20px));
        padding: var(--footer-bottom-padding-mobile, var(--footer-bottom-padding, 30px 0 0));
    }
    .site-footer--extended .footer-copyright,
    .site-footer--extended .footer-copyright p {
        text-align: center;
        font-size: var(--footer-copyright-size-mobile, var(--footer-copyright-size, 12px));
    }
    /* Bottom bar order on mobile (0 keeps the source order) */
    .site-footer--extended .footer-bottom .footer-socials {
        order: var(--footer-socials-order-mobile, 0);
    }
    .site-footer--extended .footer-region {
        order: var(--footer-region-order-mobile, 0);
        margin-left: 0;
        margin-right: 0;
    }
    .site-footer--extended .footer-copyright {
        order: var(--footer-copyright-order-mobile, var(--footer-copyright-order, 0));
        max-width: none;
    }
    .site-footer--extended .footer-legal-links {
        order: var(--footer-legal-order-mobile, 0);
        flex-direction: var(--footer-legal-direction-mobile, column);
        justify-content: var(--footer-legal-justify-mobile, center);
        gap: var(--footer-legal-gap-mobile, 30px);
        width: var(--footer-legal-width-mobile, auto);
        max-width: none;
    }
    .site-footer--extended .footer-legal-link {
        font-size: var(--footer-legal-size-mobile, var(--footer-legal-size, 12px));
    }
    .site-footer--extended .footer-legal-link:first-child {
        padding: var(--footer-legal-first-padding-mobile, 0);
    }
    .site-footer--extended .footer-region-flag {
        width: var(--footer-region-flag-size-mobile, var(--footer-region-flag-size, 24px));
        height: var(--footer-region-flag-size-mobile, var(--footer-region-flag-size, 24px));
    }
    .site-footer--extended .footer-banner {
        margin-bottom: var(--footer-banner-margin-bottom-mobile, var(--footer-banner-margin-bottom, 60px));
        padding: var(--footer-banner-padding-mobile, 32px 24px);
    }
    .site-footer--extended .footer-banner-title {
        max-width: var(--footer-banner-title-max-width-mobile, var(--footer-banner-title-max-width, 600px));
        font-size: var(--footer-banner-title-size-mobile, 32px);
        line-height: var(--footer-banner-title-line-height-mobile, var(--footer-banner-title-line-height, 1.25));
    }
    .site-footer--extended .footer-banner-top {
        width: var(--footer-banner-top-size-mobile, var(--footer-banner-top-size, 50px));
        height: var(--footer-banner-top-size-mobile, var(--footer-banner-top-size, 50px));
        margin: var(--footer-banner-top-margin-mobile, 0);
    }
}

/* --- tablets (768 to 991px): the desktop arrangement with -tablet tokens (the desktop values
   without them); the rules footer.css and this file apply from 768px down are set back here.
   The bottom bar may break into two rows (--footer-bottom-break-tablet: block): what is ordered
   before the break (--footer-*-order-tablet) on the first row, the rest on the second. --- */
@media (min-width: 768px) and (max-width: 991px) {
    .site-footer.site-footer--extended {
        padding: var(--footer-padding-tablet, var(--footer-padding, 80px 5% 40px 5%));
    }
    .site-footer--extended.site-footer--has-banner {
        margin-top: calc(var(--footer-banner-overlap, 0px) + var(--footer-banner-space-above-tablet, var(--footer-banner-space-above, 0px)));
    }
    .site-footer--extended .footer-container {
        max-width: var(--footer-container-max-width-tablet, var(--footer-container-max-width, none));
    }
    .site-footer--extended .footer-banner {
        margin-bottom: var(--footer-banner-margin-bottom-tablet, var(--footer-banner-margin-bottom, 60px));
        padding: var(--footer-banner-padding-tablet, var(--footer-banner-padding, 60px 100px));
    }
    .site-footer--extended .footer-banner-title {
        max-width: var(--footer-banner-title-max-width-tablet, var(--footer-banner-title-max-width, 600px));
        font-size: var(--footer-banner-title-size-tablet, var(--footer-banner-title-size, 48px));
        line-height: var(--footer-banner-title-line-height-tablet, var(--footer-banner-title-line-height, 1.25));
    }
    .site-footer--extended .footer-link {
        font-size: var(--footer-link-size-tablet, var(--footer-link-size, 13px));
        line-height: var(--footer-link-line-height-tablet, var(--footer-link-line-height, normal));
    }
    .site-footer--extended .footer-banner-top {
        width: var(--footer-banner-top-size-tablet, var(--footer-banner-top-size, 50px));
        height: var(--footer-banner-top-size-tablet, var(--footer-banner-top-size, 50px));
        margin: var(--footer-banner-top-margin-tablet, var(--footer-banner-top-margin, 0));
    }
    .site-footer--extended .footer-grid {
        grid-template-columns: var(--footer-grid-template-tablet, var(--footer-grid-template, repeat(var(--footer-grid-columns, 6), 1fr)));
        gap: var(--footer-grid-gap-tablet, var(--footer-grid-gap, 30px));
        margin-bottom: var(--footer-grid-margin-bottom-tablet, var(--footer-grid-margin-bottom, 60px));
    }
    .site-footer--extended .footer-col-logo {
        height: var(--footer-col-logo-height-tablet, var(--footer-col-logo-height, 64px));
    }
    .site-footer--extended .footer-col-links {
        gap: var(--footer-links-gap-tablet, var(--footer-links-gap, 12px));
    }
    .site-footer--extended .footer-bottom {
        flex-direction: var(--footer-bottom-direction-tablet, var(--footer-bottom-direction, column));
        flex-wrap: var(--footer-bottom-wrap-tablet, nowrap);
        justify-content: var(--footer-bottom-justify-tablet, var(--footer-bottom-justify, normal));
        align-items: var(--footer-bottom-align-tablet, var(--footer-bottom-align, center));
        gap: var(--footer-bottom-gap-tablet, var(--footer-bottom-gap, 20px));
        padding: var(--footer-bottom-padding-tablet, var(--footer-bottom-padding, 30px 0 0));
    }
    .site-footer--extended .footer-bottom::before {
        content: '';
        display: var(--footer-bottom-break-tablet, none);
        flex-basis: 100%;
        height: 0;
        order: var(--footer-bottom-break-order-tablet, 0);
    }
    .site-footer--extended .footer-bottom .footer-socials {
        order: var(--footer-socials-order-tablet, 0);
    }
    .site-footer--extended .footer-region {
        order: var(--footer-region-order-tablet, 0);
        margin-left: var(--footer-region-margin-left-tablet, var(--footer-region-margin-left, 0));
        margin-right: var(--footer-region-margin-right-tablet, var(--footer-region-margin-right, 0));
    }
    .site-footer--extended .footer-copyright {
        order: var(--footer-copyright-order-tablet, var(--footer-copyright-order, 0));
        max-width: var(--footer-copyright-max-width-tablet, var(--footer-copyright-max-width, none));
    }
    .site-footer--extended .footer-copyright,
    .site-footer--extended .footer-copyright p {
        text-align: var(--footer-copyright-align, center);
        font-size: var(--footer-copyright-size-tablet, var(--footer-copyright-size, 12px));
    }
    .site-footer--extended .footer-legal-links {
        order: var(--footer-legal-order-tablet, 0);
        flex-direction: row;
        justify-content: var(--footer-legal-justify, center);
        gap: var(--footer-legal-gap, 35px);
        width: auto;
        max-width: var(--footer-legal-max-width-tablet, var(--footer-legal-max-width, none));
    }
    .site-footer--extended .footer-legal-link {
        font-size: var(--footer-legal-size-tablet, var(--footer-legal-size, 12px));
    }
    .site-footer--extended .footer-legal-link:first-child {
        padding: var(--footer-legal-first-padding-tablet, 0);
    }
}

/* ==========================================================================================
   Opt-ins. Each block reads only its own modifier class (or an element only the opt-in
   renders), so a footer without the opt-in is not affected. Up to 991px = phones and tablets.
   ========================================================================================== */

/* --- band: a coloured band across the footer's top; the column logo is pulled up into it --- */
.site-footer--extended.site-footer--band {
    border-top: var(--footer-band-height, 0) solid var(--footer-band-bg, transparent);
}
.site-footer--band .footer-col-logo {
    margin-top: calc(-1 * var(--footer-band-logo-pull, 0px));
}

/* --- about (with logoInColumns): a text under the logo; the logo column spans the row and is
   centred up to 991px; the other columns can start lower than the logo from 992px --- */
.site-footer--logo-about .footer-col-about {
    margin-top: var(--footer-about-margin-top, 0);
    max-width: var(--footer-about-max-width, none);
    color: var(--footer-about-color, inherit);
    font-size: var(--footer-about-size, inherit);
    line-height: var(--footer-about-line-height, inherit);
}
.site-footer--logo-about .footer-col-about p {
    margin: 0;
}
@media (min-width: 992px) {
    .site-footer--logo-about .footer-col:not(.footer-col--logo) {
        padding-top: var(--footer-cols-offset, 0);
    }
}
@media (max-width: 991px) {
    .site-footer--logo-about .footer-col--logo {
        grid-column: 1 / -1;
        display: flex;
        flex-direction: column;
        align-items: var(--footer-col-logo-align-mobile, center);
    }
    .site-footer--logo-about .footer-col-about {
        width: 100%;
        margin-top: var(--footer-about-margin-top-mobile, var(--footer-about-margin-top, 0));
        max-width: var(--footer-about-max-width-mobile, var(--footer-about-max-width, none));
    }
}

/* --- linkChunks: each column's links in lists of N (.footer-col-chunk) side by side, wrapping
   onto more rows; one under the other up to 991px unless the -mobile width says otherwise --- */
.site-footer--link-chunks .footer-col-chunks {
    display: flex;
    flex-wrap: wrap;
    row-gap: var(--footer-chunk-row-gap, 0);
}
.site-footer--link-chunks .footer-col-chunk {
    flex: 0 0 var(--footer-chunk-width, 100%);
    max-width: var(--footer-chunk-max-width, none);
    padding-right: var(--footer-chunk-padding-right, 0);
}
@media (max-width: 991px) {
    .site-footer--link-chunks .footer-col-chunks {
        row-gap: var(--footer-chunk-row-gap-mobile, var(--footer-chunk-row-gap, 0));
    }
    .site-footer--link-chunks .footer-col-chunk {
        flex-basis: var(--footer-chunk-width-mobile, 100%);
        max-width: var(--footer-chunk-max-width-mobile, var(--footer-chunk-max-width, none));
        padding-right: var(--footer-chunk-padding-right-mobile, var(--footer-chunk-padding-right, 0));
    }
}
/* From 992px, a column's last list can have its own right padding (--footer-chunk-last-padding-right,
   default the others'). */
@media (min-width: 992px) {
    .site-footer--link-chunks .footer-col-chunk:last-child {
        padding-right: var(--footer-chunk-last-padding-right, var(--footer-chunk-padding-right, 0));
    }
}

/* --- columnTitleOwnLook: the column titles' font, colour, line-height, spacing and margin --- */
.site-footer--col-title-own .footer-col-title {
    font-family: var(--footer-col-title-font-family, inherit);
    color: var(--footer-col-title-color, var(--footer-text-color, var(--color-text-light)));
    line-height: var(--footer-col-title-line-height, normal);
    letter-spacing: var(--footer-col-title-letter-spacing, 0.5px);
    margin-bottom: var(--footer-col-title-margin-bottom, 20px);
}
@media (max-width: 991px) {
    .site-footer--col-title-own .footer-col-title {
        margin-bottom: var(--footer-col-title-margin-bottom-mobile, var(--footer-col-title-margin-bottom, 20px));
    }
}

/* --- columns[].html: a text under the column title (e.g. an address), before or after the links;
   columns[].socials: the socials at the end of that column instead of under the grid --- */
.site-footer--extended .footer-col-html {
    color: var(--footer-col-html-color, inherit);
    font-size: var(--footer-col-html-size, var(--footer-link-size, 13px));
    line-height: var(--footer-col-html-line-height, 1.4);
    opacity: var(--footer-col-html-opacity, 1);
}
.site-footer--extended .footer-col-html p {
    margin: 0 0 var(--footer-col-html-paragraph-gap, 12px);
}
.site-footer--extended .footer-col-html p:last-child {
    margin-bottom: 0;
}
.site-footer--extended .footer-col-html a {
    color: inherit;
}
.site-footer--extended .footer-col-html + .footer-col-links,
.site-footer--extended .footer-col-html + .footer-col-chunks,
.site-footer--extended .footer-col-links + .footer-col-html,
.site-footer--extended .footer-col-chunks + .footer-col-html {
    margin-top: var(--footer-col-html-gap, 20px);
}
.site-footer--extended .footer-col--socials .footer-socials {
    justify-content: var(--footer-col-socials-justify, flex-start);
    gap: var(--footer-col-socials-gap, 16px);
    margin: var(--footer-col-socials-margin, 20px 0 0);
    padding: 0;
    border-top: none;
}
/* Phones: the html column and the about text can be centred (footer.css aligns every column left
   there with !important, so the column rule needs it too) */
@media (max-width: 768px) {
    .site-footer--extended .footer-col.footer-col--html {
        grid-column: var(--footer-col-html-column-mobile, auto);
        text-align: var(--footer-col-html-align-mobile, left) !important;
    }
    .site-footer--extended .footer-col--socials .footer-socials {
        justify-content: var(--footer-col-socials-justify-mobile, var(--footer-col-socials-justify, flex-start));
    }
}

/* An existing element: in a cascade layer, so with no token the rule loses to every unlayered one
   and the text keeps the alignment it had (inherit is only a placeholder). */
@layer footer-extended-tokens {
    @media (max-width: 768px) {
        .site-footer--logo-about .footer-col-about {
            text-align: var(--footer-about-align-mobile, inherit);
        }
    }
}

/* --- collapsibleMobile: up to --footer-collapsible-up-to (default 767px; read by js/footer-extended.js,
   which adds .is-collapsible / .is-open) the link columns are accordions; the title is a button with
   a chevron. Nothing here applies without the classes the script adds. --- */
.site-footer--collapsible .footer-col.is-collapsible {
    grid-column: var(--footer-collapsible-column, 1 / -1);
}
.site-footer--collapsible .is-collapsible:not(.is-open) .footer-col-title {
    margin-bottom: var(--footer-collapsible-closed-title-margin, 0);
}
.site-footer--collapsible [data-footer-panel][hidden] {
    display: none !important;
}
.site-footer--collapsible .footer-col-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: var(--footer-collapsible-toggle-padding, 0);
    border: none;
    background: none;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    text-align: start;
    cursor: pointer;
}
.site-footer--collapsible .footer-col-toggle::after {
    content: "";
    flex: 0 0 auto;
    width: var(--footer-collapsible-chevron-size, 6px);
    height: var(--footer-collapsible-chevron-size, 6px);
    margin-top: calc(-0.5 * var(--footer-collapsible-chevron-size, 6px));
    border-right: var(--footer-collapsible-chevron-stroke, 1.5px) solid var(--footer-collapsible-chevron-color, currentColor);
    border-bottom: var(--footer-collapsible-chevron-stroke, 1.5px) solid var(--footer-collapsible-chevron-color, currentColor);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}
.site-footer--collapsible .footer-col-toggle[aria-expanded="true"]::after {
    margin-top: calc(0.5 * var(--footer-collapsible-chevron-size, 6px));
    transform: rotate(-135deg);
}
.site-footer--collapsible .footer-col-toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
