/* ============================================================
 *  A.S.H. — Stile specifico: index
 *  GENERATO dalla fase 1: non modificare a mano senza aggiornare
 *  anche le altre pagine. Vedi includes/layout/head.php.
 * ============================================================ */

/* ================= PALETTE BIANCO & ORO ================= */

        
        :root {
            --oro:        #c9a24b;
            --oro-scuro:  #a9822f;
            --oro-testo:  #7c5f20; /* oro profondo: leggibile su bianco (WCAG AA) */
            --oro-chiaro: #f5edd9;
            --crema:      #f5eee0;
            --scuro:      #2e3b42;
            --testo:      #4a5158;
        }

        body {
            font-family: 'Montserrat', sans-serif;
            color: var(--testo);
            background-color: #faf7ef; /* bianco caldo: toglie l'effetto "tutto bianco" */
            overflow-x: hidden;
        }

        .menu-servizi .dropdown-item:hover,
        .menu-servizi .dropdown-item:focus {
            background: var(--oro-chiaro);
            color: var(--oro-testo);
            transform: translateX(4px);
        }

/* Su desktop il sottomenu si apre anche al passaggio del mouse */

        
        @media (min-width: 992px) {
            .navbar .dropdown:hover > .dropdown-menu {
                display: block;
                animation: comparsa .25s ease;
            }

            /* Ponte invisibile sul distacco tra bottone e menu: evita che
               l'hover si interrompa attraversando lo spazio vuoto */
            .menu-servizi::before {
                content: "";
                position: absolute;
                top: -.6rem;
                left: 0;
                right: 0;
                height: .6rem;
            }
        }

/* ================= HERO ================= */

        
        .hero {
            min-height: 100vh;
            min-height: 100svh;
            display: flex;
            align-items: center;
            position: relative;
            overflow: hidden;
            background: var(--scuro);
            /* La navbar fissa copre ~85px in alto: il padding asimmetrico riporta
               il contenuto al centro ottico dell'area visibile, senza vuoto in basso */
            padding: 8.5rem 0 3rem;
        }

/* Sfondo hero: il poster sta qui come immagine di fondo (non piu' solo
           sull'attributo "poster" del video) e il filmato ci si sovrappone.
           Il colore scuro di base evita il flash bianco al caricamento. */

        
        .hero-bg {
            position: absolute;
            inset: 0;
            overflow: hidden;
            background: #181e22 center / cover no-repeat;
        }

/* Il video nasce trasparente e sfuma sopra il poster solo quando sta
           davvero riproducendo: niente scatto, niente fotogramma nero. Poster e
           primo fotogramma sono la stessa immagine, quindi la dissolvenza non si
           nota: la foto ferma si mette semplicemente in movimento. */

        
        .hero-video {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            opacity: 0;
            transition: opacity .7s ease;
        }

        .hero-video.in-onda { opacity: 1; }

        @media (prefers-reduced-motion: reduce) {
            .hero-video { transition: none; }
        }

/* Overlay scuro + velatura oro per leggibilità del testo */

        
        .hero-overlay {
            position: absolute;
            inset: 0;
            background:
                linear-gradient(100deg, rgba(24, 30, 34, .92) 0%, rgba(24, 30, 34, .72) 45%, rgba(24, 30, 34, .35) 100%),
                linear-gradient(0deg, rgba(169, 130, 47, .18), rgba(169, 130, 47, .18));
        }

        .hero .hero-badge {
            background: rgba(255, 255, 255, .14);
            color: #ecd9a8;
            backdrop-filter: blur(4px);
        }

        .hero h1 {
            font-weight: 800;
            font-size: clamp(2.2rem, 5vw, 3.6rem);
            line-height: 1.12;
            color: #ffffff;
        }

        .hero h1 .gold {
            background: linear-gradient(135deg, #e8cc82, var(--oro));
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

/* Logo a sinistra del titolo, come il lockup della navbar */

        
        .hero-brand {
            display: flex;
            align-items: center;
            gap: 1.5rem;
        }

        .hero-logo {
            width: clamp(88px, 9vw, 132px);
            height: auto;
            flex: none;
            filter: drop-shadow(0 8px 26px rgba(0, 0, 0, .5));
        }

        .hero .lead { max-width: 560px; color: rgba(255, 255, 255, .88); }

/* Tagline in evidenza dentro il lead */

        
        .hero .tagline-hero {
            display: block;
            font-size: 1.35em;
            font-weight: 800;
            letter-spacing: .3px;
            background: linear-gradient(135deg, #f5e6ba, #e8cc82 55%, var(--oro));
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .4));
            margin-bottom: .45rem;
        }

        .hero .btn-outline-scuro {
            border-color: #fff;
            color: #fff;
        }

        .hero .btn-outline-scuro:hover { background: #fff; color: var(--scuro); }

        .hero-info a, .hero-info span { color: #fff !important; }

        .hero-info i { color: var(--oro) !important; }

        .hero-scroll {
            position: absolute;
            bottom: 26px;
            left: 50%;
            transform: translateX(-50%);
            color: #e8cc82;
            font-size: 1.6rem;
            animation: rimbalzo 2s infinite;
        }

        @keyframes rimbalzo {
            0%, 100% { transform: translate(-50%, 0); }
            50%      { transform: translate(-50%, 10px); }
        }

        .delay-4 { animation-delay: .75s; }

/* ================= SERVIZI ================= */

/* Sezione ben staccata dall'hero (spaziatura corretta) */

        
        
        #servizi { padding: 7rem 0 5.5rem; background: linear-gradient(180deg, #fdfbf5 0%, #faf7ef 100%); }

        .card-servizio {
            position: relative;
            border: 1px solid #eee6d4;
            border-radius: 18px;
            background: linear-gradient(180deg, #ffffff 0%, #fdfaf3 100%);
            height: 100%;
            padding: 2.6rem 2rem 2.2rem;
            text-align: center;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
        }

/* Foto di cantiere in trasparenza: emerge al passaggio del mouse.
           E' un <img> e non uno sfondo CSS perche' gli sfondi ignorano
           loading="lazy": queste card stanno sotto la piega e non devono
           pesare sul primo caricamento. */

        
        .card-servizio .foto-card {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            opacity: .09;
            transform: scale(1.01);
            transition: opacity .45s ease, transform .45s ease;
            pointer-events: none;
        }

        .card-servizio:hover .foto-card {
            opacity: .22;
            transform: scale(1.05);
        }

/* Contenuto sopra la foto di sfondo */

        
        .card-servizio > * { position: relative; z-index: 1; }

/* Linea oro che si espande dal centro in alto */

        
        .card-servizio::after {
            content: "";
            position: absolute;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--oro), var(--oro-scuro));
            border-radius: 0 0 4px 4px;
            transition: width .4s ease;
        }

        .card-servizio:hover {
            transform: translateY(-8px);
            box-shadow: 0 18px 40px rgba(169, 130, 47, .16);
            border-color: var(--oro);
        }

        .card-servizio:hover::after { width: 55%; }

        .icona-servizio {
            width: 78px;
            height: 78px;
            margin: 0 auto 1.3rem;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2rem;
            color: var(--oro-scuro);
            background: var(--oro-chiaro);
            border: 1px solid #ecdfc0;
            box-shadow: 0 8px 22px rgba(201, 162, 75, .14);
            transition: transform .3s ease, background .3s ease, color .3s ease, box-shadow .3s ease;
        }

        .card-servizio:hover .icona-servizio {
            background: linear-gradient(135deg, var(--oro), var(--oro-scuro));
            color: #fff;
            transform: rotate(-6deg) scale(1.06);
            box-shadow: 0 12px 28px rgba(169, 130, 47, .3);
        }

        .card-servizio h5 {
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .5px;
            font-size: 1.02rem;
        }

/* Sottolineatura oro sotto il titolo (richiama la title-underline) */

        
        .card-servizio h5::after {
            content: "";
            display: block;
            width: 42px;
            height: 3px;
            margin: .7rem auto .2rem;
            border-radius: 2px;
            background: linear-gradient(90deg, var(--oro), var(--oro-scuro));
            transition: width .35s ease;
        }

        .card-servizio:hover h5::after { width: 70px; }

        .card-servizio p { font-size: .9rem; margin-bottom: 1.4rem; }

/* Bottone "Scopri di più": pill oro con testo scuro, si inverte al hover */

        
        .link-servizio {
            margin-top: auto;
            align-self: center;
            display: inline-flex;
            align-items: center;
            gap: .5rem;
            padding: .6rem 1.5rem;
            border-radius: 50rem;
            background: linear-gradient(135deg, #d9b866, var(--oro));
            color: var(--scuro);
            font-size: .78rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1.2px;
            text-decoration: none;
            box-shadow: 0 6px 16px rgba(169, 130, 47, .25);
            transition: background .3s ease, color .3s ease, transform .25s ease, box-shadow .25s ease;
        }

        .link-servizio i { transition: transform .3s ease; }

        .link-servizio:hover,
        .card-servizio:hover .link-servizio {
            background: var(--scuro);
            color: #d9b866;
            transform: translateY(-2px);
            box-shadow: 0 10px 22px rgba(46, 59, 66, .32);
        }

        .link-servizio:hover i,
        .card-servizio:hover .link-servizio i { transform: translateX(4px); }

/* ================= CHI SIAMO ================= */

        
        #chi-siamo { padding: 5.5rem 0; background: var(--crema); }

        .box-logo {
            background: #fff;
            border: 1px solid #eee6d4;
            border-radius: 22px;
            box-shadow: 0 22px 50px rgba(46, 59, 66, .10);
            padding: 3rem;
            text-align: center;
            position: relative;
        }

        .box-logo::after {
            content: "";
            position: absolute;
            inset: 14px;
            border: 1px solid var(--oro-chiaro);
            border-radius: 14px;
            pointer-events: none;
        }

        .box-logo img { max-width: 78%; height: auto; }

/* Foto Chi Siamo: centrata, riempie il box dentro la cornice interna */

        
        .box-logo .foto-chi-siamo {
            display: block;
            width: 100%;
            max-width: 100%;
            aspect-ratio: 1 / 1;
            object-fit: cover;
            object-position: center;
            margin: 0 auto;
            border-radius: 14px;
        }

        .lista-forza { list-style: none; padding: 0; margin: 0; }

        .lista-forza li {
            display: flex;
            align-items: center;
            gap: .8rem;
            font-weight: 600;
            color: var(--scuro);
            padding: .45rem 0;
        }

        .forza-icona {
            width: 42px;
            height: 42px;
            flex-shrink: 0;
            border-radius: 50%;
            background: #faf6ea;
            border: 1px solid #e3d3a8;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 3px 8px rgba(169, 130, 47, .12);
        }

        .forza-icona i { color: var(--oro-testo); font-size: 1.15rem; }

/* ================= COME LAVORIAMO ================= */

        
        #come-lavoriamo { padding: 5.5rem 0; background: #faf7ef; position: relative; }

/* Bordo oro in alto (come le sezioni della homepage) */

        
        #come-lavoriamo::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 6px;
            background: linear-gradient(90deg, var(--oro-scuro) 0%, var(--oro) 25%, #e8cc82 50%, var(--oro) 75%, var(--oro-scuro) 100%);
        }

/* Percorso in 4 fasi: icone collegate da una linea oro continua (desktop) */

        
        .percorso-fasi { position: relative; }

        @media (min-width: 992px) {
            .percorso-fasi::before {
                content: "";
                position: absolute;
                top: 39px;
                left: 13%;
                right: 13%;
                height: 3px;
                border-radius: 2px;
                background: linear-gradient(90deg, #e8cc82, var(--oro) 50%, var(--oro-scuro));
            }
        }

        .fase-step { text-align: center; padding: 0 .8rem; }

        .fase-step .icona-fase {
            position: relative;
            z-index: 1;
            width: 78px;
            height: 78px;
            margin: 0 auto 1.3rem;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.9rem;
            color: var(--oro-scuro);
            background: #fff;
            border: 2px solid #ecdfc0;
            box-shadow: 0 8px 22px rgba(201, 162, 75, .18);
            transition: background .3s ease, color .3s ease, transform .3s ease, border-color .3s ease;
        }

        .fase-step:hover .icona-fase {
            background: linear-gradient(135deg, var(--oro), var(--oro-scuro));
            border-color: var(--oro-scuro);
            color: #fff;
            transform: rotate(-6deg) scale(1.08);
        }

        .fase-step h5 {
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .5px;
            font-size: .98rem;
            margin-bottom: .55rem;
        }

/* Sottolineatura oro sotto il titolo (richiama la title-underline) */

        
        .fase-step h5::after {
            content: "";
            display: block;
            width: 42px;
            height: 3px;
            margin: .6rem auto 0;
            border-radius: 2px;
            background: linear-gradient(90deg, var(--oro), var(--oro-scuro));
            transition: width .35s ease;
        }

        .fase-step:hover h5::after { width: 70px; }

        .fase-step p {
            font-size: .9rem;
            margin: 0 auto;
            max-width: 240px;
            line-height: 1.7;
        }

/* ================= PARTNER TECNICI ================= */

        
        #partner {
            padding: 4.5rem 0;
            background: #fff;
            position: relative;
        }

/* Bordo oro in alto: coerente con le altre sezioni chiare */

        
        #partner::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 6px;
            background: linear-gradient(90deg, var(--oro-scuro) 0%, var(--oro) 25%, #e8cc82 50%, var(--oro) 75%, var(--oro-scuro) 100%);
        }

/* Marquee: scorrimento infinito dei loghi.
           I bordi sfumano (mask) e lo scorrimento si ferma al passaggio del mouse. */

        
        .partner-marquee {
            position: relative;
            overflow: hidden;
            width: 100%;
            -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
                    mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
        }

        .partner-track {
            display: flex;
            width: max-content;
            animation: partner-scroll 45s linear infinite;
        }

        .partner-group {
            display: flex;
            align-items: center;
            flex-shrink: 0;
        }

        .partner-logo {
            height: 58px;
            width: auto;
            max-width: 180px;
            margin: 0 2.6rem;
            object-fit: contain;
            filter: grayscale(100%);
            opacity: .62;
            pointer-events: none;
            user-select: none;
        }

        @keyframes partner-scroll {
            from { transform: translateX(0); }
            to   { transform: translateX(-50%); }
        }

/* Accessibilità: niente animazione se l'utente preferisce meno movimento */

        
        @media (prefers-reduced-motion: reduce) {
            .partner-track { animation: none; flex-wrap: wrap; justify-content: center; }
        }

        @media (max-width: 575.98px) {
            #partner { padding: 3.2rem 0; }
            .partner-logo { height: 44px; max-width: 140px; margin: 0 1.7rem; }
        }

/* ================= REALIZZAZIONI ================= */

        
        #realizzazioni {
            padding: 5.5rem 0 6.5rem;
            background: linear-gradient(180deg, #f7f1e2 0%, #faf7ef 46%);
            position: relative;
            overflow: hidden;
        }

/* Bordo oro in alto: divide le sezioni chiare e richiama la palette */

        
        #realizzazioni::before,
        #contatti::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 6px;
            background: linear-gradient(90deg, var(--oro-scuro) 0%, var(--oro) 25%, #e8cc82 50%, var(--oro) 75%, var(--oro-scuro) 100%);
        }

/* Anello decorativo oro, come nella fascia preventivo */

        
        #realizzazioni::after {
            content: "";
            position: absolute;
            width: 360px;
            height: 360px;
            border: 38px solid rgba(201, 162, 75, .10);
            border-radius: 50%;
            bottom: -150px;
            left: -130px;
        }

        #realizzazioni .container { position: relative; z-index: 1; }

/* Mosaico fotografico con effetto "video": zoom lento continuo (ken burns)
           e dissolvenza tra le foto, che ruotano una tessera alla volta */

        
        .mosaico {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            grid-auto-rows: clamp(130px, 18vw, 200px);
            grid-auto-flow: dense;
            gap: 14px;
        }

        .mosaico-item {
            position: relative;
            overflow: hidden;
            border-radius: 18px;
            border: 2px solid #ecdfc0;
            background: var(--oro-chiaro);
            cursor: pointer;
            margin: 0; /* azzera il margine di <figure> */
            transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
        }

        .mosaico-item:hover {
            border-color: var(--oro);
            box-shadow: 0 14px 32px rgba(169, 130, 47, .28);
            transform: translateY(-4px);
        }

        .mosaico-item--grande { grid-column: span 2; grid-row: span 2; }

        .mosaico-item--alto   { grid-row: span 2; }

        .mosaico-item--largo  { grid-column: span 2; }

        .mosaico-item img {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            opacity: 1;
            transition: opacity 1.1s ease;
            animation: kenburns-mosaico 16s ease-in-out infinite alternate;
            will-change: transform, opacity;
        }

        .mosaico-item img.in-dissolvenza { opacity: 0; }

/* Tempi sfalsati tra le tessere: il movimento risulta più naturale */

        
        .mosaico-item:nth-child(2n) img { animation-duration: 20s; animation-direction: alternate-reverse; }

        .mosaico-item:nth-child(3n) img { animation-delay: -7s; }

        @keyframes kenburns-mosaico {
            from { transform: scale(1.02); }
            to   { transform: scale(1.14) translate(1.5%, -1%); }
        }

/* Velo scuro + lente d'ingrandimento al passaggio del mouse */

        
        .mosaico-item::after {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, rgba(24, 30, 34, 0) 50%, rgba(24, 30, 34, .38) 100%);
            opacity: 0;
            transition: opacity .35s ease;
            pointer-events: none;
        }

        .mosaico-item:hover::after { opacity: 1; }

        .mosaico-item .lente {
            position: absolute;
            right: 12px;
            bottom: 12px;
            z-index: 2;
            width: 38px;
            height: 38px;
            border-radius: 50%;
            background: rgba(255, 255, 255, .92);
            color: var(--oro-testo);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.05rem;
            opacity: 0;
            transform: translateY(6px);
            transition: opacity .3s ease, transform .3s ease;
            pointer-events: none;
        }

        .mosaico-item:hover .lente { opacity: 1; transform: translateY(0); }

        @media (max-width: 767.98px) {
            .mosaico {
                grid-template-columns: repeat(2, 1fr);
                grid-auto-rows: clamp(110px, 26vw, 160px);
                gap: 10px;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .mosaico-item img { animation: none; }
        }

/* Lightbox: foto a schermo intero con frecce e contatore */

        
        .lightbox {
            position: fixed;
            inset: 0;
            z-index: 2000;
            background: rgba(18, 22, 25, .94);
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            pointer-events: none;
            transition: opacity .3s ease;
        }

        .lightbox.aperta { opacity: 1; pointer-events: auto; }

        .lightbox img {
            max-width: min(92vw, 1100px);
            max-height: 82vh;
            border-radius: 12px;
            box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
        }

        .lightbox button {
            position: absolute;
            border: none;
            border-radius: 50%;
            width: 46px;
            height: 46px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            background: rgba(255, 255, 255, .12);
            color: #fff;
            transition: background .25s ease, transform .25s ease;
        }

        .lightbox button:hover { background: var(--oro-scuro); transform: scale(1.08); }

        .lightbox .chiudi { top: 20px; right: 20px; }

        .lightbox .precedente { left: 16px; top: 50%; transform: translateY(-50%); }

        .lightbox .successiva { right: 16px; top: 50%; transform: translateY(-50%); }

        .lightbox .precedente:hover,
        .lightbox .successiva:hover { transform: translateY(-50%) scale(1.08); }

        .lightbox .contatore {
            position: absolute;
            bottom: 22px;
            left: 50%;
            transform: translateX(-50%);
            color: #ecd9a8;
            font-weight: 600;
            font-size: .9rem;
            letter-spacing: 1.5px;
        }

/* ================= CTA PREVENTIVO ================= */

        
        #preventivo {
            background: linear-gradient(120deg, #6f541e 0%, #7c5f20 55%, #8a6a26 100%);
            color: #fff;
            padding: 4.5rem 0;
            position: relative;
            overflow: hidden;
        }

        #preventivo::before {
            content: "";
            position: absolute;
            width: 380px;
            height: 380px;
            border: 40px solid rgba(255, 255, 255, .08);
            border-radius: 50%;
            top: -160px;
            right: -120px;
        }

        #preventivo h2 { color: #fff; font-weight: 800; }

        .btn-bianco {
            background: #fff;
            color: var(--oro-testo);
            font-weight: 700;
            padding: .75rem 1.8rem;
            border-radius: 50rem;
            border: none;
            transition: transform .25s ease, box-shadow .25s ease;
        }

        .btn-bianco:hover {
            background: #fff;
            color: var(--oro-testo);
            transform: translateY(-2px);
            box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
        }

/* ================= CONTATTI ================= */

/* Sfondo crema + bordo oro in alto: stacca la sezione dal mosaico e dal footer */

        
        
        #contatti { padding: 5.5rem 0 6.5rem; background: var(--crema); position: relative; }

        .card-contatto {
            position: relative;
            overflow: hidden;
            border: 1px solid #eee6d4;
            border-radius: 18px;
            background: #fff;
            padding: 2.4rem 1.5rem 2.2rem;
            text-align: center;
            height: 100%;
            transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
        }

/* Barra oro sul bordo alto della card */

        
        .card-contatto::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 5px;
            background: linear-gradient(90deg, var(--oro), var(--oro-scuro));
        }

        .card-contatto:hover {
            transform: translateY(-6px);
            border-color: var(--oro);
            box-shadow: 0 16px 36px rgba(169, 130, 47, .22);
        }

/* Icona dentro un badge circolare oro (richiama le card servizio) */

        
        .card-contatto i {
            width: 72px;
            height: 72px;
            margin: 0 auto;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 1.7rem;
            color: var(--oro-scuro);
            background: var(--oro-chiaro);
            border: 1px solid #ecdfc0;
            box-shadow: 0 8px 22px rgba(201, 162, 75, .16);
            transition: background .3s ease, color .3s ease, transform .3s ease;
        }

        .card-contatto:hover i {
            background: linear-gradient(135deg, var(--oro), var(--oro-scuro));
            color: #fff;
            transform: rotate(-6deg) scale(1.06);
        }

        .card-contatto a { color: var(--testo); text-decoration: none; }

        .card-contatto a:hover { color: var(--oro-testo); }

        .cornice-mappa {
            border-radius: 24px;
            box-shadow: 0 18px 40px rgba(46, 59, 66, .18);
        }

        .mappa {
            display: block;
            border: 0;
            width: 100%;
            height: 340px;
            border-radius: 24px;
        }

/* ================= MOBILE: MENU E TABLET ================= */

        
        @media (max-width: 991.98px) {
            .hero { min-height: 92vh; min-height: 92svh; padding: 7.5rem 0 4.5rem; }

            /* Menu a discesa: pannello comodo, voci grandi da toccare */
            .navbar-collapse {
                margin-top: .7rem;
                padding: .3rem .1rem .9rem;
                border-top: 1px solid #eee6d4;
                max-height: calc(100dvh - 84px);
                overflow-y: auto;
            }

            .navbar .nav-link {
                margin: 0;
                padding: .7rem .3rem;
                font-size: 1rem;
            }

            /* Nel menu aperto niente sottolineatura animata: si evidenzia col colore */
            .navbar .nav-link::after { display: none; }

            .navbar .nav-link.active { color: var(--oro-testo); }

            /* Ombra sotto la barra quando il menu è aperto */
            .navbar:has(.navbar-collapse.show) { box-shadow: 0 4px 24px rgba(46, 59, 66, .12); }

            /* Sottomenu Servizi: pannello piatto color crema, senza ombre */
            .menu-servizi {
                box-shadow: none;
                margin: .2rem 0 .6rem;
                background: #fbf8f0;
            }

            .menu-servizi .dropdown-item { padding: .68rem .9rem; }

            /* Bottone preventivo: a tutta larghezza, comodo per il pollice */
            .navbar .nav-item .btn-oro {
                display: block;
                width: 100%;
                text-align: center;
                margin-top: .4rem;
                padding: .75rem 1rem !important;
                font-size: .95rem;
            }

            /* Feedback immediato al tocco */
            .btn-oro:active, .btn-bianco:active, .link-servizio:active { transform: scale(.97); }
        }

/* Su schermi touch la foto di cantiere nelle card resta leggermente
           più visibile: l'effetto hover del mouse non esiste */

        
        @media (hover: none) {
            .card-servizio::before { opacity: .13; }
        }

/* ================= MOBILE: TELEFONI ================= */

        
        @media (max-width: 575.98px) {
            /* Ritmo verticale più compatto: meno vuoto tra le sezioni */
            #servizi { padding: 3.8rem 0 3.4rem; }
            #chi-siamo, #come-lavoriamo, #realizzazioni, #contatti { padding: 3.8rem 0; }
            #preventivo { padding: 3.2rem 0; }

            /* Righe impilate: gutter orizzontale standard e respiro ridotto */
            .row.g-5 { --bs-gutter-x: 1.5rem; --bs-gutter-y: 2.4rem; }

            .hero h1 { font-size: 2.35rem; }
            .hero .lead { font-size: 1.05rem; }
            .hero-brand { gap: 1rem; }
            .hero-logo { width: 72px; }

            /* CTA a tutta larghezza: più facili da premere */
            .hero .btn-oro,
            .hero .btn-outline-scuro,
            #preventivo .btn-bianco {
                display: flex;
                justify-content: center;
                width: 100%;
                padding-top: .85rem;
                padding-bottom: .85rem;
            }

            /* Card più snelle: il contenuto respira anche su schermi stretti */
            .card-servizio { padding: 2rem 1.4rem 1.8rem; }
            .box-logo { padding: 2rem 1.5rem; }
            .fase-step { padding: 0; }
            .mappa { height: 300px; }

            footer { padding-top: 3.2rem; }
            footer a { overflow-wrap: anywhere; }
            .footer-bottom { margin-top: 2rem; }

            /* Pulsanti flottanti: rispettano le aree sicure di iPhone */
            .btn-whatsapp {
                right: max(16px, env(safe-area-inset-right));
                bottom: max(18px, env(safe-area-inset-bottom));
            }

            .btn-top {
                right: max(21px, env(safe-area-inset-right));
                bottom: 88px;
            }

            /* Lightbox: chiudi in alto, frecce in basso al centro (zona pollice) */
            .lightbox img { max-width: 96vw; max-height: 72vh; }

            .lightbox .chiudi { top: max(14px, env(safe-area-inset-top)); right: 14px; }

            .lightbox .contatore {
                top: max(26px, env(safe-area-inset-top));
                bottom: auto;
                left: 20px;
                transform: none;
            }

            .lightbox .precedente,
            .lightbox .successiva {
                top: auto;
                bottom: max(20px, env(safe-area-inset-bottom));
                transform: none;
                width: 54px;
                height: 54px;
                background: rgba(255, 255, 255, .16);
            }

            .lightbox .precedente { left: calc(50% - 66px); }

            .lightbox .successiva { right: calc(50% - 66px); }

            .lightbox .precedente:hover,
            .lightbox .successiva:hover { transform: scale(1.06); }
        }
