/* =====================================================
   pagine.css — stili comuni a tutte le pagine archivio
   ===================================================== */

/* ===== PAGE HEADER ===== */
.page-header {
    border-bottom: 2px solid #8B4513;
    padding: 24px 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
}
.page-header-text h1 { color: red; margin: 0 0 6px; }
.page-header-text p  { margin: 0; color: #555; }
.page-header-video {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 260px;
}
.page-header-video img   { width: 40px; }
.page-header-video video { width: 100%; max-width: 420px; }

.gallery-hint {
    padding: 8px 16px;
    color: #888;
    font-size: 0.88rem;
    font-style: italic;
}

/* ===== ACCORDION ===== */
.accordion {
    border: 1px solid #d4a07a;
    border-radius: 8px;
    margin: 12px 16px;
    overflow: hidden;
}
.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    cursor: pointer;
    user-select: none;
    transition: filter 0.2s ease;
    /*background-color: #fce8d8;*/
}
.accordion-header:hover {
    filter: brightness(0.97);
}
.accordion-title {
    color: #8B0000;
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0;
}
.accordion-arrow {
    font-size: 1.2rem;
    color: #8B4513;
    transition: transform 0.3s ease;
    line-height: 1;
}
.accordion-arrow.open {
    transform: rotate(180deg);
}
.accordion-body {
    display: none;
    padding: 16px;
    /*background-color: #fce8d8;*/
}
.accordion-body.open {
    display: block;
}
.accordion-title-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    margin-right: 10px;
    vertical-align: middle;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* ===== GALLERY GRID ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
@media (max-width: 600px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== CARD ===== */
.card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #fce8d8;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.card-label {
    padding: 8px 12px;
    font-size: 0.82rem;
    color: #5a3010;
    line-height: 1.3;
    min-height: 36px;
}

/* ===== LIGHTBOX ===== */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
}
#lightbox.active { display: flex; }
#lightbox img {
    max-width: 80vw;
    max-height: 78vh;
    border-radius: 6px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.5);
    transition: opacity 0.15s ease;
}
#lightbox img.fading { opacity: 0; }
#lightbox-caption {
    color: #ddd;
    margin-top: 14px;
    font-size: 0.95rem;
    text-align: center;
    max-width: 600px;
}
#lightbox-counter {
    color: #aaa;
    font-size: 0.8rem;
    margin-top: 6px;
}
#lightbox-close {
    position: fixed;
    top: 18px; right: 24px;
    color: #fff;
    font-size: 2.2rem;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.2s;
    line-height: 1;
    user-select: none;
    background-color: red;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#lightbox-close:hover { opacity: 1; }
.lb-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 4rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 0 16px;
    user-select: none;
    line-height: 1;
}
.lb-arrow:hover { opacity: 1; }
#lb-prev { left: 8px; }
#lb-next { right: 8px; }