:root {
    --primary-color: #3498DB;
    --secondary-color: #F9D907;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --white-color: #ffffff;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    line-height: 1.6;
    background: var(--white-color);
    color: var(--dark-color);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    color: #3498DB;
}

header {
    background: var(--white-color);
    padding: 1rem 0;
    border-bottom: 1px solid var(--light-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.logo h1 {
    margin: 0;
    font-size: 1.5rem;
}

.hamburger-btn {
    display: none; 
}

/* Menu in linea */
#mainMenu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex; /* Metti gli elementi in riga */
    gap: 20px;
}

#mainMenu a {
    text-decoration: none;
    color: #333;
    padding: 10px;
}

nav {
    display: flex;
    justify-content: flex-end; /* Allinea il menu a destra */
}

nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}

nav li {
    margin-left: 20px;
}

nav a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--primary-color);
}

.language-switcher a {
    margin-left: 10px;
    text-decoration: none;
    color: var(--dark-color);
    padding: 5px 10px;
    border: 1px solid var(--dark-color);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.language-switcher a.active {
    background: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
}

#hero {
    background: var(--light-color);
    padding: 1rem 0;
    text-align: center;
    width: 100%;
    height: 600px;
    background-image: url('background.jpeg'); /* percorso dell'immagine */
    background-size: cover;       /* adatta l'immagine a riempire il div */
    background-position: center;
    background-repeat: no-repeat; /* evita ripetizioni */
    background-color: rgba(255,255,255,0.4); /* bianco semitrasparente */
}

#hero h2 {
    font-size: 2rem;
    margin-top: 1rem;
    margin-bottom: 0rem;
    padding: 0;
    color: var(--white-color);
}

#hero p {
    margin-top: 28rem;
    font-size: 1.2rem;
    /*font-weight: bold;*/
    padding: 0;
    color: var(--white-color);
}

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

.btn:hover {
    background: #2980b9;
}

#servizi {
    padding: 1rem 0;
    margin: 0;
}

#servizi h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: #3498DB;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

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

.service-card h3 {
    margin-bottom: 0.5rem;
}

#come-funziona {
    background: #3498DB; /* rgba(183, 220, 243, 0.3) - 0.3 aggiunge opacità al colore di sfondo */
    padding: 1rem 0;
    margin: 0;
}

#come-funziona h2 {
    text-align: center;
    font-size: 2rem;
    padding: 1rem 0;
    margin: 0;
    color: #2A3645;
}

#come-funziona p {
    text-align: center;
    margin: 0;
    padding-bottom: 1rem;
    color: #2A3645;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.step {
    display: flex;
    align-items: center;
}

.step-content{
    margin: 0;
    padding: 0;
    color: #2A3645;
}

.step-content h3{
    margin-top: 1em;
    padding: 0;
}

.step-content p{
    margin: 0;
}

.step-number {
    width: 50px;
    height: 50px;
    background: rgba(183, 220, 243, 0.3);
    color: #2A3645;
    border-radius: 50%;
    border: 3px solid #2A3645;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
    margin-right: 20px;
}

#why-us {
    text-align: center;
    margin-top: 0em;
    padding: 1rem 0;
}

.why-us-content {
    display: flex;
    flex-direction: column; /* impila h2 e p uno sotto l’altro */
    align-items: center;    /* centra orizzontalmente */
    justify-content: center; /* centra verticalmente se necessario */
    padding: 1rem 0;
}

#why-us h2 {
  text-align: center; /* assicura che il testo sia centrato */
  font-size: 2rem;
  margin: 0;
  padding: 0;
}

#why-us p {
    text-align: center; /* assicura che il testo sia centrato */
}

.why-us-card .icon-wrapper {
    background-color: #FEF9E7;
    border-radius: 10px;
    display: inline-flex;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.why-us-card .icon-wrapper.no-bg {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.why-us-card .icon-wrapper.no-bg svg {
    stroke: var(--primary-color);
    height: 60px;
    width: 60px;
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.why-us-card {
    background: var(--white-color);
    border: 1px solid var(--light-color);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.why-us-card svg {
    stroke: var(--dark-color);
    height: 32px;
    width: 32px;
}

.why-us-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

#contatti {
    background: #247db9;
    padding: 1rem;
}

#contatti h2 {
    text-align: center;
    font-size: 2rem;
    color: #2A3645;
}

#contatti p {
    text-align: center;
    margin-bottom: 2rem;
    color: #2A3645;
}

.btn-contatti {
    display: inline-block;
    background: #2A3645;
    color: #3498DB;
    margin-bottom: 2em;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.btn-contatti:hover {
    background: #3498DB;
    color: #2A3645;
    border: 2px solid #2A3645;
}

form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

form input, form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
}

form textarea {
    resize: vertical;
    min-height: 150px;
    margin-bottom: 1rem;
}

form button {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 5px;
    background: var(--primary-color);
    color: var(--white-color);
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

form button:hover {
    background: #2980b9;
}

footer {
    background: var(--dark-color);
    color: var(--white-color);
    padding: 3rem 0 1rem;
}

.footer-columns {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-column {
    flex: 1;
    min-width: 200px;
}

.footer-column .logo {
    margin-bottom: 1rem;
}

.footer-column h3, .footer-column h4 {
    margin-top: 0;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    display: flex; 
    align-items: center; 
    gap: 6px;
    margin-bottom: 0.5rem;
    color: var(--white-color);
    font-size: 15px;
}

.footer-column a {
    text-decoration: none;
    color: var(--light-color);
    transition: color 0.3s ease;
    margin-bottom: 0.5em;
}

.footer-column a:hover {
    color: var(--primary-color);
}

table td {
    font-size: 15px;
}

.copyright {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 1rem;
}

#servizi .service-card svg {
    stroke: #3498DB;
    height: 60px;
    margin-bottom: 1rem;
}

/* Cookie Consent Popup */
#cookie-consent-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #2c3e50;
    color: #ecf0f1;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    z-index: 900;
}

.cookie-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-content p {
    margin: 0;
    flex-grow: 1;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    margin-left: 20px;
}

#cookie-consent-popup button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#accept-cookies {
    background-color: #3498DB;
    color: white;
}

#accept-cookies:hover {
    background-color: #2980b9;
}

#decline-cookies {
    background-color: #7f8c8d;
    color: white;
}

#decline-cookies:hover {
    background-color: #95a5a6;
}

.separator {
    /* Spazio intorno al separatore */
    margin: 0 10px; 
    font-size: 2em; /* Rende il separatore più visibile */
    color: white; /* Colore per il separatore */
}

#cookie-details-modal {
    /* Il valore deve essere PIÙ ALTO di quello del popup di consenso. */
    /* 1000 o superiore è uno standard per i modali */
    z-index: 1000; 
    position: fixed; /* O lo stile che usi per il tuo modal */
    /* ... altri stili ... */
}

/* Stile per l'overlay del popup (Modal) */
.modal {
    display: none; /* Inizialmente nascosto */
    position: fixed; /* Rimanere in posizione anche scorrendo */
    z-index: 1000; /* Stare sopra a tutto */
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%;
    overflow: auto; /* Abilita lo scroll se il contenuto è troppo lungo */
    background-color: rgba(0,0,0,0.4); /* Sfondo semi-trasparente */
}

/* Contenitore interno del contenuto */
.modal-content {
    background-color: #2A3645;
    margin: 5% auto; /* 10% dall'alto e centrato orizzontalmente */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Larghezza del popup */
    max-width: 600px;
    border-radius: 8px;
    position: relative;
}

.modal-content h2{
    font-size: 1em;
    color: #fefefe;
    margin: 0;
    padding-bottom: 0.5em;
}

.modal-content h3{
    font-size: 0.8em;
    color: #fefefe;
    margin: 0;
    padding: 0;
}
.modal-content p{
    font-size: 0.7em;
    color: #fefefe;
    margin: 0;
    padding-bottom: 0.5em;
}

.modal-content li{
    font-size: 0.7em;
    color: #fefefe;
    margin: 0;
    padding: 0;
}

.modal-content ul{
    margin: 0.5em;
    padding-left: 0.5em;
}

.modal-content a{
    font-weight: bold;
    color: #fefefe;
    font-size: 0.7em;
    margin: 0;
    padding: 0;
}

/* Pulsante di chiusura (X) */
.close-button {
    color: #fefefe;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}


/* ================================== */
/* STILE MOBILE (MediaQuery) */
/* ================================== */

/* Regola applicata a schermi più piccoli di 768px (o la tua breakpoint preferita) */
@media (max-width: 768px) {
    
    /* 1. MOSTRA L'HAMBURGER */
    .hamburger-btn {
        display: block; /* Rende il pulsante visibile */
        background: none;
        border: none;
        cursor: pointer;
        padding: 15px;
        position: relative;
        z-index: 100; /* Assicura che sia sopra il menu */
    }
    
    .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        background-color: #333;
    }

    /* 2. NASCONDI IL MENU PER DEFAULT */
    #mainMenu {
        /* Nasconde la lista e la posiziona */
        display: none; 
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh; /* Schermo intero */
        background-color: white; /* Sfondo del menu mobile */
        flex-direction: column; /* Metti gli elementi in colonna */
        align-items: center;
        justify-content: center;
        padding-top: 60px;
        z-index: 90;
    }

    #mainMenu a{
        font-size: 2em;
        font-weight: bold;
    }    
    /* 3. CLASSE PER MOSTRARE IL MENU (Aggiunta con JS) */
    .menu-open {
        display: flex !important; /* Mostra il menu quando questa classe è attiva */
    }

    .step {
        display: flex;
    }

    #come-funziona p {
        text-align: left;
        margin: 0;
        padding-bottom: 1rem;
        color: #2A3645;
    }
    /* 1. LAYOUT DEL CONTENUTO: FORZIAMO LA COLONNA */
    .cookie-content {
        flex-direction: column;
        align-items: stretch; /* Stira gli elementi su tutta la larghezza */
        text-align: center;
    }

    /* 2. NASCONDI ELEMENTI INGOMBRANTI */
    /* Il separatore verticale non ha senso su un layout a colonna */
    .separator {
        display: none; 
    }

    /* 3. TESTO E BOTTONI IN LINEA (per mobile) */
    .cookie-content p {
        /* Aumenta lo spazio in basso per separare dal testo successivo */
        margin-bottom: 10px; 
    }
    
    /* Sposta il link di dettaglio sopra i pulsanti principali */
    .cookie-button-link {
        order: 3;
        margin: 1em;
        margin: 1em;
    }

    /* I pulsanti di accettazione/rifiuto sono in una riga separata, centrati */
    .cookie-buttons {
        order: 4; /* Vengono dopo il link informativo */
        width: 100%;
        justify-content: center; /* Centra i due pulsanti in orizzontale */
    }

    /* Rendi i pulsanti più grandi per il tocco */
    #cookie-consent-popup button {
        padding: 10px 18px;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
        font-size: 16px;
    }

    header .container {
        flex-direction: column;
    }

    nav {
        margin-top: 1rem;
    }

    .about-us-content {
        flex-direction: column;
    }
}
