/**
 * Header Gruppo Bonifacio (da reference gb/)
 */

body.hasNavbar {
    padding-top: 0 !important;
}

body.has-admin-bar.hasNavbar {
    padding-top: var(--admin-bar-height, 46px) !important;
}

body.has-admin-bar.hasNavbar[data-page-is-blog="true"] {
    padding-top: var(--admin-bar-height, 46px) !important;
}

.gb-header {
    width: 100%;
    background: #fff;
    font-family: "Montserrat", Arial, sans-serif;
    position: relative;
    z-index: 50;
}

.gb-container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.gb-topbar {
    background: #d20000;
    color: #fff;
    font-size: 13px;
}

.gb-topbar__inner {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.gb-topbar__left {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.gb-topbar__item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #fff;
    text-decoration: none;
}

.gb-topbar__item:hover {
    color: #d62222;
}

.gb-topbar__social,
.gb-social-big {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gb-topbar__social a {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    text-decoration: none;
    transition: 0.25s ease;
}

.gb-topbar__social a:hover {
    background: #d62222;
}

.gb-brandbar {
    background: #fff;
}

.gb-brandbar__inner {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.gb-logo img {
    max-height: 58px;
    width: auto;
    display: block;
}

.gb-info {
    display: flex;
    align-items: center;
    gap: 26px;
}

.gb-info__phone {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #0b1334;
}

.gb-info__icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #d62222;
    color: #fff;
    display: grid;
    place-items: center;
}

.gb-info__text small {
    display: block;
    font-size: 11px;
    line-height: 1;
    color: #777;
}

.gb-info__text strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
    color: #0b1334;
}

.gb-social-big a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #0b1334;
    color: #fff;
    display: grid;
    place-items: center;
    text-decoration: none;
    transition: 0.25s ease;
}

.gb-social-big a:hover {
    background: #d62222;
    transform: translateY(-2px);
}

/* Navigation bar (sotto logo e social) */
.gb-navbar {
    background: #f3f3f3;
    border-top: 1px solid rgba(11, 19, 52, 0.06);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.gb-navbar__inner {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gb-nav {
    width: 100%;
}

.gb-nav__list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0 28px;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
}

.gb-nav__list::-webkit-scrollbar {
    display: none;
}

.gb-nav__item {
    position: relative;
    flex: 0 0 auto;
}

.gb-nav__link {
    display: block;
    padding: 16px 0;
    color: #0b1334;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.gb-nav__link:hover,
.gb-nav__link--current,
.gb-nav__item--current > .gb-nav__link {
    color: #d20000;
}

.gb-nav__link--parent {
    cursor: default;
}

.gb-nav__sub {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    margin: 0;
    padding: 8px 0;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(11, 19, 52, 0.12);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(11, 19, 52, 0.12);
    z-index: 60;
}

.gb-nav__item--has-children:hover .gb-nav__sub,
.gb-nav__item--has-children:focus-within .gb-nav__sub {
    display: block;
}

.gb-nav__sub-link {
    display: block;
    padding: 10px 16px;
    color: #0b1334;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    text-transform: none;
}

.gb-nav__sub-link:hover,
.gb-nav__sub-item--current .gb-nav__sub-link {
    color: #d20000;
    background: rgba(210, 0, 0, 0.06);
}

.gb-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(11, 19, 52, 0.15);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.gb-nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: #0b1334;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.gb-nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.gb-nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.gb-nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.gb-nav-mobile {
    border-top: 1px solid rgba(11, 19, 52, 0.08);
    background: #fff;
}

.gb-nav-mobile__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.gb-nav-mobile__item + .gb-nav-mobile__item {
    border-top: 1px solid rgba(11, 19, 52, 0.08);
}

.gb-nav-mobile__link,
.gb-nav-mobile__label {
    display: block;
    padding: 14px 20px;
    color: #0b1334;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
}

.gb-nav-mobile__link:hover,
.gb-nav-mobile__item--current > .gb-nav-mobile__link {
    color: #d20000;
}

.gb-nav-mobile__sub {
    margin: 0;
    padding: 0 0 8px;
    list-style: none;
}

.gb-nav-mobile__sub-link {
    display: block;
    padding: 10px 20px 10px 32px;
    color: #0b1334;
    font-size: 14px;
    text-decoration: none;
}

.gb-nav-mobile__sub-link:hover {
    color: #d20000;
}

/* Mobile drawer (slide-in da destra) */
.gb-drawer {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    visibility: hidden;
}

.gb-drawer--open {
    pointer-events: auto;
    visibility: visible;
}

.gb-drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 19, 52, 0.55);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gb-drawer--open .gb-drawer__overlay {
    opacity: 1;
}

.gb-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(340px, 88vw);
    height: 100%;
    background: #fff;
    box-shadow: -8px 0 32px rgba(11, 19, 52, 0.18);
    transform: translateX(100%);
    transition: transform 0.32s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.gb-drawer--open .gb-drawer__panel {
    transform: translateX(0);
}

.gb-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(11, 19, 52, 0.08);
}

.gb-drawer__title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0b1334;
}

.gb-drawer__close {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(11, 19, 52, 0.12);
    border-radius: 8px;
    background: #fff;
    color: #0b1334;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 18px;
}

.gb-drawer__contact {
    background: #fff;
    color: #0b1334;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid rgba(11, 19, 52, 0.08);
    margin-top: auto;
}

.gb-drawer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #0b1334;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
}

.gb-drawer__contact-item:hover {
    color: #d20000;
}

.gb-drawer__contact-item i {
    margin-top: 2px;
    flex-shrink: 0;
    color: #0b1334;
}

.gb-drawer__nav {
    flex: 1 1 auto;
}

.gb-drawer__social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid rgba(11, 19, 52, 0.08);
}

.gb-drawer__social a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #0b1334;
    color: #fff;
    display: grid;
    place-items: center;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.gb-drawer__social a:hover {
    background: #d20000;
    transform: translateY(-2px);
}

body.gb-drawer-open {
    overflow: hidden;
}

@media (max-width: 992px) {
    .gb-navbar {
        display: none;
    }

    .gb-topbar {
        display: none;
    }

    .gb-info {
        display: none;
    }

    .gb-nav-toggle {
        display: flex;
        flex-shrink: 0;
    }

    .gb-brandbar__inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        min-height: 64px;
        padding: 10px 0;
        text-align: left;
    }

    .gb-logo img {
        max-height: 48px;
    }
}

@media (max-width: 768px) {
    .gb-container {
        width: min(1180px, calc(100% - 24px));
    }
}

/* Footer – palette Gruppo Bonifacio */
.footer__name {
    color: #fff !important;
}

.footer__link--accent {
    color: #d62222 !important;
}

.footer__link--accent:hover {
    color: #fff !important;
}

/* Newsletter + footer centrati su mobile */
@media (max-width: 767px) {
    .box-contatti-newsletter,
    .box-contatti-newsletter__item,
    .box-contatti-newsletter__text,
    .box-contatti-newsletter__form {
        text-align: center !important;
    }

    .box-contatti-newsletter__item {
        justify-items: center !important;
        width: 100%;
    }

    .box-contatti-newsletter__form .form-newsletter {
        margin-inline: auto;
        text-align: center;
    }

    .box-contatti-newsletter__form .form-newsletter__error-main,
    .box-contatti-newsletter__form .form-newsletter__field--privacy-main {
        text-align: center;
    }

    .box-contatti-newsletter__form .form-newsletter__checkbox + .form-newsletter__label {
        justify-content: center;
        text-align: left;
        max-width: 320px;
        margin-inline: auto;
    }

    .box-contatti-newsletter__form .form-newsletter__submit {
        margin-inline: auto;
    }

    .box-contatti-newsletter__cta {
        margin-inline: auto;
    }

    .footer__navigation {
        justify-items: center !important;
        text-align: center;
    }

    .footer__navigation > a {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .footer__logo {
        margin-inline: auto;
        margin-bottom: 32px !important;
    }

    .footer__list--mobile {
        width: 100% !important;
        max-width: 100% !important;
        max-height: none !important;
        flex-direction: column;
        align-items: center !important;
        align-content: center !important;
        flex-wrap: nowrap;
        gap: 16px;
        margin-bottom: 32px !important;
    }

    .footer__item {
        text-align: center;
        width: 100%;
    }

    .footer__legal,
    .footer__info,
    .footer__name,
    .footer__policies {
        text-align: center !important;
    }

    .footer__policies {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
}
