/* Bunz: Footer Angelino */

.ag-foot {
    --ag-navy: #004a83;
    --ag-navy-dark: #00335c;
    --ag-accent: #fa5636;
    --ag-ink: #1a2b48;
    --ag-muted: #5e6d77;

    /* A tutta larghezza anche dentro il container del tema */
    box-sizing: border-box;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    font-size: 15px;
    line-height: 1.6;
}

.ag-foot__wrap {
    max-width: 1170px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

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

.ag-foot__news {
    background: #f2f6fb;
    border-top: 1px solid #e2eaf4;
    padding-block: 44px;
}

.ag-foot__news-inner {
    display: flex;
    align-items: center;
    gap: 40px;
}

.ag-foot__news-text {
    flex: 1 1 auto;
    min-width: 0;
}

.ag-foot__news-text h3 {
    margin: 0 0 6px;
    color: var(--ag-ink);
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
}

.ag-foot__news-text p {
    margin: 0;
    color: var(--ag-muted);
    font-size: 15px;
}

.ag-foot__news-form {
    flex: 0 1 460px;
}

/* Il form è Contact Form 7: normalizzo input e bottone */
.ag-foot__news-form .wpcf7-form,
.ag-foot__news-form form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

.ag-foot__news-form p {
    display: contents;
    margin: 0;
}

/* CF7 avvolge il campo in uno span: il flex item è quello */
.ag-foot__news-form .wpcf7-form-control-wrap {
    flex: 1 1 220px;
    min-width: 0;
}

.ag-foot__news-form input[type="email"],
.ag-foot__news-form input[type="text"] {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #cfdbe9;
    border-radius: 6px;
    background: #fff;
    color: var(--ag-ink);
    font-size: 15px;
}

.ag-foot__news-form input[type="email"]:focus,
.ag-foot__news-form input[type="text"]:focus {
    border-color: var(--ag-navy);
    outline: 2px solid rgba(0, 74, 131, 0.18);
    outline-offset: 1px;
}

.ag-foot__news-form input[type="submit"],
.ag-foot__news-form button[type="submit"] {
    flex: 0 0 auto;
    height: 48px;
    padding: 0 28px;
    border: 0;
    border-radius: 6px;
    background: var(--ag-navy);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

.ag-foot__news-form input[type="submit"]:hover,
.ag-foot__news-form button[type="submit"]:hover {
    background: var(--ag-accent);
}

.ag-foot__news-form .wpcf7-spinner {
    margin: 0;
}

/* Il fieldset dei campi nascosti di CF7 occuperebbe una riga del flex */
.ag-foot__news-form .hidden-fields-container,
.ag-foot__news-form .screen-reader-response {
    display: none;
}

.ag-foot__news-form .wpcf7-response-output {
    flex: 1 1 100%;
    margin: 4px 0 0;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
}

/* ---------- Corpo del footer ---------- */

.ag-foot__main {
    background: var(--ag-navy);
    color: rgba(255, 255, 255, 0.82);
    padding-block: 56px 48px;
}

.ag-foot__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr 1fr;
    gap: 40px;
}

.ag-foot__logo {
    display: block;
    width: 220px;
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.ag-foot__addr {
    margin: 0 0 14px;
    font-style: normal;
    color: rgba(255, 255, 255, 0.82);
}

.ag-foot__fiscal {
    margin: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    letter-spacing: 0.02em;
}

.ag-foot__title {
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ag-foot__menu,
.ag-foot__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ag-foot__menu li,
.ag-foot__list li {
    margin-bottom: 9px;
}

.ag-foot__menu a,
.ag-foot__list a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.ag-foot__menu a:hover,
.ag-foot__menu a:focus,
.ag-foot__list a:hover,
.ag-foot__list a:focus {
    color: #fff;
    padding-left: 4px;
    text-decoration: none;
}

/* Nasconde le eventuali voci figlie del menu */
.ag-foot__menu .sub-menu,
.ag-foot__menu .menu-dropdown {
    display: none;
}

.ag-foot__hours {
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
}

.ag-foot__social-intro {
    margin: 0 0 16px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.ag-foot__social {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ag-foot__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.ag-foot__social-link svg {
    width: 21px;
    height: 21px;
}

.ag-foot__social-link:hover,
.ag-foot__social-link:focus {
    color: #fff;
    border-color: transparent;
    transform: translateY(-3px);
}

.ag-foot__social-link--facebook:hover,
.ag-foot__social-link--facebook:focus {
    background: #1877f2;
}

.ag-foot__social-link--instagram:hover,
.ag-foot__social-link--instagram:focus {
    background: linear-gradient(45deg, #f09433, #dc2743 45%, #bc1888);
}

.ag-foot__social-link--tiktok:hover,
.ag-foot__social-link--tiktok:focus {
    background: #010101;
}

/* ---------- Barra legale del tema (.main-footer-sub) ---------- */

/* Nessuno stacco bianco tra il corpo del footer e la barra legale */
#main-footer {
    margin-bottom: 0;
    padding-bottom: 0;
}

#main-footer .wpb-content-wrapper > .vc_row:empty,
#main-footer .vc_row .wpb_text_column:empty {
    display: none;
}

.main-footer-sub {
    margin-top: 0;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    box-sizing: border-box;
    /* padding-bottom generoso: in basso a sinistra c'è il bottone WhatsApp flottante */
    padding: 18px 20px 76px;
    background: #00335c;
    color: rgba(255, 255, 255, 0.6);
}

.main-footer-sub .st-flex {
    max-width: 1170px;
    margin: 0 auto;
    align-items: center;
}

.main-footer-sub .f14,
.main-footer-sub .left,
.main-footer-sub .right {
    margin-top: 0 !important;
    font-size: 13px;
}

.main-footer-sub .left .f14 {
    line-height: 1.9;
}

.main-footer-sub .left .f14 a {
    margin-left: 18px;
}

.main-footer-sub a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

.main-footer-sub a:hover,
.main-footer-sub a:focus {
    color: #fff;
    text-decoration: underline;
}

/* ---------- Tablet ---------- */

@media (max-width: 991px) {
    .ag-foot__grid {
        grid-template-columns: 1fr 1fr;
        gap: 36px 32px;
    }

    .ag-foot__news-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .ag-foot__news-form {
        flex-basis: auto;
    }
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {
    .ag-foot__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .ag-foot__main {
        padding-block: 40px 36px;
    }

    .ag-foot__news {
        padding-block: 32px;
    }

    .ag-foot__news-text h3 {
        font-size: 21px;
    }

    .ag-foot__news-form input[type="submit"],
    .ag-foot__news-form button[type="submit"] {
        flex: 1 1 100%;
    }

    .main-footer-sub .left .f14 a {
        display: inline-block;
        margin: 0 14px 0 0;
    }
}

/* Etichetta accessibile del form newsletter */
.ag-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Trustpilot nel footer ---------- */

.ag-foot__trustpilot {
    margin-top: 24px;
}

/* Il tema "dark" del widget usa un grigio scuro: qui serve il navy del footer */
.ag-foot__trustpilot .atp--dark {
    --atp-ink: #ffffff;
    --atp-muted: rgba(255, 255, 255, 0.6);
    --atp-surface: rgba(255, 255, 255, 0.08);
    --atp-sunk: rgba(255, 255, 255, 0.14);
    --atp-rule: rgba(255, 255, 255, 0.28);
}

.ag-foot__trustpilot .atp-mini,
.ag-foot__trustpilot .atp-mini__inner {
    display: flex;
    width: 100%;
}

.ag-foot__trustpilot .atp-mini__inner {
    box-sizing: border-box;
    align-items: flex-start;
    padding: 16px 18px;
    border-radius: 8px;
}

.ag-foot__trustpilot .atp-mini__title {
    font-size: 12px;
    letter-spacing: 0.06em;
}

.ag-foot__trustpilot .atp-mini__score {
    font-size: 30px;
}
