/*
 * File: style-31082025.css
 * Descrizione: Stili CSS ottimizzati, consolidati e puliti per
 * una maggiore efficienza e facilità di manutenzione.
 */

/* =======================================
    VARIABILI GLOBALI
======================================= */
:root {
    --blu-main: #0EA2E0;
    --red-main: #dc3545;
    --grey-light: #f8f9fa;
    --black: #000;
    --transition-fast: 0.2s;
    --transition-slow: 0.4s;
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* =======================================
    LAYOUT GENERALE DELLA PAGINA
======================================= */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    box-sizing: border-box;
}

body {
    font-family: 'PT Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    display: flex;
    flex-direction: column;
}

/* =======================================
    HEADER E NAVIGAZIONE
======================================= */
#main-header {
    background-color: #fff;
    border-bottom: 1px solid var(--grey-light);
}

.header-grid {
    display: grid !important;
    grid-template-columns: 150px 300px 1fr;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px 5px;
}

/* Stili del contenitore del logo */
.logo-main {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-main img {
    max-width: 100%;
    height: auto;
    max-height: 100px;
    object-fit: contain;
    display: block;
}

/* Stili per le colonne dell'header */
.header-col-1,
.header-col-2,
.header-col-3 {
    padding: 0; /* Resetta i padding per una migliore gestione */
}

.header-col-2 {
    padding-left: 30px; /* Mantieni il padding solo dove serve */
}

.header-col-3 {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}

/* Contenitore per allineare ricerca e social */
.search-and-social-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    flex-wrap: wrap; /* Assicura che gli elementi vadano a capo su schermi piccoli */
}

.search-box {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 5px;
    width: auto;
}

.search-box input[type="text"] {
    width: 350px; /* Esempio: imposta una larghezza fissa in pixel */
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.social-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.social-links img {
    height: 35px;
    width: auto;
    transition: transform var(--transition-fast);
}

.social-links img:hover {
    transform: scale(1.2);
}

/* Stili per la navigazione principale */
.main-nav {
    background-color: var(--blu-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 1px 5px;
}

.main-nav a {
    text-decoration: none;
    color: white;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0;
}

.main-nav .nav-list a {
    padding: 0px 5px;
    font-size: 12px;
}

.logos-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.top-logos,
.cert-logos {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cert-logos img,
.top-logos img {
    height: auto;
    max-height: 65px;
    width: auto;
}

.cert-logos a img {
    height: auto;
    max-height: 55px;
    transition: transform var(--transition-fast);
}

.top-logos a:hover img,
.cert-logos a:hover img {
    transform: scale(1.4);
}

/* Stile per il contenitore del logo */
.header-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Ho rimosso la duplicazione di .header-logo img e .logo-main img */

.header-contact a img {
    height: auto;
    max-height: 50px;
    transition: transform var(--transition-fast);
    text-decoration: none;
}

.header-contact a:hover img {
    transform: scale(1.1);
}

/* =======================================
    LAYOUT E GRIGLIE CONTENUTI
======================================= */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.main-content-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 1.25rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    display: flex;
    gap: 20px;
    flex: 1;
}

.left-menu {
    flex: 0 0 250px;
    padding: 20px;
}

.right-content {
    flex: 1;
    padding: 20px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding: 10px 0;
}

.grid-item {
    text-align: center;
    padding: 10px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
}

.grid-item img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 10px auto;
}

.grid-item p {
    font-size: 1rem;
    line-height: 1.4;
}

.events-section {
    text-align: center;
    padding: 20px 0 40px 0;
}

.events-section img {
    width: 100%;
    max-width: 380px;
    height: auto;
    display: block;
    margin: 0 auto 15px auto;
}

.events-section p {
    font-size: 1.1rem;
    line-height: 1.2;
}

/* =======================================
    TIPOGRAFIA E TESTO
======================================= */
.font-arial { font-family: Arial, sans-serif; }
.font-cairo { font-family: 'Cairo', sans-serif; }
.small-caps { font-variant: small-caps; }
.bold { font-weight: bold; }
.italic { font-style: italic; }
.color-black { color: var(--black); }
.color-blu { color: var(--blu-main); }
.color-red { color: var(--red-main); }
.text-center { text-align: center; }
.text-justify { text-align: justify; }

.title {
    font-weight: bold;
    line-height: 1.2;
}

.title.size-33 { font-size: 2.0625rem; color: var(--blu-main); }
.title.size-25 { font-size: 1.5625rem; }
.title.size-25.blu { color: var(--blu-main); letter-spacing: 2px; word-spacing: 10px; text-shadow: 1px 1px 2px #778899; }
.title.size-25.red { color: var(--red-main); letter-spacing: 3px; word-spacing: 15px; text-shadow: 1px 1px 2px #778899; }
.title.size-22, .title.size-20, .title.size-18, .title.size-16 { font-style: italic; }
.title.size-22 { font-size: 1.375rem; }
.title.size-20 { font-size: 1.25rem; }
.title.size-18 { font-size: 1.125rem; }
.title.size-16 { font-size: 1rem; }

.text-group { font-family: 'Cairo', sans-serif; line-height: 1.2; }
.text-group.size-22 { font-size: 1.375rem; }
.text-group.size-19 { font-size: 1.1875rem; }
.text-group.size-16 { font-size: 1rem; }
.text-group.size-14 { font-size: 0.875rem; }
.text-group.size-12 { font-size: 0.75rem; }

/* =======================================
    LINK E PULSANTI
======================================= */
.link {
    text-decoration: none;
    color: var(--black);
    transition: font-size var(--transition-fast), color var(--transition-fast);
}

.link:hover { color: var(--red-main); }
.link.variant-1 { font-size: 0.75rem; }
.link.variant-1:hover { font-size: 0.875rem; font-weight: bold; }
.link.variant-2 { font-size: 1.125rem; }
.link.variant-2:hover { font-size: 1.25rem; color: var(--red-dark); }
.link.variant-3 { font-size: 1.125rem; }
.link.variant-3:hover { font-size: 1.25rem; font-weight: bold; }
.link.variant-4 { font-size: 1.1875rem; line-height: 1.2; }
.link.variant-4:hover { font-size: 1.25rem; font-weight: bold; }
.link.variant-libri { font-size: 1rem; }
.link.variant-libri:hover { font-size: 1.25rem; font-weight: bold; }

.nospam {
    font-family: Arial;
    font-size: 1.375rem;
    color: var(--black);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.nospam:hover {
    cursor: pointer;
    font-weight: bold;
    font-size: 1.625rem;
    font-variant: small-caps;
    color: var(--red-main);
    text-shadow: 1px 1px 2px grey;
}

.button {
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    margin: 0.25rem 0.125rem;
    transition: background var(--transition-slow), color var(--transition-slow);
    cursor: pointer;
    padding: 4px 20px;
}

.button-style-1 { background-color: white; color: var(--black); border: 2px solid #4CAF50; }
.button-style-1:hover { background-color: #4CAF50; color: white; }
.button-style-2 { background-color: white; color: var(--black); border: 2px solid #008CBA; }
.button-style-2:hover { background-color: #008CBA; color: white; }
.button-style-3 { background-color: white; color: var(--black); border: 2px solid #f44336; }
.button-style-3:hover { background-color: #f44336; color: white; }
.button-style-4 {
    background-color: var(--grey-light);
    color: var(--black);
    border: 2px solid var(--red-main);
    border-radius: 4px;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.button-style-4:hover { background-color: #555555; color: white; }
.button-style-5 { background-color: white; color: var(--black); border: 2px solid #555555; }
.button-style-5:hover { background-color: #555555; color: white; }
.button-img {
    background-color: #ffffff;
    width: 230px;
    height: 70px;
    background-position: center;
    background-repeat: no-repeat;
}

.menu-sx { background-image: url("/img/buttons/menu-sx/blu-230x70px.png"); }
.menu-sx:hover { background-image: url("/img/buttons/menu-sx/red-230x70px.png"); }
.menu-sx-v { background-image: url("/img/buttons/menu-sx/red-230x70px.png"); }
.menu-sx-v:hover { background-image: url("/img/buttons/menu-sx/red-230x70px-green.png"); }

/* =======================================
    ANIMAZIONI E UTILI VARI
======================================= */
.red-separator {
    background-color: var(--red-main);
    height: 2px;
    margin: 0.125rem 0;
}

.footer-links-container {
    max-width: 1024px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    font-size: 0.5625rem;
    font-variant: small-caps;
    color: var(--black);
}

.footer-links-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 0.4375rem 0;
}

.info-col {
    flex: 1;
    min-width: 200px;
    padding: 0 5px;
}

.calendar-txt { font-family: Arial; font-size: 0.75rem; font-variant: small-caps; color: var(--black); }
.ip-txt { font-family: Arial; font-size: 0.875rem; font-variant: small-caps; font-weight: bold; color: var(--black); }

td.celle_strette { width: 11%; }
td.celle_larghe { width: 33%; }
.mostre-img img { border-radius: 8px; }

.hero {
    background: url("hero.jpg") no-repeat center center/cover;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 1.25rem;
}

.zoom { transition: transform var(--transition-fast); }
.zoom:hover { transform: scale(1.2); }
.zoom2:hover { transform: scale(1.5); }
.zoom3:hover { transform: scale(2.0); }

.blink-blu { animation: 1s blinker linear infinite; color: var(--blu-main); }
.blink-red { animation: 1s blinker linear infinite; color: var(--red-main); }

@keyframes blinker {
    0% { opacity: 1.0; }
    50% { opacity: 0.0; }
    100% { opacity: 1.0; }
}

/* =======================================
    OVERLAY
======================================= */
.animated-modal {
    background-color: transparent;
}

.modal-content {
    background-size: cover;
    background-repeat: no-repeat;
    height: 400px;
    width: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
}

.modal-text {
    text-align: center;
    color: #FF0000;
    font-weight: bold;
    font-size: 1.2rem;
}

.modal-text img {
    margin-top: 15px;
    max-width: 100%;
    height: auto;
}

/* =======================================
    MEDIA QUERIES RESPONSIVE
======================================= */
@media (max-width: 992px) {
    .main-content-wrapper {
        flex-direction: column;
    }header-gris

    
    .left-menu {
        flex: 1;
        width: auto;
        padding: 10px;
    }

    .header-grid {
        grid-template-columns: 1fr; /* Una sola colonna per impilare gli elementi */
        display: flex; /* Passa a flexbox per un controllo più flessibile */
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        padding: 10px;
    }

    .header-col-1, .header-col-2, .header-col-3 {
        width: 100%;
        text-align: center; /* Centra il testo */
        margin: 0;
        padding: 0;
    }

    .search-and-social-container {
        flex-direction: column; /* Impila la barra di ricerca e i social */
        justify-content: center;
        width: 100%;
        align-items: center;
    }

    .search-box {
        width: 100%;
        justify-content: center;
    }

    .search-box input[type="text"] {
        width: 80%; /* Rende la barra di ricerca più corta */
    }

    .social-links {
        justify-content: center;
    }

    .header-col-2 {
        padding: 0;
    }
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .header-col-2 .logos-row {
        flex-direction: column;
        align-items: center;
    }

    .main-nav {
        flex-direction: column;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .social-links {
        justify-content: center;
        width: 100%; /* Gestisce lo spazio in modo più efficiente */
    }

    .logo-main img {
        max-height: 80px;
    }

    .cert-logos img, .top-logos img {
        max-height: 55px;
    }
}

@media (max-width: 600px) {
    .grid-item img {
        max-width: 200px;
    }

    .header-grid {
        padding: 0.25rem;
    }

    .logo-main img {
        max-height: 50px;
    }

    .cert-logos img, .top-logos img {
        max-height: 45px;
    }

    .search-box input[type="text"] {
        width: 90%;
    }
}