:root {
    --primary: #1a1a1a;
    --accent: #8d1e0b;
    /* Rosso Cookstock */
    --bg-cream: #f9f7f2;
    --bg-light: #ffffff;

}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-cream);
    color: var(--primary);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Testi in evidenza (citazioni, numeri…) */
.font-serif {
    font-family: 'Playfair Display', serif;
}

/* Titoli: Indie Flower (come nel vecchio sito). Più specifico di .font-serif, che resta per gli altri testi */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
h1.font-serif, h2.font-serif, h3.font-serif, h4.font-serif {
    font-family: 'Indie Flower', cursive;
    font-weight: 700;
    font-style: normal; /* Indie Flower non ha il corsivo: evita il finto italic */
}

/* Nav Transition */
.header-scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.header-scrolled .nav-link {
    color: var(--primary) !important;
}

/* Logo: light su menu trasparente, dark su sticky menu bianco */
.site-logo img {
    height: 42px;
    width: auto;
    transition: height 0.4s ease, opacity 0.3s ease;
}

.site-logo .logo-dark {
    display: none;
}

.header-scrolled .site-logo img {
    height: 34px;
}

.header-scrolled .site-logo .logo-light {
    display: none;
}

.header-scrolled .site-logo .logo-dark {
    display: block;
}

@media (max-width: 767px) {
    .site-logo img {
        height: 34px;
    }

    .header-scrolled .site-logo img {
        height: 28px;
    }
}

/* Dropdown Styling */
.nav-item-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: white;
    border-top: 3px solid var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.nav-item-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 12px 20px;
    color: #555;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.dropdown-link:hover {
    color: var(--accent);
    background: #fafafa;
    padding-left: 25px;
}

.dropdown-link:last-child {
    border-bottom: none;
}

/* Burger Menu (mobile) */
.burger-line {
    display: block;
    width: 26px;
    height: 2px;
    background: currentColor;
    margin: 3px 0;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

#burger-btn.open .burger-line {
    background: #fff;
}

/* Sticky header bianco: la X di chiusura diventa scura, altrimenti è bianco su bianco */
.header-scrolled #burger-btn.open .burger-line {
    background: var(--primary);
}

#burger-btn.open .burger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#burger-btn.open .burger-line:nth-child(2) {
    opacity: 0;
}

#burger-btn.open .burger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.2rem;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.05);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
    z-index: 40;
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.mobile-menu a {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

.mobile-menu a:hover,
.mobile-menu a:active {
    color: var(--accent);
}

/* Sottomenu "Menu" (PDF) nel menu mobile */
.mobile-menu {
    overflow-y: auto;
    padding: 5rem 1.5rem 2rem;
    justify-content: safe center; /* su schermi bassi non taglia le prime voci */
}

.mobile-menu-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

.mobile-submenu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 1.5rem;
    text-align: center;
}

.mobile-submenu--single {
    grid-template-columns: 1fr;
}

.mobile-menu .mobile-submenu a {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.6);
}

.mobile-menu .mobile-submenu a:hover,
.mobile-menu .mobile-submenu a:active {
    color: var(--accent);
}

/* Hero Slider */
.slide {
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 1s ease;
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-image {
    transform: scale(1.1);
    transition: transform 8s linear;
}

.active .hero-image {
    transform: scale(1);
}

/* Curve SVG Generali */
.wave-separator {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100px;
    z-index: 20;
    fill: var(--bg-cream);
    display: block;
}

.wave-separator1 {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100px;
    z-index: 20;
    fill: var(--bg-light);
    display: block;
}

.wave-bottom {
    bottom: -1px;
}

/* Reservation Section Separator */
.curve-separator {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100px;
    z-index: 30;
    display: block;
    pointer-events: none;
}

.curve-top {
    top: -2px;
}

.curve-bottom {
    bottom: -2px;
    transform: rotate(180deg);
}

/* Tooltip Style */
.tooltip-container {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    width: 160px;
    background-color: var(--primary);
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 8px;
    position: absolute;
    z-index: 50;
    bottom: 125%;
    left: 50%;
    margin-left: -80px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: translateY(10px);
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Mobile: show category name as a static label below each icon */
@media (max-width: 767px) {
    .tooltip-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .tooltip-text {
        visibility: visible;
        opacity: 1;
        position: static;
        transform: none;
        bottom: auto;
        left: auto;
        margin: 10px 0 0 0;
        width: auto;
        max-width: 90px;
        background-color: transparent;
        padding: 0;
        font-size: 10px;
        line-height: 1.3;
        letter-spacing: 1px;
    }
}

.menu-icon-btn {
    transition: all 0.4s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.menu-icon-btn:hover {
    background: var(--accent);
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 15px 30px rgba(141, 30, 11, 0.4);
}

/* Universal Lightbox */
#media-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    backdrop-filter: blur(15px);
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* Widget WhatsApp nascosto mentre il lightbox è aperto */
body.lightbox-open #wa {
    display: none !important;
}

.lightbox-close {
    top: 2rem;
    right: 2rem;
}

/* Modal mappa: 600px su desktop, si riduce in base all'altezza dello schermo */
.map-frame {
    height: min(600px, 70vh);
}

.map-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
}

@media (max-width: 767px) {
    #media-lightbox {
        padding: 4.5rem 1rem 1.5rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
    }

    .lightbox-close svg {
        width: 32px;
        height: 32px;
    }

    .map-frame {
        height: min(600px, 62vh);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.play-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse-ring 2s infinite;
    z-index: -1;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.info-card {
    transition: all 0.5s ease;
}

.info-card:hover {
    transform: scale(1.02);
}

/* Certificate Badge Effect */
.award-badge {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    filter: grayscale(1);
    opacity: 0.7;
}

.award-badge:hover {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.1) rotate(5deg);
}

/* Form Custom Styling */
.form-input {
    width: 100%;
    padding: 12px 16px;
    background: white;
    border: 1px solid #ddd;
    color: var(--primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.form-input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(141, 30, 11, 0.1);
}

.form-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.05em;
    color: #ccc;
}

/*border radius*/


/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-cream);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
}

/* Footer: logo light centrato sopra l'intro */
.footer-logo {
    height: 48px;
    width: auto;
}

@media (max-width: 767px) {
    .footer-logo {
        height: 38px;
    }
}

/* Sezione Prenota un Tavolo: introduzione in 3 passaggi */
.reservation-step {
    position: relative;
    padding: 2rem 1.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(4px);
    text-align: center;
    transition: border-color 0.4s ease, transform 0.4s ease;
}

.reservation-step:hover {
    border-color: rgba(141, 30, 11, 0.7);
    transform: translateY(-4px);
}

.reservation-step svg {
    margin: 0 auto 1.1rem;
    color: var(--accent);
}

.reservation-step-num {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.15);
}

.reservation-step h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
}

.reservation-step p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #9ca3af;
}

/* Bottone "Prenota Ora": angoli arrotondati */
.reservation-btn {
    border-radius: 10px;
}

/* Modal prenotazione */
.reservation-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: safe center; /* contenuto alto: si scorre l'overlay, non la finestra */
    justify-content: center;
    overflow-y: auto;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.reservation-modal.open {
    opacity: 1;
    visibility: visible;
}

.reservation-modal-box {
    position: relative;
    width: 100%;
    max-width: 680px;
    margin: auto 0;
    padding: 3rem 2.5rem 2.5rem;
    background: var(--bg-cream);
    color: var(--primary);
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.reservation-modal.open .reservation-modal-box {
    transform: translateY(0);
}

.reservation-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--primary);
    transition: background 0.3s ease, color 0.3s ease;
}

.reservation-modal-close:hover {
    background: var(--accent);
    color: #fff;
}

body.modal-open #wa {
    display: none !important;
}

@media (max-width: 767px) {
    .reservation-modal {
        padding: 1rem;
    }

    .reservation-modal-box {
        padding: 3.25rem 1.25rem 1.75rem;
        border-radius: 12px;
    }
}

/* Form FormCraft dentro il modal prenotazione */
#reservation-form-slot .formcraft-css .fc-form {
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

#reservation-form-slot .formcraft-css .fc-pagination-cover {
    display: none; /* form a una sola pagina: niente "Step 1" */
}

#reservation-form-slot .formcraft-css .form-page-content {
    padding: 0 !important;
}

/* Datepicker sopra il modal */
#ui-datepicker-div {
    z-index: 1100 !important;
}

.reservation-modal-box:has(.formcraft-css) {
    max-width: 860px; /* il form è disegnato su 1100px: un po' più di spazio per le 3 colonne */
}

@media (max-width: 640px) {
    /* Mobile: un campo per riga */
    #reservation-form-slot .formcraft-css .form-element {
        width: 100% !important;
    }
}

/* ===== Pagine interne ===== */

/* Voce di menu della pagina corrente */
.dropdown-link.is-active {
    color: var(--accent);
}

/* Hero delle pagine interne: stesso stile della home, più basso */
.page-hero {
    height: 70vh;
    min-height: 480px;
}

.page-hero-img {
    transform: scale(1.05);
    animation: page-hero-zoom 8s ease-out forwards;
}

@keyframes page-hero-zoom {
    to {
        transform: scale(1);
    }
}

/* Chi siamo: titolare (PNG/WebP trasparente) come sfondo, testo sovrapposto a destra */
.chi-siamo-story {
    position: relative;
    background: var(--bg-cream);
    overflow: hidden;
}

.chi-siamo-bg {
    background: url('../img/chi-siamo/cookstock-chi-siamo-bg.webp') no-repeat;
}

.chi-siamo-text p {
    color: #6b7280;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.chi-siamo-text .chi-siamo-lead {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.5rem;
    line-height: 1.5;
    color: var(--primary);
}

.chi-siamo-quote {
    margin: 2rem 0;
    padding: 0.25rem 0 0.25rem 1.5rem;
    border-left: 3px solid var(--accent);
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--primary);
}

/* Desktop: immagine 1920x780 centrata in basso, il titolare cade a sinistra del testo */
@media (min-width: 1200px) {
    .chi-siamo-bg {
        position: absolute;
        inset: 0;
        background-size: auto 780px;
        background-position: center bottom;
    }

    .chi-siamo-inner {
        position: relative;
        min-height: 780px;
        display: flex;
        align-items: center;
    }

    .chi-siamo-text {
        /* il titolare occupa circa [centro-550px, centro-240px] */
        margin-left: calc(50% - 180px);
        max-width: 720px;
        padding: 6rem 0;
    }
}

/* Tablet e mobile: immagine sopra, centrata sul titolare, testo sotto */
@media (max-width: 1199px) {
    .chi-siamo-bg {
        height: 420px;
        margin-top: 2rem;
        background-size: auto 420px;
        /* scala 420/780: il centro del titolare (x 565) va al centro dello schermo */
        background-position: calc(50vw - 304px) bottom;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .chi-siamo-text {
        max-width: 720px;
        margin: 0 auto;
        padding: 4rem 0 5rem;
    }
}

@media (max-width: 767px) {
    .chi-siamo-bg {
        height: 340px;
        background-size: auto 340px;
        background-position: calc(50vw - 246px) bottom;
    }

    .chi-siamo-text .chi-siamo-lead {
        font-size: 1.3rem;
    }
}

/* ===== Pagine legali (Privacy / Cookies) ===== */
.legal-page {
    background: var(--bg-cream);
    padding-top: 4rem;
    padding-bottom: 7rem;
}

.legal-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}

.legal-tabs--bottom {
    margin-top: 2.5rem;
    margin-bottom: 0;
}

.legal-tab {
    padding: 0.7rem 1.5rem;
    border: 1px solid #ddd;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #777;
    transition: all 0.3s ease;
}

.legal-tab:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.legal-tab.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.legal-content {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    padding: 3.5rem 3rem;
    color: #555;
    font-size: 1.02rem;
    line-height: 1.8;
}

.legal-kicker {
    display: block;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    margin-bottom: 1rem;
}

.legal-content h2 {
    font-size: 1.9rem;
    line-height: 1.3;
    color: var(--primary);
    margin-bottom: 2rem;
}

.legal-content h3 {
    font-size: 1.5rem;
    line-height: 1.3;
    color: var(--primary);
    margin: 2.5rem 0 1rem;
    padding-top: 2rem;
    border-top: 1px solid #f0ece4;
}

.legal-content p {
    margin-bottom: 1.1rem;
}

.legal-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    word-break: break-word;
}

.legal-content ul {
    list-style: disc;
    padding-left: 1.4rem;
    margin: 0.75rem 0 1.25rem;
}

.legal-content ul li {
    margin-bottom: 0.4rem;
}

.legal-content ul li::marker {
    color: var(--accent);
}

.legal-steps {
    list-style: none;
    counter-reset: legal;
    padding: 0;
    margin: 1.5rem 0 2rem;
}

.legal-steps > li {
    counter-increment: legal;
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1.5rem;
}

.legal-steps > li::before {
    content: counter(legal);
    position: absolute;
    left: 0;
    top: 0.1rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--bg-cream);
    color: var(--accent);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.legal-cookie {
    background: var(--bg-cream);
    border-left: 3px solid var(--accent);
    border-radius: 0 10px 10px 0;
    padding: 1.25rem 1.5rem 0.25rem;
    margin: 1.5rem 0;
}

.legal-cookie code {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    background: #fff;
    border-radius: 6px;
    padding: 0.2rem 0.6rem;
    margin-bottom: 0.75rem;
}

.legal-content .legal-links {
    list-style: none;
    padding: 0;
}

.legal-content .legal-links li {
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0ece4;
}

.legal-contact {
    background: var(--primary);
    color: #ccc;
    border-radius: 12px;
    padding: 1.75rem 2rem 0.75rem;
    margin: 2.5rem 0 1.5rem;
}

.legal-contact .legal-contact-links a {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.legal-contact .legal-contact-links a:hover {
    color: var(--accent);
}

.legal-contact .legal-contact-links span {
    margin: 0 0.6rem;
    color: #666;
}

.legal-note {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
    margin-top: 2rem;
}

.legal-footnote {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #aaa;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0ece4;
}

@media (min-width: 1024px) {
    .legal-content {
        padding: 4.5rem 5rem;
    }
}

@media (max-width: 767px) {
    .legal-page {
        padding-top: 2.5rem;
        padding-bottom: 5rem;
    }

    .legal-content {
        padding: 2.25rem 1.4rem;
        border-radius: 12px;
    }

    .legal-content h2 {
        font-size: 1.45rem;
    }

    .legal-steps > li {
        padding-left: 2.6rem;
    }

    .legal-contact {
        padding: 1.5rem 1.25rem 0.5rem;
    }

    .legal-contact .legal-contact-links span {
        display: none;
    }

    .legal-contact .legal-contact-links a {
        display: block;
        margin-bottom: 0.25rem;
    }
}

/* ===== Privacy e cookie (Complianz) ===== */

/* Lucchetto in basso a sinistra: stesso stile dei bottoni "Consulta i nostri Menu",
   sfondo rosso Cookstock e icona bianca; al passaggio del mouse i colori si invertono */
.consent-lock-btn {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 900;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.4s ease;
    cursor: pointer;
}

.consent-lock-btn:hover,
.consent-lock-btn:focus-visible {
    background: #fff;
    color: var(--accent);
    border-color: #fff;
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(141, 30, 11, 0.4);
    outline: none;
}

/* Nascosto mentre sono aperti menu mobile, lightbox, modal prenotazione o banner */
body.lightbox-open .consent-lock-btn,
body.modal-open .consent-lock-btn,
body.consent-open .consent-lock-btn,
.mobile-menu.open ~ .consent-lock-btn {
    opacity: 0;
    visibility: hidden;
}

/* Il bottone "Gestisci consenso" di Complianz è sostituito dal lucchetto */
#cmplz-manage-consent {
    display: none !important;
}

/* Banner come modal: sfondo scuro + finestra centrata */
body.consent-open #cmplz-cookiebanner-container {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
}

body.consent-open #wa {
    display: none !important;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner.cmplz-show {
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: min(560px, calc(100vw - 2rem)) !important;
    max-width: none !important;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    border-radius: 16px !important;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5) !important;
    z-index: 1201 !important;
}

@media (max-width: 767px) {
    .consent-lock-btn {
        left: 16px;
        bottom: 16px;
        width: 48px;
        height: 48px;
    }

    .consent-lock-btn svg {
        width: 20px;
        height: 20px;
    }

    #cmplz-cookiebanner-container .cmplz-cookiebanner.cmplz-show {
        max-height: calc(100vh - 1.5rem);
        width: calc(100vw - 1.5rem) !important;
        margin: 0 !important;
    }
}

/* Tooltip del lucchetto: stesso stile dei tooltip dei menu, a destra del bottone */
.consent-lock-tooltip {
    position: absolute;
    left: calc(100% + 14px);
    top: 50%;
    transform: translate(10px, -50%);
    white-space: nowrap;
    background: var(--primary);
    color: #fff;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.consent-lock-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: var(--primary);
}

.consent-lock-btn:hover .consent-lock-tooltip,
.consent-lock-btn:focus-visible .consent-lock-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%);
}

/* Touch (mobile/tablet): niente hover, il tooltip resterebbe "appeso" dopo il tocco */
@media (hover: none) {
    .consent-lock-tooltip {
        display: none;
    }
}

/* Banner Complianz: "Accetta" bianco con testo rosso, ben distinto dallo sfondo rosso del banner.
   Hover: si inverte (trasparente con bordo e testo bianchi). */
#cmplz-cookiebanner-container .cmplz-cookiebanner {
    --cmplz_button_accept_background_color: #ffffff;
    --cmplz_button_accept_border_color: #ffffff;
    --cmplz_button_accept_text_color: #8d1e0b;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner .cmplz-btn.cmplz-accept {
    font-weight: 700;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#cmplz-cookiebanner-container .cmplz-cookiebanner .cmplz-btn.cmplz-accept:hover {
    background-color: transparent;
    color: #ffffff;
}

/* ── Pagina 404 (2026-11-26) ───────────────────────────────── */
.error-hero {
    height: 100vh;
    min-height: 560px;
}

.error-code {
    display: block;
    font-size: clamp(6rem, 22vw, 14rem);
    line-height: .85;
    margin-bottom: 1.5rem;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, .55);
}

.error-link {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 1.75rem 1.5rem;
    border: 1px solid #e5e5e5;
    border-radius: 1rem;
    background: #fff;
    transition: border-color .4s, transform .4s, box-shadow .4s;
}

.error-link:hover {
    border-color: #8d1e0b;
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .08);
}

.error-link-title {
    font-size: 1.5rem;
    color: #1a1a1a;
}

.error-link:hover .error-link-title {
    color: #8d1e0b;
}

.error-link-text {
    font-size: .85rem;
    color: #6b6b6b;
    line-height: 1.5;
}

/* ── Pagina di manutenzione (2026-11-26) ───────────────────── */
.maintenance-logo {
    width: 220px;
    max-width: 60vw;
    height: auto;
}

.maintenance-info a {
    transition: color .3s;
}
