/* RESET E VARIABILI */
:root {
    --primary-color: #554488; /* Viola dal logo per i testi forti */
    --accent-color: #6FA3D3;  /* Celeste richiesto */
    --light-bg: #F0F8FF;      /* Bianco "AliceBlue" molto tenue */
    --white: #ffffff;
    --text-color: #333333;
}


html, body {
    width: 100%;
    overflow-x: hidden; /* IMPORTANTE: Taglia tutto ciò che esce dai bordi laterali */
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    margin: 0; 
    padding: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img {
    max-width: 100%;
    height: auto;
}

/* HEADER */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    height: 80px; /* Aggiusta in base alla grandezza reale */
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--primary-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-color);
}

/* HAMBURGER MENU */
.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--primary-color);
}

/* SEZIONI GENERALI */
section {
    padding: 100px 5% 60px; /* Padding top alto per compensare header fisso */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

h1, h2, h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* HOME */
.hero-image-wrapper {
    /* MODIFICA: Centriamo il contenitore e limitiamo la sua larghezza */
    margin: 0 auto 2rem auto; /* auto a destra e sinistra centra il blocco */
    max-width: 750px;         /* Larghezza massima. Puoi cambiarla (es. 600px o 800px) se la vuoi più o meno grande */
    
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.feature-img {
    width: 100%;   /* L'immagine si adatta alla larghezza del contenitore (max 750px) */
    height: auto;  /* Mantiene le proporzioni originali senza deformarsi */
    display: block;
    
    /* RIMOSSO: max-height: 600px; -> Non serve più ora che limitiamo la larghezza */
    /* RIMOSSO: object-fit: cover; -> Rimosso per evitare che l'immagine di auguri venga tagliata ai bordi */
}

/* CHI SIAMO */
.about-section {
    background-color: var(--light-bg);
}

.about-text {
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
}

.gallery {
    display: grid;
    /* Cambiato da 300px a 250px per stare comodi sui cellulari */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 20px;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.gallery-item img:hover {
    transform: scale(1.02);
}

/* CONTATTI */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    transition: 0.3s;
}

.contact-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 5px 15px rgba(111, 163, 211, 0.2);
}

.contact-card i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.contact-card a {
    color: var(--primary-color);
    font-weight: 600;
}

.map-container {
    margin-top: 2rem;
}

.map-placeholder iframe {
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* FOOTER */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 5% 1rem;
    margin-top: auto;
}

.footer-info p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 0.8rem;
    text-align: center;
}

/* RESPONSIVE MOBILE */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px; /* Altezza header */
        gap: 0;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 5px 5px rgba(0,0,0,0.1);
    }

    .nav-item {
        margin: 16px 0;
    }

    .nav-menu.active {
        left: 0;
    }
}