@charset "utf-8";

body { 
    background-image:url("../../../docstruttura/foto/body.jpg");
    font-family: Baskerville, "Times New Roman", "serif";
    color: #530D0D;
    margin: 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh; 
	top: 0px !important;
    position: static !important;
    padding-top: 20px !important; /* Ridà respiro al titolo che vedi schiacciato */
}

/* TITOLO */
.titolotre { text-align: center; padding: 40px; color: #530D0D; }

/* GRIGLIA FOTO - MODIFICATA PER AFFIANCAMENTO */


.container-sololed {
    background-color: #FDFBD6;
    width: 95%;
    max-width: 950px;
    margin: 25px auto 100px auto;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: row; /* Cambiato da column a row */
    flex-wrap: wrap;     /* Permette alle foto di andare a capo */
    justify-content: center; /* Centra le foto nella riga */
    align-items: stretch;
    padding-top: 25px;
}

.item-foto {
    width: 150px; 
    height: 150px;
    margin: 10px;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.item-foto img { width: 100%; height: 100%; object-fit: cover; transition: 0.3s; }
.item-foto:hover img { transform: scale(1.1); }

/* LIGHTBOX - SFONDO GIALLO PAGLIERINO TRASPARENTE */
.lightbox {
    display: none; /* Verrà attivato dal JS */
    position: fixed;
    z-index: 99999;
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%;
    /* 0.85 è l'opacità: riducilo a 0.70 per vedere di più il sito dietro */
    background-color: rgba(253, 251, 214, 0.85); 
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center; 
}

.intro-gallery {
    max-width: 800px;
    margin: 0 auto 30px auto;
    text-align: center;
    padding: 0 20px;
}

.intro-gallery p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #530D0D; /* Lo stesso marrone scuro che usi per i titoli */
    font-style: italic; /* Rende il testo più simile a una dedica o riflessione */
}
/* PULSANTE CHIUDI (X) - ORA VISIBILE */
.close { 
    position: absolute; 
    top: 15px; 
    right: 25px; 
    color: #530D0D; /* Colore marrone per contrasto sul giallo */
    font-size: 60px; 
    font-weight: bold;
    cursor: pointer; 
    z-index: 100001;
    line-height: 1;
}

.close:hover {
    color: #AB410A;
}

/* CONTENITORE VERTICALE PER FOTO + FRECCE + TESTO */
.lightbox-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1200px;
}

/* FOTO ADATTABILE AD OGNI SCHERMO */
.lightbox-content {
    max-width: 90%;      /* Non tocca mai i bordi laterali */
    max-height: 60vh;    /* Lascia spazio sotto per testo e bottoni */
    width: auto;
    height: auto;
    border: 5px solid #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: block;
    object-fit: contain; /* Mantiene le proporzioni della foto */
}

/* BARRA COMANDI SOTTO LA FOTO */
.lightbox-controls {
    margin-top: 20px;
    text-align: center;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#caption {
    color: #530D0D;
    font-size: 1.2rem; /* Si adatta alla dimensione del font del dispositivo */
    font-weight: bold;
    margin-bottom: 20px; 
    max-width: 800px;
    line-height: 1.4;
    padding: 0 10px;
}

.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 20px; 
}

/* BOTTONI NAVIGAZIONE PIÙ ADATTI AL MOBILE */
.nav-btn {
    background: #fff;
    border: 2px solid #530D0D;
    color: #530D0D;
    font-size: 20px;
    padding: 10px 25px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav-btn:hover {
    background: #530D0D;
    color: #FDFBD6;
}

/* Nasconde il quadratino e la barra di Google in questa specifica pagina */
#google_translate_element, 
.goog-te-gadget, 
.goog-te-banner-frame {
    display: none !important;
}

#iubenda-cs-banner {
    bottom: 80px !important;
}
/* MEDIA QUERY PER TELEFONINI PICCOLI */
@media (max-width: 600px) {
    #caption { font-size: 16px; }
    .nav-btn { padding: 8px 20px; font-size: 18px; }
    .close { top: 10px; right: 15px; font-size: 50px; }
}
@media (max-height: 500px) {
    .lightbox-content { max-height: 45vh; }
    .close { font-size: 40px; }
}