/* Variabili CSS per la palette colori */
:root {
    --primary-color: #4a5d4e; 
    --secondary-color: #cba153; 
    --bg-light: #fdfbf7; 
    --text-dark: #333333;
    --text-light: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

h1, h2, h3, h4, .logo {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
}

/* Navigazione */
#navbar {
    position: fixed; top: 0; width: 100%;
    background: rgba(253, 251, 247, 0.95);
    padding: 1rem 5%;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.05); transition: 0.3s;
}

.logo { font-size: 1.8rem; color: var(--primary-color); }
.nav-links { list-style: none; display: flex; gap: 2rem; }
.nav-links a { text-decoration: none; color: var(--text-dark); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; transition: 0.3s; }
.nav-links a:hover { color: var(--secondary-color); }

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('https://images.unsplash.com/photo-1519741497674-611481863552?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80') center/cover;
    display: flex; align-items: center; justify-content: center;
    text-align: center; color: var(--text-light);
}

.hero h1 { font-size: 5rem; margin-bottom: 0.5rem; letter-spacing: 2px; }
.hero .subtitle { font-size: 1.8rem; font-style: italic; font-family: 'Cormorant Garamond', serif; }
.countdown { margin-top: 2rem; font-size: 1.2rem; letter-spacing: 2px; }

/* Sezioni e Container */
.section { padding: 6rem 5%; }
.section h2 { text-align: center; font-size: 3rem; color: var(--primary-color); margin-bottom: 3rem; }
.container { max-width: 1200px; margin: 0 auto; }
.text-center { text-align: center; }

.dark-bg { background-color: var(--primary-color); color: var(--text-light); }
.dark-bg h2 { color: var(--secondary-color); }

/* Layout Colonne (Luoghi) */
.double-column { display: flex; gap: 3rem; flex-wrap: wrap; }
.card {
    flex: 1; min-width: 300px; background: #fff; padding: 3rem 2rem;
    text-align: center; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-top: 4px solid var(--secondary-color); color: var(--text-dark);
}
.card h3 { font-size: 2rem; margin-bottom: 1rem; color: var(--primary-color); }

/* Layout Griglia (Consigli) */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem; margin-top: 3rem;
}
.tip-card { padding: 2.5rem; background: #fff; border: 1px solid #eee; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.02); }
.tip-card h4 { color: var(--secondary-color); font-size: 1.5rem; margin-bottom: 0.8rem; }

/* Pulsanti e Immagini */
.btn {
    display: inline-block; padding: 0.8rem 2rem; background-color: var(--secondary-color);
    color: var(--text-light); text-decoration: none; border-radius: 30px;
    text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px;
    transition: 0.3s; margin-top: 1.5rem;
}
.btn:hover { background-color: #b58d45; }
.btn-light { background-color: var(--bg-light); color: var(--primary-color); }
.btn-light:hover { background-color: #eee; }
.btn-small { padding: 0.6rem 1.5rem; font-size: 0.75rem; margin-top: 1rem; }

.qr-container { margin: 2rem 0; }
.qr-code { border: 10px solid #fff; border-radius: 8px; max-width: 100%; height: auto; }

/* Galleria Foto Dinamica */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 3rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    aspect-ratio: 1 / 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img { transform: scale(1.08); }

footer { text-align: center; padding: 2rem; background: #222; color: #fff; font-family: 'Cormorant Garamond', serif; }

/* ======== RESPONSIVE DESIGN (SMARTPHONE) ======== */
@media (max-width: 768px) {
    #navbar { flex-direction: column; padding: 1rem; }
    .nav-links { margin-top: 1rem; gap: 1rem; flex-wrap: wrap; justify-content: center; }
    
    .hero h1 { font-size: 3rem; }
    .hero .subtitle { font-size: 1.4rem; }
    .countdown { font-size: 1rem; }
    
    .section { padding: 4rem 5%; }
    .section h2 { font-size: 2.2rem; margin-bottom: 2rem; }
    
    .double-column { gap: 2rem; }
    .card { padding: 2rem 1.5rem; }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2.5rem; }
    .nav-links { gap: 0.8rem; }
    .nav-links a { font-size: 0.8rem; }
    .btn { padding: 0.7rem 1.5rem; font-size: 0.75rem; }
}
/* ======== STILI LIGHTBOX (FOTO INGRANDITA) ======== */
.gallery-item {
    cursor: pointer; /* Fa capire che la foto si può cliccare */
}

.lightbox {
    display: none; /* Nascosto di default */
    position: fixed;
    z-index: 9999; /* Sta sopra a tutto il resto */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Sfondo nero semitrasparente */
    backdrop-filter: blur(5px); /* Sfoca leggermente lo sfondo */
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh; /* Non supera mai l'altezza dello schermo */
    margin-top: 5vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
}

/* Tasto di chiusura "X" */
.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-lightbox:hover {
    color: var(--secondary-color);
}

/* Animazione di entrata fluida */
@keyframes zoomIn {
    from {transform: scale(0.9); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

/* Adatta la X sugli smartphone */
@media (max-width: 768px) {
    .close-lightbox {
        top: 10px;
        right: 20px;
    }
}
/* ======== GRIGLIA CONSIGLI (SPIAGGE E RISTORANTI) ======== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.card-consiglio {
    background: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Se la card si trova dentro una sezione scura, adattiamo lo sfondo interno */
.dark-bg .card-consiglio {
    background: #ffffff; 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.card-consiglio:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.card-consiglio h3 {
    font-family: var(--font-title);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.card-consiglio p {
    font-family: var(--font-text);
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.btn-link {
    font-family: var(--font-text);
    font-weight: 500;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.btn-link:hover {
    text-decoration: underline;
}