/* ============================================================
   1. STRUTTURA PRINCIPALE E TESTO
   ============================================================ */
main[role="main"] {
    max-width: 700px; 
    margin: 40px auto;
    padding: 0 20px;
    font-family: Georgia, serif;
    line-height: 1.8; 
    color: #1a1a1a;
}

.opera-header {
    text-align: center;
    margin-bottom: 50px;
}

.opera-header h4 {
    font-size: 1.4rem;
    font-weight: normal;
    margin-bottom: 10px;
    color: #000;
}

.sottotitolo {
    font-size: 1.2rem;
    color: #555;
}

.sottotitolo a {
    color: #c0392b;
    text-decoration: none;
}

.testo-opera {
    font-size: 1.15rem;
    text-align: justify;
    margin-bottom: 60px;
}

.testo-opera p {
    margin-bottom: 1.5rem; /* Corretto errore sintassi */
    text-indent: 0; 
}

/* ============================================================
   2. GALLERIA MUSEALE (Griglia Responsive)
   ============================================================ */
   .museum-intro {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    line-height: 1.6;
    color: #333;
    border-left: 4px solid #b58900; /* Un tocco d'oro antico */
    background-color: #fdf6e3;
}

.gallery-container {
    max-width: 1000px; /* Più largo del testo per dare respiro alle immagini */
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.museum-grid {
    display: grid;
    /* Crea colonne da almeno 200px che si adattano allo schermo */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.museum-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: #ffffff; /* Sfondo bianco per far risaltare le foto */
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: background 0.3s ease;
}

.museum-item:hover {
    background: #fdfdfd;
}

.museum-item img {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 220px; /* Mantiene uniformità visiva */
    object-fit: contain;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* Ombra più morbida */
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.museum-item img:hover {
    transform: translateY(-5px) scale(1.02);
}

.museum-item figcaption {
    font-size: 0.9rem;
    color: #333;
    margin-top: 12px;
    line-height: 1.4;
    font-weight: 500;
}

/* Link extra nelle didascalie */
.reconstruction-link {
    display: block;
    font-size: 0.8rem;
    font-style: italic;
    color: #0066cc;
    text-decoration: none;
    margin-top: 6px;
}

.sub-links {
    font-size: 0.8rem;
    margin-top: 8px;
}

.sub-links a {
    color: #0077aa;
    text-decoration: none;
    background: #f0f4f8;
    padding: 3px 8px;
    border-radius: 4px;
    margin: 0 2px;
}

/* ============================================================
   3. NAVIGAZIONE E FOOTER
   ============================================================ */
.navigazione-opera {
    margin-top: 60px;
    background-color: #f9f9f9;
    padding: 30px;
    border: 1px solid #eee;
    border-radius: 8px;
}

.approfondimenti h5 {
    margin-top: 0;
    font-size: 1.1rem;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.approfondimenti ul {
    list-style-type: none;
    padding: 0;
}

.approfondimenti li {
    margin-bottom: 12px;
    padding-left: 15px;
    border-left: 2px solid #ccc;
}

.approfondimenti a {
    color: #004a99;
    text-decoration: none;
}

.fine-lettura {
    text-align: center;
    margin-top: 30px;
    font-style: italic;
    color: #999;
}