/* ========================================= */
/* --- RESET E TYPOGRAPHY STILE APPLE --- */
/* ========================================= */
:root {
    --bg-color: #fbfbfd;
    --text-color: #1d1d1f;
    --secondary-text: #515154; /* Reso un po' più grigio Apple */
    --dark-text: #1d1d1f;
    --link-color: #06c;
    --card-bg: #ffffff;
}

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

html {
    scroll-behavior: smooth;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ========================================= */
/* --- NAVBAR TRASLUCIDA STILE APPLE --- */
/* ========================================= */
/* Sfondo della navbar a tutta pagina (100%) */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transition: all 0.3s ease;
}

/* Contenuto centrato e limitato a 1000px */
.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px; /* Margine di sicurezza per i cellulari */
}



.nav-logo img { 
    height: 30px; /* Adattato al tuo logo EHL/Slowfood */
 
}


.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #1d1d1f;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.2s, color 0.2s;
}

.nav-links a:hover {
    opacity: 1;
}

.nav-links a.active { 
    opacity: 1; 
    color: var(--link-color); 
}

/* --- HAMBURGER MENU (MOBILE) --- */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 10000;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ============================================================ */
/* --- HERO SECTION: OVERLAY SCURO E TESTO BIANCO GARANTITO --- */
/* ============================================================ */
.hero {
    position: relative; /* Serve per ancorare gli absolute */
    height: 100vh;
    width: 100%;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* LIVELLO 1: L'immagine */
.hero-bg-img {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    object-fit: cover; 
    z-index: 1; 
}

/* LIVELLO 2: L'Overlay Scuro (Il trucco per scurire l'immagine) */
.hero-overlay {
    position: absolute; /* Fondamentale! */
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2); /* 0.5 = 50% di nero. */
    z-index: 2; 
}

/* LIVELLO 3: Il Contenuto (Logo, H1, P) */
.hero-content {
    position: relative; /* Lo solleva sopra l'overlay */
    z-index: 3; 
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-hero-badge {
    display: inline-block;
    background-color: #F5F5F5; 
    padding: 20px; 
    border-radius: 20px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); 
    margin-bottom: 30px; 
}

.logo-hero-badge img {
    height: 100px; 
    width: auto;
    display: block; 
}

/* Colori forzati per la Hero */
.hero-content h1 { 
    font-size: 64px; 
    font-weight: 700; 
    letter-spacing: -0.01em;
    margin-bottom: 10px; 
    color: #ffffff !important; /* Forza il bianco */
    
}

.hero-content p { 
    font-size: 36px; 
    font-weight: 600;
    margin-bottom: 40px; 
    color: #ffffff !important; /* Forza il bianco */
    
}

/* Tabella di intro (Sotto la Hero) */
.hero-info-table {
    position: relative; 
    z-index: 10; 
    margin: -40px auto 40px auto; 
    width: 100%; 
    max-width: 600px; 
    border-collapse: separate; 
    border-spacing: 0; 
    background-color: #ffffff; 
    border: 1px solid rgba(0, 0, 0, 0.2); 
    border-radius: 24px; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.14); 
    overflow: hidden;
}

/* ========================================= */
/* --- STRUTTURA SEZIONI --- */
/* ========================================= */
section { 
    padding: 80px 40px; /* Aumentato padding top per via della navbar fixed */
    max-width: 1200px; 
    margin: 0 auto; 
}

.section-header { text-align: center; margin-bottom: 80px; }
.section-header h2 { font-size: 48px; font-weight: 600; margin-bottom: 16px; letter-spacing: -0.03em;}
.section-header p { font-size: 20px; color: var(--secondary-text); max-width: 800px; margin: 0 auto; }

/* ========================================= */
/* --- GRIGLIA E ALLINEAMENTO (SULLA STESSA RIGA) --- */
/* ========================================= */
.philosophy-grid-strong { 
    display: flex; 
    flex-direction: row; /* Forza le card a stare sulla stessa riga */
    gap: 40px; 
    justify-content: center; 
    align-items: stretch; /* Le fa alte tutte uguali */
    text-align: center; 
    margin-top: 60px; 
}

/* ========================================= */
/* --- LE CARD: COLORI SGARGIANTI APPLE --- */
/* ========================================= */
.philosophy-item-strong { 
    flex: 1; /* Divide lo spazio in 3 parti uguali */
    padding: 50px 35px;
    border-radius: 28px;
    
    /* Ombra più marcata per staccarle bene dal fondo */
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    
    /* Animazione fluida */
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
}

/* 1. Good: Rosso/Arancio Vivido (stile Apple Red) */
.philosophy-item-strong:nth-child(1) {
    background-color: #FF3B30; 
}

/* 2. Clean: Verde Brillante (stile Apple Green) */
.philosophy-item-strong:nth-child(2) {
    background-color: #34C759; 
}

/* 3. Fair: Blu Elettrico (stile Apple Blue) */
.philosophy-item-strong:nth-child(3) {
    background-color: #007AFF; 
}

/* --- TESTO BIANCO PER CONTRASTARE I COLORI FORTI --- */
.philosophy-item-strong h2 { 
    font-size: 32px; 
    margin-bottom: 20px; 
    font-weight: 700;
    color: #ffffff !important; /* Forza il bianco */
    letter-spacing: -0.03em;
}

.philosophy-item-strong p {
    font-size: 16px;
    line-height: 1.5;
    color: #ffffff !important; /* Forza il bianco */
    opacity: 0.95; /* Leggerissima trasparenza per eleganza */
}

/* Effetto Hover: la card si alza e l'ombra si espande */
.philosophy-item-strong:hover {
    transform: translateY(-15px) scale(1.02); 
    box-shadow: 0 30px 60px rgba(0,0,0,0.2); 
}

/* ========================================= */
/* --- RESPONSIVE: SOLO SU CELLULARE VANNO IN COLONNA --- */
/* ========================================= */
@media (max-width: 768px) {
    .philosophy-grid-strong {
        flex-direction: column; /* Su mobile si mettono una sopra l'altra per ragioni di spazio */
        gap: 25px;
    }
}

/* ========================================= */
/* --- CARDS (Bento Grid) --- */
/* ========================================= */
.bento-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.card {
    background: var(--card-bg); border-radius: 24px; overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.04); transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 40px rgba(0,0,0,0.08); }
.card-img-wrapper { width: 100%; height: 250px; background-color: #d1d1d6; display: flex; align-items: center; justify-content: center; }
.card img { width: 100%; height: 100%; object-fit: cover; }
.card-content { padding: 30px; flex-grow: 1; }
.card-content h3 { font-size: 24px; margin-bottom: 12px; }
.card-content p { color: var(--secondary-text); font-size: 15px; line-height: 1.4; }

.card-footer {
    padding: 15px 30px;
    border-top: 1px solid rgba(0,0,0,0.05);
    background-color: #E8E8E8;
    text-align: center;
}

.card-footer a {
    color: var(--dark-text); 
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: opacity 0.3s ease;
}

.card-footer a:hover { opacity: 0.6; text-decoration: underline; }

/* ========================================= */
/* --- TIMELINE E HOSTS --- */
/* ========================================= */
.timeline { max-width: 800px; margin: 0 auto; }
.day-block { margin-bottom: 60px; }
.day-block h3 { font-size: 28px; border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 10px; margin-bottom: 15px; }
.event { display: flex; margin-bottom: 8px; padding: 6px 0; border-bottom: 1px solid rgba(0,0,0,0.03); }
.event-time { flex: 0 0 80px; font-weight: 600; color: var(--secondary-text); }
.event-desc { flex: 1; text-align: left; }

.hosts-image { width: 100%; max-width: 400px; border-radius: 24px; margin: 40px auto; display: block; background-color: #d1d1d6; }

.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ========================================= */
/* --- FOOTER --- */
/* ========================================= */
.main-footer {
    background-color: #f5f5f7;
    padding: 60px 40px 20px 40px;
    border-top: 1px solid rgba(0,0,0,0.05);
    margin-top: 60px;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

.footer-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo { height: 70px; width: auto; margin-bottom: 20px; }

.footer-column h3 { font-size: 18px; color: var(--dark-text); margin-bottom: 10px; font-weight: 600; }
.footer-column p { font-size: 14px; color: var(--secondary-text); line-height: 1.6; margin-bottom: 15px; }
.footer-column a { color: var(--link-color); text-decoration: none; font-size: 14px; font-weight: 500; transition: opacity 0.3s ease; }
.footer-column a:hover { opacity: 0.7; text-decoration: underline; }

.footer-bottom {
    text-align: center;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.05);
    font-size: 12px;
    color: var(--secondary-text);
}

/* ========================================= */
/* --- UTILITY E MAPPA --- */
/* ========================================= */
img { max-width: 100%; height: auto; }

#map {
    width: 100%;
    max-width: 1000px;
    height: 500px;
    margin: 0 auto;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    background-color: #e5e5ea; 
}

/* Torna in alto */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--link-color);
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 9999;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.back-to-top:hover {
    transform: translateY(-5px);
    background-color: #0051a8;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* ========================================= */
/* --- RESPONSIVE (MOBILE) --- */
/* ========================================= */
@media (max-width: 768px) {
    nav { padding: 0 20px; }
    .hamburger { display: flex; }

    .nav-links { 
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.98); 
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 30px 0;
        gap: 30px;
        text-align: center;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        transform: translateY(-150%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.4s ease, opacity 0.4s ease;
    }

    .nav-links.nav-active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links a { font-size: 1.5rem; font-weight: 600; }

    .hamburger.toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .hamburger.toggle span:nth-child(2) { opacity: 0; }
    .hamburger.toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .hero-content h1 { font-size: 40px; }
    .hero-content p { font-size: 22px; }
    
    section { padding: 80px 20px; }
    .philosophy-grid { flex-direction: column; }
    .event { flex-direction: column; gap: 8px; }
    .event-time { flex: auto; }
    
    .footer-container { flex-direction: column; gap: 50px; }
    
    #map { height: 400px; }
}