/* ==========================================================================
   1. RESET & VARIABILI
   ========================================================================== */
:root {
    --rotary-blue: #00247D;
    --rotary-gold: #F7A81B;
    --header-top-height: 40px;
    
    /* MODIFICA: Aumentato da 90px a 120px (o quanto preferisci) */
    --header-main-height: 120px; 
    
    --text-dark: #333;
    --bg-light: #fff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    padding-top: calc(var(--header-top-height) + var(--header-main-height));
    overflow-x: hidden; /* Previene scroll orizzontale */
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }
h1, h2, h3 { font-family: 'Montserrat', serif; color: var(--rotary-blue); margin-bottom: 1rem; }

.container, .header-container, .footer-container {
    max-width: 1400px; margin: 0 auto; padding: 0 20px;
}

/* ==========================================================================
   2. HEADER
   ========================================================================== */
header.rotary-header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Top Bar */
.header-top-bar {
    background-color: var(--rotary-blue); height: var(--header-top-height);
    color: white; font-size: 13px; display: flex; align-items: center;
}
.top-bar-inner { display: flex; justify-content: space-between; width: 100%; }
.top-bar-left i { color: var(--rotary-gold); margin-right: 5px; }
.top-bar-right { display: flex; align-items: center; gap: 15px; }
.header-divider { width: 1px; height: 15px; background: rgba(255,255,255,0.3); }

/* Main Header */
.header-main {
    background-color: white; height: var(--header-main-height);
    border-bottom: 3px solid var(--rotary-gold); display: flex; align-items: center;
}
.header-main .header-container {
    display: flex; justify-content: space-between; align-items: center; width: 100%;
}

.logo-container img { 
    height: 90px; /* MODIFICA: Aumentato da 65px per riempire la barra più alta */
    width: auto; 
    display: block; 
}

/* Controlli Destra (Cerca + Hamburger) */
.header-controls-right {
    display: flex; align-items: center; gap: 20px;
}

.header-icon-button {
    background: none; border: none; font-size: 1.4rem; color: var(--rotary-blue); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.header-icon-button:hover { color: var(--rotary-gold); }

.hamburger-button { display: none; } /* Nascosto su desktop */
/* ==========================================================================
   3. MENU NAVIGAZIONE (Desktop) - BOLD DEFAULT
   ========================================================================== */
.main-nav > ul { 
    display: flex; 
    gap: 15px; 
    margin: 0; 
    padding: 0; 
    align-items: center; 
}

/* --- VOCE GENITORE --- */
.main-nav > ul > li {
    position: relative; 
    display: flex;      
    align-items: center;
    height: 100%;       
}

.main-nav > ul > li > a {
    display: flex;
    align-items: center;
    padding: 0 15px; /* Aumentato leggermente il padding laterale */
    font-weight: 700;
    text-transform: uppercase;
    
    /* MODIFICA: Aumentato font-size da 14px a 18px (o 20px) */
    font-size: 15px; 
    
    color: var(--text-dark);
    position: relative;
    height: 100%;       
    transition: color 0.2s ease;
}

/* --- EFFETTO HOVER (Solo colore Oro) --- */
.main-nav > ul > li:hover > a { 
    color: var(--rotary-gold); 
}

/* --- SOTTOMENU (Con margine e ponte) --- */
.submenu {
    display: none;
    position: absolute;
    /* Margine dal menu principale */
    top: calc(100% + 20px); 
    left: 0;
    
    background: white;
    min-width: 240px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-top: 3px solid var(--rotary-gold);
    
    padding: 10px 0;
    z-index: 1500;
    border-radius: 0 0 4px 4px;
}

/* PONTE INVISIBILE (Per non perdere l'hover col margine) */
.submenu::before {
    content: '';
    position: absolute;
    top: -25px; 
    left: 0;
    width: 100%;
    height: 25px; 
    background: transparent;
}

/* Freccetta decorativa */
.submenu::after {
    content: '';
    position: absolute;
    top: -8px; 
    left: 20px;
    width: 0; 
    height: 0; 
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--rotary-gold);
}

.main-nav ul li:hover .submenu { 
    display: block; 
}

/* Stile voci sottomenu */
.submenu li { display: block; width: 100%; }

.submenu li a {
    display: block;
    padding: 10px 20px;
    text-transform: none; 
    font-weight: 400; /* I sottomenu restano normali per gerarchia */
    color: #555;
    font-size: 14px;
    border-left: 3px solid transparent;
    line-height: 1.4;
}

/* Hover nel sottomenu */
.submenu li a:hover {
    background: #f9f9f9;
    color: var(--rotary-blue);
    border-left: 3px solid var(--rotary-gold);
}

.close-button { display: none; }
/* ==========================================================================
   4. MOBILE (Hamburger Menu & Overlay) - FIXED & CLEAN
   ========================================================================== */
@media (max-width: 1100px) {
    
    /* 1. Nascondi Top Bar */
    .header-top-bar { display: none; }
    
    /* 2. Adattamento Layout Header Mobile */
    body { padding-top: 80px; }
    .header-main { height: 80px; }
    
    /* Loghi più piccoli su mobile */
    .logo-container img { height: 40px; }
    .logo-left { margin-right: 5px; }
    .logo-right { margin-left: 5px; margin-right: 0; }

    /* 3. Hamburger Button (Visibile) */
    .hamburger-button {
        display: block; 
        background: none; border: none; 
        font-size: 1.8rem; color: var(--rotary-blue); 
        cursor: pointer; z-index: 2201; 
    }

    /* 4. MENU LATERALE (Sidebar) */
    .main-nav {
        position: fixed; 
        top: 0; 
        right: 0;
        width: 300px;         /* Larghezza fissa */
        max-width: 85%;       /* Non supera mai l'85% dello schermo */
        height: 100vh;
        background: #ffffff;  /* Sfondo bianco solido */
        z-index: 2202;        /* Sopra tutto */
        box-shadow: -5px 0 20px rgba(0,0,0,0.15); /* Ombra laterale marcata */
        
        /* Animazione Ingresso */
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        
        /* Layout Interno */
        padding-top: 70px;    /* Spazio per il bottone chiudi in alto */
        display: block !important; /* IMPORTANTE: Sovrascrive il flex del desktop */
        overflow-y: auto;     /* Scrollabile se troppo lungo */
    }

    /* 5. Overlay Scuro */
   /* Correzione Maschera Sfocatura */
.mobile-nav-overlay {
    display: none;
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    
    /* MODIFICA FONDAMENTALE: 
       Deve essere INFERIORE all'header (che è 1000) 
       altrimenti copre il menu che sta dentro l'header. */
    z-index: 990; 
    
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
}

    /* Stati Attivi (Gestiti via JS) */
    body.mobile-nav-active .main-nav { transform: translateX(0); }
    body.mobile-nav-active .mobile-nav-overlay { display: block; }
    body.mobile-nav-active { overflow: hidden; }

    /* 6. Pulsante Chiudi (X) */
    .close-button {
        display: flex; align-items: center; justify-content: center;
        position: absolute; 
        top: 20px; 
        right: 20px;
        width: 40px; height: 40px;
        background: #f4f4f4;
        border-radius: 50%;
        border: none;
        color: var(--rotary-blue);
        font-size: 1.5rem;
        cursor: pointer;
        transition: all 0.3s;
    }
    .close-button:hover { background: var(--rotary-blue); color: #fff; }

    /* 7. STILE LISTA MENU */
    .main-nav > ul { 
        display: flex; 
        flex-direction: column; /* Colonna verticale */
        width: 100%;
        gap: 0; 
        padding: 0; 
        margin: 0; 
    }
    
    .main-nav > ul > li { 
        width: 100%; 
        border-bottom: 1px solid #f0f0f0; /* Separatore leggero */
        display: block; 
        margin: 0;
    }

    /* Link Principali */
    .main-nav > ul > li > a { 
        display: flex;
        align-items: center;
        width: 100%;
        padding: 15px 25px; 
        font-size: 16px;
        font-weight: 700;
        color: var(--rotary-blue);
        background: #fff;
        text-transform: uppercase;
    }
    
    /* Rimuovi effetti desktop */
    .main-nav > ul > li > a::after { display: none !important; }

    /* 8. SOTTOMENU (Sempre visibili e ordinati) */
    .submenu {
        position: static !important; /* Non più flottante */
        display: block !important;
        width: 100%;
        box-shadow: none !important;
        border: none !important;
        background-color: #f8f9fa; /* Sfondo grigio chiaro per distinguere */
        padding: 10px 0;
        margin: 0;
    }
    
    .main-nav ul li:hover .submenu { display: block !important; }

    /* Link Sottomenu */
    .submenu li a {
        padding: 12px 25px 12px 40px; /* Rientro maggiore a sinistra */
        font-size: 14px;
        color: #555;
        font-weight: 500;
        border-left: 3px solid transparent; /* Reset bordo hover desktop */
    }

    .submenu li a:hover {
        background-color: #e9ecef;
        color: var(--rotary-blue);
    }
}

/* ==========================================================================
   5. FOOTER & OVERLAY SEARCH
   ========================================================================== */
.site-footer {
    background: #f4f4f4; padding: 50px 0 20px; border-top: 5px solid var(--rotary-blue); margin-top: 60px;
}
.footer-main { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer-col h3 { font-size: 1.1rem; border-bottom: 2px solid var(--rotary-gold); padding-bottom: 5px; display: inline-block; }
.footer-bottom { text-align: center; border-top: 1px solid #ddd; padding-top: 20px; font-size: 0.9rem; }
.social-icons a { margin-right: 10px; color: var(--rotary-blue); font-size: 1.2rem; }

@media (max-width: 768px) {
    .footer-main { grid-template-columns: 1fr; text-align: center; }
}

/* Overlay Ricerca */
.search-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 36, 125, 0.95); z-index: 2500;
    display: flex; justify-content: center; padding-top: 100px;
    opacity: 0; visibility: hidden; transition: all 0.3s;
}
.search-overlay.active { opacity: 1; visibility: visible; }
.search-overlay .close-button {
    position: absolute;
    top: 30px;
    right: 40px;
    background: transparent; /* Rimuove sfondo grigio */
    border: none;            /* Rimuove bordi */
    color: #fff;
    font-size: 2.5rem;       /* Dimensione icona */
    cursor: pointer;
    display: flex;           /* Centra l'icona */
    align-items: center;
    justify-content: center;
    width: 50px;             /* Area cliccabile definita */
    height: 50px;
    z-index: 2600;
    transition: color 0.3s ease;
}

.search-overlay .close-button:hover {
    color: var(--rotary-gold);
}
#search-overlay-input {
    width: 80%; background: transparent; border: none; border-bottom: 2px solid white;
    color: white; font-size: 2rem; padding: 10px; text-align: center; outline: none;
}
.search-overlay-results-container { color: white; margin-top: 30px; }

/* ==========================================================================
   4. SEZIONI DELLA HOMEPAGE (INDEX.CSHTML)
   ========================================================================== */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    background-size: cover;
    background-position: center;
    transition: background-image 1.5s ease-in-out;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
}

    .hero-content h1 {
        font-size: 4rem;
        margin-bottom: 1rem;
        font-weight: 700;
    }

    .hero-content p {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

.hero-search {
    display: flex;
    justify-content: center;
    gap: 10px;
}

    .hero-search button {
        background-color: #007bff;
        color: white;
        cursor: pointer;
        transition: background-color 0.3s ease;
        padding: 15px 25px;
        border: none;
        border-radius: 5px;
        font-size: 1.2rem;
    }

        .hero-search button:hover {
            background-color: #0056b3;
        }

.custom-select-wrapper {
    position: relative;
    width: 350px;
    user-select: none;
}

.select-selected {
    background-color: #fff;
    color: #555;
    padding: 15px 25px;
    border-radius: 5px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #fff;
}

    .select-selected::after {
        content: "";
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border: 6px solid transparent;
        border-color: #555 transparent transparent transparent;
        transition: transform 0.3s ease;
    }

.custom-select-wrapper.active .select-selected::after {
    transform: translateY(-50%) rotate(180deg);
}

.select-items {
    position: absolute;
    background-color: #fff;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    z-index: 99;
    border-radius: 5px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    list-style-type: none;
    max-height: 250px;
    overflow-y: auto;
}

.select-hide {
    display: none;
}

.select-items li {
    color: #333;
    padding: 15px 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: background-color 0.2s ease;
}

    .select-items li:hover {
        background-color: #f2f2f2;
    }

.select-items i {
    color: #007bff;
    width: 20px;
    text-align: center;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

    .section-title h2 {
        font-size: 2.8rem;
        font-weight: 700;
        color: #00247D;
        margin-bottom: 10px;
    }

    .section-title p {
        font-size: 1.2rem;
        color: #666;
        max-width: 90%;
        margin: 0 auto;
    }

.events-section {
    padding: 40px 0;
    background-color: #fff;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;  
    max-width:25%;
}


@media screen and (max-width: 768px) {
    .events-grid {
        max-width: 100%; /* Questo sovrascrive il 25% su mobile */
    }
}

.event-card {
    display: block;
    position: relative;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .event-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    }

.event-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}

.event-card:hover .event-card-image {
    transform: scale(1.05);
}

.event-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0) 100%);
    z-index: 1;
}

.event-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.event-date {
    background-color: rgba(0, 123, 255, 0.8);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.event-card-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color:#fff;
}

.event-card-cta {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.8;
    transition: opacity 0.3s ease, gap 0.3s ease;
}

    .event-card-cta .fa-arrow-right {
        transition: transform 0.3s ease;
    }

.event-card:hover .event-card-cta {
    opacity: 1;
    gap: 15px;
}

    .event-card:hover .event-card-cta .fa-arrow-right {
        transform: translateX(5px);
    }

.gallery-section {
    padding: 60px 0;
    background-color: #fff;
}

.masonry-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: 200px;
    grid-auto-flow: dense;
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s ease-out, filter 0.4s ease;
    }

    .gallery-item.tall {
        grid-row: span 2;
    }

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay i {
    font-size: 3rem;
    margin-bottom: 15px;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-item:hover .gallery-item-overlay i {
    transform: scale(1);
}

.gallery-item-overlay h3 {
    font-size: 1.2rem;
    text-align: center;
    padding: 0 10px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay h3 {
    transform: translateY(0);
}

.gallery-item:hover img {
    transform: scale(1.08);
    filter: blur(2px);
}

.feature-section {
    padding: 100px 0;
    background-color: #f8f9fa;
}

.feature-container {
    display: grid;
    grid-template-columns: 55% 45%;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-image-wrapper {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

    .feature-image-wrapper img {
        width: 100%;
        height: auto;
        display: block;
    }

.feature-content-wrapper {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    position: relative;
    z-index: 5;
    background-color: #ffffff;
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    transform: translateX(-100px);
}

.feature-tagline {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #007bff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
}

.feature-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.feature-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 30px;
}

.feature-cta-button {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

    .feature-cta-button:hover {
        background-color: #0056b3;
        transform: translateY(-3px);
        box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
    }

/* ==========================================================================
   5. PAGINA DETTAGLIO EVENTO (INDEX2.CSHTML)
   ========================================================================== */
.event-hero-section {
    height: 70vh;
    min-height: 500px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.event-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.event-hero-content {
    position: relative;
    z-index: 2;
    width: 90%;
}

.event-hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    margin: 20px 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.event-meta {
    display: flex;
    justify-content: center;
    gap: 15px 25px;
    flex-wrap: wrap;
}

.event-meta-item {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    backdrop-filter: blur(5px);
}

    .event-meta-item i {
        margin-right: 8px;
    }

.event-main-content {
    padding: 80px 0;
}

.event-layout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: flex-start;
}

.event-description h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.event-description h3 {
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
}

.event-description ul {
    list-style-position: inside;
    padding-left: 10px;
}

    .event-description ul li {
        margin-bottom: 10px;
    }

.event-sidebar {
    position: sticky;
    top: 120px;
}

.sidebar-widget {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

    .sidebar-widget h4 {
        margin-bottom: 15px;
        font-size: 1.2rem;
    }

.feature-cta-button.full-width {
    display: block;
    text-align: center;
}

.event-share-buttons {
    display: flex;
    gap: 15px;
}

    .event-share-buttons a {
        background-color: #e9ecef;
        color: #333;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-size: 1rem;
        transition: all 0.3s ease;
    }

        .event-share-buttons a:hover {
            background-color: #007bff;
            color: white;
            transform: translateY(-3px);
        }

.timeline-section {
    padding: 80px 0;
    background-color: #f8f9fa;
    overflow: hidden;
}

.event-timeline {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    position: relative;
    max-width: 800px;
}

    .event-timeline::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        width: 3px;
        height: 100%;
        background-color: #dee2e6;
        transform: translateX(-50%);
    }

    .event-timeline::after {
        content: "";
        display: table;
        clear: both;
    }

    .event-timeline li {
        position: relative;
        width: 50%;
        margin-bottom: 40px;
        padding: 10px 40px;
        box-sizing: border-box;
    }

        .event-timeline li:nth-child(odd) {
            float: left;
            clear: both;
            text-align: right;
        }

        .event-timeline li:nth-child(even) {
            float: right;
            clear: both;
            text-align: left;
        }

        .event-timeline li::after {
            content: '';
            position: absolute;
            top: 25px;
            width: 20px;
            height: 20px;
            background-color: white;
            border: 4px solid #007bff;
            border-radius: 50%;
            z-index: 1;
        }

        .event-timeline li:nth-child(odd)::after {
            right: -10px;
            transform: translate(50%, -50%);
        }

        .event-timeline li:nth-child(even)::after {
            left: -10px;
            transform: translate(-50%, -50%);
        }

.timeline-content {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-align: left;
    position: relative;
}

    .timeline-content::before {
        content: ' ';
        height: 0;
        position: absolute;
        top: 25px;
        width: 0;
        z-index: 1;
        border: medium solid white;
    }

.event-timeline li:nth-child(odd) .timeline-content::before {
    right: -15px;
    border-width: 10px 0 10px 15px;
    border-color: transparent transparent transparent white;
}

.event-timeline li:nth-child(even) .timeline-content::before {
    left: -15px;
    border-width: 10px 15px 10px 0;
    border-color: transparent white transparent transparent;
}

.timeline-content time {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 8px;
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.location-section {
    padding: 80px 0;
}

.location-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.location-map iframe {
    border-radius: 12px;
}

.location-info h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.location-info p {
    margin-bottom: 15px;
}

/* ==========================================================================
   6. PAGINA DETTAGLIO PRODOTTO (INDEX3.CSHTML)
   ========================================================================== */
.split-hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 90vh;
    min-height: 600px;
}

.split-hero-image {   
    background-size: cover;
    background-position: center;
    
}
.opacityActive {
    color:#d14d4d;    
}

.split-hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.content-wrapper {
    max-width: 80%;
}

.product-category {
    font-weight: 700;
    color: #007bff;
    letter-spacing: 1px;
}

.split-hero-content h1 {
    font-size: 3rem;
    margin: 10px 0 20px 0;
    line-height: 1.2;
}

.product-subtitle {
    font-size: 1.2rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 30px;
}

.product-key-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

    .product-key-info span {
        background: #eaeaea;
        padding: 5px 12px;
        border-radius: 20px;
        font-size: 0.9rem;
        color:#000;
    }

        .product-key-info span i {
            margin-right: 5px;
        }

.features-grid-section {
    padding: 80px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-item {
    text-align: center;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.feature-icon {
    font-size: 2.5rem;
    color: #007bff;
    margin-bottom: 20px;
}

.feature-item h3 {
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.stepper-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.stepper-timeline {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 800px;
    position: relative;
}

    .stepper-timeline::before {
        content: '';
        position: absolute;
        top: 20px;
        left: 20px;
        width: 2px;
        height: calc(100% - 20px);
        background-color: #dee2e6;
    }

.stepper-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 40px;
}

    .stepper-item::before {
        content: counter(step);
        counter-increment: step;
        position: absolute;
        left: 0;
        top: 0;
        width: 40px;
        height: 40px;
        background-color: #007bff;
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        font-size: 1.2rem;
    }

.stepper-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.cta-section {
    padding: 80px 0;
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    text-align: center;
}

.cta-content p {
    max-width: 600px;
    margin: 15px auto 30px auto;
    font-size: 1.2rem;
    opacity: 0.9;
}

.cta-price {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

    .cta-price span {
        font-size: 1rem;
        font-weight: 400;
        opacity: 0.8;
    }

.feature-cta-button.large {
    padding: 18px 40px;
    font-size: 1.2rem;
    background-color: #fff;
    color: #007bff;
}

    .feature-cta-button.large:hover {
        background-color: #e9ecef;
    }

/* ==========================================================================
   7. ANIMAZIONI ON-SCROLL
   ========================================================================== */
.is-visible {
    opacity: 1 !important;
    transform: none !important;
}

[class*="scroll-animate"] {
    opacity: 1;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-animate-up {
    transform: translateY(10px);
}

.scroll-animate-left {
    transform: translateX(40px);
}

.scroll-animate-right {
    transform: translateX(-40px);
}

.scroll-animate-zoom {
    transform: scale(0.9);
}

.event-timeline li.scroll-animate {
    opacity: 1;
}

.event-timeline li:nth-child(odd).scroll-animate {
    transform: translateX(-40px);
}

.event-timeline li:nth-child(even).scroll-animate {
    transform: translateX(40px);
}

@media (max-width: 992px) {
    /* Layouts a 2 colonne diventano a 1 colonna */
    .feature-container,
    .event-layout-grid,
    .location-grid,
    .split-hero-section {
        grid-template-columns: 1fr;
    }
    /* Sezione Feature (Homepage) */
    .feature-image-wrapper {
        grid-row: 1 / 2;
    }

    .feature-content-wrapper {
        grid-row: 2 / 3;
        transform: translateX(0);
        margin: -60px 20px 0 20px;
        padding: 40px;
    }

    .feature-title {
        font-size: 2rem;
    }
    /* Pagina Dettaglio Evento (Index2) */
    .event-sidebar {
        position: static;
        margin-top: 40px;
    }

    .location-info {
        text-align: center;
    }
    /* Pagina Dettaglio Prodotto (Index3) */
    .split-hero-section {
        height: auto;
    }

    .split-hero-image {
        height: 40vh;
        min-height: 300px;
    }

    .split-hero-content {
        padding: 50px 20px;
    }

        .split-hero-content h1 {
            font-size: 2.8rem;
        }
}

   /* STILI ESISTENTI (invariati) */
    .open-video-btn { padding: 10px 20px; font-size: 16px; cursor: pointer; background-color: #c4302b; color: white; border: none; border-radius: 5px; }
    .video-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(0, 0, 0, 0.85); display: none; justify-content: center; align-items: center; z-index: 1000; }
    .overlay-content { position: relative; background-color: #000; width: 90%; max-width: 800px; box-shadow: 0 4px 15px rgba(0,0,0,0.5); }
    .video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; }
    .video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
    .close-btn { position: absolute; top: -30px; right: 0; color: #fff; font-size: 35px; cursor: pointer; }

    .social-share-buttons {
    margin-top: 20px;
    text-align: left; /* Centra i pulsanti */
}

.share-button {
    display: inline-flex; /* Usa flexbox per centrare l'icona */
    align-items: center;
    justify-content: center;
    width: 40px; /* Larghezza e altezza fisse per un pulsante quadrato */
    height: 40px;
    margin: 5px; /* Spazio tra i pulsanti */
    border-radius: 50%; /* Rende i pulsanti rotondi */
    color: white;
    text-decoration: none;
    font-size: 18px; /* Dimensione dell'icona */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Transizioni per hover */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); /* Una leggera ombra per dare profondità */
}

.share-button:hover {
    transform: translateY(-2px); /* Effetto leggero al passaggio del mouse */
    opacity: 0.9;
}

/* Colori specifici per i social */
.facebook {
    background-color: #3b5998;
}

.twitter {
    background-color: #1da1f2;
}

.linkedin {
    background-color: #0077b5;
}

.email {
    background-color: #777; /* Colore generico per l'email */
}

@media (max-width: 768px) {
    .event-share-buttons {
        justify-content:center;
    }

    .event-timeline li:nth-child(odd).scroll-animate {
        transform:none;
    }

    .event-timeline li:nth-child(even).scroll-animate {
        transform:none;
    }

    .scroll-animate-right {
    transform: none;
}

     .scroll-animate-left {
    transform: none;
}

     .social-share-buttons {
    text-align: center; /* Centra i pulsanti */
}

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .hero-search {
        flex-direction: column;
        width: 90%;
        margin: 0 auto;
    }

    .custom-select-wrapper {
        width: 100%;
    }

    .section-title h2 {
        font-size: 2.2rem;
    }
    /* Pagina Dettaglio Evento (Index2) */
    .event-hero-section {
        background-attachment: scroll;
        height: auto;
        padding: 100px 0;
    }

    .event-hero-title {
        font-size: 2.8rem;
    }

    .event-timeline::before {
        left: 20px;
        transform: translateX(0);
    }

    .event-timeline li, .event-timeline li:nth-child(odd), .event-timeline li:nth-child(even) {
        width: 100%;
        float: none;
        clear: none;
        text-align: left;
        padding-left: 60px;
        padding-right: 15px;
    }

        .event-timeline li::after, .event-timeline li:nth-child(odd)::after, .event-timeline li:nth-child(even)::after {
            left: 20px;
            transform: translate(-50%, -50%);
        }

    .timeline-content::before {
        left: -15px;
        border-width: 10px 15px 10px 0;
        border-color: transparent white transparent transparent;
    }
    /* Pagina Dettaglio Prodotto (Index3) */
    .stepper-timeline::before {
        left: 15px;
    }

    .stepper-item {
        padding-left: 50px;
    }

        .stepper-item::before {
            width: 30px;
            height: 30px;
            font-size: 1rem;
            left: 0;
        }
}

@media (max-width: 576px) {
    .feature-content-wrapper {
        margin: -40px 10px 0 10px;
        padding: 30px;
    }

    .feature-title {
        font-size: 1.8rem;
    }

    .feature-description {
        font-size: 1rem;
    }
}

/* ==========================================================================
   NUOVO STILE: HORIZONTAL HERO STRIPS
   ========================================================================== */

/* Contenitore principale: non più griglia, ma colonna flessibile */
.events-list-container {
    display: flex;
    flex-direction: column;
    gap: 40px; /* Spazio tra le strisce */
    max-width: 1200px;
    margin: 0 auto;
}

/* La Striscia (Card Orizzontale) */
.event-strip-hero {
    display: flex; /* Layout orizzontale */
    width: 100%;
    height: 300px; /* Altezza fissa per desktop per un look "Hero" */
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    text-decoration: none; /* Rimuove sottolineatura link */
}

/* Effetto Hover sulla striscia */
.event-strip-hero:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 36, 125, 0.15); /* Ombra blu rotary leggera */
    border-color: var(--rotary-gold); /* Bordo oro al passaggio */
}

/* --- Parte Sinistra: Immagine --- */
.event-strip-image-wrapper {
    flex: 0 0 55%; /* L'immagine occupa il 55% della larghezza */
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 90% 100%, 0% 100%); /* Taglio diagonale creativo "Hero" */
}

.event-strip-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}

/* Zoom immagine all'hover */
.event-strip-hero:hover .event-strip-image {
    transform: scale(1.05);
}

/* --- Parte Destra: Contenuto --- */
.event-strip-content {
    flex: 1; /* Occupa il restante spazio */
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Spinge il titolo su e la CTA giù */
    background: #fff;
    position: relative;
}

/* Titolo */
.event-strip-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--rotary-blue);
    margin-bottom: 15px;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.event-strip-hero:hover .event-strip-title {
    color: var(--rotary-gold);
}

/* Call to Action (Pulsante) */
.event-strip-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-top: auto; /* Assicura che stia in fondo */
}

.event-strip-cta span {
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
}

.event-strip-cta i {
    color: var(--rotary-blue);
    transition: transform 0.3s ease;
    background: rgba(0, 36, 125, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Effetto Hover sulla CTA */
.event-strip-hero:hover .event-strip-cta span {
    border-color: var(--rotary-gold);
}

.event-strip-hero:hover .event-strip-cta i {
    transform: translateX(5px);
    background: var(--rotary-blue);
    color: #fff;
}

/* ==========================================================================
   RESPONSIVE (MOBILE)
   ========================================================================== */
@media (max-width: 992px) {
    .event-strip-image-wrapper {
        flex: 0 0 50%;
        clip-path: none; /* Rimuove il taglio diagonale su tablet per pulizia */
        border-right: 3px solid var(--rotary-gold);
    }
    
    .event-strip-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .events-list-container {
        gap: 30px;
    }

    .event-strip-hero {
        flex-direction: column; /* Diventa verticale su mobile */
        height: auto; /* Altezza automatica */
        min-height: 450px;
    }

    .event-strip-image-wrapper {
        flex: none;
        width: 100%;
        height: 250px; /* Altezza immagine su mobile */
        border-right: none;
        border-bottom: 3px solid var(--rotary-gold);
    }

    .event-strip-content {
        padding: 30px 25px;
    }

    .event-strip-title {
        font-size: 1.6rem;
    }

    /* Su mobile l'icona è sempre colorata per visibilità */
    .event-strip-cta i {
        background: var(--rotary-blue);
        color: #fff;
    }
}

/* ==========================================================================
   LISTA COMPATTA (STRISCE BASSE CON ICONA)
   ========================================================================== */

.events-compact-list {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Spazio ridotto tra le righe */
    max-width: 90%; /* Non serve larghissimo */
    margin: 0 auto;
}

.compact-strip-card {
    display: flex;
    align-items: center; /* Centra tutto verticalmente */
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px; /* Arrotondamento leggero */
    padding: 20px 30px; /* Padding interno gestisce l'altezza */
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    border-left: 5px solid transparent; /* Preparo per effetto hover */
}

/* --- HOVER EFFECT --- */
.compact-strip-card:hover {
    background-color: #fcfcfc;
    border-color: #ccc;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transform: translateX(5px); /* Spostamento leggero a destra */
    border-left-color: var(--rotary-gold); /* Linea oro a sinistra */
}

/* 1. STILE DELL'IMMAGINE "ICONA" */
.strip-icon-wrapper {
    flex-shrink: 0; /* Impedisce all'icona di schiacciarsi */
    width: 80px;    /* Larghezza fissa piccola */
    height: 80px;   /* Altezza fissa piccola */
    margin-right: 30px; /* Spazio tra icona e testo */
    background-color: #f4f4f4;
    border-radius: 12px; /* O 50% se la vuoi tonda */
    padding: 10px; /* Spazio interno se l'immagine è trasparente (opzionale) */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
}

.strip-icon-img {
    width: 100%;
    height: 100%;
    background-size: cover; /* O 'contain' se l'immagine è un logo vettoriale */
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px; /* Segue il contenitore */
}

/* 2. TESTO CENTRALE */
.strip-text-content {
    flex-grow: 1; /* Occupa tutto lo spazio disponibile */
}

.strip-title {
    margin: 0;
    font-size: 1.4rem; /* Font più piccolo rispetto alla Hero */
    font-weight: 600;
    color: var(--rotary-blue);
    transition: color 0.3s ease;
}

.strip-desc {
    margin: 10px 0px;
    font-size: 1rem; /* Font più piccolo rispetto alla Hero */
    font-weight: 600;
    color: rgba(0, 0, 0, 0.5);
    transition: color 0.3s ease;
}

.compact-strip-card:hover .strip-title {
    color: var(--rotary-gold);
}

/* 3. FRECCIA A DESTRA */
.strip-action-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    background: transparent;
    border-radius: 50%;
}

.compact-strip-card:hover .strip-action-icon {
    background-color: var(--rotary-blue);
    color: white;
    transform: translateX(5px);
}

/* ==========================================================================
   RESPONSIVE (MOBILE)
   ========================================================================== */
@media (max-width: 600px) {
    .compact-strip-card {
        padding: 15px;
        align-items: flex-start; /* Allinea in alto se il titolo va a capo */
    }

    .strip-icon-wrapper {
        width: 60px;
        height: 60px;
        margin-right: 15px;
        padding: 5px;
    }
    
    .strip-title {
        font-size: 1.1rem;
        line-height: 1.3;
        margin-top: 5px; /* Compensa allineamento */
    }

    .strip-action-icon {
        width: 30px;
        font-size: 1rem;
    }
}

.btn-soci-border {
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: #fff !important;
    padding: 5px 12px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1); /* Sfondo leggerissimo */
    transition: all 0.3s;
    display: inline-block;
}

.btn-soci-border:hover {
    background-color: #fff;
    color: #00246c !important; /* Testo diventa blu */
    border-color: #fff;
}

/* 4. Stile per il bottone Cerca nella barra blu (Top Bar) */
.btn-top-search {
    background: none;
    border: none;
    color: white; /* Bianco perché è su sfondo blu */
    font-size: 16px;
    cursor: pointer;
    margin-left: 15px;
    padding: 5px;
    transition: color 0.3s;
}

.btn-top-search:hover {
    color: var(--rotary-gold);
}

/* 5. Gestione Search su Mobile */
/* Poiché la barra blu sparisce su mobile, dobbiamo assicurarci che l'icona search
   rimanga visibile nella barra bianca SOLO su mobile */
.mobile-search-trigger {
    display: none; /* Nascosto su desktop */
}

@media (max-width: 1100px) {
    .mobile-search-trigger {
        display: flex; /* Visibile su mobile accanto all'hamburger */
    }
}

/* ==========================================================================
   LAYOUT DOPPIO LOGO
   ========================================================================== */

/* 1. Contenitore Flex Principale */
.header-main .header-container {
    display: flex;
    align-items: center;
    width: 100%;
}

/* 2. Menu al centro (Spinge loghi ai lati su Desktop) */
.main-nav {
    flex-grow: 1; /* Occupa lo spazio disponibile */
    display: flex;
    justify-content: center; /* Centra le voci del menu */
}

/* 3. Controlli (Cerca/Hamburger) sempre a destra */
.header-controls-right {
    margin-left: auto; /* Spinge forzatamente a destra */
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 4. Gestione Dimensioni Loghi */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10; /* Assicura che stiano sopra se serve */
}

.logo-container img {
    /* DESKTOP: Rimpiccioliti come richiesto */
    height: 55px; 
    width: auto;
    display: block;
    transition: all 0.3s ease;
}

/* Spaziatura Desktop */
.logo-left { margin-right: 20px; }
.logo-right { margin-left: 20px; }

/* ==========================================================================
   RESPONSIVE (MOBILE) - Loghi Consecutivi
   ========================================================================== */
@media (max-width: 1100px) {
    
    /* Ridimensiona loghi per farli stare vicini */
    .logo-container img {
        height: 40px; 
    }

    /* Rimuovi margini ampi e avvicina i loghi */
    .logo-left { 
        margin-right: 5px; 
    }
    
    .logo-right { 
        margin-left: 5px; 
        margin-right: 0;
    }

    /* 
       SPIEGAZIONE TECNICA MOBILE:
       Su mobile, la classe .main-nav diventa position: fixed (il menu laterale).
       Quindi esce dal flusso della barra header.
       
       Risultato automatico del flexbox:
       [Logo Left] [Logo Right] [Spazio Vuoto (margin-left:auto)] [Controlli]
       
       I loghi appariranno uno accanto all'altro a sinistra.
    */
}

/* ==========================================================================
   HERO CAROUSEL FULLSCREEN - CLEAN TEXT (NO BOX)
   ========================================================================== */

.hero-carousel-section {
    position: relative;
    width: 100%;
    height: 90vh; 
    min-height: 600px;
    background-color: #000;
}

.hero-fullscreen-slider {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* --- SFONDO E ANIMAZIONE KEN BURNS --- */
.slide-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 1;
    transform: scale(1);
    transition: transform 8s ease-in-out;
}

.swiper-slide-active .slide-bg {
    transform: scale(1.15);
}

/* 
   Overlay Scuro (FONDAMENTALE):
   Poiché non c'è il box, scuriamo leggermente di più l'immagine
   per far risaltare il testo bianco.
*/
.slide-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); /* 50% Nero */
    z-index: 2;
}

/* --- CONTENITORE CENTRALE --- */
.slide-container {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center; 
    justify-content: center; /* Centra Orizzontalmente */
    z-index: 3;
}

/* --- ELEMENTO TESTO (Senza Sfondo) --- */
.slide-card-box {
    /* RESET TOTALE DEL BOX */
    background: transparent; 
    box-shadow: none;
    border: none;
    backdrop-filter: none;
    
    padding: 0 20px; /* Solo padding laterale per non toccare i bordi su mobile */
    max-width: 900px;
    text-align: center; /* Testo Centrato */
    
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease-out;
    transition-delay: 0.3s;
}

.swiper-slide-active .slide-card-box {
    opacity: 1;
    transform: translateY(0);
}

/* --- TIPOGRAFIA (Con ombre per leggibilità) --- */

/* Titolo Grande */
.slide-card-box h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem; /* Molto grande */
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.1;
    /* Ombra testo forte per staccare dallo sfondo */
    text-shadow: 0 4px 20px rgba(0,0,0,0.6); 
}

/* Categoria / Sottotitolo (Oro) */
.slide-card-box .card-desc {
    color: var(--rotary-gold);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 4px; /* Spaziato */
    text-transform: uppercase;
    margin-bottom: 25px;
    display: block;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Paragrafo descrittivo */
.slide-card-box .card-text {
    font-size: 1.3rem;
    color: #f8f9fa; /* Bianco quasi puro */
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

/* --- BOTTONE (Pillola) --- */
.read-more-btn {
    display: inline-block;
    background-color: var(--rotary-gold); /* Bottone ORO */
    color: var(--rotary-blue);            /* Testo BLU */
    padding: 18px 45px;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); /* Ombra sotto il bottone */
    text-decoration: none;
    border: 2px solid var(--rotary-gold); /* Bordo invisibile ma utile per hover */
}

.read-more-btn:hover {
    background-color: transparent; /* Diventa trasparente */
    color: #fff;                   /* Testo bianco */
    border-color: #fff;            /* Bordo bianco */
    transform: translateY(-3px);
}

/* --- FRECCE --- */
.swiper-button-next, .swiper-button-prev {
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    height: 60px; width: 60px;
    top: 50%; transform: translateY(-50%);
}

.swiper-button-next::after, .swiper-button-prev::after {
    font-size: 3rem; font-weight: 300;
}

.swiper-button-next:hover, .swiper-button-prev:hover {
    color: var(--rotary-gold);
    transform: translateY(-50%) scale(1.1);
}
.swiper-button-prev { left: 30px; }
.swiper-button-next { right: 30px; }

/* --- PALLINI PAGINAZIONE --- */
.swiper-pagination-bullet {
    background: #fff; opacity: 0.5; width: 12px; height: 12px; margin: 0 8px !important;
}
.swiper-pagination-bullet-active {
    background: var(--rotary-gold); opacity: 1; transform: scale(1.2);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .hero-carousel-section { height: 100vh; }
    
    /* Ridimensionamento testi su mobile */
    .slide-card-box h3 { font-size: 2.2rem; }
    .slide-card-box .card-text { font-size: 1.1rem; }
    
    .swiper-button-next, .swiper-button-prev { display: none; }
}

/* ==========================================================================
   LOGIN AREA RISERVATA
   ========================================================================== */

.login-section {
    /* Occupa l'intera altezza meno header e footer, o min 80vh */
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Sfondo elegante: un grigio chiarissimo o un'immagine sfocata */
    background: #f4f6f9; 
    padding: 40px 20px;
    position: relative;
}

/* Opzionale: Background decorativo (es. texture o gradiente leggero) */
.login-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Gradiente obliquo Blu Rotary molto chiaro */
    background: linear-gradient(135deg, #eef2f8 0%, #e0e7f3 100%);
    z-index: 0;
}

.login-container {
    width: 100%;
    max-width: 450px; /* Larghezza massima card */
    position: relative;
    z-index: 1;
}

/* --- CARD LOGIN --- */
.login-card {
    background: #ffffff;
    padding: 50px 40px;
    border-radius: 12px;
    /* Ombra profonda simile alle card dello slider */
    box-shadow: 0 15px 35px rgba(0, 36, 125, 0.1);
    border-top: 5px solid var(--rotary-blue); /* Dettaglio brand */
    text-align: center;
    transition: transform 0.3s ease;
}

/* Effetto leggero all'hover sulla card intera */
.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 36, 125, 0.15);
}

/* --- HEADER CARD --- */
.login-header {
    margin-bottom: 30px;
}

.login-logo {
    height: 60px; /* Logo proporzionato */
    width: auto;
    margin-bottom: 20px;
}

.login-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    color: var(--rotary-blue);
    font-weight: 700;
    margin-bottom: 5px;
}

.login-header p {
    color: #666;
    font-size: 0.95rem;
}

/* --- CAMPI INPUT --- */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--rotary-blue);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

/* Icona dentro l'input */
.input-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 1rem;
    transition: color 0.3s;
}

.form-control {
    width: 100%;
    padding: 12px 15px 12px 45px; /* Padding a sinistra per l'icona */
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    background-color: #fcfcfc;
    transition: all 0.3s ease;
    outline: none;
    color: #333;
}

/* Focus State: Diventa Blu e Oro */
.form-control:focus {
    border-color: var(--rotary-blue);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 36, 125, 0.1);
}

.form-control:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--rotary-gold); /* L'icona si illumina */
}

/* --- BOTTONE LOGIN (Stile CTA Pillola) --- */
.form-action {
    margin-top: 30px;
    margin-bottom: 20px;
}

.login-btn {
    width: 100%;
    background-color: var(--rotary-blue);
    color: #fff;
    border: none;
    padding: 15px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1rem;
    border-radius: 50px; /* Pillola */
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 36, 125, 0.2);
}

.login-btn:hover {
    background-color: var(--rotary-gold);
    color: var(--rotary-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(247, 168, 27, 0.3);
}

/* --- LINK RECUPERO --- */
.login-footer {
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.forgot-link {
    color: #777;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-link:hover {
    color: var(--rotary-blue);
    text-decoration: underline;
}

/* Messaggi di Errore */
.login-error-message {
    color: #dc3545;
    background: #ffe6e6;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    margin-bottom: 15px;
    border-left: 3px solid #dc3545;
    text-align: left;
}

/* --- RESPONSIVE --- */
@media (max-width: 500px) {
    .login-card {
        padding: 30px 20px;
    }
    .login-header h2 {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   TABELLA SOCI (Style "Bellino")
   ========================================================================== */

.soci-list-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

/* --- BARRA SUPERIORE (Titolo e Cerca) --- */
.table-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Allinea in basso */
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
}

.table-top-bar .section-title {
    margin-bottom: 0;
    text-align: left;
}

.table-top-bar h2 {
    margin-bottom: 5px;
    font-size: 2rem;
}

/* Input di ricerca personalizzato */
.table-search-wrapper {
    position: relative;
    width: 300px;
}

.table-search-wrapper i {
    position: absolute;
    top: 50%; left: 15px;
    transform: translateY(-50%);
    color: #aaa;
}

.table-search-input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid #ddd;
    border-radius: 50px; /* Pillola */
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.3s;
    background: #fff;
}

.table-search-input:focus {
    border-color: var(--rotary-blue);
    box-shadow: 0 0 0 3px rgba(0, 36, 125, 0.1);
}

/* --- CONTENITORE CARD TABELLA --- */
.rotary-table-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    overflow: hidden; /* Taglia gli angoli della tabella */
    border: 1px solid rgba(0,0,0,0.05);
}

.rotary-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Inter', sans-serif;
}

/* --- HEADER TABELLA --- */
.rotary-table thead {
    background-color: var(--rotary-blue);
    color: #fff;
}

.rotary-table th {
    padding: 18px 20px;
    text-align: left;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* --- BODY TABELLA --- */
.rotary-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    color: #555;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.rotary-table tbody tr:hover td {
    background-color: #fcfcfc; /* Leggerissimo grigio all'hover */
}

.rotary-table tbody tr:last-child td {
    border-bottom: none; /* Niente riga sull'ultimo elemento */
}

/* Stili specifici celle */
.text-blue { color: var(--rotary-blue); }
.fw-bold { font-weight: 600; }
.text-right { text-align: right; }

/* --- AVATAR (FOTO) --- */
.member-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #e0e7f3; /* Sfondo se manca foto */
    display: flex; align-items: center; justify-content: center;
}

.member-avatar img {
    width: 100%; height: 100%; object-fit: cover;
}

.avatar-initials {
    font-weight: 700; color: var(--rotary-blue); font-size: 0.9rem;
}

/* --- BADGES STATO (Pillole) --- */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Varianti Colore Badge */
.status-badge.active {
    background-color: rgba(0, 36, 125, 0.1);
    color: var(--rotary-blue);
}

.status-badge.honorary {
    background-color: rgba(247, 168, 27, 0.15);
    color: #d48c00; /* Oro scuro per leggibilità */
}

.status-badge.inactive {
    background-color: #f0f0f0;
    color: #888;
}

/* --- BOTTONE AZIONE --- */
.btn-table-action {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 35px; height: 35px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 50%;
    color: var(--rotary-blue);
    transition: all 0.3s;
    text-decoration: none;
}

.btn-table-action:hover {
    background-color: var(--rotary-blue);
    color: #fff;
    border-color: var(--rotary-blue);
    transform: scale(1.1);
}

/* --- RESPONSIVE TABELLA --- */
/* Su mobile trasformiamo la tabella in una lista di card per leggibilità */
@media (max-width: 768px) {
    .table-top-bar { flex-direction: column; align-items: flex-start; }
    .table-search-wrapper { width: 100%; }

    .rotary-table thead { display: none; /* Nascondi intestazione */ }
    
    .rotary-table, .rotary-table tbody, .rotary-table tr, .rotary-table td {
        display: block; width: 100%;
    }

    .rotary-table tr {
        margin-bottom: 20px;
        border: 1px solid #eee;
        border-radius: 12px;
        background: #fff;
        padding: 10px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    .rotary-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 5px;
        border-bottom: 1px solid #f9f9f9;
        text-align: right;
    }
    
  .rotary-table-card {
    background: none;
    border-radius: 12px;
    box-shadow: none;
    overflow: hidden; /* Taglia gli angoli della tabella */
    border:none;
}

    /* Aggiunge etichette su mobile tramite attributo data-label (Opzionale) 
       Oppure layout semplificato come segue: */
    
    .member-avatar { width: 50px; height: 50px; margin-right: auto; }
}