/* Palette Colori */
:root {
    --green-dark: #006633;
    --green-light: #009933;
    --bg-cream: #fdfcf9;
    --text-color: #5e7d5e;
    --gold: #d4af37;
    --nav-height: 50px; 
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Josefin Sans', sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-color);
    text-align: center;
    line-height: 1.4; 
}

section { scroll-margin-top: var(--nav-height); }

/* --- COUNTDOWN RIBBON (Desktop) --- */
.countdown-ribbon {
    position: absolute; 
    top: 5px; 
    left: 20px; 
    width: 60px; 
    height: 85px; 
    background-color: #d4af37;
    color: white; 
    z-index: 100;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.countdown-ribbon::after {
    content: ''; 
    position: absolute; 
    bottom: -19px; 
    left: 0;
    border-left: 30px solid #d4af37; 
    border-right: 30px solid #d4af37;
    border-bottom: 20px solid transparent;
}

/* --- HEADER & HERO DESKTOP --- */
.top-header { 
    position: relative !important; 
    padding: 5px 20px 5px !important; 
    text-align: center !important; 
    background-color: var(--bg-cream);
}

.wedding-names { 
    color: var(--green-dark); 
    font-size: 2.3rem; 
    font-weight: bold !important; 
    margin: 0 auto !important;
    display: block;
    line-height: 1.1;
}

.top-header p, .wedding-data {
    text-align: center !important;
    margin: 2px 0 0 0 !important; 
}

/* --- Modifica per Header Hero su Desktop/Big Screen --- */
.hero {
    background-image: url('img/villa.jpg');
    background-size: cover;  /* Mantiene la copertura completa */
    height: 85vh !important;  /* Aumentata da 70vh a 85vh */ /* Aumenta l'altezza per far respirare il logo */
    background-position: center 10% !important; 
    width: 100%; 
    margin-bottom: 10px; 
}

/* --- NAVBAR DESKTOP --- */
.navbar {
    background: white; 
    padding: 8px 0; 
    border-bottom: 1px solid #eee;
    position: sticky; 
    top: 0; 
    z-index: 1500; 
}
.navbar ul { list-style: none; display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; padding: 0 10px; }
.navbar ul li a {
    text-decoration: none;
    color: var(--green-light);
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 1.4rem; 
}
.navbar ul li a:hover, 
.navbar ul li a.active {
    color: #d4af37 !important;
    transform: translateY(-3px);
}

/* Sezioni e Immagini */
.container { width: 95%; max-width: 700px; margin: 0 auto; padding: 25px 0; }
.section-title { color: var(--green-dark); font-size: 2.2rem; margin-bottom: 15px; font-weight: bold; }
.media-container { width: 100%; display: flex; justify-content: center; margin: 20px 0; }
.img-responsive { max-width: 100%; height: auto; border-radius: 8px; }
.illustration { max-width: 100%; margin: 15px 0; }

.oro-divider {
    border: 0; height: 1px; width: 60%; margin: 40px auto; 
    background-image: linear-gradient(to right, transparent, var(--gold), transparent);
}

/* RSVP Form */
.wedding-form { max-width: 500px; margin: 20px auto; }
.wedding-form input[type="text"] {
    width: 100%; padding: 12px; border: 2px solid var(--green-dark);
    border-radius: 8px; font-size: 1rem; margin-bottom: 12px;
}
.radio-group { 
    text-align: left; background: white; padding: 15px; 
    border-radius: 12px; border: 5px solid #eee; margin: 15px 0; 
}
.radio-label { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; cursor: pointer; }

.btn-primary {
    display: inline-block; width: 100%; padding: 15px;
    background: transparent; border: 2px solid var(--green-dark);
    color: var(--green-dark); border-radius: 50px;
    font-weight: bold; cursor: pointer; transition: 0.3s; text-decoration: none;
}
.btn-primary:hover { background: var(--green-dark); color: white; }

/* Info Box & Mappa */
.info-box { max-width: 700px; margin: 0 auto; text-align: left; background: #fff; padding: 20px; border-left: 4px solid var(--gold); }
.btn-maps {
    display: inline-block; padding: 12px 25px; background: #2c3e50;
    color: white !important; border-radius: 50px; text-decoration: none; 
    font-weight: bold; transition: 0.3s;
}
.btn-maps:hover { background: var(--gold); transform: scale(1.05); }

/* Footer */
.main-footer { background: #f9f9f9;  margin-top: 30px; }
.footer-contact a { text-decoration: none; color: inherit; }
.footer-contact a:hover { color: var(--gold); }

/* WhatsApp */
.btn-whatsapp {
    display: inline-flex; align-items: center; gap: 10px; padding: 10px 20px;
    border: 1px solid #ddd; border-radius: 50px; text-decoration: none; color: #333; margin-top: 15px;
}
.btn-whatsapp:hover { border-color: #25D366; color: #25D366; }

.evidenziato-giallo { background: #fdfd96; padding: 2px 6px; border-radius: 4px; }

/* --- MEDIA QUERY MOBILE TOTALMENTE COMPATTA --- */
@media (max-width: 600px) {
    :root { 
        --nav-height: 42px; 
    }
    
    /* MODIFICATO: Cambiato contain in cover e ridotto l'altezza a 25vh per tagliare i vuoti bianchi */
    .hero { 
        height: 25vh !important; 
        background-size: cover !important; 
        background-position: center center !important; 
        margin-top: 0px !important; 
        margin-bottom: 0px !important; 
    }
    
    .top-header { 
        display: block !important;
        padding: 10px 10px 8px !important; 
        position: relative !important;
        min-height: auto !important;
    }
    
    .wedding-names { 
        font-size: 1.6rem !important; 
        font-weight: bold !important; 
        margin: 0 auto !important;
        padding: 0 10px 0 45px !important; 
        text-align: center !important;
        line-height: 1.2 !important;
    }

    .top-header p, .wedding-data {
        text-align: center !important;
        margin: 2px 0 0 0 !important;
        font-size: 1rem !important;
        padding-left: 35px !important;
    }

    .countdown-ribbon {
        position: absolute !important;
        top: 6px !important;
        left: 8px !important; 
        width: 40px !important;    
        height: 55px !important;   
        font-size: 0.55rem !important; 
        z-index: 1000 !important;
    }
    
    .countdown-ribbon::after {
        bottom: -10px !important;
        border-left-width: 20px !important;  
        border-right-width: 20px !important; 
        border-bottom-width: 10px !important;
    }

    /* MODIFICATO: Navbar ultra-compressa per eliminare ogni pixel vuoto */
    .navbar { 
        position: sticky; 
        top: 0; 
        padding: 4px 0 !important; 
        z-index: 2000;
    }

    .navbar ul { 
        gap: 8px !important; 
    }

    .navbar a { 
        font-size: 0.8rem !important; 
    }
    
    .container { 
        width: 90%; 
        padding: 10px 0; /* Ridotto il padding delle sezioni */
    }
    
    .section-title { 
        font-size: 1.4rem; 
        margin-bottom: 5px;
    }
}

/* --- GESTIONE ANCORAGGI --- */
#cerimonia,
#ricevimento,
#rsvp, 
#lista, 
#info {
  scroll-margin-top: calc(var(--nav-height) + 5px); 
}