/* =========================================
   HERO SECTION - LA FINESTRA SPAZIALE
   ========================================= */

.hero-section {
    width: 100%;
    padding: 120px 20px 60px;
    display: flex;
    justify-content: center;
    background-color: #ffffff; 
}

.hero-card {
    position: relative;
    width: 100%;
    max-width: 1400px; 
    height: 82vh; 
    min-height: 600px;
    border-radius: 40px; 
    overflow: hidden; 
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.15); 
    opacity: 0;
    transform: translateY(40px);
    animation: fadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover; 
    object-position: center bottom; 
    z-index: 1;
    transform: scale(1.05);
    animation: smoothZoom 3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Contenitore Trasparente - Spostato verso l'alto */
.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    
    /* MODIFICA CHIAVE: Invece di centrarli perfettamente (finendo sulla luce), 
       li partiamo dall'alto e li spingiamo giù solo del 15% nello spazio scuro */
    justify-content: flex-start;
    padding-top: 15%; 
    padding-left: 20px;
    padding-right: 20px;
    text-align: center;
}

/* Il Brand (NexWebStudio) */
.hero-brand {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: clamp(0.7rem, 1.5vw, 1rem); /* Rimpicciolito */
    font-weight: 600;
    letter-spacing: 10px; /* Ancora più distanziato per eleganza */
    text-transform: uppercase;
    color: #ffffff;
    margin: 0 0 10px 0;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8); /* Ombra di sicurezza */
    opacity: 0;
    transform: translateY(15px);
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

/* Lo Slogan (Calligrafia) */
.hero-slogan {
    font-family: 'Snell Roundhand', 'Zapfino', 'Apple Chancery', 'Savoye LET', cursive;
    color: #ffffff;
    
    /* Rimpicciolito drasticamente per rientrare nello schermo */
    font-size: clamp(1.4rem, 2.5vw, 2.6rem); 
    font-weight: normal;
    margin: 0;
    
    /* MODIFICA CHIAVE: Permette al testo di andare a capo */
    white-space: normal; 
    max-width: 800px; /* Non lo fa allargare all'infinito su schermi grandi */
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8); /* Ombra profonda per staccarlo dalla luce */
    
    clip-path: inset(0 100% 0 0);
    animation: textWipe 3s cubic-bezier(0.25, 1, 0.5, 1) 0.8s forwards;
}

/* --- ANIMAZIONI --- */
@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes smoothZoom {
    to { transform: scale(1); }
}

@keyframes textWipe {
    to { clip-path: inset(0 0 0 0); }
}

/* =========================================
   RESPONSIVE MOBILE (Smartphone & Tablet)
   ========================================= */
@media (max-width: 768px) {
    /* 1. Uccidiamo lo spazio bianco: la sezione prende tutto lo schermo */
    .hero-section {
        padding: 0; 
        background-color: #000000; /* Fondo scuro di sicurezza */
    }
    
    /* 2. La Card perde gli angoli curvi e diventa alta quanto lo schermo (100vh) */
    .hero-card {
        height: 100vh; /* Altezza totale dello schermo */
        height: 100dvh; /* Supporto per i nuovi browser mobile (ignora la barra di ricerca) */
        border-radius: 0; /* Niente angoli tondi */
        box-shadow: none;
    }
    
    /* 3. Aggiungiamo un impercettibile velo scuro (overlay) all'immagine 
          SOLO su mobile per garantire che la navbar e i testi bianchi siano sempre leggibilissimi */
    .hero-overlay {
        padding-top: 0; 
        justify-content: center; /* Centriamo perfettamente i testi */
        background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.4) 100%);
    }

    /* 4. Testi proporzionati per il telefono */
    .hero-brand {
        letter-spacing: 6px; 
        font-size: 0.8rem;
        margin-bottom: 5px;
    }
    .hero-slogan {
        font-size: clamp(1.6rem, 7vw, 2rem);
        max-width: 90%;
    }
}
/* =========================================
   1. SEZIONE MANIFESTO
   ========================================= */
.manifesto-section {
    padding: 120px 20px;
    background-color: #ffffff;
    text-align: center;
}

.manifesto-container {
    max-width: 900px;
    margin: 0 auto;
}

.manifesto-section h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.5px;
    margin-bottom: 25px;
}

.manifesto-text {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: #515154;
    line-height: 1.6;
    margin: 0;
}

/* La parola futuro colorata col blu del brand */
.highlight-future {
    color: #2c3e50;
    font-weight: 600;
    position: relative;
}


/* =========================================
   2. SEZIONE ECOSISTEMA & DISPOSITIVI
   ========================================= */
.ecosystem-section {
    padding: 80px 20px 120px;
    background-color: #fbfbfd; /* Sfondo grigio carta tipico di Apple */
    border-top: 1px solid rgba(0,0,0,0.04);
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.ecosystem-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ecosystem-tag {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #2c3e50;
    margin-bottom: 15px;
    display: block;
}

.ecosystem-header h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 600;
    color: #1d1d1f;
    max-width: 850px;
    line-height: 1.3;
    margin-bottom: 60px;
}

/* Contenitore immagine con effetto sfumato sui bordi (Vignettatura hardware) */
.devices-wrapper {
    width: 100%;
    max-width: 1000px;
    margin-bottom: 50px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    background: #ffffff;
}

.devices-image {
    width: 100%;
    height: auto;
    display: block;
    /* Effetto sfumato pulito sui bordi */
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

/* Griglia delle Piattaforme */
.platforms-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

.platform-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1d1d1f;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.04);
}

/* ==========================================
   SEZIONE 2.4: BANNER REPORT GRATUITO
   ========================================== */
.free-report-banner {
    padding: 60px 20px;
    background-color: #fbfbfd; /* Si fonde con lo sfondo chiaro della home */
    display: flex;
    justify-content: center;
}

.banner-container {
    background: #ffffff;
    border: 1px solid #e5e5ea; /* Bordo grigio chiarissimo e pulito */
    border-radius: 24px;
    padding: 40px 60px;
    max-width: 1000px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02); /* Ombra quasi impercettibile */
}

.banner-content {
    flex: 1;
}

.banner-content h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.banner-content p {
    font-size: 1.15rem;
    color: #515154;
    line-height: 1.5;
    margin: 0;
}

.btn-report {
    display: inline-block;
    background-color: #1d1d1f;
    color: #ffffff;
    padding: 16px 32px;
    border-radius: 30px; /* Pulsante a pillola */
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-report:hover {
    background-color: #333336;
    transform: scale(1.03); /* Unico minuscolo effetto hover sul bottone */
}

/* --- Responsive per Cellulari e Tablet --- */
@media (max-width: 768px) {
    .banner-container {
        flex-direction: column;
        text-align: center;
        padding: 35px 25px;
    }
    
    .banner-content h2 {
        font-size: 1.8rem;
    }
    
    .banner-content p {
        font-size: 1.05rem;
    }
    
    .btn-report {
        width: 100%;
        box-sizing: border-box;
    }
}

/* =========================================
   SEZIONE 2.5: BIVIO DECISIONALE (GLI SCENARI)
   ========================================= */
.scenarios-section {
    padding: 100px 20px;
    background-color: #ffffff;
}

.scenarios-container {
    max-width: 1200px;
    margin: 0 auto;
}

.scenarios-header {
    text-align: center;
    margin-bottom: 70px;
}

.scenarios-header h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.scenarios-header p {
    font-size: 1.15rem;
    color: #86868b;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Griglia delle carte */
.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.scenario-card {
    background: #fbfbfd;
    border-radius: 30px;
    padding: 40px;
    text-align: left;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}

/* Effetto Hover (solo per Desktop/Mouse) */
@media (hover: hover) {
    .scenario-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(0,0,0,0.06);
        background: #ffffff;
    }
}

.scenario-icon-wrapper {
    width: 60px;
    height: 60px;
    background: #2c3e50; /* Il colore del tuo brand */
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.scenario-icon {
    width: 28px;
    height: 28px;
    color: #ffffff;
}

.scenario-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 15px;
}

.scenario-card p {
    font-size: 1rem;
    color: #515154;
    line-height: 1.6;
    margin: 0;
}

/* =========================================
   IL PONTE VERSO I SERVIZI (Banner Cliccabile)
   ========================================= */
.services-bridge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1d1d1f; /* Antracite Premium Apple */
    padding: 35px 50px;
    border-radius: 24px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.bridge-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bridge-tag {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.6);
}

.bridge-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #ffffff;
}

.bridge-arrow {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background 0.3s ease;
}

.bridge-arrow svg {
    width: 24px;
    height: 24px;
    color: #ffffff;
}

/* Animazione freccia al passaggio del mouse (PC) */
.services-bridge:hover .bridge-arrow {
    transform: translateX(10px);
    background: rgba(255,255,255,0.2);
}

/* =========================================
   MAGIA MOBILE (Tap Feedback & Adattamenti Apple)
   ========================================= */
@media (max-width: 768px) {
    .scenarios-section { padding: 60px 15px; }
    
    .scenarios-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .scenario-card {
        padding: 30px 25px;
        border-radius: 24px;
        /* Preparazione per l'effetto di tocco (Tap) */
        transform-origin: center;
    }
    
    /* Quando tocchi la carta col dito si "ritrae" */
    .scenario-card:active {
        transform: scale(0.96); 
        background: #f0f0f2;
    }

    .services-bridge {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
        gap: 20px;
    }

    .bridge-title {
        font-size: 1.3rem;
    }
    
    .bridge-arrow {
        /* La freccia punta verso il basso sul telefono */
        transform: rotate(90deg); 
        width: 45px;
        height: 45px;
    }
    
    /* Animazione "spinta giù" al tocco */
    .services-bridge:active .bridge-arrow {
        transform: rotate(90deg) translateY(5px);
    }
}

/* =========================================
   3. SEZIONE BENEFICI (CAROUSEL AUTOMATICO)
   ========================================= */
.benefits-section {
    padding: 120px 20px;
    background-color: #ffffff;
    overflow: hidden;
}

.benefits-container {
    max-width: 1200px;
    margin: 0 auto;
}

.benefits-header {
    text-align: center;
    margin-bottom: 50px;
}

.benefits-header h3 {
    font-size: 2.2rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 10px;
}

.benefits-header p {
    font-size: 1.1rem;
    color: #86868b;
    margin: 0;
}

/* Stile per i loghi SVG Originali */
.platform-icon {
    width: 20px;
    height: 20px;
    color: #1d1d1f; /* Grigio scuro/Nero Apple */
}

/* Struttura del Carousel orizzontale */
.benefits-carousel {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding: 20px 10px;
    scrollbar-width: none; 
    /* IMPORTANTE: Ho rimosso 'scroll-behavior: smooth' dal CSS. 
       Ora lo gestiamo nel JS per fare il loop invisibile */
}
.benefits-carousel::-webkit-scrollbar {
    display: none;
}

/* Le Card stile Bento Apple */
.benefit-card {
    min-width: 320px;
    max-width: 360px;
    flex: 1;
    background-color: #f5f5f7; /* Grigio chiaro pulito */
    padding: 40px 30px;
    border-radius: 28px;
    border: 1px solid rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 20px;
}

.benefit-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 12px;
}

.benefit-card p {
    font-size: 0.95rem;
    color: #515154;
    line-height: 1.5;
    margin: 0;
}
/* ==========================================
   STILI SEZIONE 4: FAQ (STILE APPLE - CARD MORBIDE)
========================================== */
.faq-section {
    padding: 100px 20px;
    background-color: #ffffff; /* Sfondo della pagina bianco puro */
    color: #1d1d1f;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.faq-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-header {
    text-align: center;
    margin-bottom: 70px;
}

.faq-header h3 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -0.02em;
    color: #1d1d1f;
}

.faq-header p {
    color: #86868b;
    font-size: 22px;
    font-weight: 400;
    margin: 0;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px; /* Spazio tra una domanda e l'altra */
}

/* --- LE CARD CON LA CURVATURA DELLA TUA FOTO --- */
.faq-item {
    border: none; /* Nessun bordo scuro */
    border-radius: 24px; /* Curvatura ampia e morbida come in foto */
    background-color: #f5f5f7; /* Il grigio chiarissimo di Apple */
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.faq-item:hover {
    background-color: #e8e8ed; /* Si scurisce appena quando ci passi sopra col mouse */
}

.faq-question {
    width: 100%;
    padding: 26px 30px;
    background: none;
    border: none;
    color: #1d1d1f;
    font-size: 20px;
    font-weight: 600;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.faq-icon {
    font-size: 28px;
    color: #86868b;
    font-weight: 300;
    transition: transform 0.3s ease, color 0.3s ease;
}

/* Animazione icona + quando si apre */
.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: #1d1d1f;
}

/* ANIMAZIONE ENTRATA E USCITA RISPOSTE */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 30px;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.4s ease;
}

.faq-answer p {
    color: #515154;
    font-size: 17px;
    line-height: 1.6;
    margin: 0;
}

/* Stato aperto della risposta */
.faq-item.active .faq-answer {
    max-height: 250px; 
    opacity: 1;
    padding: 0 30px 26px 30px;
}