/* Sección de galería y visor */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.gallery__item { overflow: hidden; border-radius: var(--radius); aspect-ratio: 16 / 9; }
.gallery__item a { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item .media-ph { min-height: 0; }

.lightbox { max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0; padding: 1rem; border: 0; background: transparent; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(15, 44, 35, .95); }
.lightbox__image { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox__btn {
    position: absolute; width: 2.75rem; height: 2.75rem;
    font-size: 1.75rem; line-height: 1; color: var(--ivory); cursor: pointer;
    background: rgba(15, 44, 35, .7); border: 1px solid rgba(198, 167, 120, .5); border-radius: 50%;
}
.lightbox__btn--close { top: 1rem; right: 1rem; }
.lightbox__btn--prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__btn--next { right: 1rem; top: 50%; transform: translateY(-50%); }

@media (min-width: 40em) {
    .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 64em) {
    /* 6 imágenes: una destacada 2x2 + cinco normales, sin huecos */
    .gallery { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 14rem; }
    .gallery__item { aspect-ratio: auto; }
    .gallery__item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
}
