/* ==========================================================================
   1. Base e Reset
   ========================================================================== */
:root {
    --text-gray-800: #1f2937;
    --gray-200: #e5e7eb;
}

*,
::before,
::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: var(--gray-200);
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

body {
    margin: 0;
    line-height: inherit;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text-gray-800);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: inherit;
    font-weight: inherit;
}

a {
    color: inherit;
    text-decoration: inherit;
}

img,
video {
    max-width: 100%;
    height: auto;
}

button,
input,
textarea,
select {
    font-family: inherit;
    font-size: 100%;
    margin: 0;
    padding: 0;
}

button {
    background-color: transparent;
    cursor: pointer;
}

textarea {
    resize: vertical;
}

/* ==========================================================================
   2. Classi di Utility (Traduzione di Tailwind)
   ========================================================================== */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.max-w-2xl {
    max-width: 42rem;
}

.max-w-3xl {
    max-width: 48rem;
}

.max-w-4xl {
    max-width: 56rem;
}

.flex {
    display: flex;
}

.inline-flex {
    display: inline-flex;
}

.grid {
    display: grid;
}

.hidden {
    display: none;
}

.flex-col {
    flex-direction: column;
}

.items-start {
    align-items: flex-start;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.gap-12 {
    gap: 3rem;
}

.space-y-2> :not([hidden])~ :not([hidden]) {
    margin-top: 0.5rem;
}

.space-y-3> :not([hidden])~ :not([hidden]) {
    margin-top: 0.75rem;
}

.space-y-4> :not([hidden])~ :not([hidden]) {
    margin-top: 1rem;
}

.space-x-5> :not([hidden])~ :not([hidden]) {
    margin-left: 1.25rem;
}

.space-x-6> :not([hidden])~ :not([hidden]) {
    margin-left: 1.5rem;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.font-bold {
    font-weight: 700;
}

.font-medium {
    font-weight: 500;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-center {
    text-align: center;
}

.underline {
    text-decoration-line: underline;
}

.italic {
    font-style: italic;
}

.bg-white {
    background-color: #fff;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.bg-gray-100 {
    background-color: #f3f4f6;
}

.bg-gray-800 {
    background-color: #1f2937;
}

.bg-gray-900 {
    background-color: #111827;
}

.bg-blue-600 {
    background-color: #2563eb;
}

.bg-blue-700 {
    background-color: #1d4ed8;
}

.bg-blue-800 {
    background-color: #1e40af;
}

.bg-green-500 {
    background-color: #22c55e;
}

.bg-green-600 {
    background-color: #16a34a;
}

.bg-green-800 {
    background-color: #065f46;
}

.text-white {
    color: #fff;
}

.text-gray-300 {
    color: #d1d5db;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-gray-600 {
    color: #4b5567;
}

.text-gray-700 {
    color: #374151;
}

.text-blue-400 {
    color: #60a5fa;
}

.text-blue-800 {
    color: #1e40af;
}

.text-green-100 {
    color: #dcfce7;
}

.text-green-300 {
    color: #86efac;
}

.text-green-400 {
    color: #4ade80;
}

.text-green-500 {
    color: #22c55e;
}

.text-green-600 {
    color: #16a34a;
}

.text-green-800 {
    color: #065f46;
}

.text-red-400 {
    color: #f87171;
}

.text-red-500 {
    color: #ef4444;
}

.text-yellow-400 {
    color: #facc15;
}

.hover\:bg-gray-100:hover {
    background-color: #f3f4f6;
}

.hover\:bg-green-600:hover {
    background-color: #16a34a;
}

.hover\:bg-green-700:hover {
    background-color: #15803d;
}

.hover\:bg-blue-700:hover {
    background-color: #1d4ed8;
}

.hover\:text-green-600:hover {
    color: #16a34a;
}

.hover\:text-white:hover {
    color: #fff;
}

.hover\:scale-105:hover {
    transform: scale(1.05);
}

.ml-auto {
    margin-left: auto;
}

.mr-2 {
    margin-right: 0.5rem;
}

.mr-3 {
    margin-right: 0.75rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-10 {
    margin-bottom: 2.5rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.my-2 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.px-10 {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.py-32 {
    padding-top: 8rem;
    padding-bottom: 8rem;
}

.pt-6 {
    padding-top: 1.5rem;
}

.h-10 {
    height: 2.5rem;
}

.h-16 {
    height: 4rem;
}

.h-48 {
    height: 12rem;
}

.h-64 {
    height: 16rem;
}

.h-96 {
    height: 24rem;
}

.w-full {
    width: 100%;
}

.sticky {
    position: sticky;
    top: 0;
    z-index: 50;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.border-t {
    border-top-width: 1px;
}

.border-gray-300 {
    border-color: #d1d5db;
}

.border-gray-800 {
    border-color: #1f2937;
}

.transition {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-300 {
    transition-duration: 300ms;
}

.transition-transform {
    transition-property: transform;
}

.form-checkbox {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 0;
    display: inline-block;
    vertical-align: middle;
    background-origin: border-box;
    user-select: none;
    flex-shrink: 0;
    height: 1rem;
    width: 1rem;
    color: #1e40af;
    background-color: #fff;
    border-color: #6b7280;
    border-width: 1px;
    border-radius: 0.25rem;
}

.overflow-hidden {
    overflow: hidden;
}

.object-cover {
    object-fit: cover;
}

.bg-opacity-10 {
    background-color: rgba(255, 255, 255, 0.1);
}

.opacity-70 {
    opacity: 0.7;
}

/* ==========================================================================
   3. Stili dei Componenti Custom
   ========================================================================== */
.hero-gradient {
    background: linear-gradient(135deg, rgba(0, 82, 159, 0.9) 0%, rgba(0, 159, 127, 0.9) 100%);
}

.countdown-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
}

.problem-solution-bg {
    background-color: #f0f4f8;
}

.problem-box {
    background-color: #fff2f2;
    border-left: 4px solid #ef4444;
}

.solution-box {
    background-color: #f0fdf4;
    border-left: 4px solid #22c55e;
}

.testimonial-card {
    background-color: rgba(255, 255, 255, 0.1);
}

.certification-badge {
    transition: all 0.3s ease;
}

.certification-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.hover\:shadow-md:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

/* --- CORREZIONE ICONE CON CERCHIO COLORATO --- */
.feature-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto;
}

.bg-blue-100 {
    background-color: #dbeafe;
}

.text-green-800 {
    color: #065f46;
}

.bg-green-100 {
    background-color: #dcfce7;
}

.bg-yellow-100 {
    background-color: #fef9c3;
}

.text-yellow-800 {
    color: #854d0e;
}

.bg-purple-100 {
    background-color: #f3e8ff;
}

.text-purple-800 {
    color: #6b21a8;
}

/* ==========================================================================
   4. Stili per le FAQ Interattive
   ========================================================================== */
.faq-item-new {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 700;
    color: #1e40af;
    background-color: #f9fafb;
    font-size: 1.125rem;
}

.faq-question:hover {
    background-color: #f3f4f6;
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: 700;
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    background-color: #fff;
}

.faq-answer p {
    padding: 0 1.5rem;
    line-height: 1.6;
}

.faq-item-new.active .faq-answer {
    max-height: 300px;
    padding: 1.5rem;
}

.faq-item-new.active .faq-toggle {
    transform: rotate(45deg);
}

/* ==========================================================================
   5. Media Queries per Classi Responsive
   ========================================================================== */
@media (min-width: 640px) {
    .sm\:flex-row {
        flex-direction: row;
    }

    .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .md\:flex {
        display: flex;
    }

    .md\:flex-row {
        flex-direction: row;
    }

    .md\:hidden {
        display: none;
    }

    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .md\:w-1\/2 {
        width: 50%;
    }

    .md\:text-left {
        text-align: left;
    }

    .md\:mt-0 {
        margin-top: 0;
    }

    .md\:mb-0 {
        margin-bottom: 0;
    }
}

@media (min-width: 1024px) {
    .lg\:flex-row {
        flex-direction: row;
    }

    .lg\:w-1\/2 {
        width: 50%;
    }

    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* ==========================================================================
   6. NUOVO CODICE PER HEADER E MENU FUNZIONANTE
   ========================================================================== */

/* Contenitore principale dell'header per allineare logo e menu */
.header-container {
    display: flex;
    justify-content: space-between;
    /* Spinge il logo a sx e il menu a dx */
    align-items: center;
    /* Allinea verticalmente logo e menu */
    height: 4rem;
    /* Altezza dell'header */
}

/* Lista dei link */
.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.nav-item>a {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: #4b5567;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s ease-in-out;
}

.nav-item>a:hover {
    color: #16a34a;
    /* Verde al passaggio del mouse */
}

.nav-item .fa-chevron-down {
    font-size: 0.7rem;
    margin-left: 0.25rem;
    transition: transform 0.3s ease-in-out;
}

/* --- STILI DESKTOP (da 768px in su) --- */
@media (min-width: 768px) {
    #hamburger-btn {
        display: none;
        /* Nasconde l'hamburger su desktop */
    }

    #header-nav {
        display: flex !important;
        /* Assicura che la navigazione sia visibile */
    }

    .nav-links {
        flex-direction: row;
    }

    .nav-item.dropdown {
        position: relative;
        /* Contenitore per il sottomenu */
    }

    .dropdown-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background: white;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        min-width: 220px;
        padding: 0.5rem 0;
        border-radius: 0.375rem;
        list-style: none;
        z-index: 10;
    }

    /* Mostra il sottomenu al passaggio del mouse */
    .nav-item.dropdown:hover>.dropdown-menu {
        display: block;
    }

    .dropdown-menu a {
        display: block;
        padding: 0.5rem 1rem;
        color: #374151;
        text-decoration: none;
    }

    .dropdown-menu a:hover {
        background-color: #f3f4f6;
    }
}

/* --- STILI MOBILE (fino a 767px) --- */
@media (max-width: 767px) {
    #header-nav {
        display: none;
        /* Nascosto di default su mobile */
        position: absolute;
        top: 4rem;
        /* Altezza dell'header */
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        z-index: 100;
        /* Assicura che sia sopra il resto del contenuto */
    }

    /* Classe che viene aggiunta da JS per mostrare il menu */
    #header-nav.nav-open {
        display: block;
    }

    .nav-links {
        flex-direction: column;
    }

    .nav-item {
        width: 100%;
    }

    .nav-item>a {
        justify-content: space-between;
        padding: 1rem;
        border-bottom: 1px solid #f3f4f6;
    }

    .dropdown-menu {
        display: none;
        /* Sottomenu nascosto di default */
        list-style: none;
        padding: 0;
        margin: 0;
        background-color: #f9fafb;
    }

    /* Classe che viene aggiunta da JS per mostrare il sottomenu */
    .nav-item.submenu-open>.dropdown-menu {
        display: block;
    }

    /* Ruota l'icona a freccia quando il sottomenu è aperto */
    .nav-item.submenu-open>a>i.fa-chevron-down {
        transform: rotate(180deg);
    }

    .dropdown-menu a {
        display: block;
        padding: 1rem 1rem 1rem 2rem;
        /* Indentatura */
        border-bottom: 1px solid #e5e7eb;
        color: #4b5567;
        text-decoration: none;
    }
}
/* ==========================================================================
   7. CLASSI AGGIUNTIVE PER PULSANTE WHATSAPP
   ========================================================================== */

.fixed {
    position: fixed;
}

.bottom-6 {
    bottom: 1.5rem;
    /* 24px */
}

.right-6 {
    right: 1.5rem;
    /* 24px */
}

.z-50 {
    z-index: 50;
}

.w-16 {
    width: 4rem;
    /* 64px */
}

.rounded-full {
    border-radius: 9999px;
}

.transform {
    transform: none;
}

.hover\:scale-110:hover {
    transform: scale(1.1);
}