/* 1. COLORI */
:root {

    /* COLOR */
    --gold-drop-50: #fff8ed; 
    --gold-drop-100: #fff0d6;
    --gold-drop-200: #FFDBA3; 
    --gold-drop-300: #FFBF6E;
    --gold-drop-400: #FB9A31;
    --gold-drop-500: #EF7D00;
    --gold-drop-600: #CC6200;
    --gold-drop-700: #A34A00;
    --gold-drop-800: #823A00;
    --gold-drop-900: #6B2F00;
    --gold-drop-950: #3D1800;
    --gold-drop-alpha20: #ef7d0033; 

    --vivid-cerulean-50: #E6F5FD;
    --vivid-cerulean-100: #CCEBFA;
    --vivid-cerulean-200: #99D7F6;
    --vivid-cerulean-300: #66C3F2;
    --vivid-cerulean-400: #33AFEE;
    --vivid-cerulean-500: #009FEF;
    --vivid-cerulean-600: #008FD7;
    --vivid-cerulean-700: #006FBF;
    --vivid-cerulean-800: #004FA7;
    --vivid-cerulean-900: #002F8F;
    --vivid-cerulean-950: #001F5F;
    --vivid-cerulean-alpha-20: #009fef33;

    --gray-0:  #ffffff;
    --gray-50:  #f9fafb;
    --gray-100:  #F3F4F6;
    --gray-200:  #E5E7EB;
    --gray-300:  #D1D5DB;
    --gray-400:  #9CA3AF;
    --gray-500:  #6B7280;
    --gray-600:  #4B5563; 
    --gray-700:  #374151;
    --gray-800:  #1F2937;
    --gray-900:  #111827;
    --gray-950:  #030712;

    --red-50: #FEF2F2;
    --red-100: #FEE2E2;
    --red-200: #FECACA;
    --red-300: #FCA5A5;
    --red-400: #F87171;
    --red-500: #EF4444;
    --red-600: #DC2626;
    --red-700: #B91C1C;
    --red-800: #991B1B;    
    --red-900: #7F1D1D;
    --red-950: #450A0A;

    --yellow-50: #FEFCE8;
    --yellow-100: #FEF9C3;
    --yellow-200: #FEF08A;
    --yellow-300: #FDE047;
    --yellow-400: #FACC15;
    --yellow-500: #EAB308;
    --yellow-600: #CA8A04;
    --yellow-700: #A16207;
    --yellow-800: #854D0E;    
    --yellow-900: #713F12;
    --yellow-950: #422006;

    --green-50: #F0FDF4;
    --green-100: #DCFCE7;
    --green-200: #BBF7D0;
    --green-300: #86EFAC;
    --green-400: #4ADE80;
    --green-500: #22C55E;
    --green-600: #16A34A;
    --green-700: #15803D;
    --green-800: #166534;    
    --green-900: #14532D;
    --green-950: #052E16;
    
    /* Token */
    --primary-strong: var(--vivid-cerulean-200);
    --primary-default: var(--vivid-cerulean-500);
    --primary-soft: var(--vivid-cerulean-700);
    --primary-alpha: var(--vivid-cerulean-alpha-20);

    --bg-strong: var(--gray-50);
    --bg-surface: var(--gray-200);
    --bg-subber: var(--gray-500);
    --bg-sub: var(--gray-600);
    --bg-soft: var(--gray-800);
    --bg-weak: var(--gray-900);
    --bg-null: var(--gray-950);

    --text-strong: var(--gray-50);
    --text-sub: var(--gray-300);
    --text-soft: var(--gray-400);
    --text-disabled: var(--gray-600);
    --text-null: var(--gray-950);

    --stroke-full: var(--gray-300);
    --stroke-strong: var(--gray-500);
    --stroke-sub: var(--gray-800);
    --stroke-soft: var(--gray-900);
    --stroke-null: var(--gray-950);

    --error-strong: var(--red-400);
    --error-default: var(--red-500);
    --error-soft: var(--red-700);
    --error-softer: var(--red-900);
    
    --warning-strong: var(--yellow-200);
    --warning-default: var(--yellow-400);
    --warning-soft: var(--yellow-600);
    --warning-softer: var(--yellow-700);

    --success-strong: var(--green-300);
    --success-default: var(--green-500);
    --success-soft: var(--green-700);
    --success-softer: var(--green-900);

    /* TYPOGRAPHY */
    --font-titles: 'Ubuntu Sans', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    --fw-light: 200;
    --fw-regular: 300;
    --fw-medium: 400;
    --fw-semibold:500;
    --fw-bold: 600;
    --fw-extrabold: 700;

    --font-italic: italic;

    /* SPACING PRIMITIVE */
    --space-000: 0px;
    --space-002: 2px;
    --space-004: 4px;
    --space-008: 8px;
    --space-012: 12px;
    --space-016: 16px;
    --space-024: 24px;
    --space-032: 32px;
    --space-040: 40px;
    --space-056: 56px;
    --space-080: 80px;
    --space-112: 112px;
    --space-160: 160px;
    --space-240: 240px;
    --space-999: 999px;

    /* Spacing */
    --spacing-null: var(--space-000);
    --spacing-2xs: var(--space-004);
    --spacing-xs: var(--space-008);
    --spacing-s: var(--space-012);
    --spacing-m: var(--space-016);
    --spacing-l: var(--space-024);
    --spacing-xl: clamp(26px, 2vw, 32px);
    --spacing-2xl: clamp(30px, 3vw, 40px);
    --spacing-3xl: clamp(36px, 5vw, 56px);
    --spacing-4xl: clamp(40px, 8vw, 80px);
    --spacing-5xl: clamp(56px, 10vw, 112px);
    --spacing-6xl: clamp(64px, 12vw, 160px);
    --spacing-7xl: clamp(80px, 14vw, 240px);

    /* Radius */
    --radius-null: var(--space-000);
    --radius-2xs: var(--space-004);
    --radius-xs: var(--space-008);
    --radius-s: var(--space-012);
    --radius-m: var(--space-016);
    --radius-l: var(--space-024);
    --radius-xl: var(--space-032);
    --radius-2xl: var(--space-040);
    --radius-3xl: var(--space-056);
    --radius-4xl: var(--space-080);
    --radius-5xl: var(--space-112);
    --radius-6xl: var(--space-160);
    --radius-7xl: var(--space-240);
    --radius-full: var(--space-999);

    /* Dimension */
    --dimension-2xs: var(--space-004);
    --dimension-xs: var(--space-008);
    --dimension-s: var(--space-012);
    --dimension-m: var(--space-016);
    --dimension-l: var(--space-024);
    --dimension-xl: var(--space-032);
    --dimension-2xl: var(--space-040);
    --dimension-3xl: var(--space-056);
    --dimension-4xl: var(--space-080);
    --dimension-5xl: var(--space-112);
    --dimension-6xl: var(--space-160);
    --dimension-7xl: var(--space-240);

}

/* 2. RESET E STILI BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-weak);
    color: var(--text-strong);
    font-family: sans-serif; /* Lo cambieremo quando avremo il nome del font */
}

/* 3. TEXT STYLES */
.text-display {
    font-family: var(--font-titles);
    font-size: clamp(38px, 8vw, 64px); /* Mobile: 38px | Desktop: 64px */
    letter-spacing: -2%;
    line-height: 1.1;
    font-weight: var(--fw-extrabold); 
}
.text-display--light {
    font-weight: var(--fw-light);
}
.text-display--medium {
    font-weight: var(--fw-medium);
}

.text-h1 {
    font-family: var(--font-titles);
    font-size: clamp(32px, 6vw, 48px);
    letter-spacing: -1%;
    line-height: 1.1;
    font-weight: var(--fw-extrabold); 
}
.text-h1--light {
    font-weight: var(--fw-light);
}
.text-h1--medium {
    font-weight: var(--fw-medium);
}

.text-h2 {
    font-family: var(--font-titles);
    font-size: clamp(26px, 4vw, 36px);
    letter-spacing: -1%;
    line-height: 1.1;
    font-weight: var(--fw-extrabold); 
}
.text-h2--light {
    font-weight: var(--fw-light);
}
.text-h2--medium {
    font-weight: var(--fw-medium);
}

.text-h3 {
    font-family: var(--font-titles);
    font-size: 24px;
    letter-spacing: 0%;
    line-height: 1.1;
    font-weight: var(--fw-extrabold); 
}
.text-h3--light {
    font-weight: var(--fw-light);
}
.text-h3--medium {
    font-weight: var(--fw-medium);
}

.text-h4 {
    font-family: var(--font-titles);
    font-size: 18px;
    letter-spacing: 0%;
    line-height: 1.1;
    font-weight: var(--fw-extrabold); 
}
.text-h4--light {
    font-weight: var(--fw-light);
}
.text-h4--medium {
    font-weight: var(--fw-medium);
}

.text-body-xl {
    font-family: var(--font-body);
    font-size: clamp(24px, 3vw, 32px);
    letter-spacing: 0%;
    line-height: 1.2;
    font-weight: var(--fw-regular); 
}
.text-body-xl--light {
    font-weight: var(--fw-light);
}
.text-body-xl--bold {
    font-weight: var(--fw-bold);
}
.text-body-xl--italic {
    font-family: var(--font-body);
    font-size: clamp(24px, 3vw, 32px);
    letter-spacing: 0%;
    line-height: 1.2;
    font-weight: var(--fw-light);
    font-style: var(--font-italic);
}

.text-body-l {
    font-family: var(--font-body);
    font-size: 20px;
    letter-spacing: 0%;
    line-height: 1.5;
    font-weight: var(--fw-regular); 
}
.text-body-l--light {
    font-weight: var(--fw-light);
}
.text-body-l--bold {
    font-weight: var(--fw-bold);
}

.text-body-m {
    font-family: var(--font-body);
    font-size: 16px;
    letter-spacing: 0%;
    line-height: 1.5;
    font-weight: var(--fw-regular); 
    text-decoration: none;
}
.text-body-m--light {
    font-weight: var(--fw-light);
}
.text-body-m--bold {
    font-weight: var(--fw-bold);
}

.text-body-s {
    font-family: var(--font-body);
    font-size: 14px;
    letter-spacing: 0%;
    line-height: 1.5;
    font-weight: var(--fw-regular); 
    text-decoration: none;
}
.text-body-s--underlined {
    text-decoration: underline;
    text-underline-offset: 3px;
}
.text-body-s--light {
    font-weight: var(--fw-light);
}
.text-body-s--bold {
    font-weight: var(--fw-bold);
}
.text-body-s--italic {
    font-family: var(--font-body);
    font-size: 14px;
    letter-spacing: 0%;
    line-height: 1.5;
    font-weight: var(--fw-regular);
    font-style: italic; 
}

.text-caption {
    font-family: var(--font-titles);
    font-size: 16px;
    letter-spacing: 10%;
    line-height: 1.0;
    text-transform: uppercase;
    font-weight: var(--fw-medium); 
}
.text-caption--light {
    font-weight: var(--fw-light);
}
.text-caption--semibold {
    font-weight: var(--fw-semibold);
}
.text-caption--extrabold {
    font-weight: var(--fw-extrabold);
}

.text-button{
    font-family: var(--font-titles);
    font-size: 16px;
    letter-spacing: 2%;
    line-height: 1.0;
    font-weight: var(--fw-semibold); 
}
.text-button--underlined {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.text-primary {
    color: var(--primary-default);
}


/* MARGINI */
.mt-2xl { margin-top: var(--spacing-2xl); }
.mt-xl { margin-top: var(--spacing-xl); }
.mt-l { margin-top: var(--spacing-l); }
.mt-m { margin-top: var(--spacing-m); }
.mt-s { margin-top: var(--spacing-s); }
.mt-xs { margin-top: var(--spacing-xs); }
.mt-2xs { margin-top: var(--spacing-2xs); }

.mb-4xl { margin-bottom: var(--spacing-4xl); }
.mb-3xl { margin-bottom: var(--spacing-3xl); }
.mb-2xl { margin-bottom: var(--spacing-2xl); }
.mb-l { margin-bottom: var(--spacing-l); }
.mb-m { margin-bottom: var(--spacing-m); }
.mb-s { margin-bottom: var(--spacing-s); }
.mb-xs { margin-bottom: var(--spacing-xs); }
.mb-2xs { margin-bottom: var(--spacing-2xs); }

/* ============================================================================================================================================= */

/* --- SCROLL FLUIDO --- */
html {
    scroll-behavior: smooth;
}

/* --- RESET BODY (Importante per il bordo inferiore) --- */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Spinge il footer in fondo se la pagina ha poco contenuto */
main {
    flex: 1; 
}

/* CONTAINER 1216px */
.container{
    max-width: 1440px;
    margin: var(--spacing-2xl) auto;
    padding: var(--spacing-4xl) var(--spacing-5xl);
    /* Padding dinamico: 6% sui lati, ma mai meno di 20px */
    padding-left: clamp(20px, 6%, 80px);
    padding-right: clamp(20px, 6%, 80px);
}

.container-top {
    max-width: 1440px;
    margin: 0 auto var(--spacing-2xl) auto;
    padding: var(--spacing-3xl) var(--spacing-5xl) var(--spacing-4xl) var(--spacing-5xl);
    /* Padding dinamico: 6% sui lati, ma mai meno di 20px */
    padding-left: clamp(20px, 6%, 80px);
    padding-right: clamp(20px, 6%, 80px);
}

.container-bottom {
    max-width: 1440px;
    margin: var(--spacing-2xl) auto 0 auto;
    padding: var(--spacing-4xl) var(--spacing-5xl) var(--spacing-3xl) var(--spacing-5xl);
    /* Padding dinamico: 6% sui lati, ma mai meno di 20px */
    padding-left: clamp(20px, 6%, 80px);
    padding-right: clamp(20px, 6%, 80px);
}

/* BACKGROUND CHIARO */
.bg-light {
    background-color: var(--bg-soft); 
}

/* COMPONENTE: CTA centrale */
.cta {
    margin-top: var(--spacing-3xl);
    display: flex;
    justify-content: center;
}

/* --- COMPONENTE: Nav Item --- */
.nav-item {
    color: var(--text-strong);
    padding: var(--spacing-xs) var(--spacing-xs); 
    transition: all 0.2s ease;  /* Transizione fluida per gli stati */
    position: relative;         /* Gestiamo solo il "contenitore" del link */
    display: inline-block;
    text-decoration: none;
}

.nav-item:hover {       /* Stato Hover */
    color: var(--primary-strong);
}

.nav-item.is-active {   /* Stato Active (La pagina in cui ti trovi) */
    color: var(--primary-default);
}


/* --- COMPONENTE: Nav Bar / Header --- */
.main-header {                          /* Layout dell'Header (esterno) */
    width: 100%;
    height: 96px;
    display: flex;
    align-items: center;                /* Allinea tutto verticalmente al centro */
    justify-content: space-between;     /* Distribuisce i 3 blocchi (SX, Centro, DX) */
    background-color: var(--bg-weak);    /* bg color */
    position: sticky;
    z-index: 1000;
    padding: var(--spacing-null) var(--spacing-5xl);
    padding-left: clamp(20px, 6%, 80px);
    padding-right: clamp(20px, 6%, 80px);
}

.header-container {     /* Layout del contenitore interno dell'Header */
    width: 100%;
    max-width: 1284px;
    margin: 0 auto;     /* Centra il contenitore orizzontalmente */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-nav ul {                /* Stile del Menu (Lista) */
    display: flex;               /* Mette le voci del menu in riga */
    list-style: none;            /* Toglie i pallini della lista */
    gap: var(--spacing-l);       /* Spazio tra le voci */
    margin: var(--spacing-null);
    padding: var(--spacing-null);
}

.logo-img {
    height: 40px;       
    width: auto;        /* Mantiene le proporzioni */
    display: block;
    transition: transform 0.3s ease;
}

.logo:hover .logo-img {
    transform: scale(1.01);
}

/* Responsive Navigation Bar */
.menu-toggle {
    display: none; /* Nascosto su desktop */
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    z-index: 1100;
}

.menu-toggle .bar {
    width: 24px;
    height: 2px;
    background-color: var(--text-strong);
    transition: 0.3s ease;
}

.menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0; /* La barra centrale sparisce */
}

.menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 992px) {
    
    .header-logo {          /* 1. Facciamo sparire il logo come richiesto */
        display: none !important;
    }

    .menu-toggle {          /* 2. Mostriamo l'hamburger */
        display: flex;
    }

    .header-nav {
        position: absolute;
        top: 96px; /* Sotto il header */
        left: 0; 
        width: 100%;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        background-color: var(--bg-weak);
        transition: all 0.3s ease;
        padding: 0 var(--spacing-xl) var(--spacing-xl);
        z-index: 1000;
    }

    .header-nav.is-open {       /* Quando il menu è attivo (classe aggiunta via JS) */
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .header-nav ul {
        flex-direction: column; /* Voci in verticale */
        gap: var(--spacing-m);
        align-items: flex-start;
    }

    .nav-item {
        width: 100%;
        padding: var(--spacing-s) 0;
    }

    .header-actions {       /* 4. Il pulsante azioni rimane a destra grazie al flex del container */
        display: flex;
    }

    .main-header {          /* Opzionale: riduciamo il padding dell'header su mobile */
        padding: var(--spacing-null) var(--spacing-l);
    }
}

/* --- COMPONENTE: Button --- */
.btn-primary {                   /* Stile del Pulsante */
    background-color: var(--primary-default);
    color: var(--text-strong);
    padding: var(--spacing-m) var(--spacing-l); 
    border: none;
    border-radius: var(--radius-null) var(--radius-s) var(--radius-null) var(--radius-s);
    cursor: pointer;            /* Cambia il cursore in una manina */
    transition: background-color 0.3s ease, transform 0.2 cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.btn-primary:hover {
    background-color: var(--primary-soft);
}

.btn-primary:active {
    transform: scale(0.96); /* Effetto "pressione" del tasto */
}

.btn-text {    
    background-color: transparent;               /* Stile del Pulsante secondario*/
    color: var(--primary-default);
    padding: var(--spacing-2xs) var(--spacing-2xs); 
    border: none;
    cursor: pointer;            /* Cambia il cursore in una manina */
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.btn-text:hover {
    color: var(--primary-soft);
}


/* --- HERO SECTION --- */
.hero {
    position: relative;          /* Necessario per posizionare l'overlay all'interno */
    width: 100%;
    height: 72vh;               /* Altezza fissa richiesta */
    background-image: url('assets/blasting.jpg'); /* Sostituisci con il nome del file Freepik */
    background-size: cover;      /* L'immagine copre tutto il rettangolo di 720px */
    background-position: bottom center; /* L'immagine rimane centrata anche se ridimensioni il browser */
    overflow: hidden;
}

/* Hero Overlay: Opacità al 50% */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Nero con opacità 0.5 (50%) */
    z-index: 1;                             /* Sta sopra l'immagine */
}

/* Hero Container: Gestione del Layout */
.hero-container {
    position: relative;
    z-index: 2;                  /* Assicura che il testo sia SOPRA l'overlay scuro */
    max-width: 1216px;           /* Stessa larghezza dell'Header per coerenza */
    height: 100%;                /* Prende tutti i 720px di altezza */
    margin: 0 auto;              /* Centra il contenitore orizzontalmente */
    padding: 0 var(--spacing-5xl);     /* Margine di sicurezza ai lati */
    display: flex;
    flex-direction: column;      /* Allinea gli elementi in verticale */
    justify-content: center;   /* Spinge tutto verso il BASSO */
    align-items: center;         /* Centra tutto ORIZZONTALMENTE */
}

/* Contenuto: Stile dei testi */
.hero-content {
    text-align: center;          /* Allinea il testo all'interno del suo box */
    margin-bottom: var(--spacing-2xl);         /* Distanza dal bordo inferiore della Hero */
    color: var(--text-strong);         /* Colore dei testi  */
}

.hero-content h1 {
    margin-bottom: var(--spacing-m);
}

.hero-content p {
    margin-bottom: var(--spacing-3xl); /* Spazio prima del pulsante */
    max-width: 900px;            /* Evita che il testo vada da un bordo all'altro */
}

.hero-credits {
    position: absolute;
    bottom: var(--spacing-l);      /* Distanza dal bordo inferiore */
    right: var(--spacing-xl);       /* Distanza dal bordo destro */
    font-size: 10px;   /* Molto piccolo per non disturbare */
    color: var(--text-soft); /* Bianco semitrasparente */
    z-index: 10;       /* Sopra l'immagine, sotto eventuali menu a tendina */
    font-family: var(--font-body);
}

.hero-credits a {
    color: inherit;    /* Prende lo stesso colore del testo */
    text-decoration: none;
    transition: color 0.3s ease;
    font-family: var(--font-body);
}

.hero-credits a:hover {
    color: var(--text-sub);       /* Diventa bianco pieno al passaggio */
}

@media (max-width: 768px) {
    .hero-credits {
        bottom: var(--spacing-s);
        right: var(--spacing-s);
        font-size: 9px;
    }
}


/* --- SEZIONE 1: Identità --- */
/* Griglia a due colonne */
.identita-grid {
    display: flex;
    gap: var(--spacing-3xl); /* Spazio generoso tra le due metà */
    align-items: center;
}

.identita-col-left, .identita-col-right {
    flex: 1;    /* Divide esattamente a metà (50% ciascuno) */
}

/* Stile del riquadro citazione */
.quote-box {
    background-color: var(--bg-sub); 
    padding: var(--spacing-2xl);
    border-radius: var(--radius-null) var(--radius-2xl) var(--radius-null) var(--radius-2xl);
    position: relative;
    z-index: 1;
}
.quote-box p {
    color: var(--text-soft);
    z-index: 2;
}
.quote-icon {
    position: absolute;      /* Estratto dal flusso: 0 impatto su line-spacing */
    width: 56px;             /* Larghezza fissa */
    height: 56px;            /* Altezza fissa 32px richiesta */
    stroke: var(--primary-default);  /* Usiamo stroke per le icone Lucide (che sono SVG) */
    fill: var(--primary-default);    /* Se l'icona ha un riempimento, usiamo fill */
    opacity: 0.25;           /* Opacità ridotta per non appesantire la lettura */
    z-index: -1;
}
.quote-icon--start {
    top: 24px;
    left: 24px;
    transform: rotate(180deg);
}
.quote-icon--end {
    bottom: 32px;
    right: 32px;
}

/* Gestione Immagine Destra */
.identita-img-wrapper {
    width: 100%;
    height: 600px; /* Altezza fissa come da design */
    overflow: hidden;
    border-radius: var(--radius-2xl) var(--radius-null) var(--radius-2xl) var(--radius-null);
}

.img-fit {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fondamentale: riempie i 575px senza deformarsi */
    display: block;
}

/* Tablet (Sotto i 992px) */
@media (max-width: 992px) {
    .identita-img-wrapper {
        height: auto; /* Riduciamo l'altezza dell'immagine */
        aspect-ratio: 1 / 1;
    }
    .identita-grid {
        flex-direction: column;
    }
}

/* Mobile (Sotto i 768px) */
@media (max-width: 768px) {
    .identita-grid {
        flex-direction: column; /* L'immagine va sopra, il testo sotto */
        gap: var(--spacing-2xl);
    }
    .identita-img-wrapper {
        height: auto; /* Rimuoviamo l'altezza fissa */
        aspect-ratio: 1 / 1; /* L'immagine mantiene una forma armoniosa */
    }
    .identita-col-right, 
    .identita-col-left {
        width: 100%; /* Occupano tutta la larghezza dello schermo */
    }
    /* Centriamo il testo su mobile per una lettura migliore se preferisci */
    .identita-description {
        text-align: left; 
    }
}


/* --- SEZIONE 2: Tecnologie --- */
.tecnologie-header {
    margin-bottom: var(--spacing-2xl);
    text-align: left;
}

.tecnologie-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Allinea i testi in alto */
    gap: var(--spacing-3xl);
}

/* Questo per far sì che le immagini inizino nello stesso punto */
.tecnologie-start-img { 
    min-height: 102px; /* Regola questo valore in base alla lunghezza massima dei tuoi titoli */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.tecnologie-card {
    flex: 1; /* Le due colonne occupano lo stesso spazio */
}

/* Sottotitolo del modello */
.tecnologie-card .text-primary {
    margin-bottom: var(--spacing-l);
    display: block;
}

/* Immagine con altezza fissa */
.tecnologie-image-container {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--radius-null) var(--radius-2xl) var(--radius-null) var(--radius-2xl);
    margin-bottom: var(--spacing-l);
}

.tecnologie-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Taglia l'immagine per riempire i 500px senza schiacciarla */
}

/* Quando lo schermo è più stretto di 992px (Tablet) */
@media (max-width: 992px) {
    .tecnologie-image-container {
        height: 500px; /* Riduciamo l'altezza a 400px */
    }
    .tecnologie-wrapper {
        flex-direction: column;
    }
}

/* Quando lo schermo è più stretto di 576px (Mobile) */
@media (max-width: 768px) {
    .tecnologie-image-container {
        height: 300px; /* Riduciamo ulteriormente l'altezza a 300px */
        /*aspect-ratio: 4 / 3;*/
    }
}

/* --- COMPONENTE: Divider Grigio */
.vertical-divider {
    width: 1px;
    background-color: var(--bg-subber); 
    align-self: stretch;       /* Si allunga per tutta l'altezza del contenitore */
    margin: 0;
}

/* --- SEZIONE 3: Risultati --- */
.progetto-wrap {
    margin-bottom: var(--spacing-5xl);
}

.progetto-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0px;
    text-transform: uppercase;
    color: var(--text-soft); /* Un grigio meno marcato */
}

.confronto-immagini {
    display: flex;
    width: 100%;
    height: auto;
    border-radius: var(--radius-null) var(--radius-2xl) var(--radius-null) var(--radius-2xl);
    overflow: hidden;   /* Taglia gli angoli delle immagini */
}

.img-box-608 {
    flex: 1;
    height: auto;
    aspect-ratio: 1/1;
}

@media (max-width: 768px) {
    /* 1. Reset del contenitore padre */
    .confronto-immagini {
        display: block !important; /* Trasformiamo da flex a block per evitare tensioni verticali */
        height: auto !important;   /* Fondamentale: deve adattarsi al contenuto */
        min-height: 0 !important;
        border: none !important;    /* Togliamo il bordo esterno se crea fastidio */
        gap: 0;
    }
    /* 2. Reset del box immagine */
    .img-box-608 {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 4 / 3 !important; /* Qui forziamo la proporzione */
        overflow: hidden;
        margin-bottom: 0px; 
    }
    /* 3. Reset dell'immagine interna */
    .img-box-608 .img-fit {
        width: 100% !important;
        height: 100% !important;
        max-height: none !important; /* Rimuove eventuali limiti di altezza */
        object-fit: cover !important;
        display: block !important;
    }
    /* 4. Separatore visivo */
    .border-right {
        border-right: none !important;
        border-bottom: 2px solid var(--stroke-full) !important;
    }
}

.border-right {
    border-right: 2px solid var(--stroke-full);
}

/* COMPONENTE: Badge */
.badge-group {
    display: flex;
    flex-wrap: wrap;      /* Permette di andare a capo (crea la griglia) */
    gap: var(--spacing-m) var(--spacing-l);     /* Spazio tra i badge (sia orizzontale che verticale) */
}

/* Lo stile del singolo Badge */
.badge {
    display: flex;
    align-items: center;  /* Allinea icona e testo verticalmente */
    gap: var(--spacing-s);            /* Spazio tra icona e testo */
    padding: var(--spacing-s) var(--spacing-m);
    border: 2px solid var(--primary-default);
    border-radius: var(--radius-null) var(--radius-s) var(--radius-null) var(--radius-s);  
    background-color: transparent;
    min-width: max-content;       /* Impedisce ai badge di diventare troppo piccoli */
}

/* Stile dell'icona dentro il badge */
.badge-icon {
    width: 24px;
    height: 24px;
    color: var(--text-strong);
    stroke-width: 2.0px;
}
.badge span {
    color: var(--text-strong);
    white-space: nowrap;    /* Evita che il testo del badge vada a capo internamente */
}

/* --- WORK IN PROGRESS --- */
.work-in-progress {
    grid-column: 1 / -1; /* Occupa tutta la larghezza della griglia */
    background-color: var(--bg-weak);
    box-sizing: border-box;
    border: 2px dashed var(--stroke-strong);
    border-radius: 0 var(--radius-2xl) 0 var(--radius-2xl);
    padding: var(--spacing-4xl) var(--spacing-2xl);
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 600px;
}

.wip-content {
    max-width: 600px;
    margin: var(--spacing-2xl);
}

.wip-icon {
    width: 80px;
    height: 80px;
    background-color: var(--primary-default);
    color: var(--text-strong);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto var(--spacing-l);
}

.wip-icon svg {
    width: 40px;
    height: 40px;
}

.wip-content h3 {
    margin-bottom: var(--spacing-l);
    color: var(--text-strong);
}

.wip-content p {
    color: var(--text-sub);
    margin-bottom: var(--spacing-xl);
}

/* Adattamento Mobile */
@media (max-width: 768px) {
    .work-in-progress {
        padding: var(--spacing-2xl) var(--spacing-m);
        height: 500px;
    }
}


/* --- SEZIONE 4: FAQ --- */
.faq-grid {
    display: flex;
    flex-direction: row;
    gap: var(--spacing-l);
    align-items: flex-start;
}
.faq-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-l);
}

@media (max-width: 992px) {
    .faq-grid {
        flex-direction: column; /* Gli elementi vanno uno sotto l'altro */
    }
    .faq-column {
        width: 100%; /* La colonna occupa tutto lo spazio disponibile */
    }
}

/* --- COMPONENTE: Accordion --- */
.faq-item {
    background-color: var(--bg-sub); 
    border-radius: var(--radius-null) var(--radius-m) var(--radius-null) var(--radius-m);
    overflow: hidden;
    transition: all 0.3s ease;
}
/* Rimuove la freccetta predefinita del browser */
.faq-item summary {
    list-style: none;
    padding: var(--spacing-l);
    gap: var(--spacing-l);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    outline: none;
}
.faq-item summary::-webkit-details-marker {
    display: none;
}

/* ICONE: Il contenitore deve essere relativo */
.icon-wrapper {
    position: relative;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Animiamo gli span che contengono gli SVG */
.icon-plus, .icon-minus {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

/* Stato chiuso */
.icon-plus {
    opacity: 1;
    transform: rotate(0deg);
    color: var(--text-strong);
}

.icon-minus {
    opacity: 0;
    transform: rotate(-90deg);
}

/* Stato aperto */
.faq-item.is-active .icon-plus {
    opacity: 0;
    transform: rotate(90deg);
}

.faq-item.is-active .icon-minus {
    opacity: 1;
    transform: rotate(0deg);
}

.faq-item.is-active .text-h4 {
    color: var(--text-strong);
    transition: color 0.3s ease;
}

/* Forza la dimensione dell'SVG interno */
.icon-wrapper svg {
    width: 20px !important;
    height: 20px !important;
}

/* Contenuto della risposta */
.faq-item {
    background-color: var(--bg-sub); 
    border-radius: var(--radius-null) var(--radius-m) var(--radius-null) var(--radius-m);
    overflow: hidden;
    transition: background-color 0.3s ease;
}

/* Contenitore che viene animato dal JS */
.faq-content {
    height: 0;                /* Parte da zero */
    overflow: hidden;         /* Nasconde il testo che esce */
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* La velocità dell'allungamento */
}

/* Wrapper interno per mantenere il padding pulito */
.faq-inner {
    padding: 0px var(--spacing-l) var(--spacing-l) var(--spacing-l);
}


/* --- SEZIONE 5: Contatti --- */
.contact-form {
    width: 100%;
    margin: 0 auto;
}

.form-grid {
    display: flex;
    flex-direction: row;
    gap: var(--spacing-2xl);
    width: 100%;
}

.form-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-l);
}

/* --- Elementi Comuni (Input, Textarea, Select, File) --- */
.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    position: relative;
}
.input-group label {
    color: var(--text-strong);
}

/* Reset e Stile Base per tutti i campi */
.input-group input, 
.input-group textarea, 
.custom-select,
.file-input {
    -webkit-font-smoothing: antialiased;    /* Anti-aliasing per MAC */
    font-family: var(--font-body) !important;
    font-size: 16px;
    font-weight: var(--fw-regular);
    line-height: 1.6;
    width: 100%;
    padding: var(--spacing-s) var(--spacing-m);
    background-color: var(--bg-soft);
    border: 1px solid transparent;
    border-radius: 2px;
    color: var(--text-soft) !important;
    transition: all 0.2s ease;
    font-family: inherit;
}

/* Placeholder per i campi di testo */
::placeholder {
    color: var(--text-soft);
}

/* --- Stati Attivi (Focus e Valore Presente) --- */
.input-group input:focus,
.input-group textarea:focus,
.custom-select:focus,
.file-input:focus {
    outline: none;
    border-color: var(--primary-soft);
    color: var(--text-strong) !important;
}
.custom-select.has-value,
.file-input.has-value {
    color: var(--text-strong) !important;
}

/* --- Specifiche Select --- */
.select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px; /* Spazio per l'icona */
    cursor: pointer;
}

.select-icon {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 20px;
    height: 20px;
    pointer-events: none;
    color: var(--text-soft);
    transition: color 0.2s ease;
}

/* L'icona si illumina se il select è attivo o pieno */
.custom-select:focus + .select-icon,
.custom-select.has-value + .select-icon {
    color: var(--text-strong) !important;
}

.custom-select option {
    background-color: var(--bg-soft);
    color: var(--text-strong);
}

/* --- Specifiche File Input --- */
.file-input {
    padding: 0 var(--spacing-m) 0 0 !important; /* Il padding è gestito dal bottone interno */
    display: grid !important;
    grid-template-columns: auto 1fr;
    align-items: center !important;
    cursor: pointer;
    height: 51px; /* Altezza minima, altrimenti sarebbe più basso rispetto alle altre caselle */
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    flex-direction: row !important;
    line-height: normal !important;
}

.file-input::file-selector-button {
    appearance: none;
    -webkit-appearance: none;
    font-family: var(--font-titles);
    font-weight: var(--fw-semibold);
    font-size: 16px;
    background-color: var(--bg-sub);
    color: var(--text-strong);
    border: none;
    padding: 0px 20px;
    margin-right: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    height: 100%;
}

.file-input::before {
    content: none !important; /* centra il testo "Nessun file selezionato" a destra del pulsante */
}

.file-input::file-selector-button:hover {
    color: var(--primary-default);
}

/* --- Specifiche Textarea --- */
textarea {
    resize: vertical;
    min-height: 120px;
}

/* --- Privacy Checkbox --- */
.privacy-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 8px;
}
.privacy-wrapper input[type="checkbox"] {
    appearance: none;   /* Rimuove lo stile di sistema */
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    background-color: var(--bg-weak);
    border: 2px solid var(--stroke-strong);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    display: grid;
    place-content: center;
    transition: 0.1s;
}
.privacy-wrapper input[type="checkbox"]:checked {
    background-color: var(--primary-default);
    border-color: var(--primary-default);
}
/* Disegniamo il tic bianco con uno pseudo-elemento */
.privacy-wrapper input[type="checkbox"]::before {
    content: "";
    width: 10px;
    height: 10px;
    transform: scale(0);
    transition: 100ms transform ease-in-out;
    box-shadow: inset 1em 1em var(--text-strong); /* Il tic bianco */
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); /* Crea la forma della spunta */
}
.privacy-wrapper input[type="checkbox"]:checked::before {
    transform: scale(1.2);
}

/* Footer Form */
.form-footer {
    display: flex;
    justify-content: center;
}

/* --- Responsive contatti --- */
@media (max-width: 1200px) {
    .form-grid {
        flex-direction: column;
        gap: var(--spacing-l);

    }
    
    .form-column {
        width: 100%;
    }
}


/* --- FOOTER --- */

.main-footer {
    background-color: var(--bg-null); /* O la tua variabile --bg-dark */
    color: var(--text-soft);
    margin-top: var(--spacing-2xl);
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* La prima colonna è più larga */
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-4xl);
}

/* Colonna Logo e Social */
.footer-logo-row {
    margin-bottom: var(--spacing-l);
    text-align: left;
}

.brand-col {
    text-align: left;
}

.logo-img-footer {
    height: 40px;       /* Coerente con la classe .footer-logo che hai già */
    width: auto;
    display: block;
}

.footer-text {
    color: var(--text-soft);
    margin-bottom: var(--spacing-l);
    max-width: 500px;
    margin-left: auto;  /* Spinge il blocco al centro da sinistra */
    margin-right: auto; /* Spinge il blocco al centro da destra */
}

.footer-socials {
    display: flex;
    gap: var(--spacing-m);
}

.social-link img {
    width: 24px;
    transition: transform 0.2s;
}

.social-link:hover img {
    color: var(--primary-default);
    transform: translateY(-3px);
}

/* Menu e Info */
.nav-col {
    text-align: center;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.footer-nav a {
    color: var(--text-soft);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: var(--primary-default);
}

.info-col {
    text-align: right;
}
 
.info-col address {
    font-style: normal;
    color: var(--text-soft);
}

/* Riga Inferiore */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-disabled);
}

.legal-buttons {
    display: flex;
    gap: var(--spacing-2xs);
}

.btn-legal {
    font-family: var(--font-body);
    font-size: 14px;
    letter-spacing: 0%;
    line-height: 1.5;
    font-weight: var(--fw-regular); 
    background: none;
    border: none;
    color: var(--text-disabled);
    cursor: pointer;
    padding: 0;
    transition: color 0.3s;
    text-decoration: none !important;
}

.btn-legal:hover {
    color: var(--primary-default);
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-logo-row {      /* 1. Centriamo il logo nella sua riga dedicata */
        text-align: center;
        margin-bottom: var(--spacing-m);
    }

    .logo-img-footer {
        margin: 0 auto var(--spacing-m); /* Centra il logo su mobile */
    }

    .footer-top {           /* 2. Trasformiamo la griglia in una singola colonna */
        grid-template-columns: 1fr; /* Una sola colonna */
        gap: var(--spacing-2xl); /* Spazio tra i blocchi sovrapposti */
        text-align: center; /* Forza il testo al centro per tutte le colonne */
    }

    .brand-col, .nav-col, .info-col {       /* 3. Resettiamo gli allineamenti specifici delle classi */
        text-align: center;
    }

    .footer-socials {       /* 4. Centriamo i social e la navigazione */
        justify-content: center;
        margin-top: var(--spacing-m);
    }

    .footer-nav {
        align-items: center; /* Centra i link del menu */
    }

    .footer-bottom {        /* 5. Sistemiamo la barra inferiore (Copyright e Privacy) */
        flex-direction: column; /* Sovrappone copyright e bottoni */
        gap: var(--spacing-l);
        text-align: center;
    }

    .legal-buttons {
        justify-content: center;
        width: 100%;
    }

    .main-footer {      /* Opzionale: riduciamo un po' il padding per risparmiare spazio */
        padding: var(--radius-2xl) 0 var(--spacing-2xl) 0;
    }
}

/* --- PRIVACY --- */
.privacy-content {
    padding: var(--spacing-2xl) 0 var(--spacing-4xl) 0;
    color: var(--text-sub); /* O il tuo colore di testo principale */
}

.privacy-content h1 {
    margin-bottom: 40px;
}

.privacy-content h4 {
    margin: 30px 0 10px 0;
    color: var(--text-strong);
}

.privacy-caption {
    color: var(--text-soft);
    margin-bottom: 20px;
}

.privacy-body {
    max-width: 800px; /* Non far allungare le righe all'infinito */
    margin: 0 auto;   /* Centra il blocco nella pagina */
    padding: 60px 20px;
    color: var(--text-sub);
}

.privacy-body h1 {
    margin-bottom: 20px;
    color: var(--text-strong);
}

.privacy-body h2 {
    margin-top: 40px;
    margin-bottom: 15px;
    color: var(--text-strong);
}

.privacy-body ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.privacy-body li {
    margin-top: 8px;
    margin-bottom: 8px;
}

/* --- COOKIE BANNER --- */
.cookie-overlay {
    position: fixed;
    bottom: var(--spacing-2xl);
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    background-color: var(--bg-null);
    color: var(--text-soft);
    border: 2px solid var(--stroke-sub);
    border-radius: 0 var(--radius-l) 0 var(--radius-l);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 9999;
    display: none; /* Inizialmente nascosto */
    max-width: 1094px;
    margin: 0 auto;
    padding: var(--spacing-l) var(--spacing-xl);
    vertical-align: middle;
    gap: var(--spacing-l);
}

.cookie-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-l);
    vertical-align: middle;
}

.cookie-text p {
    margin-bottom: 14px;
    vertical-align: middle;
    display: inline-block;
}

.cookie-text a { 
    color: var(--text-soft);
}

.cookie-buttons {
    display: flex;
    gap: var(--spacing-l);
}

/* Responsive Cookie */
@media (max-width: 768px) {
    .cookie-wrapper {
        flex-direction: column; /* In colonna su schermi piccoli */
        text-align: left;
        gap: var(--spacing-m);
    }

    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .btn-accept, .btn-reject {
        flex: 1; /* I bottoni si dividono lo spazio equamente su mobile */
        max-width: 200px;
    }
}

/* ============================ PAGINA 2: SERVIZI ================================== */

/* --- SEZIONE 1: CARD --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.service-card {
    background-color: var(--bg-sub); 
    padding: var(--spacing-xl);
    border-radius: 0 var(--radius-xl) 0 var(--radius-xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    transition: all 0.3s ease;
}
/*
.service-card:hover {
    transform: translateY(-5px); } /* Un piccolo tocco interattivo */

.card-image {
    width: 100%;
    aspect-ratio: 1 / 1; /* Forza il rapporto quadrato */
    overflow: hidden;
    border-radius: 0 var(--radius-m) 0 var(--radius-m); 
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Evita che l'immagine si schiacci */
}

.card-content h3 {
    margin-bottom: var(--spacing-xs);
    color: var(--text-strong);
}

.card-content p {
    color: var(--text-sub);
}

/* --- SPECIFICO SEZIONE SUPERFICI --- */
.superfici-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.superfici-list {
    padding-left: var(--spacing-l);
    list-style-type: disc; 
    color: var(--text-sub);
}

/* Responsive Card (In colonna)
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: 1fr 1fr; /* 2 colonne su tablet 
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr; /* 1 colonna su mobile 
    }
}*/

/* Responsive */
@media (max-width: 1120px) {        /* Tablet: 2x2 */
    .superfici-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-l);
    }
}

@media (max-width: 768px) {
    .services-grid {
        display: flex;          /* Trasformiamo la grid in un contenitore flessibile orizzontale */
        flex-wrap: nowrap;
        overflow-x: auto;       /* Attiva lo scorrimento orizzontale */
        scroll-snap-type: x mandatory; /* Effetto "calamita" sulle card */
        gap: var(--spacing-l);
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
        padding: var(--spacing-m) var(--spacing-xs); /* Padding laterale per non far toccare le card al bordo dello schermo */
        padding-left: clamp(20px, 6%, 80px);
        padding-right: clamp(20px, 6%, 80px);
        margin-left: 0;
        margin-right: 0;
        width: auto;
        grid-template-columns: none;
    }

    .superfici-grid {
        display: flex;          /* Trasformiamo la grid in un contenitore flessibile orizzontale */
        flex-wrap: nowrap;
        overflow-x: auto;       /* Attiva lo scorrimento orizzontale */
        scroll-snap-type: x mandatory; /* Effetto "calamita" sulle card */
        gap: var(--spacing-l);
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
        padding: var(--spacing-m) var(--spacing-xs); /* Padding laterale per non far toccare le card al bordo dello schermo */
        padding-left: clamp(20px, 6%, 80px);
        padding-right: clamp(20px, 6%, 80px);
        margin-left: 0;
        margin-right: 0;
        width: auto;
        grid-template-columns: none;
    }

    .services-grid::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    .superfici-grid::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    .service-card {         /* Definiamo quanto deve essere larga ogni card su mobile */
        min-width: 60vw; /* Per evitare che il contenuto forzi la grandezza */
        scroll-snap-align: center; /* La card si ferma al centro dello schermo */
        flex: 0 0 70vw; /* 80% della larghezza della finestra */
    }

    .card.image {
        width: 100%;
        aspect-ratio: 1/1;
        overflow: hidden;
    }
}

/* --- SEZIONE 2: Clientela --- */
/* Layout per la sezione Clientela */
.clientela-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Due colonne uguali */
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

/* Variante Orizzontale della Card */
.service-card--horizontal {
    background-color: var(--bg-sub);
    padding: var(--spacing-xl);
    border-radius: 0 var(--radius-l) 0 var(--radius-l);
    display: flex;
    align-items: center; /* Centra l'icona verticalmente rispetto al testo */
    gap: var(--spacing-xl);
    transition: transform 0.3s ease;
}

/* Box dell'icona arancione */
.card-icon-box {
    flex: 0 0 100px; /* Non cresce, non si restringe, fissa a 100px */
    width: 100px;
    height: 100px;
    background-color: var(--primary-strong); 
    border-radius: 0 var(--radius-m) 0 var(--radius-m);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-null); /* Colore dell'icona */
    overflow: hidden;   /* Evita che l'immagine esca dai bordi */
}

.card-icon-box img {
    width: 80px; /* Dimensione dell'icona dentro il box */
    height: 80px;
    object-fit: contain;
}

.service-card--horizontal .card-content {
    display: flex;
    flex-direction: column;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .clientela-grid {
        grid-template-columns: 1fr; /* Una sotto l'altra su tablet e mobile */
    }
}

@media (max-width: 480px) {
    .service-card--horizontal {
        flex-direction: column; /* Opzionale: se lo schermo è minuscolo, tornano in colonna */
        text-align: left;
        align-items: flex-start;
        gap: var(--spacing-xs);
    }
    
    .card-icon-box {
        flex: 0 0 80px;
        margin-bottom: var(--spacing-s);
        width: 80px;
        height: 80px;
        min-width: 80px;
        min-height: 80px;
    }

    .card-icon-box img {
        width: 64px;
        height: 64px;
    }
}

/* --- SEZIONE 3: Tecnologie (ampliamento) --- */
.tech-specs {
    margin-top: var(--spacing-l);
    border-top: 1px solid var(--bg-sub); /* Primo divider superiore */
}

.spec-item {
    padding: var(--spacing-l) 0;
    border-bottom: 1px solid var(--bg-sub); /* Divider tra le voci */
}

.spec-item h4 {
    color: var(--text-strong); 
    margin-bottom: var(--spacing-2xs);
}

.spec-item p {
    margin: 0;
    color: var(--text-strong);
}

.spec-list {     /* Stile elenco puntato nell'ultima voce */
    padding-left: var(--spacing-l);
    list-style-type: disc; 
    color: var(--text-strong);
}

/* Responsive tabella */
@media (max-width: 768px) {
    .tech-specs {
        margin-top: var(--spacing-l);
    }
}

/* --- SEZIONE 4: Processo --- */
.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonne su desktop */
    gap: var(--spacing-2xl);
    margin-top: var(--spacing-2xl);
}

.process-card {
    background-color: var(--bg-sub);
    padding: var(--spacing-xl);
    border-radius: 0 var(--radius-xl) 0 var(--radius-xl);
    display: flex;
    flex-direction: column; /* Torna verticale */
    align-items: flex-start; /* Tutto allineato a sinistra */
    gap: var(--spacing-m);
    transition: transform 0.3s ease;
}

.process-number-box {
    flex: 0 0 100px;
    width: 100px;
    height: 100px;
    background-color: var(--primary-strong); /* Lo stesso arancione di prima */
    border-radius: 0 var(--radius-m) 0 var(--radius-m);
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-step {
    color: var(--primary-soft);
    line-height: 1;
}

.process-content h3 {
    margin-bottom: var(--spacing-m);
    color: var(--text-strong);
}

.process-content p {
    color: var(--text-sub);
}

/* Responive processo */
@media (max-width: 992px) {
    .process-grid {
        grid-template-columns: 1fr 1fr; /* 2 colonne su tablet */
    }
}

@media (max-width: 768px) {
    .process-grid {
        grid-template-columns: 1fr; /* Una sotto l'altra su mobile */
    }
}


/* ============================ PAGINA 4: CONTATTI ================================== */

/* --- SEZIONE 1: CONTATTI --- */ 
.contatti-page-wrapper {
    display: flex;
    gap: var(--spacing-3xl);
    align-items: flex-start;
}

.form-main-column {
    flex: 1;
}

/* Sidebar Info */
.info-sidebar {
    width: 360px;
    flex-shrink: 0;
}

.map-container {
    width: 360px;
    height: 400px;
    border-radius: 0 var(--radius-l) 0 var(--radius-l);
    overflow: hidden;
    background-color: var(--bg-soft);
}
.sidebar-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-m);
    margin-top: var(--spacing-xl);
}
.detail-row {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-m);
    color: var(--text-strong);   
}
.detail-icon {
    width: 20px;
    height: 20px;
    color: var(--text-strong);
    flex-shrink: 0;
    margin-top: 2px;
    margin-left: var(--spacing-2xs);
}

.map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-2xl);
    background: linear-gradient(135deg, var(--bg-soft) 0%, var(--bg-sub) 100%);
    color: var(--text-soft);
}

.map-placeholder i {
    width: 32px;
    height: 32px;
    color: var(--primary-soft);
    margin-bottom: var(--spacing-s);
}

.map-container iframe {     /* Assicuriamoci che l'iframe inserito dinamicamente riempia il contenitore */
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Responsive contatti */
@media (max-width: 992px) {
    .contatti-page-wrapper {
        flex-direction: column; /* Inverte l'ordine visuale */
    }
    .info-sidebar {
        width: 100%;
        margin-bottom: var(--spacing-2xl);
    }
    .map-container {
        width: 100%;
        height: 400px; /* Un po' più bassa su mobile */
    }
    .map-container iframe {
        width: 100%;
    }
}


/* =================== ANIMAZIONI =================================== */
/* Gli elementi iniziano invisibili e leggermente abbassati */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

/* Quando la classe "active" viene aggiunta, tornano al loro posto */
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Riduce le animazioni per accessiblità */
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
}