/* Approved gallery layout; the site's original theme is unchanged elsewhere. */
#navbarResponsive.show { max-height: calc(100vh - 76px); overflow-y: auto; }
.gallery-page #contenuto { padding-top: 76px; }
.gallery-page .page-heading { max-width: 1100px; margin: 0 auto; padding: 2rem 1rem 1.5rem; line-height: 1.2; }
.gallery-page #contenuto > section { padding-top: 1.5rem; padding-bottom: 2.5rem; }
.video-card a { color: var(--site-brand); }
.album-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.album-card { display: flex; flex-direction: column; background: var(--site-surface); border-radius: var(--site-radius, 12px); box-shadow: var(--site-shadow, 0 4px 16px rgba(35,25,30,.10)); overflow: hidden; color: #252525; }
.album-card:hover { color: #252525; text-decoration: none; box-shadow: 0 6px 22px rgba(35,25,30,.18); }
.album-card > img { display: block; width: 100%; height: auto; aspect-ratio: 7 / 10; object-fit: contain; background: #f2f2f2; }
.album-caption { padding: 1rem; }
.album-caption h2, .album-caption h3 { color: var(--site-brand, var(--site-brand)); line-height: 1.4; }
.album-caption p { margin: .5rem 0 0; }
.album-date { color: #555; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.photo-thumbnail { display: block; background: #e7e7e7; border-radius: 8px; overflow: hidden; }
.photo-thumbnail img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-viewer .modal-dialog { max-width: 1100px; width: calc(100% - 2rem); margin: 1rem auto; }
.photo-viewer .modal-content { background: #181818; color: var(--site-on-brand); border-radius: var(--site-radius, 12px); }
.photo-viewer .modal-header, .photo-viewer .modal-footer { border: 0; }
.photo-viewer .close { color: var(--site-on-brand); opacity: 1; min-width: 44px; min-height: 44px; }
.photo-viewer .modal-body { padding: .5rem 1rem; }
.photo-viewer .modal-body img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 11rem); margin: auto; }
.photo-viewer .modal-footer { display: flex; justify-content: space-between; gap: .5rem; }
.photo-viewer .modal-footer p { margin: 0; }
.video-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.video-card { margin: 0; background: var(--site-surface); border-radius: var(--site-radius, 12px); box-shadow: var(--site-shadow, 0 4px 16px rgba(35,25,30,.10)); overflow: hidden; }
.video-card iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
.video-card figcaption { padding: .75rem 1rem; }

@media (min-width: 576px) { .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 768px) {
    .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .album-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) { .photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 767px) {
    .gallery-page .page-heading { padding-top: 1.5rem; font-size: 1.75rem; }
    .photo-grid { gap: .5rem; }
    .photo-viewer .modal-footer .btn { padding: .5rem; min-height: 44px; }
}
