/* _footer.css — footer layout, columns, social icons */
/* =======================
   FOOTER
   ======================= */
.footer {
    width: min(1120px, calc(100% - 38px));
    margin: 8px auto 24px;
    border-radius: 22px;
    border: 1px solid rgba(16, 91, 81, .14);
    box-shadow: 0 16px 34px rgba(9, 45, 39, .16);
    background: rgba(255, 255, 255, .92);
    color: #253e37;
    padding: 20px 0 18px;
    content-visibility: auto;
    contain-intrinsic-size: 300px;
}

.footer-a, .footer-b {
    width: min(1020px, calc(100% - 24px));
    margin: 0 auto;
    padding: 0;
}

.footer-a {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 18px;
    align-items: start
}

@media (max-width: 920px) {
    .footer-a {
        grid-template-columns: 1fr 1fr
    }
}

@media (max-width: 720px) {
    .footer-a {
        grid-template-columns: 1fr 1fr
    }
}

@media (max-width: 420px) {
    .footer-a {
        grid-template-columns: 1fr
    }
}

.footer-column-a, .footer-column-b {
    min-width: 160px
}

.footer-column-a {
    min-width: 0;
}

.title-footer {
    margin: 0 0 6px;
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 800;
    color: #253e37
}

.footer-text {
    margin: 2px 0;
    font-size: .9rem;
    line-height: 1.35;
    color: #253e37;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.link-footer {
    color: #253e37;
    text-decoration: none
}

.footer-a .link-footer {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.footer-b {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(16, 91, 81, .12)
}

.footer-b .footer-column-b {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px
}

.footer-b .link-footer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(16, 91, 81, .3);
    background: rgba(236, 246, 244, .92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
    transition: background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.footer-b .link-footer:hover,
.footer-b .link-footer:focus-visible {
    background: rgba(35, 181, 159, .18);
    border-color: rgba(35, 181, 159, .56);
    box-shadow: 0 8px 18px rgba(10, 62, 54, .12), inset 0 1px 0 rgba(255, 255, 255, .56);
    transform: translateY(-1px);
}

.footer-social-icon {
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    pointer-events: none;
}

.footer-b .link-footer::before {
    content: "";
    width: 22px;
    height: 22px;
    background: #3d625d;
    transition: background .2s ease;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.footer-b .link-footer[aria-label*="Facebook"]::before {
    -webkit-mask-image: url("/immagini/facebook-logo.svg");
    mask-image: url("/immagini/facebook-logo.svg");
}

.footer-b .link-footer[aria-label*="Instagram"]::before {
    -webkit-mask-image: url("/immagini/instagram-logo.svg");
    mask-image: url("/immagini/instagram-logo.svg");
}

.footer-b .link-footer[aria-label*="WhatsApp"]::before {
    -webkit-mask-image: url("/immagini/WhatsAppLogoWhite.svg");
    mask-image: url("/immagini/WhatsAppLogoWhite.svg");
}

.footer-b .link-footer[aria-label*="Telegram"]::before {
    -webkit-mask-image: url("/immagini/telegram-logo.svg");
    mask-image: url("/immagini/telegram-logo.svg");
}

.footer-b .link-footer[aria-label*="Messenger"]::before {
    -webkit-mask-image: url("/immagini/messenger-logo.svg");
    mask-image: url("/immagini/messenger-logo.svg");
}

.footer-b .link-footer:hover::before,
.footer-b .link-footer:focus-visible::before {
    background: #165f55;
}

.footer-b .footer-text {
    margin: 0
}

/* ============================================================
   .footer-pill — pill condivisa per "Preferenze cookie" e "Notifiche".
   Entrambi i bottoni hanno aspetto e comportamento identici.
   Le classi specifiche (.fc-cookie-manage-btn, .fc-push-toggle)
   aggiungono solo icona e stati (active/denied).
   ============================================================ */
.footer-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    height: 36px;
    padding: 0 12px 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(16, 91, 81, .3);
    background: rgba(236, 246, 244, .92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
    color: #3d625d;
    font-family: inherit;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .01em;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none !important;
    transition: background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease, color .2s ease;
}

.footer-pill:hover,
.footer-pill:focus-visible {
    background: rgba(35, 181, 159, .18);
    border-color: rgba(35, 181, 159, .56);
    box-shadow: 0 8px 18px rgba(10, 62, 54, .12), inset 0 1px 0 rgba(255, 255, 255, .56);
    transform: translateY(-1px);
    color: #165f55;
    outline: none;
}

.footer-pill:focus-visible {
    outline: 2px solid rgba(35, 181, 159, .5);
    outline-offset: 2px;
}

@media (max-width: 800px) {
    .footer {
        border-radius: 18px;
    }
}

@media (prefers-color-scheme: dark) {
    .footer {
        background: rgba(26, 32, 34, .9);
        border-color: rgba(174, 215, 206, .16);
        color: #e9efed
    }

    .title-footer, .footer-text, .link-footer {
        color: #e9efed
    }

    .footer-b {
        border-top: 1px solid rgba(174, 215, 206, .18);
    }

    .footer-b .link-footer {
        border-color: rgba(146, 214, 202, .52);
        background: rgba(14, 48, 53, .84);
        box-shadow: inset 0 0 0 1px rgba(175, 228, 218, .08);
    }

    .footer-b .link-footer:hover,
    .footer-b .link-footer:focus-visible {
        background: rgba(35, 181, 159, .28);
        border-color: #4ad4bf;
        box-shadow: 0 10px 22px rgba(0, 0, 0, .22), inset 0 0 0 1px rgba(204, 248, 239, .14);
    }

    .footer-b .link-footer::before {
        background: #cfe7e2;
        filter: drop-shadow(0 1px 1px rgba(3, 10, 12, .3));
    }

    .footer-b .link-footer:hover::before,
    .footer-b .link-footer:focus-visible::before {
        background: #f4fffd;
        filter: none;
    }

    .footer-pill {
        background: rgba(14, 48, 53, .84);
        border-color: rgba(146, 214, 202, .52);
        color: #cfe7e2;
        box-shadow: inset 0 0 0 1px rgba(175, 228, 218, .08);
    }

    .footer-pill:hover,
    .footer-pill:focus-visible {
        background: rgba(35, 181, 159, .28);
        border-color: #4ad4bf;
        color: #f4fffd;
        box-shadow: 0 10px 22px rgba(0, 0, 0, .22), inset 0 0 0 1px rgba(204, 248, 239, .14);
    }
}
