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

/* ================= PALETTE BIANCO & ORO (come homepage) ================= */

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

        body {
            font-family: 'Montserrat', sans-serif;
            color: var(--testo);
            background-color: #faf7ef;
            overflow-x: hidden;
        }

        .title-underline.a-sinistra { margin-left: 0; }

        .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;
            }

            .menu-servizi::before {
                content: "";
                position: absolute;
                top: -.6rem;
                left: 0;
                right: 0;
                height: .6rem;
            }
        }

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

        
        .hero-servizio {
            min-height: 58vh;
            display: flex;
            align-items: center;
            position: relative;
            overflow: hidden;
            background: var(--scuro);
            padding: 9.5rem 0 4.5rem;
        }

        .hero-servizio .hero-bg {
            position: absolute;
            inset: 0;
            background: url('../../media/chi%20siamo/13-hero-squadra-in-cantiere.jpg') center center / cover no-repeat;
            /* Stessa foto in WebP: i browser che non conoscono image-set()
               scartano questa riga e restano sul JPEG qui sopra. */
            background-image: image-set(url('../../assets/ottimizzate/media/chi%20siamo/13-hero-squadra-in-cantiere-900.webp') type('image/webp') 1x);
            animation: kenburns 22s ease-in-out infinite alternate;
            will-change: transform;
        }

/* hero-bg-mobile: sui telefoni basta la variante piu' piccola,
           lo schermo e' stretto e la foto pesa meno della meta'. */

        
        @media (max-width: 767.98px) {
            .hero-servizio .hero-bg { background-image: image-set(url('../../assets/ottimizzate/media/chi%20siamo/13-hero-squadra-in-cantiere-800.webp') type('image/webp') 1x); }
        }

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

        .hero-servizio .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-servizio .hero-badge {
            background: rgba(255, 255, 255, .14);
            color: #ecd9a8;
            backdrop-filter: blur(4px);
        }

        .hero-servizio h1 {
            font-weight: 800;
            font-size: clamp(2.1rem, 4.6vw, 3.3rem);
            line-height: 1.12;
            color: #ffffff;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

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

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

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

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

/* Breadcrumb nell'hero */

        
        .breadcrumb-servizio {
            display: inline-flex;
            flex-wrap: wrap;
            align-items: center;
            gap: .35rem;
            margin-bottom: 2.5rem;
            padding: 0;
            font-size: .82rem;
            font-weight: 600;
            letter-spacing: .6px;
        }

        .breadcrumb-servizio a {
            color: rgba(255, 255, 255, .85);
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: .4rem;
            transition: color .2s ease;
        }

        .breadcrumb-servizio a:hover { color: #e8cc82; }

        .breadcrumb-servizio .separatore { color: rgba(255, 255, 255, .45); font-size: .7rem; }

        .breadcrumb-servizio .corrente { color: #e8cc82; }

/* ================= LA NOSTRA STORIA ================= */

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

/* Foto in cornice bianca con filo oro interno (come la homepage) */

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

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

        .box-foto img {
            display: block;
            width: 100%;
            aspect-ratio: 4 / 5;
            object-fit: cover;
            object-position: center;
            border-radius: 14px;
        }

/* Targhetta col motto sovrapposta alla foto */

        
        .targhetta-motto {
            position: absolute;
            left: 50%;
            bottom: -26px;
            transform: translateX(-50%);
            z-index: 1;
            width: max-content;
            max-width: 88%;
            background: linear-gradient(135deg, #d9b866, var(--oro-scuro));
            color: #fff;
            font-weight: 700;
            font-size: .85rem;
            letter-spacing: .6px;
            text-align: center;
            padding: .85rem 1.6rem;
            border-radius: 50rem;
            box-shadow: 0 14px 30px rgba(169, 130, 47, .38);
        }

        .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;
        }

        .lista-forza li i { color: var(--oro-scuro); font-size: 1.25rem; }

/* ================= I NOSTRI VALORI ================= */

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

        #valori::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%);
        }

        .card-valore {
            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-valore::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 5px;
            background: linear-gradient(90deg, var(--oro), var(--oro-scuro));
        }

        .card-valore: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-valore > 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-valore:hover > i {
            background: linear-gradient(135deg, var(--oro), var(--oro-scuro));
            color: #fff;
            transform: rotate(-6deg) scale(1.06);
        }

        .card-valore p {
            font-size: .87rem;
            line-height: 1.7;
            margin-bottom: 0;
        }

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

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

/* 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: 64px; }

        .fase-step p { font-size: .88rem; margin-bottom: 0; }

/* ================= DAL CANTIERE (FASCIA FOTO) ================= */

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

        .banda-cantiere {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 14px;
        }

        .banda-cantiere a {
            position: relative;
            display: block;
            overflow: hidden;
            border-radius: 16px;
            aspect-ratio: 1 / 1;
            background: var(--oro-chiaro);
            box-shadow: 0 3px 10px rgba(46, 59, 66, .07);
            transition: transform .3s ease, box-shadow .3s ease;
        }

        .banda-cantiere img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform .5s ease;
        }

        .banda-cantiere a:hover {
            transform: translateY(-4px);
            box-shadow: 0 16px 34px rgba(169, 130, 47, .26);
        }

        .banda-cantiere a:hover img { transform: scale(1.08); }

        @media (max-width: 767.98px) {
            .banda-cantiere { grid-template-columns: repeat(2, 1fr); gap: 10px; }
        }

/* ================= COSA FACCIAMO ================= */

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

        #cosa-facciamo::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%);
        }

/* Card servizio con foto: linea oro che si espande dal centro in alto */

        
        .card-specialita {
            position: relative;
            display: flex;
            flex-direction: column;
            height: 100%;
            overflow: hidden;
            border: 1px solid #eee6d4;
            border-radius: 18px;
            background: #fff;
            color: var(--testo);
            text-decoration: none;
            transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
        }

        .card-specialita::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;
            z-index: 2;
        }

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

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

        .card-specialita .foto {
            position: relative;
            overflow: hidden;
            aspect-ratio: 16 / 10;
            background: var(--oro-chiaro);
        }

        .card-specialita .foto img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform .5s ease;
        }

        .card-specialita:hover .foto img { transform: scale(1.07); }

        .card-specialita .corpo {
            position: relative;
            display: flex;
            flex-direction: column;
            flex-grow: 1;
            padding: 2.2rem 1.5rem 1.5rem;
        }

/* Icona a cavallo tra foto e testo */

        
        .card-specialita .icona {
            position: absolute;
            top: -27px;
            left: 1.5rem;
            width: 54px;
            height: 54px;
            border-radius: 14px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 1.4rem;
            color: var(--oro-scuro);
            background: #fff;
            border: 1px solid #ecdfc0;
            box-shadow: 0 8px 20px rgba(201, 162, 75, .22);
            transition: background .3s ease, color .3s ease, transform .3s ease;
        }

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

        .card-specialita h5 {
            font-size: 1.02rem;
            font-weight: 700;
            margin-bottom: .45rem;
        }

        .card-specialita p {
            font-size: .85rem;
            line-height: 1.65;
            margin-bottom: 1rem;
        }

        .card-specialita .scopri {
            margin-top: auto;
            display: inline-flex;
            align-items: center;
            gap: .45rem;
            font-size: .78rem;
            font-weight: 700;
            letter-spacing: 1px;
            text-transform: uppercase;
            color: var(--oro-testo);
        }

        .card-specialita .scopri i { transition: transform .25s ease; }

        .card-specialita:hover .scopri i { transform: translateX(4px); }

/* ================= CTA FINALE ================= */

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

        #cta-finale::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%);
        }

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

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

        #cta-finale 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);
        }

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

        
        @media (max-width: 991.98px) {
            .hero-servizio { min-height: 0; padding: 7.5rem 0 3.2rem; }
            .targhetta-motto { font-size: .78rem; padding: .7rem 1.3rem; }

            /* 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 { transform: scale(.97); }
        }

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

        
        @media (max-width: 575.98px) {
            /* Ritmo verticale più compatto: meno vuoto tra le sezioni */
            #storia, #valori, #come-lavoriamo, #dal-cantiere, #cosa-facciamo { padding: 3.8rem 0; }
            #cta-finale { padding: 3.4rem 0; }

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

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

            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;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .hero-servizio .hero-bg { animation: none; }
        }
