:root {
    --primary: #DE9F2B;
    --dark: #121212;
    --light: #F9F8F6;
    --font-deco: 'Cinzel Decorative', serif;
    --font-sans: 'Montserrat', sans-serif;
}

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

body { 
    font-family: var(--font-sans); 
    background-color: var(--light); 
    color: var(--dark); 
    overflow-x: hidden; 
    line-height: 1.6; 
    padding-top: 60px; 
}

/* Menu Social Superiore */
.top-nav { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 60px; 
    background-color: rgba(18, 18, 18, 0.95); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 30px; 
    z-index: 2000; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.3); 
}

.nav-logo { 
    font-family: var(--font-deco); 
    color: var(--primary); 
    font-size: 1.1rem; 
    text-decoration: none; 
    letter-spacing: 1px; 
}

.nav-socials a { 
    color: #fff; 
    text-decoration: none; 
    margin-left: 20px; 
    font-size: 0.9rem; 
    font-weight: 600; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    transition: color 0.3s; 
}

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

/* Sezione Iniziale (Hero) */
.hero { 
    height: calc(100vh - 60px); 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    align-items: center; 
    text-align: center; 
    background: linear-gradient(rgba(18,18,18,0.5), rgba(18,18,18,0.5)), url('foto-divano.jpg') no-repeat center center/cover; 
    color: #fff; 
    padding: 0px 20px 40px 20px; 
}

.hero-logo { 
    max-width: 280px; 
    width: 65%; 
    height: auto; 
    margin-top: -15px; 
    filter: drop-shadow(2px 2px 6px rgba(0,0,0,0.4)); 
}

.hero-footer-content { 
    margin-top: auto; 
}

.hero p { 
    font-size: 1.3rem; 
    font-weight: 600; 
    letter-spacing: 2px; 
    margin-bottom: 15px; 
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8); 
}

.btn { 
    display: inline-block; 
    padding: 12px 30px; 
    background-color: var(--primary); 
    color: var(--dark); 
    text-decoration: none; 
    font-weight: 600; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    border-radius: 4px; 
    transition: all 0.3s ease; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); 
}

.btn:hover { 
    background-color: #fff; 
    transform: scale(1.05); 
}

/* Struttura Generale Sezioni */
.section { 
    padding: 80px 20px; 
    max-width: 1100px; 
    margin: 0 auto; 
    text-align: center; 
}

.section h2 { 
    font-family: var(--font-deco); 
    font-size: 2.3rem; 
    margin-bottom: 40px; 
    position: relative; 
    padding-bottom: 10px; 
}

.section h2::after { 
    content: ''; 
    width: 60px; 
    height: 3px; 
    background-color: var(--primary); 
    position: absolute; 
    bottom: 0; 
    left: 50%; 
    transform: translateX(-50%); 
}

.bio-text { 
    font-size: 1.15rem; 
    max-width: 800px; 
    margin: 0 auto; 
    text-align: justify; 
    text-justify: inter-word; 
}

/* Griglia dei Membri (Orizzontale per Desktop) */
.grid-container-scroll { 
    width: 100%; 
    overflow-x: auto; 
    padding-bottom: 15px; 
    -webkit-overflow-scrolling: touch; 
}

.grid { 
    display: flex; 
    justify-content: center; 
    gap: 20px; 
    margin-top: 20px; 
    width: max-content; 
    margin-left: auto; 
    margin-right: auto; 
    padding: 0 20px; 
}

.member-card { 
    background: #fff; 
    border-radius: 8px; 
    overflow: hidden; 
    width: 180px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    cursor: pointer; 
    transition: transform 0.3s; 
    flex-shrink: 0; 
}

.member-card:hover { 
    transform: translateY(-5px); 
}

.member-img { 
    width: 100%; 
    height: 200px; 
    background-color: #ddd; 
    object-fit: cover; 
    display: block; 
}

.member-info { 
    padding: 12px; 
}

.member-info h3 { 
    font-size: 1rem; 
    margin-bottom: 3px; 
}

.member-info p { 
    font-size: 0.8rem; 
    color: #777; 
}

/* Slider Automatico */
.slider-container { 
    position: relative; 
    max-width: 800px; 
    margin: 0 auto; 
    overflow: hidden; 
    border-radius: 8px; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.1); 
}

.slider { 
    display: flex; 
    width: 300%; 
    transition: transform 0.5s ease-in-out; 
}

.slide-img { 
    width: 33.333%; 
    height: 450px; 
    object-fit: cover; 
    background-color: #ccc; 
    display: block; 
}

/* Sezione Calendario Live */
.cal-container { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 40px; 
    align-items: center; 
    margin-top: 30px; 
    text-align: left; 
}

.cal-list { 
    flex: 1; 
    min-width: 300px; 
}

.cal-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px 0; 
    border-bottom: 1px solid #ddd; 
}

.cal-date { 
    font-weight: 600; 
    color: var(--primary); 
    width: 80px; 
}

.cal-details { 
    flex: 1; 
    padding: 0 15px; 
}

.cal-img { 
    flex: 1; 
    min-width: 300px; 
    height: 350px; 
    object-fit: cover; 
    border-radius: 8px; 
    background-color: #bbb; 
}

/* Finestre Popup */
.modal { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.7); 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    opacity: 0; 
    pointer-events: none; 
    transition: opacity 0.3s; 
    z-index: 3000; 
}

.modal.active { 
    opacity: 1; 
    pointer-events: auto; 
}

.modal-content { 
    background: #fff; 
    padding: 35px 25px; 
    border-radius: 8px; 
    max-width: 420px; 
    width: 90%; 
    text-align: center; 
    position: relative; 
    box-shadow: 0 5px 25px rgba(0,0,0,0.2); 
    max-height: 90vh; 
    overflow-y: auto; 
}

.modal-close { 
    position: absolute; 
    top: 10px; 
    right: 15px; 
    font-size: 32px; 
    cursor: pointer; 
    color: #999; 
    z-index: 10; 
}

.modal-pop-img { 
    width: 110px; 
    height: 110px; 
    object-fit: cover; 
    border-radius: 50%; 
    margin: 0 auto 15px auto; 
    display: block; 
    border: 3px solid var(--primary); 
    background-color: #eee; 
}

.modal h3 { 
    font-family: var(--font-deco); 
    margin-bottom: 5px; 
    color: var(--primary); 
    font-size: 1.6rem; 
}

.modal h4 { 
    color: #777; 
    margin-bottom: 15px; 
    font-weight: 400; 
    text-transform: uppercase; 
    font-size: 0.85rem; 
    letter-spacing: 1px; 
}

.modal p { 
    font-size: 0.95rem; 
    text-align: justify; 
    color: #444; 
    line-height: 1.5; 
}

/* Footer Fondopagina */
footer { 
    background-color: var(--dark); 
    color: #fff; 
    padding: 50px 20px; 
    text-align: center; 
}

.video-container { 
    display: flex; 
    justify-content: center; 
    gap: 20px; 
    flex-wrap: wrap; 
    margin-bottom: 30px; 
}

.video-box iframe { 
    width: 460px; 
    height: 259px; 
    max-width: 100%; 
    border: none; 
    border-radius: 4px; 
}

.copyright { 
    margin-top: 25px; 
    font-size: 0.8rem; 
    color: #555; 
}

/* ==========================================================================
   🎯 REGOLA RESPONSIVE: Ottimizzazione per Smartphone
   ========================================================================== */
@media (max-width: 768px) {
    body { padding-top: 50px; }
    .top-nav { height: 50px; padding: 0 15px; }
    .nav-logo { font-size: 1rem; }
    .nav-socials a { margin-left: 10px; font-size: 0.75rem; }

    .hero { padding: 0px 15px 30px 15px; }
    .hero-logo { max-width: 210px; margin-top: -10px; }
    .hero p { font-size: 1rem; letter-spacing: 1px; margin-bottom: 20px; }
    .btn { padding: 10px 22px; font-size: 0.85rem; }

    .section { padding: 50px 15px; }
    .section h2 { font-size: 1.8rem; margin-bottom: 25px; }
    .bio-text { font-size: 1rem; text-align: left; }

    /* Modifica strategica: toglie la riga orizzontale e mette i membri in colonna verticale */
    .grid-container-scroll { overflow-x: visible; }
    .grid { 
        flex-direction: column; /* Impila gli elementi in verticale */
        align-items: center; 
        width: 100%; 
        gap: 25px; 
        padding: 0; 
    }
    .member-card { 
        width: 240px; /* Diventano leggermente più grandi e facili da cliccare */
    }
    .member-img { 
        height: 250px; /* Foto proporzionate e ben visibili */
    }

    .slide-img { height: 260px; }

    /* Impila il calendario */
    .cal-container { flex-direction: column; gap: 25px; }
    .cal-list { width: 100%; }
    .cal-img { width: 100%; height: 240px; }

    .video-box iframe { width: 100%; height: 190px; }
}