/* ============================================================
   1. VARIABILI E BASE
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Luckiest+Guy&family=Quicksand:wght@400;600&display=swap');

:root {
    --primary-green: #2E8B57;
    --safari-orange: #FF8C00;
    --savanna-yellow: #FFFDD0;
    --dark-wood: #5D4037;
    --white: #ffffff;
}

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

body {
    font-family: 'Quicksand', sans-serif;
    background-color: var(--savanna-yellow);
    color: var(--dark-wood);
    text-align: center;
    overflow-x: hidden; /* Evita scroll orizzontali strani */
}

/* ============================================================
   2. HEADER E MENU
   ============================================================ */
header {
    background-color: var(--primary-green);
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    position: sticky;
    top: 0;
    z-index: 10000;
}

.safari-logo {
    color: white !important;
    font-family: 'Luckiest Guy', cursive;
    font-size: 2rem;
    text-decoration: none;
    text-align: left;
    letter-spacing: 4px;
}

#menuToggle { position: relative; z-index: 10001; }
#menuToggle input { 
    display: block; width: 40px; height: 32px; position: absolute; 
    top: -7px; left: -5px; cursor: pointer; opacity: 0; z-index: 2;
}
#menuToggle span { 
    display: block; width: 33px; height: 4px; margin-bottom: 5px; 
    background: white !important; border-radius: 3px; transition: 0.4s;
    position: relative; z-index: 1;
}

#menuToggle input:checked ~ span:nth-of-type(1) { transform: rotate(45deg) translate(5px, 5px); }
#menuToggle input:checked ~ span:nth-of-type(2) { opacity: 0; }
#menuToggle input:checked ~ span:nth-of-type(3) { transform: rotate(-45deg) translate(7px, -8px); }

#menu {
    position: fixed; width: 280px; height: 100vh; background: var(--primary-green);
    top: 0; right: 0; padding: 100px 40px; list-style: none;
    transform: translateX(100%); transition: 0.5s; box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    text-align: left !important;
}
#menuToggle input:checked ~ ul { transform: translateX(0); }
#menu li { padding: 10px 0; border-bottom: 1px dashed rgba(255,255,255,0.2); text-align: left !important; }
#menu li a { 
    color: white !important; font-family: 'Quicksand', sans-serif;
    font-weight: 600; font-size: 1.3rem; display: block; 
}

/* ============================================================
   3. HERO E TITOLI DI PAGINA
   ============================================================ */
.hero-safari {
    position: relative;
    width: 100%;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--primary-green);
    background-size: cover !important;
    background-position: center !important;
    box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.4);
    margin-bottom: 50px;
}

.hero-safari h1 {
    color: white !important;
    font-family: 'Luckiest Guy', cursive !important;
    font-size: 4rem;
    text-shadow: 3px 3px 0px rgba(0,0,0,0.5);
    z-index: 10;
    letter-spacing: 4px;
}

/* ============================================================
   3.5 RIPRISTINO GRIGLIA CARDS (Quello che mancava!)
   ============================================================ */
.features {
    padding: 40px 5%;
    display: flex;
    justify-content: center;
}

.grid-safari {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1200px;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 40px;
    border: 3px solid #eee;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.card:hover { transform: translateY(-10px); border-color: var(--safari-orange); }

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 25px;
    margin-bottom: 20px;
}

.card h3 { font-family: 'Luckiest Guy', cursive; color: var(--dark-wood); margin-bottom: 15px; }

/* ============================================================
   4. MODALI E PRIVACY
   ============================================================ */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9); display: none;
    justify-content: center; align-items: center; z-index: 20000;
}
.modal-content {
    background: var(--savanna-yellow) !important; padding: 40px; width: 90%; max-width: 600px;
    border-radius: 30px; border: 5px solid var(--primary-green);
    position: relative; max-height: 80vh; overflow-y: auto; text-align: left;
}
.modal-content *, .modal-content h3, .modal-content p { color: var(--dark-wood) !important;
}

/* ============================================================
   4.5. FIX X CHIUSURA (COOKIE & MODALI)
   ============================================================ */

/* La X del banner cookie */
.cookie-notice .close-modal {
    font-size: 35px !important; /* Molto più grande */
    color: white !important;    /* Sempre bianca */
    cursor: pointer;
    line-height: 1;
    margin-left: 15px;
    transition: transform 0.2s ease;
    display: inline-block;
}

/* La X delle finestre Privacy/Cookie */
.modal-content .close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 40px !important;
    color: var(--dark-wood) !important; /* Marrone legno per contrasto su crema */
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s ease;
}

/* Effetto ingrandimento quando ci passi sopra */
.close-modal:hover {
    transform: scale(1.2);
    filter: brightness(1.2);
}

/* ============================================================
   5. CONTATTI E FORM
   ============================================================ */
.contatti-section { width: 100%; display: flex; justify-content: center; padding: 50px 0; }
.safari-form {
    width: 95%; max-width: 550px; background: white; padding: 40px;
    border-radius: 40px; border: 4px solid var(--primary-green);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}
.form-group input, .form-group textarea {
    width: 100%; padding: 15px; border-radius: 20px; border: 2px solid #eee; margin-top: 10px;
}

/* ============================================================
   6. FOOTER E SOCIAL
   ============================================================ */
.footer-safari { background-color: var(--dark-wood); color: white; padding: 60px 5% 20px; margin-top: 50px; }
.footer-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 1200px; margin: 0 auto; }
.social-links { display: flex; justify-content: center; gap: 30px; margin: 20px 0; }
.social-icon i { font-size: 3.5rem !important; }
.facebook-color i { color: #1877F2 !important; }
.whatsapp-color i { color: #25D366 !important; }

/* ============================================================
   7. WHATSAPP flottante
   ============================================================ */
.wa-floating-btn {
    position: fixed !important; bottom: 80px !important; right: 15px !important;
    background-color: #25d366 !important; color: white !important;
    width: 50px !important; height: 50px !important; border-radius: 50% !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    z-index: 15000 !important; box-shadow: 2px 4px 15px rgba(0, 0, 0, 0.3);
    font-size: 35px !important;
    text-decoration: none !important;
}

a, .link-privacy, .modal-content a { color: var(--safari-orange) !important; text-decoration: underline !important; }
#menu li a, .footer-section a, .footer-bottom p, .safari-logo, .wa-floating-btn i { color: white !important; text-decoration: none !important; }

@media (max-width: 768px) {
    .footer-container { grid-template-columns: 1fr; }
    .hero-safari h1 { font-size: 2.5rem; }
}

/* ============================================================
   7. dove siamo flottante
   ============================================================ */
.dv-floating-btn {
    position: fixed !important; bottom: 160px !important; right: 15px !important;
    background-color: #2F4AC4 !important; color: white !important;
    width: 50px !important; height: 50px !important; border-radius: 50% !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    z-index: 15000 !important; box-shadow: 2px 4px 15px rgba(0, 0, 0, 0.3);
    font-size: 35px !important;
    text-decoration: none !important;
}

a, .link-privacy, .modal-content a { color: var(--safari-orange) !important; text-decoration: underline !important; }
#menu li a, .footer-section a, .footer-bottom p, .safari-logo, .dv-floating-btn i { color: white !important; text-decoration: none !important; }

@media (max-width: 768px) {
    .footer-container { grid-template-columns: 1fr; }
    .hero-safari h1 { font-size: 2.5rem; }
}

/* ============================================================
   8. COOKIE BANNER STYLE
   ============================================================ */
.cookie-notice {
    position: fixed;
    bottom: 20px;
    left: 5%;
    right: 5%;
    background: var(--dark-wood);
    color: white;
    padding: 20px 30px;
    border-radius: 25px;
    z-index: 16000; /* Sopra il pulsante WA */
    display: none; /* Inizialmente nascosto, gestito da JS */
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 2px solid var(--safari-orange);
}

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

.cookie-content p {
    font-size: 0.95rem;
    text-align: left;
    margin: 0;
    color: white !important;
}

.cookie-content a {
    color: var(--safari-orange) !important;
    text-decoration: underline;
    font-weight: bold;
}

.cookie-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-cookie {
    background: var(--safari-orange);
    color: white !important;
    border: none;
    padding: 10px 25px;
    border-radius: 50px;
    font-family: 'Luckiest Guy', cursive;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-cookie:hover {
    transform: scale(1.05);
}

.btn-invio-wa {
    text-decoration: none !important;
}

/* Mobile Fix */
@media (max-width: 768px) {
    .cookie-content { flex-direction: column; text-align: center; }
    .cookie-content p { text-align: center; }
}


.grid-3-moduli {
    display: grid;
    /* Crea 3 colonne uguali */
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Responsività per cellulari: li mette uno sotto l'altro */
@media (max-width: 900px) {
    .grid-3-moduli {
        grid-template-columns: 1fr;
    }
}

/* Nasconde il checkbox originale */
.custom-check-container input {
    display: none;
}

/* Stile base (quando NON è selezionato) */
.fake-checkbox {
    cursor: pointer;
    font-size: 20px;
    transition: 0.2s;
}

/* Icona quando NON è selezionato (Bianca/Grigia) */
.fake-checkbox::before {
    content: "⬜"; /* Oppure un'icona Awesome: content: "\f0c8"; font-family: "Font Awesome 5 Free"; */
}

/* Icona quando è SELEZIONATO (Verde) */
.custom-check-container input:checked + .fake-checkbox::before {
    content: "✅"; /* Oppure un'icona Awesome: content: "\f14a"; */
}

/* Effetto al passaggio del mouse */
.fake-checkbox:hover {
    transform: scale(1.2);
    filter: brightness(1.1);
}

/* Nasconde il checkbox originale */
.custom-check-container input {
    display: none;
}

/* Stile base (quando NON è selezionato) */
.fake-checkbox {
    cursor: pointer;
    font-size: 20px;
    transition: 0.2s;
}

/* Icona quando NON è selezionato (Bianca/Grigia) */
.fake-checkbox::before {
    content: "⬜"; /* Oppure un'icona Awesome: content: "\f0c8"; font-family: "Font Awesome 5 Free"; */
}

/* Icona quando è SELEZIONATO (Verde) */
.custom-check-container input:checked + .fake-checkbox::before {
    content: "✅"; /* Oppure un'icona Awesome: content: "\f14a"; */
}

/* Effetto al passaggio del mouse */
.fake-checkbox:hover {
    transform: scale(1.2);
    filter: brightness(1.1);
}