@charset "utf-8";

/* --- STILE GENERALE PAGINA --- */
/* --- Modifica Titolo Racconti Fotografici --- */
#documenti-page p {
    color: #530D0D;
    text-align: center;      /* Centra la scritta */
    font-size: 82px;         /* La rende più grande e importante */
    font-weight: bolder;     /* Testo bello marcato */
    margin-top: 10px;
    margin-bottom: 30px;     /* Aumenta lo spazio dalle foto sotto */
    font-family: 'Georgia', serif; /* Opzionale: per un tocco più elegante */
}

/* Assicuriamoci che il contenitore principale non blocchi la centratura */
#documenti-page {
    display: flex;
    flex-direction: column;
    align-items: center;    /* Forza tutto il contenuto al centro */
    padding: 40px 20px;
}

.titolotre {
    text-align: center;
    padding: 40px;
    font-size: 40px;
}

.intro-gallery {
    max-width: 800px;
    margin: 0 auto 30px auto;
    text-align: center;
    padding: 0 20px;
}

.intro-gallery p {
    font-size: 1.5rem;
    line-height: 1.8;
    font-style: italic; /* Rende il testo più simile a una dedica o riflessione */
}

/* --- GRIGLIA DOCUMENTI --- */
.documenti-grid {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.documenti-grid li a {
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    text-decoration: none;
    color: #530D0D;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.documenti-grid li a:hover {
    transform: scale(1.05);
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.1);
}

.documenti-grid li a img {
    width: 65px;
    height: auto;
    margin-right: 15px;
    border-radius: 5px;
}

/* --- GRIGLIA FOTO (MINIATURE) --- */
.container-sololed {
    background-color: #FDFBD6;
    width: 95%;
    max-width: 950px;
    margin: 25px auto 100px auto;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 25px 10px;
    gap: 15px;
}

.item-foto {
    width: 150px; 
    height: 150px;
    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 (IL POPUP CENTRATO) --- */
.lightbox {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%;
    background-color: #fdf6e3; 
	background-color: rgba(253, 251, 214, 0.85); 
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center;
    
    /* Logo di sfondo */
   /* background-image: url("foto/Minianicola01.gif"); /* Ho corretto il percorso per essere relativo */
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 200px;
    background-blend-mode: multiply;
    /* AGGIUNTA: Un po' di respiro dal bordo superiore */
    padding-top: 40px; 
    box-sizing: border-box;
    
}

.lightbox-stack {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
	/* AGGIUNTA: Spinge tutto leggermente più giù */
    margin-top: 180px;
}



.lightbox-content {
    max-width: 90%;      /* Non tocca mai i bordi laterali */
    max-height: 55vh;    /* 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 */
}

.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;
    gap: 20px;
    justify-content: center;
}

.nav-btn {
    background: #fff;
    border: 2px solid #530D0D;
    color: #530D0D;
    padding: 10px 25px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 5px;
    transition: 0.3s;
}

.nav-btn:hover {
    background: #530D0D;
    color: #FDFBD6;
}


/* --- UTILITY & MOBILE --- */
#google_translate_element, .goog-te-gadget, .goog-te-banner-frame { display: none !important; }

@media (max-width: 600px) {
    #caption { font-size: 16px; }
    .nav-btn { padding: 8px 15px; font-size: 18px; }
    .lightbox-content { max-height: 50vh; }
}
