/* --- RESET --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-dark: #1a332d;
    --accent-cream: #fdfbd4;
    --glass-bg: rgba(253, 251, 212, 0.1);
    --glass-border: rgba(253, 251, 212, 0.2);
}

html, body { height: 100%; background-color: var(--bg-dark); }

body {
    font-family: 'Poppins', sans-serif;
    color: var(--accent-cream);
    padding: 40px; /* Ripristinato padding originale */
    display: flex;
    flex-direction: column;
}

body.loading { overflow: hidden; }

/* --- PRELOADER (SIPARIO) --- */
#preloader {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: var(--bg-dark); display: flex; justify-content: center; 
    align-items: center; z-index: 10000; transition: opacity 0.8s, visibility 0.8s;
}
.loader-content { width: 200px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.loader-logo { width: 100px; margin-bottom: 25px; animation: pulse 1.5s infinite; }
.progress-container { width: 100%; height: 4px; background: rgba(253, 251, 212, 0.1); border-radius: 10px; overflow: hidden; }
.progress-bar { width: 0%; height: 100%; background: var(--accent-cream); animation: loadBar 2s forwards; }
.fade-out { opacity: 0 !important; visibility: hidden !important; }
@keyframes loadBar { 100% { width: 100%; } }
@keyframes pulse { 50% { transform: scale(1.05); } }

/* --- EFFETTO GLASS --- */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* --- HEADER --- */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-bottom: 60px; /* Spazio generoso sotto l'header */
}

.logo-container {
    padding: 12px 28px;
    border-radius: 50px;
}

.logo-text { color: var(--accent-cream); font-weight: 800; font-size: 1.2rem; }

/* MENU SCROLLABILE */
.nav-container {
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.glass-menu {
    display: flex;
    list-style: none;
    padding: 8px;
    border-radius: 100px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.glass-menu::-webkit-scrollbar { display: none; }

.glass-menu li a {
    text-decoration: none;
    color: var(--accent-cream);
    padding: 10px 22px;
    font-size: 0.9rem;
    border-radius: 100px;
    display: block;
    transition: 0.3s;
}

.glass-menu li a.active, .glass-menu li a:hover {
    background: rgba(253, 251, 212, 0.2);
}

/* --- HERO --- */
.hero {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    justify-content: center;
}

.image-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    grid-template-rows: 250px 180px; 
    gap: 20px; 
}

.box { background-color: var(--accent-cream); border-radius: 25px; }
.large { grid-column: span 2; }

.content h1 { 
    font-size: clamp(2rem, 8vw, 3.8rem); 
    text-align: center; 
    line-height: 1.1; 
}

.content p { 
    text-align: center; 
    max-width: 650px; 
    margin: 25px auto; 
    font-weight: 300; 
    line-height: 1.6;
}

/* --- DESKTOP (Ritorno layout originale) --- */
@media (min-width: 1024px) {
    header {
        flex-direction: row; 
        justify-content: space-between;
        margin-bottom: 80px;
    }
    
    .nav-container {
        width: auto;
        max-width: none;
    }

    .hero { flex-direction: row; text-align: left; gap: 80px; }
    .image-grid { flex: 1; grid-template-rows: 380px 280px; }
    .content { flex: 1.2; }
    .content h1, .content p { text-align: left; margin: 0; }
    .content h1 { margin-bottom: 30px; }
}
