/**
 * Footer styles.
 * Colors are pulled from theme.json presets via WordPress's generated
 * custom properties (--wp--preset--color--{slug}) where available.
 * The neutral grays below (#AAB0BA, #808898, #EAEBEE, #FDFDFC) aren't
 * theme.json tokens but match the hardcoded-hex convention already used
 * elsewhere in the design refresh (e.g. rf-promocard, rf-faq).
 */

.footer {
    background-color: var(--wp--preset--color--dark);
    color: #fff;
    padding-block: clamp(3rem, 6vw, 5rem) 2rem;
    border-radius: clamp(40px, 5.6vw, 80px) clamp(40px, 5.6vw, 80px) 0 0;
    position:relative;
    z-index:2;
}

.footer a {
    color: inherit;
    text-decoration: none;
}

.footer__inner {
    max-width: var(--wp--style--global--wide-size, 1440px);
    margin-inline: auto;
    padding-inline: clamp(2.5rem, 5.6vw, 5rem);
}

/* Top area: brand + main content ------------------------------------ */

.footer__top {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem clamp(2rem, 5.6vw, 5rem);
    margin-bottom: 3rem;
}

.footer__brand {
    flex: 0 0 auto;
    width: 351px;
    max-width: 100%;
}

.footer__logo {
    display: inline-block;
}

.footer__logo img {
    height: auto;
    max-width: 100%;
}

.footer__main {
    flex: 1 1 480px;
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    min-width: 0;
}

/* Nav columns (top row: For you / About us / For you / Login) -------- */

.footer__nav-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem 5rem;
}

/* Secondary row: optional content columns + newsletter --------------- */

.footer__secondary-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 2rem 5rem;
}

.footer__nav-columns .footer__column,
.footer__secondary-row .footer__column {
    flex: 0 0 140px;
}

.footer__secondary-row--single {
    max-width: 420px;
}

.footer__column-title {
    margin: 0 0 1.5rem;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.4;
    color: #AAB0BA;
}

.footer__link-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer__link-list a {
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
    transition: color 0.15s ease;
}

.footer__link-list a:hover,
.footer__link-list a:focus-visible {
    color: var(--wp--preset--color--primary);
}

/* Newsletter ----------------------------------------------------------- */

.footer__newsletter-col {
    flex: 1 1 240px;
}

.footer__newsletter {
    background-color: rgba(246, 243, 240, 0.05);
    border: 1.5px solid #FDFDFC;
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer__newsletter-text {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
    color:#fff;
}

.footer__newsletter-form {
    margin: 0;
}

.footer__newsletter-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 2px solid #EAEBEE;
    border-radius: 999px;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.4;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.footer__newsletter-button:hover,
.footer__newsletter-button:focus-visible {
    background-color: #fff;
    color: var(--wp--preset--color--dark);
}

.footer__newsletter-arrow {
    display: block;
    width: 0.85em;
    height: 0.5em;
    background-color: currentColor;
    mask-image: url('icons/arrow-right.svg');
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-image: url('icons/arrow-right.svg');
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    transform: rotate(90deg);
}

/* Articles accordion ---------------------------------------------------- */

.footer__articles {
    border-top: 1px solid #808898;
    padding-top: 1.5rem;
}

.footer__articles-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: none;
    border: none;
    color: #AAB0BA;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.4;
    cursor: pointer;
    padding: 0;
}

.footer__articles-icon {
    display: block;
    width: 9px;
    height: 8px;
    background-color: currentColor;
    mask-image: url('icons/chevron-down.svg');
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-image: url('icons/chevron-down.svg');
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    transition: transform 0.2s ease;
}

.footer__articles-toggle[aria-expanded="true"] .footer__articles-icon {
    transform: rotate(180deg);
}

.footer__articles-panel {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
    column-count: 2;
    column-gap: 5rem;
}

.footer__articles-panel li {
    break-inside: avoid;
    margin-bottom: 1rem;
}

.footer__articles-panel a {
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
    transition: color 0.15s ease;
}

.footer__articles-panel a:hover,
.footer__articles-panel a:focus-visible {
    color: var(--wp--preset--color--primary);
}

/* Bottom bar: legal / socials + certifications -------------------------- */

.footer__bottom {
    padding-top: 2.5rem;
    border-top: 1px solid #808898;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem 2rem;
}

.footer__legal {
    flex: 1 1 320px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.footer__copyright {
    margin: 0;
    font-weight: 500;
    color:#fff;
}

.footer__legal-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
}

.footer__legal-links a {
    font-size: 13px;
    font-weight: 500;
}

.footer__legal-links li + li {
    border-left: 1px solid #808898;
    padding-left: 1rem;
}

.footer__logos {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.footer__socials {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end;
    gap: 1.2rem;
}

.footer__social-icon {
    display: block;
    width: 2rem;
    height: 2rem;
    background-color: #fff;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    transition: background-color 0.15s ease;
}

.footer__social-icon:hover,
.footer__social-icon:focus-visible {
    background-color: var(--wp--preset--color--primary);
}

.footer__social-icon--facebook {
    mask-image: url('icons/facebook.svg');
    -webkit-mask-image: url('icons/facebook.svg');
    mask-size: 9.93px 19.13px;
    -webkit-mask-size: 9.93px 19.13px;
}

.footer__social-icon--linkedin {
    mask-image: url('icons/linkedin.svg');
    -webkit-mask-image: url('icons/linkedin.svg');
    mask-size: 15.95px 15.95px;
    -webkit-mask-size: 15.95px 15.95px;
}

.footer__social-icon--youtube {
    mask-image: url('icons/youtube.svg');
    -webkit-mask-image: url('icons/youtube.svg');
    mask-size: 20.73px 14.35px;
    -webkit-mask-size: 20.73px 14.35px;
}

.footer__social-icon--instagram {
    mask-image: url('icons/instagram.svg');
    -webkit-mask-image: url('icons/instagram.svg');
    mask-size: 20.73px 20.73px;
    -webkit-mask-size: 20.73px 20.73px;
}

.footer__certifications {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.75rem;
    opacity: 0.8;
}

.footer__certifications img {
    max-height: 2.75rem;
    width: auto;
}

/* Overlapped by a preceding block (e.g. CTA (simple) with "Overlap footer"):
   the card reaches 245px into the footer (see ctasimple.css — keep in sync),
   footer content starts 80px below the card. All screen sizes. */
.footer--overlapped {
    padding-top: calc(245px + 80px);
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 960px) {
    .footer__nav-columns,
    .footer__secondary-row {
        gap: 2rem 2.5rem;
    }
}

@media (max-width: 781px) {
    .footer__top {
        flex-direction: column;
        gap: 5rem;
    }

    .footer__brand {
        width: 100%;
        max-width: 310px;
        order: 2;
    }

    .footer__main {
        order: 1;
        gap: 2.5rem;
    }

    .footer__legal{
        flex:inherit;
    }

    .footer__nav-columns,
    .footer__secondary-row {
        flex-direction: column;
        gap: 2.5rem;
    }

    .footer__nav-columns .footer__column,
    .footer__secondary-row .footer__column {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
    }

    .footer__newsletter-col {
        flex: 1 1 auto;
        width: 100%;
    }

    .footer__secondary-row--single {
        max-width: none;
    }

    .footer__articles-panel {
        column-count: 1;
    }

    .footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 2.5rem;
    }

    .footer__legal-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .footer__legal-links li + li {
        border-left: none;
        padding-left: 0;
    }

    .footer__logos {
        width: 100%;
        align-items: center;
    }

    .footer__socials {
        justify-content: center;
        width: 100%;
    }

    .footer__certifications {
        justify-content: center;
        width: 100%;
    }
}
