/* ====================================
   Scuola dell'Infanzia Santa Maria Goretti
   Stile giovanile, allegro e gioioso
   ==================================== */

/* Import Google Fonts - Font arrotondati e friendly */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Quicksand:wght@400;500;600;700&display=swap');

/* Variabili CSS */
:root {
    --colore-primario: #FF6B6B;      /* Rosso corallo */
    --colore-secondario: #4ECDC4;    /* Turchese */
    --colore-accento: #FFE66D;       /* Giallo sole */
    --colore-viola: #A06CD5;         /* Viola lavanda */
    --colore-arancione: #FF9F43;     /* Arancione */
    --colore-verde: #7ED957;         /* Verde prato */
    --colore-rosa: #FF85A1;          /* Rosa */
    --colore-azzurro: #74C0FC;       /* Azzurro cielo */

    --sfondo-chiaro: #FFF9F0;        /* Beige chiaro */
    --sfondo-card: #FFFFFF;
    --testo-scuro: #2D3436;
    --testo-chiaro: #636E72;

    --ombra: 0 4px 15px rgba(0, 0, 0, 0.1);
    --ombra-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --bordo-radius: 20px;
    --bordo-radius-piccolo: 12px;
}

/* Reset e base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--sfondo-chiaro);
    color: var(--testo-scuro);
    line-height: 1.6;
    min-height: 100vh;
}

/* ====================================
   HEADER E NAVIGAZIONE
   ==================================== */
header {
    background: linear-gradient(135deg, var(--colore-primario), var(--colore-arancione));
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--ombra);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: white;
}

.logo-img {
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    overflow: hidden;
    flex-shrink: 0;
}

.logo-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.logo-text .logo-nome {
    display: block;
    font-family: 'Quicksand', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.logo-riga {
    white-space: nowrap;
}

.logo-text > span:not(.logo-nome) {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Menu hamburger per mobile */
.menu-toggle {
    display: none;
    background: white;
    border: none;
    padding: 10px 15px;
    border-radius: var(--bordo-radius-piccolo);
    cursor: pointer;
    font-size: 1.5rem;
}

/* Navigazione */
nav {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    padding: 10px 5%;
    gap: 5px;
}

nav ul li a {
    display: block;
    padding: 10px 18px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    background: white;
    color: var(--colore-primario);
    transform: translateY(-2px);
}

/* ====================================
   HERO SECTION
   ==================================== */
.hero {
    background-color: var(--colore-secondario); /* colore di riserva se l'immagine non carica */
    background-image: url('assets/images/ambienti/scuola.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 80px 5%;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

/* Velo concentrato sulla fascia orizzontale del testo, trasparente sopra e sotto.
   Volutamente SENZA variazione orizzontale: un velo ellittico dava più luce,
   ma la sua sfumatura laterale si vedeva come un'ombra sull'intonaco chiaro
   a destra del titolo, dove la foto è piatta e non ha texture che la mascheri. */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
                rgba(0, 0, 0, 0) 0%,
                rgba(0, 0, 0, 0.08) 15%,
                rgba(0, 0, 0, 0.21) 30%,
                rgba(0, 0, 0, 0.30) 48%,
                rgba(0, 0, 0, 0.19) 70%,
                rgba(0, 0, 0, 0.06) 85%,
                rgba(0, 0, 0, 0) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1,
.hero h2 {
    font-family: 'Quicksand', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85),
                 0 0 10px rgba(0, 0, 0, 0.8);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85),
                 0 0 10px rgba(0, 0, 0, 0.8);
}

.btn {
    display: inline-block;
    padding: 15px 35px;
    background: white;
    color: var(--colore-primario);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: var(--ombra);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--ombra-hover);
}

.btn-primario {
    background: var(--colore-primario);
    color: white;
}

.btn-secondario {
    background: var(--colore-secondario);
    color: white;
}

/* ====================================
   CONTENUTO PRINCIPALE
   ==================================== */
main {
    padding: 50px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.page-title {
    text-align: center;
    margin-bottom: 50px;
}

.page-title h1,
.page-title h2 {
    font-family: 'Quicksand', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--colore-primario);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.page-title h1::after,
.page-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, var(--colore-accento), var(--colore-arancione));
    border-radius: 5px;
}

.page-title p {
    color: var(--testo-chiaro);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 20px auto 0;
}

/* ====================================
   CARDS E SEZIONI
   ==================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background: var(--sfondo-card);
    border-radius: var(--bordo-radius);
    overflow: hidden;
    box-shadow: var(--ombra);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--ombra-hover);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--colore-azzurro), var(--colore-secondario));
}

/* Sposta il ritaglio verso il basso, per foto verticali il cui soggetto sta in fondo */
.card-img-basso {
    object-position: center 85%;
}

/* Sposta il ritaglio verso l'alto, per foto verticali il cui soggetto sta in cima */
.card-img-alto {
    object-position: center top;
}

.card-content {
    padding: 25px;
}

.card-content h3 {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.4rem;
    color: var(--colore-primario);
    margin-bottom: 12px;
}

.card-content p {
    color: var(--testo-chiaro);
    margin-bottom: 20px;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--colore-secondario);
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.3s ease;
}

.card-link:hover {
    gap: 12px;
}

/* Sezione con sfondo colorato */
.section-colorata {
    background: linear-gradient(135deg, var(--colore-viola), var(--colore-rosa));
    padding: 60px 5%;
    margin: 50px 0;
    border-radius: var(--bordo-radius);
    color: white;
    text-align: center;
}

.section-colorata h3 {
    font-family: 'Quicksand', sans-serif;
    font-size: 2rem;
    margin-bottom: 20px;
}

/* Numero dell'errore nella pagina 404 */
.errore-404 {
    font-family: 'Quicksand', sans-serif;
    font-size: 6rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 4px;
    margin-bottom: 10px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ====================================
   CITAZIONE
   ==================================== */
.citazione {
    position: relative;
    max-width: 900px;
    margin: 0 auto 50px;
    padding: 45px 40px 30px;
    background: white;
    border-left: 6px solid var(--colore-secondario);
    border-radius: var(--bordo-radius);
    box-shadow: var(--ombra);
}

.citazione::before {
    content: '\201C';
    position: absolute;
    top: 10px;
    left: 28px;
    font-family: 'Quicksand', sans-serif;
    font-size: 4rem;
    line-height: 1;
    color: var(--colore-accento);
}

.citazione blockquote p {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.7;
    color: var(--testo-scuro);
}

.citazione figcaption {
    margin-top: 15px;
    text-align: right;
    font-weight: 700;
    color: var(--colore-primario);
}

/* ====================================
   INFO BOX E LISTE
   ==================================== */
.info-box {
    background: white;
    border-radius: var(--bordo-radius);
    padding: 30px;
    box-shadow: var(--ombra);
    margin-bottom: 30px;
}

.info-box h3 {
    font-family: 'Quicksand', sans-serif;
    color: var(--colore-primario);
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--colore-accento);
}

/* L'intestazione è fissa in cima: senza questo margine, saltando a un'ancora
   la sezione di destinazione finirebbe nascosta sotto al menu */
.info-box[id],
section[id] {
    scroll-margin-top: 150px;
}

.info-box ul {
    list-style: none;
}

/* Il testo scorre come un normale paragrafo, con la stellina a sbalzo:
   così grassetti e link restano nel flusso della frase */
.info-box ul li {
    position: relative;
    padding: 12px 0 12px 26px;
    border-bottom: 1px dashed #eee;
}

.info-box ul li:last-child {
    border-bottom: none;
}

.info-box ul li::before {
    content: '★';
    position: absolute;
    left: 0;
    top: 12px;
    color: var(--colore-accento);
    font-size: 1rem;
}

/* Link testuali dentro i contenuti, coordinati con la palette del sito.
   I pulsanti .btn sono esclusi: hanno già un loro stile. */
.info-box a:not(.btn),
.tabella a:not(.btn),
.avviso a:not(.btn) {
    color: var(--colore-primario);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
}

.info-box a:not(.btn):hover,
.tabella a:not(.btn):hover,
.avviso a:not(.btn):hover {
    color: var(--colore-arancione);
}

/* ====================================
   MAPPA INCORPORATA
   ==================================== */
.mappa {
    position: relative;
    border-radius: var(--bordo-radius-piccolo);
    overflow: hidden;
    background: var(--sfondo-chiaro);
    min-height: 350px;
}

/* Messaggio visibile solo se il browser blocca o rimuove l'iframe */
.mappa-fallback {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 25px;
    text-align: center;
    color: var(--testo-chiaro);
}

.mappa iframe {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 350px;
    border: 0;
}

@media (max-width: 480px) {
    .mappa,
    .mappa iframe {
        min-height: 280px;
        height: 280px;
    }
}

/* Contenitore scorrevole per tabelle larghe su schermi piccoli */
/* Con overflow-x questo diventa un contenitore di scorrimento, che ritaglia
   sui propri bordi dritti tutto ciò che sporge: l'ombra della tabella veniva
   tranciata ad angolo retto in basso. Ombra e arrotondamento stanno quindi qui,
   sul contenitore, che non è ritagliato da nessuno. */
.tabella-scroll {
    overflow-x: auto;
    margin-bottom: 30px;
    border-radius: var(--bordo-radius);
    box-shadow: var(--ombra);
}

.tabella-scroll .tabella {
    margin-bottom: 0;
    box-shadow: none;
}

/* Tabella per orari/tariffe */
.tabella {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--bordo-radius);
    overflow: hidden;
    box-shadow: var(--ombra);
}

.tabella thead {
    background: linear-gradient(135deg, var(--colore-primario), var(--colore-arancione));
    color: white;
}

.tabella th {
    padding: 18px 15px;
    text-align: left;
    font-weight: 700;
}

.tabella td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.tabella td ul {
    list-style: none;
    margin: 0;
}

.tabella td ul li {
    padding: 3px 0;
}

.tabella td ul li::before {
    content: '\2022';
    color: var(--colore-secondario);
    font-weight: 700;
    margin-right: 8px;
}

.tabella tr:last-child td {
    border-bottom: none;
}

.tabella tbody tr:hover {
    background: var(--sfondo-chiaro);
}

/* ====================================
   AVVISI
   ==================================== */
.avviso {
    background: white;
    border-radius: var(--bordo-radius);
    padding: 25px;
    box-shadow: var(--ombra);
    margin-bottom: 20px;
    border-left: 5px solid var(--colore-primario);
    transition: transform 0.3s ease;
}

.avviso:hover {
    transform: translateX(5px);
}

.avviso-data {
    display: inline-block;
    background: var(--colore-accento);
    color: var(--testo-scuro);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.avviso h3 {
    color: var(--colore-primario);
    margin-bottom: 10px;
}

.avviso-locandina {
    display: block;
    max-width: 420px;
    margin-top: 20px;
    border-radius: var(--bordo-radius-piccolo);
    overflow: hidden;
    box-shadow: var(--ombra);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.avviso-locandina:hover {
    transform: translateY(-3px);
    box-shadow: var(--ombra-hover);
}

.avviso-locandina img {
    display: block;
    width: 100%;
    height: auto;
}

.avviso-importante {
    border-left-color: var(--colore-primario);
    background: linear-gradient(90deg, rgba(255, 107, 107, 0.1), white);
}

/* ====================================
   GALLERY AMBIENTI
   ==================================== */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.gallery-item {
    position: relative;
    border-radius: var(--bordo-radius);
    overflow: hidden;
    box-shadow: var(--ombra);
    aspect-ratio: 4/3;
}

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

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

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 30px 20px 20px;
}

.gallery-item-overlay h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

/* Riquadri della galleria apribili a tutto schermo */
.gallery-item-cliccabile {
    cursor: pointer;
}

.gallery-item-cliccabile:focus-visible {
    outline: 3px solid var(--colore-primario);
    outline-offset: 4px;
}

/* ====================================
   ANTEPRIMA A TUTTO SCHERMO (LIGHTBOX)
   ==================================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.92);
}

.lightbox.aperta {
    display: flex;
}

.lightbox-contenuto {
    position: relative;
    margin: 0;
    text-align: center;
    max-width: 100%;
    max-height: 100%;
}

.lightbox-contenuto img {
    display: block;
    margin: 0 auto;
    max-width: 97vw;
    max-height: 94vh;
    width: auto;
    height: auto;
    border-radius: var(--bordo-radius-piccolo);
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.6);
}

/* Didascalia sovrapposta in fondo alla foto, così non le ruba spazio */
.lightbox-contenuto figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 50px 20px 18px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    border-radius: 0 0 var(--bordo-radius-piccolo) var(--bordo-radius-piccolo);
    color: white;
    font-family: 'Quicksand', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    pointer-events: none;
}

/* Sta sopra la foto, in alto a destra */
.lightbox-chiudi {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1;
    width: 50px;
    height: 50px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.lightbox-chiudi:hover,
.lightbox-chiudi:focus-visible {
    background: var(--colore-primario);
    transform: scale(1.08);
    outline: none;
}

/* Frecce laterali per scorrere le foto con il mouse o con il dito */
.lightbox-freccia {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    width: 54px;
    height: 54px;
    padding: 0 0 6px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    font-size: 2.6rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.lightbox-precedente {
    left: 20px;
}

.lightbox-successiva {
    right: 20px;
}

.lightbox-freccia:hover,
.lightbox-freccia:focus-visible {
    background: var(--colore-primario);
    outline: none;
}

.lightbox-precedente:hover,
.lightbox-precedente:focus-visible {
    transform: translateY(-50%) scale(1.08);
}

.lightbox-successiva:hover,
.lightbox-successiva:focus-visible {
    transform: translateY(-50%) scale(1.08);
}

.lightbox-freccia[hidden] {
    display: none;
}

/* Blocca lo scorrimento della pagina mentre l'anteprima è aperta */
body.senza-scroll {
    overflow: hidden;
}

/* ====================================
   FORM E MODULI
   ==================================== */
.modulo-download {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 20px 25px;
    border-radius: var(--bordo-radius);
    box-shadow: var(--ombra);
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.modulo-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.modulo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--colore-primario), var(--colore-arancione));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.modulo-info h4 {
    color: var(--testo-scuro);
    margin-bottom: 5px;
}

.modulo-info p {
    color: var(--testo-chiaro);
    font-size: 0.9rem;
}

.btn-download {
    background: var(--colore-verde);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-download:hover {
    background: #6bc348;
    transform: translateY(-2px);
}

/* ====================================
   CALENDARIO
   ==================================== */
.calendario-mese {
    background: white;
    border-radius: var(--bordo-radius);
    padding: 30px;
    box-shadow: var(--ombra);
    margin-bottom: 30px;
}

.calendario-mese h3 {
    font-family: 'Quicksand', sans-serif;
    color: var(--colore-viola);
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.evento {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px dashed #eee;
}

.evento:last-child {
    border-bottom: none;
}

.evento-data {
    background: linear-gradient(135deg, var(--colore-secondario), var(--colore-azzurro));
    color: white;
    padding: 10px 15px;
    border-radius: var(--bordo-radius-piccolo);
    text-align: center;
    min-width: 60px;
}

.evento-data .giorno {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
}

.evento-data .mese-abbr {
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* ====================================
   CONTATTI (nel footer o sezione)
   ==================================== */
.contatti-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.contatto-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: var(--bordo-radius);
    box-shadow: var(--ombra);
}

/* Tile con la foto in cima, sopra il contenuto */
.contatto-item-con-foto {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
}

.contatto-foto {
    display: block;
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.contatto-riga {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
}

.contatto-icon svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

.contatto-icon-facebook {
    background: #1877F2;
    color: white;
}

.contatto-icon-instagram {
    background: linear-gradient(45deg, #FEDA75, #FA7E1E 25%, #D62976 50%, #962FBF 75%, #4F5BD5);
    color: white;
}

.contatto-item p a {
    color: var(--colore-primario);
    text-decoration: none;
    font-weight: 600;
    word-break: break-word;
}

.contatto-item p a:hover {
    text-decoration: underline;
}

.contatto-icon {
    width: 50px;
    height: 50px;
    background: var(--colore-accento);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* ====================================
   FOOTER
   ==================================== */
footer {
    background: linear-gradient(135deg, var(--testo-scuro), #1a1a2e);
    color: white;
    padding: 50px 5% 30px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto 40px;
}

.footer-section h4 {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--colore-accento);
}

.footer-section p,
.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    line-height: 2;
}

.footer-section a:hover {
    color: var(--colore-accento);
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    transition: background 0.3s ease, transform 0.3s ease;
}

.footer-social a:hover {
    color: white;
    transform: translateY(-3px);
}

.footer-social a.social-facebook:hover {
    background: #1877F2;
}

.footer-social a.social-instagram:hover {
    background: linear-gradient(45deg, #FEDA75, #FA7E1E 25%, #D62976 50%, #962FBF 75%, #4F5BD5);
}

.footer-social svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

/* Dati fiscali: informazione di servizio, un gradino sotto al copyright */
.footer-dati-fiscali {
    margin-top: 8px;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */
@media (max-width: 768px) {
    .header-top {
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
    }

    .logo {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .logo-img {
        width: 50px;
        height: 50px;
        min-width: 50px;
        min-height: 50px;
    }

    .logo-text {
        flex: 1;
        min-width: 0;
    }

    .logo-text .logo-nome {
        font-size: 1rem;
        line-height: 1.3;
    }

    .logo-text > span:not(.logo-nome) {
        font-size: 0.75rem;
    }

    .menu-toggle {
        display: block;
        flex-shrink: 0;
        margin-left: 10px;
    }

    nav {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    nav.active {
        max-height: 500px;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li a {
        width: 100%;
        text-align: center;
    }

    .hero h1,
    .hero h2 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .page-title h1,
    .page-title h2 {
        font-size: 1.8rem;
    }

    .errore-404 {
        font-size: 4rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    /* L'intestazione è fissa anche qui, ma più bassa: il menu è chiuso */
    .info-box[id],
    section[id] {
        scroll-margin-top: 100px;
    }

    .modulo-download {
        flex-direction: column;
        text-align: center;
    }

    .modulo-info {
        flex-direction: column;
    }

    .tabella {
        font-size: 0.9rem;
    }

    .tabella th,
    .tabella td {
        padding: 10px 8px;
    }
}

@media (max-width: 420px) {
    .logo-text .logo-nome {
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    .logo-text .logo-nome {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    main {
        padding: 30px 4%;
    }

    .card-content {
        padding: 20px;
    }

    .info-box {
        padding: 20px;
    }

    .citazione {
        padding: 40px 25px 25px;
    }

    .lightbox {
        padding: 8px;
    }

    .lightbox-contenuto img {
        max-width: 98vw;
        max-height: 96vh;
    }

    .lightbox-contenuto figcaption {
        font-size: 1.1rem;
        padding: 40px 15px 14px;
    }

    .lightbox-chiudi {
        top: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
    }

    .contatto-foto {
        height: 220px;
    }

    .lightbox-freccia {
        width: 44px;
        height: 44px;
        font-size: 2.1rem;
    }

    .lightbox-precedente {
        left: 8px;
    }

    .lightbox-successiva {
        right: 8px;
    }

    .citazione blockquote p {
        font-size: 1.05rem;
    }

    .btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

/* ====================================
   ANIMAZIONI
   ==================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* Stagger animation for cards */
.cards-grid .card:nth-child(1) { animation-delay: 0.1s; }
.cards-grid .card:nth-child(2) { animation-delay: 0.2s; }
.cards-grid .card:nth-child(3) { animation-delay: 0.3s; }
.cards-grid .card:nth-child(4) { animation-delay: 0.4s; }
.cards-grid .card:nth-child(5) { animation-delay: 0.5s; }
.cards-grid .card:nth-child(6) { animation-delay: 0.6s; }

/* ====================================
   DECORAZIONI (pallini, forme)
   ==================================== */
.decorazione-pallini {
    position: absolute;
    pointer-events: none;
}

/* Placeholder per immagini */
.placeholder-img {
    background: linear-gradient(135deg, var(--colore-azzurro), var(--colore-secondario));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

/* Utility classes */
.text-center { text-align: center; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }
