/* Stile base e reset */
:root {
    --primary-color: #015277;   /* Blu Scuro del logo */
    --secondary-color: #25B4E8;  /* Azzurro/Ciano del logo */
    --text-color: #333333;      /* Grigio scuro del logo */
    --light-bg-color: #f8f9fa;  /* Manteniamo un grigio chiaro per gli sfondi */
    --white-color: #ffffff;
    scroll-padding-top: 80px;
}
html { scroll-behavior: smooth; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white-color);
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
img { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid #eee; margin: 2rem 0; }

/* Header e Navigazione */
header {
    background: var(--white-color);
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0e0;
    position: sticky; top: 0; z-index: 100;
}
header .container { display: flex; justify-content: space-between; align-items: center; }
header .logo h1 a { color: var(--primary-color); font-family: 'Times New Roman', Times, serif; text-decoration: none; }
header nav ul { list-style: none; display: flex; }
header nav ul li { margin-left: 25px; }
header nav a { text-decoration: none; color: var(--text-color); font-weight: 500; transition: color 0.3s ease; }
header nav a:hover { color: var(--primary-color); }

/* Stile per il logo immagine */
.logo img {
    max-height: 80px; /* Imposta l'altezza massima del logo. Modifica questo valore se necessario */
    width: auto;      /* La larghezza si adatterà in automatico */
}

/* Stile Sezioni */
main section { padding: 4rem 0; border-bottom: 1px solid #e0e0e0; }
main section:last-child, main section#hero { border-bottom: none; }
main section:nth-of-type(even) { background-color: var(--light-bg-color); }
main section h3 { text-align: center; font-size: 2rem; color: var(--primary-color); margin-bottom: 2.5rem; font-family: 'Times New Roman', Times, serif; }

/* Hero */
#hero {
    min-height: 90vh; padding: 0;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('https://via.placeholder.com/1500x800.png?text=Panorama+di+Gaeta') no-repeat center center/cover;
    color: var(--white-color);
    display: flex; justify-content: center; align-items: center; text-align: center;
}
.hero-text h2 { font-size: 2.8rem; margin-bottom: 1rem; }
.hero-text p { font-size: 1.2rem; max-width: 600px; margin: 0 auto 2rem auto; }

/* Layout a colonne (Testo e Immagine) */
.split-layout { display: flex; align-items: center; gap: 3rem; }
.split-layout > div { flex: 1; }

/* Gallerie Fotografiche */
.gallery-grid, .gallery-grid-small { display: grid; gap: 1.5rem; }
.gallery-grid { grid-template-columns: repeat(2, 1fr); }
.gallery-grid-small { grid-template-columns: repeat(3, 1fr); }

/* Sezione Link Online */
#online { background-color: var(--primary-color); color: var(--white-color); text-align: center; /* <-- AGGIUNGI QUESTA RIGA */}
#online h3 { color: var(--white-color); }
.online-links { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }

/* Pulsanti */
.cta-button {
    background: var(--primary-color); color: var(--white-color);
    padding: 12px 25px; border: 2px solid var(--primary-color); border-radius: 5px;
    text-decoration: none; font-size: 1rem; font-weight: bold; cursor: pointer;
    transition: all 0.3s ease; display: inline-block;
}
.cta-button:hover { background: #00332a; border-color: #00332a; }
.cta-button.secondary { background: transparent; color: var(--primary-color); }
.cta-button.secondary:hover { background: var(--primary-color); color: var(--white-color); }
#online .cta-button { background: var(--white-color); color: var(--primary-color); border-color: var(--white-color); }
#online .cta-button:hover { background: var(--light-bg-color); border-color: var(--light-bg-color); }
.text-center { text-align: center; margin-top: 2.5rem; }

/* Modulo Contatti */
.contact-form { max-width: 700px; margin: 2rem auto 0 auto; }
.contact-form button {
    display: block; /* Rende il pulsante un elemento a blocco */
    margin: 2rem auto 0 auto; /* Centra orizzontalmente l'elemento a blocco */
}
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; color: #555; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 5px; font-size: 1rem; }

/* Stili Pagine Dettaglio */
.page-header { padding: 4rem 0; background: var(--light-bg-color); text-align: center; }
.page-header h2 { font-size: 2.5rem; color: var(--primary-color); }

/* Footer */
footer { background: var(--text-color); color: var(--light-bg-color); text-align: center; padding: 2rem 0; }
footer a { color: var(--white-color); }

.hamburger-menu {
    display: none; /* Nascosto di default sui desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001; /* Deve stare sopra tutto */
}

.hamburger-line {
    width: 2rem;
    height: 0.25rem;
    background: var(--primary-color);
    border-radius: 10px;
    transition: all 0.3s linear;
}

/* Stili per la Media Query - si attivano solo sotto i 768px */
@media (max-width: 768px) {
    
    header nav ul { padding: 0; justify-content: center; }
    header nav ul li { margin: 0 10px; }
    
    .hero-text h2 { font-size: 2rem; }
    
    .split-layout { flex-direction: column; }
    .gallery-grid, .gallery-grid-small { grid-template-columns: 1fr; }
	
    /* Nascondiamo la navigazione desktop */
    header nav#main-nav {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background-color: var(--light-bg-color);
        box-shadow: -2px 0 5px rgba(0,0,0,0.2);
        
        /* Nascondiamo il menu fuori dallo schermo a destra */
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    /* Quando il menu è aperto (classe .is-open aggiunta da JS) */
    header nav#main-nav.is-open {
        transform: translateX(0);
    }
    
    /* Sistemiamo la lista di link in verticale */
    header nav#main-nav ul {
        flex-direction: column;
        width: 100%;
        padding: 0;
    }
    
    header nav#main-nav ul li {
        margin: 0;
        text-align: center;
        width: 100%;
    }
    
    header nav#main-nav ul li a {
        display: block;
        padding: 1.5rem 0;
        font-size: 1.2rem;
    }
    
    /* Mostriamo il pulsante hamburger */
    .hamburger-menu {
        display: flex;
    }
}
