/* <=================== HOME.CSS - SOLO HOME PAGE ===================> */

/* INTRO ACQUERELLO */

#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Se vuoi lo sfondo generale più grigio, cambia #fff in #eee o #ccc qui sotto */
    background-color: #eeeeee; 
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: opacity 1.5s ease-out, visibility 1.5s;
}

.watercolor-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('img/castello2.png'); 
    background-size: cover;
    background-position: center;
    
    /* MODIFICHE PER LEGGIBILITÀ */
    opacity: 0.45; /* Rende l'immagine più trasparente (50%) */
    filter: grayscale(20%); /* Toglie un po' di colore per renderla più neutra */
    
    animation: gentleZoom 20s infinite alternate;
}

.intro-content {
    position: relative;
    z-index: 10;
    text-align: center;
    
    /* IL RIQUADRO BIANCO SALVA-VISTA */
    background-color: rgba(255, 255, 255, 0.05); /* Bianco all'85% di opacità */
    padding: 40px 60px; /* Spazio interno abbondante */
    border-radius: 15px; /* Angoli arrotondati */
    /*box-shadow: 0 10px 40px rgba(0,0,0,0.15); /* Ombra elegante per staccarlo dallo sfondo */
    /*border: 1px solid rgba(255,255,255,0.9); /* Bordino sottile */
    /*backdrop-filter: blur(5px); /* Effetto sfocato dietro il box (molto moderno) */
    
    /* Assicuriamoci che non sia più largo dello schermo su mobile */
    max-width: 90%; 
    margin: 0 auto;
}

/* Riduciamo un po' il padding su mobile */
@media (max-width: 768px) {
    .intro-content {
        padding: 30px 20px;
        width: 85%;
    }
    
    .intro-names {
        font-size: 3.5rem !important; /* Nome un po' più piccolo su mobile per stare nel box */
    }
}
.intro-names {
    font-family: 'Great Vibes', cursive !important;
    font-size: 6rem;
    color: var(--wine-color);
    margin: 0;
    font-weight: 400;
    text-shadow: 0px 0px 10px rgba(255,255,255,0.9);
    line-height: 1.2;
    text-transform: none !important; 
}

.intro-date {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    color: var(--wine-dark);
    margin-top: 5px;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: bold;
    text-shadow: 0px 0px 8px rgba(255,255,255,0.9);
}

.intro-btn {
    margin-top: 40px;
    display: inline-block;
    padding: 12px 40px;
    border: 1px solid var(--wine-color);
    color: var(--wine-color);
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    text-transform: uppercase;
    font-weight: bold;
}
.intro-btn:hover { background-color: var(--wine-color); color: white; }
.fade-out { opacity: 0; visibility: hidden; }
@keyframes gentleZoom { from { transform: scale(1); } to { transform: scale(1.1); } }

/* <=================== HERO SECTION ===================> */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh; 
    
    background-image: url('img/foto15.jpeg'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 20px;
    margin: 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); 
    z-index: 1;
}

.hero-section > * { position: relative; z-index: 2; }
.hero-photo-container { display: none; }

.hero-section h1 {
    color: white;
    font-size: 5rem;
    text-shadow: 2px 2px 15px rgba(0,0,0,0.6);
    margin-bottom: 10px;
    line-height: 1.1;
}

.hero-section h3 {
    color: #f4e9d3;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.6);
    font-size: 2rem;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.hero-details .big-date {
    color: white;
    font-size: 1.8rem;
    margin-top: 20px;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.6);
}

.hero-details .location-text {
    color: #ddd;
    font-size: 1.2rem;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-top: 10px;
    font-weight: 400;
}

/* COUNTDOWN */
#countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 60px;
    flex-wrap: wrap; 
}

.time-box {
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 15px 25px;
    border-radius: 15px;
    min-width: 90px;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.time-box span {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: white; 
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.time-box small {
    text-transform: uppercase;
    font-size: 0.8rem;
    color: #eee;
    letter-spacing: 1px;
    margin-top: 5px;
    display: block;
}

/* CARDS LOCATION */
.location-section {
    background-color: var(--bg-sage);
    padding: 60px 0;
}

.cards-container {
    display: flex;
    justify-content: center;
    gap: 40px; 
    flex-wrap: wrap; 
    padding: 20px 0;
}

.location-card {
    background-color: white;
    width: 100%;
    max-width: 450px; 
    border-radius: 15px;
    overflow: hidden; 
    text-decoration: none; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(92, 26, 32, 0.1);
    position: relative;
    display: block;
}

.location-card:hover { transform: translateY(-10px); box-shadow: 0 15px 35px rgba(92, 26, 32, 0.2); }
.card-image { width: 100%; height: 250px; position: relative; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.location-card:hover .card-image img { transform: scale(1.05); }

.card-badge {
    position: absolute; top: 15px; right: 15px;
    background-color: var(--wine-color); color: white;
    padding: 5px 15px; border-radius: 20px;
    font-family: 'Montserrat', sans-serif; font-weight: bold; font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.card-content { padding: 25px; text-align: center; }
.card-content h3 { margin-top: 0; margin-bottom: 10px; font-size: 1.6rem; }
.venue-name { font-family: 'Cinzel', serif; font-weight: bold; font-size: 1.1rem; color: var(--text-color); margin-bottom: 5px; }
.venue-address { font-family: 'Montserrat', sans-serif; color: #666; font-size: 0.95rem; margin-bottom: 20px; }
.click-cta {
    display: inline-block; color: var(--wine-color);
    font-family: 'Montserrat', sans-serif; font-weight: bold; font-size: 0.9rem;
    text-transform: uppercase; letter-spacing: 1px;
    border-bottom: 1px solid transparent; transition: 0.3s;
}
.location-card:hover .click-cta { border-bottom: 1px solid var(--wine-color); }

/* SEZIONI RSVP & REGALO */
.rsvp-section { background-color: var(--bg-sage); padding: 80px 20px; width: 100%; }
.gift-section { background-color: var(--bg-sage); text-align: center; padding: 80px 20px; width: 100%; }

.iban-card {
    background-color: white; padding: 30px;
    max-width: 600px; margin: 20px auto 60px auto;
    border: 2px dashed var(--wine-color); border-radius: 10px;
}
.iban-label { font-weight: bold; font-size: 1.2rem; color: var(--wine-color); }
.iban-number { font-family: 'Montserrat', monospace; font-size: 1.3rem; margin: 10px 0; word-break: break-all; font-weight: bold; }

/* MOSAICO MASONRY */
.mosaic-section {
    width: 100%; max-width: 1200px; margin: 0 auto;
    padding: 60px 20px 100px 20px; background: transparent;
}

.mosaic-grid { column-count: 4; column-gap: 15px; }

.mosaic-item {
    break-inside: avoid; margin-bottom: 15px;
    border-radius: 8px; overflow: hidden; position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}
.mosaic-item img { width: 100% !important; height: auto !important; display: block; }
.mosaic-item:hover { transform: scale(1.02); z-index: 2; }


/* <=================== MEDIA QUERY SPECIFICHE HOME ===================> */
@media (max-width: 768px) {
    /* HERO MOBILE */
    .hero-section {
        background-attachment: scroll; 
        min-height: 85vh;
        padding-top: 80px; 
    }
    
    .hero-section h1 { font-size: 3rem; }
    .hero-section h3 { font-size: 1.5rem; }
    .intro-names { font-size: 3.5rem; }

    /* COUNTDOWN LINEARE */
    #countdown {
        gap: 8px; 
        flex-wrap: nowrap; 
        width: 100%; 
        padding: 0 10px; 
    }

    .time-box { 
        min-width: auto; 
        flex: 1; 
        padding: 10px 5px; 
        margin: 0; 
    }
    
    .time-box span { font-size: 1.3rem; }
    .time-box small { font-size: 0.6rem; }
    
    /* MOSAICO 2 COLONNE */
    .mosaic-grid { column-count: 2; column-gap: 10px; }
    .mosaic-item { margin-bottom: 10px; }
}

/* <=== STILE INPUT PASSWORD (INTRO) ===> */
.access-box {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#access-code {
    padding: 10px 15px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    text-align: center;
    border: none;
    border-bottom: 2px solid var(--wine-color); /* Linea color vino sotto */
    background: rgba(255, 255, 255, 0.6); /* Sfondo semitrasparente */
    color: var(--wine-dark);
    outline: none;
    border-radius: 5px;
    width: 200px;
    transition: all 0.3s ease;
}

#access-code:focus {
    background: rgba(255, 255, 255, 0.9);
    width: 220px; /* Effetto allargamento quando scrivi */
}

/* Animazione "scossa" per errore */
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.shake-animation {
    animation: shake 0.4s ease-in-out;
    border-bottom: 2px solid red !important;
}