@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* Impostazioni Base e Colori Premium */
:root {
    --primary-color: #0b2038; /* Blu Navy profondo */
    --accent-color: #d4af37; /* Oro elegante */
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --text-light: #666;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0; padding: 0;
    color: var(--text-color);
    line-height: 1.7;
    display: flex; flex-direction: column; min-height: 100vh;
    background-color: #fafafa;
}

h1, h2, h3 { color: var(--primary-color); font-weight: 700; }

/* Header e Logo */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    padding: 1rem 5%; display: flex; justify-content: space-between;
    align-items: center; position: sticky; top: 0; z-index: 1000;
}

/* Gestione del Logo Immagine */
.logo {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--primary-color);
    font-size: 1.5rem; font-weight: 700;
}
.logo img {
    height: 50px; /* Regola questa altezza in base al tuo logo */
    width: auto;
}

nav a {
    margin-left: 25px; text-decoration: none; color: var(--primary-color);
    font-weight: 600; font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}
nav a::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: -5px; left: 0; background-color: var(--accent-color);
    transition: width 0.3s ease;
}
nav a:hover::after, nav a.active::after { width: 100%; }
nav a:hover, nav a.active { color: var(--accent-color); }

/* Animazioni */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-up { animation: fadeInUp 0.8s ease-out forwards; }

/* Contenitori e Sezioni */
main { flex: 1; }
.container { padding: 5rem 5%; max-width: 1200px; margin: 0 auto; }

/* Griglie */
.grid { display: grid; gap: 40px; margin-top: 3rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); align-items: stretch; }

/* Stile Card Contatti & Servizi */
.contact-card {
    background: #fff; padding: 3rem; border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--accent-color);
}
.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

/* Icone Info Contatti */
.info-item {
    display: flex; align-items: flex-start; gap: 15px; margin-bottom: 20px;
}
.info-icon {
    background-color: var(--primary-color); color: var(--accent-color);
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; flex-shrink: 0;
}
.info-text h4 { margin: 0 0 5px 0; font-size: 1.1rem; }
.info-text p { margin: 0; color: var(--text-light); font-size: 0.95rem; }

/* Form Premium */
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { position: relative; }
.contact-form input, .contact-form textarea {
    width: 100%; padding: 15px; border: 1px solid #e0e0e0;
    border-radius: 8px; font-family: inherit; font-size: 1rem;
    background-color: #fcfcfc; transition: all 0.3s ease;
    box-sizing: border-box;
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: none; border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    background-color: #fff;
}
.btn {
    /* --- NUOVE REGOLE STRUTTURALI --- */
    display: inline-block; 
    box-sizing: border-box; 
    max-width: 100%; 
    text-align: center; 
    text-decoration: none; 
    
    /* --- IL TUO STILE ORIGINALE (intatto) --- */
    background: linear-gradient(135deg, var(--primary-color), #1a3a5f);
    color: white; 
    padding: 15px 30px; 
    border: none; 
    border-radius: 8px;
    cursor: pointer; 
    font-weight: 600; 
    font-size: 1.1rem;
    transition: all 0.3s ease; 
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(11, 32, 56, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(11, 32, 56, 0.3);
}

/* Footer */
footer {
    background-color: var(--primary-color); color: white;
    padding: 3rem 5% 2rem; text-align: center;
}

/* --- Cookie Banner Premium --- */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 900px;
    background: #fff;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(11, 32, 56, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    border-left: 5px solid var(--accent-color);
    gap: 20px;
    opacity: 1;
    transition: opacity 0.5s ease;
}
.cookie-text p { margin: 0; font-size: 0.9rem; color: var(--text-light); }
.cookie-text a { color: var(--accent-color); text-decoration: none; font-weight: 600; }
.cookie-text a:hover { text-decoration: underline; }

.cookie-buttons { display: flex; gap: 10px; flex-shrink: 0; }
.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Modifiche ai bottoni standard nel cookie banner per ridurli un po' */
.cookie-buttons .btn { padding: 10px 20px; font-size: 1rem; }

/* --- Hamburger Menu Icon (Nascosto su Desktop) --- */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001; /* Rimane sopra il menù aperto */
}
.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* --- Responsive & Mobile Menu --- */
@media (max-width: 768px) {
    /* Mostra l'hamburger */
    .hamburger { 
        display: flex; 
        margin-left: auto; /* Lo spinge tutto a destra se serve */
    }
    
    /* Stile per il menù a tendina */
    nav#nav-menu {
        display: flex;              /* Attiva la modalità flessibile */
        flex-direction: column;     /* IMPILA le voci verticalmente */
        position: absolute;
        top: 100%;                  /* Esattamente sotto l'header */
        left: 0;
        width: 100%;
        background-color: #ffffff;
        box-shadow: 0 10px 20px rgba(0,0,0,0.08);
        max-height: 0;              /* Altezza zero quando è chiuso */
        overflow: hidden;           /* Nasconde le voci quando è chiuso */
        transition: max-height 0.4s ease-out;
        padding: 0; 
        margin: 0;
    }
    /* Allarga il bottone al 100% su mobile */
    .btn {
        width: 100%;
    }
    /* Classe applicata dallo script quando clicchi l'hamburger */
    nav#nav-menu.open {
        max-height: 400px; 
        border-top: 2px solid var(--accent-color); /* Riga dorata carina che stacca l'header dal menù */
    }
    
    /* Stile per le singole voci impilate */
    nav#nav-menu a {
        margin: 0;
        padding: 18px 20px;          /* Più spazio per essere cliccate comodamente col dito */
        width: 100%;
        text-align: center;          /* Testo centrato */
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--primary-color);
        border-bottom: 1px solid #f0f0f0; /* Linea grigia chiarissima per separare le voci */
        box-sizing: border-box;
    }

    /* Rimuove la linea separatrice dall'ultima voce (Privacy) */
    nav#nav-menu a:last-child {
        border-bottom: none;
    }

    /* Effetto quando premi col dito / passi col mouse su mobile */
    nav#nav-menu a:hover, nav#nav-menu a.active {
        background-color: #fcfcfc;
        color: var(--accent-color);
    }
    
    /* Rimuove l'animazione della linea sotto il testo che usavamo su PC */
    nav#nav-menu a::after { 
        display: none; 
    }

    /* --- Animazione della X per l'hamburger --- */
    .hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.open span:nth-child(2) { opacity: 0; }
    .hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    
    /* --- Adattamenti generali per il testo su mobile --- */
    .grid-2 { grid-template-columns: 1fr; }
    .contact-card { padding: 2rem; }
    .split-text { padding: 2.5rem 1.5rem; } /* Testo un po' più stretto per far respirare la pagina su mobile */
}
/* Responsive Cookie Banner per Mobile */
@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column; /* Incolonna testo e bottoni */
        text-align: center; /* Centra il testo */
        bottom: 10px;
        width: 95%; /* Sfrutta quasi tutto lo schermo */
        padding: 15px; /* Riduciamo un po' lo spazio interno */
        gap: 15px;
        box-sizing: border-box;
    }
    .cookie-buttons { 
        width: 100%; 
        flex-direction: column; /* Incolonna i due bottoni */
        gap: 10px; 
    }
    .cookie-buttons .btn, 
    .cookie-buttons .btn-outline {
        width: 100%; /* I bottoni prendono tutta la larghezza, facilissimi da tappare */
        padding: 12px;
    }
}

/* --- Popup di Successo Invio Email --- */
.popup-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(11, 32, 56, 0.8);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(5px);
}
.popup-overlay.show {
    opacity: 1; visibility: visible;
}
.popup-content {
    background: #fff;
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    border-top: 5px solid var(--accent-color);
}
.popup-overlay.show .popup-content {
    transform: translateY(0);
}
.popup-icon {
    font-size: 4rem;
    color: #28a745; /* Verde successo */
    margin-bottom: 1rem;
}
.popup-content h3 { margin-top: 0; font-size: 1.5rem; color: var(--primary-color); }
.popup-content p { color: var(--text-light); margin-bottom: 2rem; }

