:root {
    --primary: #06b6d4; /* Cyan accent */
    --dark: #0f172a;    /* Navy slate */
    --text: #334155;
    --white: #ffffff;
    --gray: #f1f5f9;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background-color: var(--white);
    padding-bottom: 70px; 
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Desktop */
.main-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 100px; 
    transition: box-shadow 0.3s ease;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    height: 100%;
    flex: 0 0 290px; 
    text-decoration: none;
}

.logo-img { height: 60px; width: auto; }

.logo-tagline {
    font-size: 0.75rem; 
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 3px;
    padding-left: 8px;
}

/* Navigazione Desktop: Spostata a Destra */
.nav-desktop {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end; 
}

.nav-desktop .nav-list {
    display: flex;
    list-style: none;
    gap: 35px;
    align-items: center;
}

.nav-desktop .nav-list a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.nav-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--text);
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.3s ease;
}

/* GESTIONE HOVER E CLASSE ACTIVE DESKTOP */
.nav-desktop .nav-list a:hover,
.nav-desktop .nav-list a.active {
    color: var(--primary);
}

.nav-desktop .nav-list a:hover .nav-icon,
.nav-desktop .nav-list a.active .nav-icon {
    stroke: var(--primary);
}

.btn-cta {
    background: var(--primary) !important;
    color: white !important;
    padding: 10px 22px;
    border-radius: 50px;
    transition: background 0.3s ease !important;
    text-decoration: none !important;
    display: inline-block;
}

.btn-cta:hover { background: #0891b2 !important; }
.btn-cta .nav-icon { stroke: white !important; display: none; } /* nascondiamo l'icona sul pulsante CTA se presente */

.header-spacer { display: none; }

/* Menu Mobile */
.nav-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 -2px 15px rgba(0,0,0,0.08);
    display: none; 
    z-index: 1001;
}

.mobile-nav-list {
    display: flex;
    justify-content: space-around;
    list-style: none;
    padding: 12px 0;
}

.mobile-nav-list a {
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mobile-nav-list .nav-icon {
    width: 22px;
    height: 22px;
    margin-bottom: 4px;
    stroke: var(--text);
}

/* GESTIONE CLASSE ACTIVE MOBILE */
.mobile-nav-list a:active, 
.mobile-nav-list a:focus,
.mobile-nav-list a.active {
    color: var(--primary);
}

.mobile-nav-list a:active .nav-icon,
.mobile-nav-list a:focus .nav-icon,
.mobile-nav-list a.active .nav-icon {
    stroke: var(--primary);
}

/* Responsive */
@media (max-width: 992px) {
    .nav-desktop { display: none; }
    .nav-mobile { display: block; }
    .main-header { height: 90px; } 
    .logo-container { flex: auto; align-items: center; text-align: center; }
    .logo-img { height: 55px; } 
    .logo-tagline { padding-left: 0; margin-top: 2px;}
    body { padding-bottom: 75px; }
}

@media (min-width: 993px) {
    body { padding-bottom: 0; }
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero-section {
    padding: 60px 0; /* Spazio respiro sopra e sotto */
    background-color: var(--white);
    overflow: hidden; /* Previene scroll orizzontali accidentali */
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

/* Colonna Testo */
.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    background-color: #e0f2fe; /* Azzurro chiarissimo */
    color: #0284c7; /* Azzurro scuro leggibile */
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 3.2rem;
    line-height: 1.15;
    color: var(--dark);
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: 35px;
    line-height: 1.7;
}

.hero-description strong {
    color: var(--dark);
}

/* Pulsanti Hero */
.hero-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.hero-btn {
    font-size: 1.05rem;
    padding: 14px 28px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 50px;
    border: 2px solid var(--border-color, #e2e8f0);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: var(--gray-light, #f8fafc);
}

/* Colonna Immagine */
.hero-image-wrapper {
    flex: 1;
    position: relative;
    /* Ratio per evitare CLS */
    aspect-ratio: 4 / 3; 
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ritaglia l'immagine riempiendo il box senza schiacciarla */
    display: block;
}

/* Responsive per Tablet e Smartphone */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column; /* Impila testo e immagine */
        text-align: center;
        gap: 40px;
    }

    .hero-content {
        max-width: 100%;
        text-align: left;
    }

    .hero-title {
        font-size: 2.5rem;
        text-align: left;
    }
    
    .hero-description {
        text-align: left; /* AGGIUNTO: allinea il testo a sinistra */
    }

    .hero-actions {
        justify-content: center; /* Centra i bottoni su mobile */
    }

    .hero-image-wrapper {
        width: 100%;
        max-width: 600px; /* Evita che diventi gigantesca sui tablet */
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-btn, .btn-secondary {
        width: 100%;
        text-align: center;
    }
}

/* =========================================
   SEZIONI CONTENUTO (H2 e Testi)
   ========================================= */
.content-section {
    padding: 70px 0;
    background-color: var(--white);
}

.content-section.bg-light {
    background-color: var(--gray-light); /* Alternanza colori di sfondo (#f8fafc) */
}

.section-container {
    max-width: 900px; /* Testo più stretto per una lettura ottimale su PC */
    margin: 0 auto;
}

.text-content h2 {
    font-family: var(--font-headings);
    font-size: 2.2rem;
    color: var(--dark);
    line-height: 1.2;
    margin-bottom: 25px;
    letter-spacing: -0.5px;
}

.text-content p {
    font-size: 1.1rem;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Stile per gli elenchi senza pallino */
.text-content ul {
    list-style-type: none;
    padding-left: 0; 
    margin-bottom: 20px;
}

.text-content li {
    margin-bottom: 15px; 
}

/* =========================================
   SEZIONE FAQ (Accordion Nativo)
   ========================================= */
.faq-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px auto;
}

.faq-header h2 {
    font-size: 2.2rem;
    color: var(--dark);
    margin-bottom: 15px;
}

.faq-header p {
    font-size: 1.1rem;
    color: var(--text);
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background-color: var(--white);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    overflow: hidden;
}

/* Nasconde il triangolino standard sui browser Webkit e standard */
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary { list-style: none; }

.faq-item summary {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--dark);
    padding: 20px;
    cursor: pointer;
    position: relative;
    padding-right: 40px;
    transition: background-color 0.2s ease;
}

.faq-item summary:hover {
    background-color: #f8fafc;
}

/* Icona + e - animata personalizzata (fatta con i bordi) */
.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    content: '−';
    transform: translateY(-50%) rotate(180deg);
}

.faq-answer {
    padding: 0 20px 20px 20px;
    color: var(--text);
    line-height: 1.7;
    border-top: 1px solid var(--gray-light);
    margin-top: 5px;
    padding-top: 15px;
}

/* =========================================
   CTA FINALE (Sfondo Azzurro #06b6d4)
   ========================================= */
.cta-final-section {
    background-color: var(--primary); /* Sfondo #06b6d4 */
    padding: 80px 0;
    text-align: center;
}

.cta-container {
    max-width: 800px;
    margin: 0 auto;
}

.cta-final-section h2 {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 20px;
    line-height: 1.2;
}

.cta-final-section p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Bottone Alternativo (Sfondo Bianco, Testo Azzurro) */
.btn-cta-alt {
    display: inline-block;
    background-color: var(--white);
    color: var(--primary);
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-cta-alt:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Bottone Outline (Bordo Bianco trasparente) */
.btn-cta-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: transparent;
    color: var(--white);
    font-weight: 600;
    padding: 12px 26px;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-cta-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
}

/* Responsive generale per queste sezioni */
@media (max-width: 768px) {
    .text-content h2, .faq-header h2, .cta-final-section h2 {
        font-size: 1.8rem;
    }
    
    .content-section {
        padding: 50px 0;
    }
    
    .cta-final-section {
        padding: 60px 0;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .btn-cta-alt, .btn-cta-outline {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================
   FOOTER
   ========================================= */
.main-footer {
    background-color: var(--dark); /* Sfondo blu notte / ardesia scuro */
    color: rgba(255, 255, 255, 0.7); /* Testo grigio chiaro per non affaticare la vista */
    padding-top: 60px;
    /* Lasciamo uno spazio inferiore per non far coprire il footer dal menu mobile */
    padding-bottom: 75px; 
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.brand-col {
    max-width: 380px;
}

.footer-logo {
    display: block;
    margin-bottom: 15px;
}

.footer-logo-img {
    height: 50px;
    width: auto;
    /* Questa regola trasforma automaticamente il tuo logo SVG in bianco, perfetto per lo sfondo scuro! */
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-vat {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.5px;
}

.links-col h3 {
    color: var(--white);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.links-col ul {
    list-style: none;
}

.links-col li {
    margin-bottom: 12px;
}

.links-col a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    display: inline-block;
}

.links-col a:hover {
    color: var(--primary); /* Si illumina di azzurro al passaggio del mouse */
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Linea divisoria sottile */
    padding: 25px 0 0 0;
    text-align: center;
    font-size: 0.85rem;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .brand-col {
        max-width: 100%;
        text-align: center;
    }

    .footer-logo-img {
        margin: 0 auto 15px auto;
    }

    .links-col {
        text-align: center;
    }
    
    /* Aumentiamo il padding su mobile in modo che l'ultimo testo non venga nascosto dal menu sticky inferiore */
    .main-footer {
        padding-bottom: 90px;
    }
}

@media (min-width: 993px) {
    .main-footer {
        padding-bottom: 0; /* Rimuove lo spazio extra se siamo su PC (dove non c'è il menu mobile in basso) */
    }
    .footer-bottom {
        padding-bottom: 25px; /* Aggiunge padding regolare sotto il copyright su desktop */
    }
}

/* =========================================
   PAGINA CONTATTI (Form e Recapiti)
   ========================================= */
.contact-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    align-items: flex-start;
}

.contact-info-col, .contact-form-col {
    flex: 1;
    min-width: 300px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--gray-light, #f8fafc);
    border-radius: 12px;
    border: 1px solid var(--border-color, #e2e8f0);
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-card h4 {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 5px;
}

.contact-link {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    text-decoration: none;
}

/* Modulo / Form */
.form-box {
    background: white;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color, #e2e8f0);
}

.form-group {
    margin-bottom: 18px;
}

.form-group-split {
    display: flex;
    gap: 18px;
}

.form-group-split .form-group {
    flex: 1;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--dark);
    background-color: #f8fafc;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Previene sbordamenti */
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
    background-color: white;
}

.form-feedback {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

.feedback-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.feedback-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

@media (max-width: 768px) {
    .form-group-split { flex-direction: column; gap: 0; }
    .form-box { padding: 25px 20px; }
}

/* =========================================
   BANNER COOKIE / PRIVACY FULL-PAGE
   ========================================= */
#cookie-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #ffffff;
    z-index: 990; /* L'header principale ha z-index 1000, quindi il banner si infila perfettamente sotto! */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-top: 80px; /* Lascia respiro sotto l'header */
    box-sizing: border-box;
    transition: opacity 0.4s ease;
}

.cookie-content {
    max-width: 600px;
    text-align: center;
}

.cookie-content h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: #000000;
}

.cookie-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.6;
    color: #000000;
}

.cookie-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.cookie-link {
    color: var(--primary, #06b6d4);
    text-decoration: underline;
    font-weight: 600;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .cookie-actions {
        flex-direction: column-reverse;
    }
}