/* Stile responsive per Istituto Rosmini */

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

body {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    padding-bottom: 60px; /* Spazio per footer fixed */
    background-color: #f5f4f3;
}

/* Titoli e testo in grassetto */
h1, h2, h3, h4, h5, h6 {
    font-family: "Georgia", Helvetica, Arial, sans-serif;
    line-height: 1.3;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

h1 { font-size: 1.8em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.5em; color: #333; text-transform: none; }
h4 { font-size: 1.1em; }
h5 { font-size: 1em; }
h6 { font-size: 0.9em; }

strong, b {
    font-weight: 600;
}

em, i {
    font-style: italic;
}

/* Paragrafi e testo */
p {
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 1em;
}

/* Titolo principale del sito */
.site-title {
    font-family: "Georgia", Helvetica, Arial, sans-serif;
    color: #a7976f;
    font-size: 1.6em;
    font-weight: normal;
    line-height: 1.3;
    margin: 20px auto;
    padding: 15px 10px;
    text-align: center;
    max-width: 900px;
}

/* Link globali */
a {
    color: #a7976f;
    text-decoration: underline;
}

a:hover {
    color: #8a7c5a;
    text-decoration: underline;
}

/* Container principale */
.container {
    max-width: 900px;
    margin: 0 auto;
}

/* Menu orizzontale */
.menu-header {
    padding: 20px 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #fff;
    position: relative;
    min-height: 120px;
}

/* Language switcher */
.lang-switcher {
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: row;
    gap: 5px;
}

.lang-switcher a {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.lang-switcher a:hover {
    background-color: #f0f0f0;
    color: #333;
}

.lang-switcher a.active {
    background-color: #a7976f;
    color: #fff;
    border-color: #a7976f;
}

.menu-logo {
    text-align: center;
}

.menu-logo img {
    max-width: 230px;
    height: auto;
    margin-bottom: 15px;
}

.menu-logo a {
    text-decoration: none;
}

/* Hamburger button - hidden on desktop */
.hamburger {
    display: none;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.menu-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
}

.menu-nav a {
    display: inline-block;
    padding: 8px 12px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid #ddd;
}

.menu-nav a:last-child {
    border-right: none;
}

.menu-nav a:hover {
    background-color: #e0e0e0;
    text-decoration: none;
}

.menu-nav a.active {
    background-color: #e8e8e8;
    color: #a7976f;
}

/* Contenuto principale */
.content {
    padding: 20px;
    margin: 10px 0;
    font-size: 15px;
    line-height: 1.6;
}

.content img {
    max-width: 100%;
    height: auto;
}

.content iframe {
    max-width: 100%;
}

.content table {
    max-width: 100%;
}

/* Box News (ex aggiornamento) */
.box-aggiornamento {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-left: 3px solid #a7976f;
    padding: 15px;
    margin: 15px auto;
    max-width: 80%;
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
}

/* Separatore sezioni (linea grigia) */
.section-divider {
    border: none;
    border-top: 1px solid #ccc;
    margin: 30px auto;
    max-width: 60%;
}

hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 25px 0;
}

/* Footer */
.footer {
    background-color: #fff;
    padding: 15px;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 50px; /* Spazio per footer-cookies fixed */
    font-size: 12px;
}

.footer-sponsors {
    margin-bottom: 15px;
    font-size: 11px;
}

.footer-sponsors img {
    max-height: 50px;
    width: auto;
    margin: 5px 10px;
    vertical-align: middle;
}

/* Footer cookies - fixed in fondo */
.footer-cookies {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #333;
    padding: 10px 20px;
    font-size: 11px;
    line-height: 1.4;
    color: #fff;
    text-align: center;
    z-index: 1000;
}

.footer-cookies.hidden {
    display: none;
}

.footer-cookies a {
    color: #a7976f;
}

.footer-cookies a:hover {
    color: #fff;
}

.footer-cookies .close-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
}

.footer-cookies .close-btn:hover {
    color: #a7976f;
}

/* Cookie minimized */
.cookie-minimized {
    position: fixed;
    bottom: 10px;
    left: 10px;
    background-color: #333;
    color: #fff;
    padding: 8px 15px;
    font-size: 11px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1000;
    display: none;
}

.cookie-minimized:hover {
    background-color: #a7976f;
}

.cookie-minimized.visible {
    display: block;
}

/* Responsive */
@media screen and (max-width: 768px) {
    body {
        padding: 5px;
        padding-bottom: 70px;
        font-size: 15px;
    }

    .menu-header {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
        min-height: auto;
        position: relative;
    }

    .hamburger {
        display: block;
        position: static;
        transform: none;
        order: 1;
    }

    .menu-logo {
        order: 2;
        margin: 0;
    }

    .menu-logo img {
        max-height: 50px;
    }

    .lang-switcher {
        position: static;
        order: 3;
    }

    .lang-switcher a {
        padding: 3px 6px;
        font-size: 10px;
    }

    .menu-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        background-color: #fff;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    .menu-nav.open {
        display: flex;
    }

    .menu-nav a {
        padding: 12px 20px;
        font-size: 13px;
        border-right: none;
        border-bottom: 1px solid #eee;
        text-align: center;
    }

    .menu-nav a:last-child {
        border-bottom: none;
    }

    .content {
        padding: 15px;
        font-size: 14px;
    }

    .box-aggiornamento {
        max-width: 95%;
        margin: 10px auto;
    }

    .footer-sponsors img {
        max-height: 40px;
        margin: 3px 5px;
    }

    /* Tabelle responsive */
    table {
        width: 100% !important;
        display: block;
        overflow-x: auto;
    }

    td, th {
        min-width: 100px;
    }

    iframe {
        width: 100% !important;
        height: auto !important;
        min-height: 200px;
    }
}

@media screen and (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .menu-nav a {
        padding: 5px 6px;
        font-size: 11px;
    }

    .footer-sponsors img {
        max-height: 35px;
        display: block;
        margin: 5px auto;
    }

    h1 { font-size: 1.5em; }
    h2 { font-size: 1.3em; }
    h3 { font-size: 1.1em; }

    .site-title {
        font-size: 1.3em;
    }

    .footer-cookies {
        font-size: 11px;
        padding: 10px 15px;
    }
}

/* Logo principale */
.logo-main {
    max-width: 400px;
    width: 100%;
    height: auto;
}

/* Box convegno */
.convegno-box {
    margin: 20px 0;
    padding: 15px;
}

.convegno-titolo {
    font-family: "Georgia", Helvetica, Arial, sans-serif;
    color: #a7976f;
    font-size: 1.2em;
    line-height: 1.4;
}

.convegno-data {
    color: #a7976f;
    font-size: 1.1em;
    line-height: 1.4;
}

/* Immagini responsive */
.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px auto;
}

/* Video container responsive */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 560px;
    margin: 20px auto;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Avviso box */
.avviso-box {
    background: #f8f8f8;
    border: 1px solid #ddd;
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
}

/* Small text */
.small-text {
    font-size: 0.85em;
    line-height: 1.5;
}

/* Footer info */
.footer-info {
    padding: 10px;
    font-size: 11px;
}

.footer-bottom {
    background-color: #f0f0f0;
    padding: 12px 20px;
    text-align: center;
    font-size: 11px;
    color: #555;
}

.footer-bottom a {
    color: #555;
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

.footer-bottom .separator {
    margin: 0 10px;
    color: #999;
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.color-red { color: #333; }
.color-blue { color: #333333; }
.color-navy { color: #000; }
.color-gold { color: #a7976f; }
.color-gray { color: #666; }

/* Page subtitle h2 */
.text-center h2.color-gray {
    font-size: 1.1em;
    font-weight: normal;
    font-style: italic;
    margin-top: 5px;
    margin-bottom: 20px;
}

.mt-10 { margin-top: 10px; }
.mb-10 { margin-bottom: 10px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }

/* Bottone oro */
.btn-gold {
    display: inline-block;
    background-color: #a7976f;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin-top: 10px;
    border-radius: 10px;
}

.btn-gold:hover {
    background-color: #8a7c5a;
    color: #fff;
    text-decoration: none;
}

/* Mobile responsive adjustments */
@media screen and (max-width: 600px) {
    .convegno-titolo {
        font-size: 1.1em;
    }

    .convegno-data {
        font-size: 1em;
    }

    .video-container {
        max-width: 100%;
    }

    .small-text {
        font-size: 0.8em;
    }
}

/* =============================================
   PAGE-SPECIFIC STYLES
   ============================================= */

/* ----- HOMEPAGE ----- */
.home-section {

    margin-top:0; margin-bottom: 30px;
    padding-top:0;
    padding-left:25px;
    padding-right:25px;
    padding-bottom:25px;

    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 4px solid #a7976f;
}
.home-section h3 {
    margin: 0 -25px 20px -25px;
    padding: 12px 25px;
    background: #3c4b64;
    color: #fff;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 600;
}
.agg-item {
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
}
.agg-item:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.convegno-home-item {
    padding-bottom: 25px;
    margin-bottom: 25px;
    border-bottom: 2px solid #ccc;
}
.convegno-home-item:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.static-section {
    margin: 30px 0;
    padding: 25px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 4px;
}
.agg-content { line-height: 1.6; }
.agg-data { color: #a7976f; font-size: 13px; margin-bottom: 10px; }
.btn-scopri {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: #a7976f;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
}
.btn-scopri:hover { background: #8a7a5a; color: #fff; }
.section-footer {
    margin-top: 20px;
    padding-top: 15px;
/*    border-top: 1px solid #e0d9c8;*/
    text-align: right;
}
.btn-vedi-tutti {
    color: #a7976f;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
}
.btn-vedi-tutti:hover { color: #8a7a5a; text-decoration: underline; }

/* ----- CONVEGNI ----- */
.convegno-item {
    margin-bottom: 40px;
    padding: 25px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 4px solid #a7976f;
}
.convegno-numero {
    color: #a7976f;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}
.convegno-tema {
    color: #333;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.4;
}
.convegno-info {
    color: #333;
    margin-bottom: 15px;
    line-height: 1.6;
}
.convegno-links a {
    display: inline-block;
    margin: 5px 10px 5px 0;
    padding: 8px 16px;
    background: #a7976f;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
}
.convegno-links a:hover { background: #8a7a5a; }
.convegno-img {
    margin-top: 20px;
    text-align: center;
}
.convegno-img img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
}
.section-year {
    font-size: 28px;
    color: #a7976f;
    border-bottom: 3px solid #a7976f;
    padding-bottom: 10px;
    margin: 50px 0 30px 0;
}

/* ----- NEWS ----- */
.news-item {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 4px;
}
.news-data {
    color: #a7976f;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 10px;
}
.news-titolo {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}
.news-testo {
    line-height: 1.6;
    margin-bottom: 15px;
}
.news-testo img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
}
.btn-link {
    display: inline-block;
    padding: 8px 16px;
    background: #a7976f;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    margin-top: 10px;
}
.btn-link:hover { background: #8a7a5a; color: #fff; }
.section-title {
    margin-top: 50px;
    padding-bottom: 10px;
    border-bottom: 2px solid #a7976f;
    color: #333;
}
.in-memoriam {
    background: #fff;
    border-left: 3px solid #666;
}

/* ----- GALLERY ----- */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin: 30px 0;
}
.album-card {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}
.album-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.album-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #ddd;
}
.album-info { padding: 15px; }
.album-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}
.album-year {
    color: #a7976f;
    font-size: 13px;
}
.album-pdf-icon {
    display: inline-block;
    background: #dc3545;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    margin-left: 5px;
}
.foto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin: 20px 0;
}
.foto-item {
    cursor: pointer;
    border-radius: 5px;
    overflow: hidden;
}
.foto-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    transition: transform 0.2s;
}
.foto-item:hover img { transform: scale(1.05); }
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.lightbox.active { display: flex; }
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 10001;
}
.lightbox-close:hover { color: #a7976f; }
.lightbox-content {
    max-width: 90%;
    max-height: 75%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}
.lightbox-caption {
    color: #fff;
    text-align: center;
    padding: 20px;
    max-width: 800px;
    font-size: 15px;
    line-height: 1.6;
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 50px;
    cursor: pointer;
    padding: 20px;
    user-select: none;
}
.lightbox-nav:hover { color: #a7976f; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-counter {
    color: #999;
    font-size: 13px;
    margin-top: 10px;
}
.btn-back {
    display: inline-block;
    margin-bottom: 20px;
    padding: 10px 20px;
    background: #a7976f;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
}
.btn-back:hover { background: #8a7a5a; color: #fff; }

/* ----- SOCI (MEMBERS) ----- */
.members-section {
    margin: 20px 0;
    padding: 25px;
    text-align: center;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 4px;
}
.members-section h3 {
    color: #333;
    margin: 25px 0 15px 0;
}
.member-photo {
    width: 220px;
    height: auto;
    margin: 15px auto;
    display: block;
}
.deceased-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

/* ----- PRESENTAZIONE ----- */
.indice-box {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 4px;
    padding: 20px 25px;
    margin-bottom: 30px;
}
.indice-box p {
    margin: 0;
    line-height: 2;
}
.indice-box p a {
    text-decoration: none;
}
.indice-box p a:hover {
    text-decoration: underline;
}
.sezione {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 4px;
    padding: 25px;
    margin-bottom: 25px;
    scroll-margin-top: 20px;
}
.sezione h3 {
    color: #333;
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #a7976f;
}
.btn-top {
    display: inline-block;
    margin-top: 15px;
    color: #a7976f;
    text-decoration: none;
    font-size: 13px;
}
.btn-top:hover { text-decoration: underline; }
.lista-persone {
    margin: 15px 0;
}
.lista-persone p {
    margin: 5px 0;
}
.lista-convegni, .lista-atti {
    margin: 15px 0;
    padding-left: 30px;
}
.lista-convegni li, .lista-atti li {
    margin-bottom: 8px;
    line-height: 1.5;
}
.text-justify {
    text-align: justify;
}

/* ----- COMUNICATI ----- */
.comunicato-item {
    margin-bottom: 25px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 3px solid #a7976f;
}
.comunicato-data {
    color: #a7976f;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 10px;
}
.comunicato-titolo {
    font-size: 16px;
    margin-bottom: 10px;
}
.btn-pdf {
    display: inline-block;
    padding: 8px 16px;
    background: #a7976f;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    margin-top: 10px;
}
.btn-pdf:hover {
    background: #8a7a5a;
    color: #fff;
}
.btn-pdf img {
    vertical-align: middle;
    margin-left: 5px;
}
.anno-section {
    margin-top: 40px;
    padding-bottom: 10px;
    border-bottom: 2px solid #a7976f;
    color: #333;
}

/* ----- AGGIORNAMENTI ----- */
.aggiornamento-item {
    display: none;
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 3px solid #a7976f;
}
.aggiornamento-item.visible {
    display: block;
}
.aggiornamento-data {
    color: #a7976f;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
}
.aggiornamento-testo {
    line-height: 1.6;
}
.aggiornamento-testo img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}
.btn-mostra-altri {
    display: block;
    width: 100%;
    padding: 12px;
    background: #a7976f;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    margin: 20px 0;
    border-radius: 4px;
}
.btn-mostra-altri:hover {
    background: #8a7a5a;
}
.aggiornamento-testo {
    margin-top: 8px;
}
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
    flex-wrap: wrap;
}
.pagination button {
    padding: 8px 14px;
    border: 1px solid #a7976f;
    background: #fff;
    color: #a7976f;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}
.pagination button:hover {
    background: #a7976f;
    color: #fff;
}
.pagination button.active {
    background: #a7976f;
    color: #fff;
}
.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.pagination-info {
    text-align: center;
    margin: 15px 0;
    color: #666;
    font-size: 14px;
}

/* ----- LINKS ----- */
.links-section {
    margin: 20px 0;
    padding: 25px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 4px;
}
.links-section h3 {
    color: #000;
    margin: 25px 0 15px 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}
.links-section ul {
    list-style: disc;
    margin-left: 20px;
}
.links-section li {
    margin: 8px 0;
}
.sponsor-img {
    max-width: 350px;
    height: auto;
    margin: 10px;
}

/* ----- INFO (CONTATTI) ----- */
.contact-box {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 3px solid #a7976f;
    padding: 25px;
    margin: 20px 0;
    text-align: center;
}
.contact-box img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}

/* Info box for EN comunicati */
.info-box {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 3px solid #a7976f;
    padding: 20px;
    margin: 30px 0;
}
.lang-links {
    margin-top: 30px;
}
.lang-links a {
    display: inline-block;
    margin: 10px;
    padding: 12px 25px;
    background: #a7976f;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}
.lang-links a:hover {
    background: #8a7a5a;
}

/* =============================================
   ADMIN PANEL STYLES
   ============================================= */

.admin-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background: #f5f5f5;
}

.admin-body * {
    font-family: inherit;
}

/* Mantieni Georgia solo nell'editor */
.admin-body .ql-editor,
.admin-body .ql-editor * {
    font-family: "Georgia", serif;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.admin-container h1 {
    color: #000;
    border-bottom: 2px solid #3c4b64;
    padding-bottom: 10px;
    margin-top: 0;
}

.admin-container h2 {
    color: #000;
    margin-top: 30px;
}

/* Admin Login */
.login-form {
    max-width: 350px;
    margin: 0 auto;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.login-form h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    border: none;
    padding: 0;
}

.login-form input {
    width: 100%;
    padding: 12px 15px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.login-form input:focus {
    outline: none;
    border-color: #3c4b64;
}

.login-form button {
    width: 100%;
    padding: 12px;
    background: #3c4b64;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 15px;
    margin-top: 15px;
    transition: background 0.2s;
}

.login-form button:hover {
    background: #2c3a4a;
}

/* Login page - container centrato */
.admin-container:has(.login-form) {
    max-width: 100%;
    background: transparent;
    box-shadow: none;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 40px);
}

/* Admin Form Elements */
.admin-container .form-group {
    margin-bottom: 15px;
}

.admin-container .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.admin-container .form-group input[type="text"],
.admin-container .form-group input[type="date"],
.admin-container .form-group input[type="number"],
.admin-container .form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
}

.admin-container .form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.admin-container .form-col {
    flex: 1;
    min-width: 200px;
}

/* Admin Buttons */
.admin-container .btn {
    padding: 8px 16px;
    border: none;
    cursor: pointer;
    margin: 2px;
    font-size: 13px;
    border-radius: 3px;
    text-decoration: none;
    display: inline-block;
}

.admin-container .btn-primary {
    background: #000;
    color: white;
}

.admin-container .btn-success {
    background: #28a745;
    color: white;
}

.admin-container .btn-danger {
    background: #dc3545;
    color: white;
}

.admin-container .btn-warning {
    background: #ffc107;
    color: black;
}

.admin-container .btn-secondary {
    background: #6c757d;
    color: white;
}

.admin-container .btn:hover {
    opacity: 0.85;
}

/* Admin Messages */
.admin-container .message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 3px;
}

.admin-container .message.success {
    background: #d4edda;
    color: #155724;
}

.admin-container .message.error {
    background: #f8d7da;
    color: #721c24;
}

/* Admin Tables */
.admin-container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 13px;
}

.admin-container th,
.admin-container td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    vertical-align: top;
}

.admin-container th {
    background: #000;
    color: white;
}

.admin-container tr:hover {
    background: #f9f9f9;
}

.admin-container .status-pub {
    color: green;
    font-weight: bold;
}

.admin-container .status-unpub {
    color: #999;
}

/* Admin Top Bar */
.admin-container .top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.admin-container .back-link {
    color: #3c4b64;
}

/* Admin Preview */
.admin-container .preview {
    background: #f9f9f9;
    padding: 8px;
    border: 1px solid #eee;
    max-height: 60px;
    overflow: auto;
    font-size: 12px;
}

.admin-container .help-text {
    font-size: 11px;
    color: #666;
    margin-top: 3px;
}

/* Admin Editor */
.admin-container .editor-container {
    border: 1px solid #ccc;
    border-radius: 3px;
}

.admin-container .ql-container {
    min-height: 120px;
    font-size: 14px;
}

.admin-container .ql-editor {
    min-height: 120px;
}

.admin-container .ql-container.ql-large {
    min-height: 400px;
}

.admin-container .ql-container.ql-large .ql-editor {
    min-height: 400px;
}

/* Admin Language Tabs */
.admin-container .lang-tab {
    display: inline-block;
    padding: 8px 15px;
    cursor: pointer;
    background: #eee;
    border: 1px solid #ddd;
    border-bottom: none;
    margin-right: 2px;
    border-radius: 3px 3px 0 0;
}

.admin-container .lang-tab.active {
    background: white;
    border-bottom: 1px solid white;
    margin-bottom: -1px;
}

.admin-container .lang-content {
    border: 1px solid #ddd;
    padding: 15px;
    display: none;
}

.admin-container .lang-content.active {
    display: block;
}

.admin-container .lang-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    margin-right: 3px;
}

.admin-container .lang-badge.it {
    background: #e8f5e9;
    color: #2e7d32;
}

.admin-container .lang-badge.de {
    background: #e3f2fd;
    color: #1565c0;
}

.admin-container .lang-badge.en {
    background: #fff3e0;
    color: #e65100;
}

/* Admin Section Tabs */
.admin-container .section-tabs {
    display: flex;
    justify-content: flex-start;
    gap: 0;
    margin-bottom: 20px;
    background: #3c4b64;
    border-radius: 4px;
    overflow: hidden;
}

.admin-container .section-tab {
    padding: 12px 18px;
    text-decoration: none;
    color: rgba(255,255,255,0.8);
    background: transparent;
    border-radius: 0;
    font-weight: 500;
    font-size: 13px;
    border-right: 1px solid rgba(255,255,255,0.1);
    transition: background 0.2s, color 0.2s;
}

.admin-container .section-tab:last-child {
    border-right: none;
}

.admin-container .section-tab:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-container .section-tab.active {
    background: rgba(255,255,255,0.2);
    color: white;
}

.admin-container .section-tab.page-tab {
    border-bottom: none;
}

.admin-container .section-tab.page-tab:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-container .section-tab.page-tab.active {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Admin Links Manager */
.admin-container .links-manager {
    background: #f9f9f9;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-top: 15px;
}

.admin-container .link-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: white;
    border: 1px solid #eee;
    border-radius: 3px;
}

.admin-container .link-item input {
    flex: 1;
    padding: 6px;
    border: 1px solid #ddd;
    font-size: 12px;
}

.admin-container .link-item .btn {
    padding: 6px 12px;
}

/* Admin Translator */
.admin-container .translator-box {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-top: 30px;
}

.admin-container .translator-box h2 {
    margin-top: 0;
}

.admin-container .translator-row {
    display: flex;
    gap: 20px;
}

.admin-container .translator-col {
    flex: 1;
}

.admin-container .translator-col textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
}

.admin-container .btn-translate {
    background: #3c4b64;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    margin-top: 10px;
}

/* Admin Star Button */
.admin-container .btn-star {
    background: transparent;
    border: 1px solid #ffc107;
    color: #ccc;
    font-size: 16px;
    padding: 4px 8px;
}

.admin-container .btn-star:hover {
    background: #fff8e1;
}

.admin-container .btn-star.active {
    color: #ffc107;
    background: #fff8e1;
}

.admin-container .star-icon {
    font-style: normal;
}

/* Admin Image Upload */
.admin-container .image-upload-box,
.admin-container .file-upload-box {
    background: #f9f9f9;
    border: 2px dashed #ddd;
    padding: 15px;
    border-radius: 5px;
}

.admin-container .image-upload-box input[type="file"],
.admin-container .file-upload-box input[type="file"] {
    margin-bottom: 10px;
}

.admin-container .image-preview,
.admin-container .file-preview {
    margin-top: 10px;
}

.admin-container .image-preview img {
    border: 1px solid #ddd;
    border-radius: 3px;
}

.admin-container .btn-sm {
    padding: 4px 8px;
    font-size: 11px;
    margin-top: 5px;
}

.admin-container .uploading {
    opacity: 0.5;
    pointer-events: none;
}

/* Admin Page Info */
.admin-container .page-info {
    background: #e8f4fd;
    border: 1px solid #b8daff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.admin-container .page-info h3 {
    margin-top: 0;
    color: #004085;
}

.admin-container .page-info p {
    margin-bottom: 0;
    color: #004085;
    font-size: 14px;
}

/* File upload indicator */
.admin-container .file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #e8f5e9;
    border-radius: 4px;
    margin-top: 10px;
}

.admin-container .file-info .file-icon {
    font-size: 24px;
    color: #dc3545;
}

.admin-container .file-info .file-name {
    flex: 1;
    font-size: 13px;
    word-break: break-all;
}

.admin-container .current-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 10px;
}

/* =============================================
   PRESENTAZIONE PAGE - SIDEBAR LAYOUT
   ============================================= */

.presentazione-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 10px 20px;
}
.presentazione-header .text-center {
  /*  background: #fff;*/
    padding: 25px;
/*    box-shadow: 0 2px 8px rgba(0,0,0,0.08);*/
}
.presentazione-layout {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    align-items: flex-start;
}

.presentazione-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.presentazione-sidebar .indice-box {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 0;
}

.presentazione-sidebar .indice-box p {
    margin: 0;
    line-height: 1.8;
    font-size: 13px;
}

.presentazione-sidebar .indice-box p strong {
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
    color: #333;
    border-bottom: 2px solid #a7976f;
    padding-bottom: 8px;
}

.presentazione-sidebar .indice-box a {
    display: block;
    padding: 8px 0;
    text-decoration: none;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
    transition: color 0.2s, padding-left 0.2s;
}

.presentazione-sidebar .indice-box a:last-child {
    border-bottom: none;
}

.presentazione-sidebar .indice-box a:hover {
    color: #a7976f;
    padding-left: 5px;
}

.presentazione-main {
    flex: 1;
    min-width: 0;
    background-color:#fff;
    padding-left: 30px;
    padding-right: 30px;
}

.presentazione-main .content {
    padding: 0;
    margin: 0;
}

/* Responsive sidebar */
@media screen and (max-width: 900px) {
    .presentazione-header {
        padding: 20px 15px 10px 15px;
    }
    .presentazione-layout {
        flex-direction: column;
        padding: 15px;
    }

    .presentazione-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        margin-bottom: 20px;
    }

    .presentazione-sidebar .indice-box {
        padding: 15px;
    }

    .presentazione-sidebar .indice-box a {
        padding: 6px 0;
        font-size: 14px;
    }

    .presentazione-main {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .presentazione-header {
        padding: 15px 10px 5px 10px;
    }
    .presentazione-header .text-center {
        padding: 15px;
    }
    .presentazione-layout {
        padding: 10px;
    }

    .presentazione-sidebar .indice-box p {
        font-size: 12px;
    }
}
