/* Galería: estilos específicos de esta página */
#galeria {
  padding-top: 3rem;
  padding-bottom: 3rem;
}
.gallery-item {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  user-select: none;
  width: 100%;
  height: auto;
  display: block;
}
.gallery-item:hover {
  transform: scale(1.03);
}

/* Estilo de mosaico con CSS Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(150px, auto);
  gap: 1rem;
}

.gallery-cell {
  overflow: hidden;
  border-radius: 8px;
}

.gallery-grid .gallery-item {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Patrón de mosaico explícito para pantallas grandes */
@media (min-width: 992px) {
  .gallery-cell:nth-child(1) {
    grid-column: 1 / span 4;
    grid-row: 1 / span 2;
  }
  .gallery-cell:nth-child(2) {
    grid-column: 5 / span 3;
    grid-row: 1 / span 1;
  }
  .gallery-cell:nth-child(3) {
    grid-column: 8 / span 5;
    grid-row: 1 / span 2;
  }
  .gallery-cell:nth-child(4) {
    grid-column: 5 / span 3;
    grid-row: 2 / span 1;
  }
  .gallery-cell:nth-child(5) {
    grid-column: 1 / span 4;
    grid-row: 3 / span 2;
  }
  .gallery-cell:nth-child(6) {
    grid-column: 5 / span 4;
    grid-row: 3 / span 1;
  }
  .gallery-cell:nth-child(7) {
    grid-column: 9 / span 4;
    grid-row: 3 / span 1;
  }
  .gallery-cell:nth-child(8) {
    grid-column: 5 / span 8;
    grid-row: 4 / span 2;
  }
  .gallery-cell:nth-child(9) {
    grid-column: 1 / span 4;
    grid-row: 5 / span 1;
  }
  .gallery-cell:nth-child(10) {
    grid-column: 1 / span 4;
    grid-row: 6 / span 2;
  }
  .gallery-cell:nth-child(11) {
    grid-column: 5 / span 3;
    grid-row: 6 / span 1;
  }
  .gallery-cell:nth-child(12) {
    grid-column: 8 / span 5;
    grid-row: 6 / span 2;
  }
  .gallery-cell:nth-child(13) {
    grid-column: 5 / span 3;
    grid-row: 7 / span 1;
  }
  .gallery-cell:nth-child(14) {
    grid-column: 1 / span 7;
    grid-row: 8 / span 2;
  }
  .gallery-cell:nth-child(15) {
    grid-column: 8 / span 5;
    grid-row: 8 / span 2;
  }
}

/* Layout de mosaico para tablets */
@media (min-width: 768px) and (max-width: 991px) {
  .gallery-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .gallery-cell:nth-child(1) {
    grid-column: span 3;
    grid-row: span 2;
  }
  .gallery-cell:nth-child(2) {
    grid-column: span 3;
    grid-row: span 1;
  }
  .gallery-cell:nth-child(3) {
    grid-column: span 3;
    grid-row: span 2;
  }
  .gallery-cell:nth-child(4) {
    grid-column: span 3;
    grid-row: span 1;
  }
  .gallery-cell:nth-child(5) {
    grid-column: span 6;
    grid-row: span 2;
  }
  .gallery-cell:nth-child(6) {
    grid-column: span 2;
    grid-row: span 1;
  }
  .gallery-cell:nth-child(7) {
    grid-column: span 4;
    grid-row: span 1;
  }
  .gallery-cell:nth-child(8) {
    grid-column: span 3;
    grid-row: span 2;
  }
  .gallery-cell:nth-child(9) {
    grid-column: span 3;
    grid-row: span 1;
  }
  .gallery-cell:nth-child(10) {
    grid-column: span 3;
    grid-row: span 2;
  }
  .gallery-cell:nth-child(11) {
    grid-column: span 3;
    grid-row: span 1;
  }
  .gallery-cell:nth-child(12) {
    grid-column: span 6;
    grid-row: span 2;
  }
  .gallery-cell:nth-child(13) {
    grid-column: span 2;
    grid-row: span 1;
  }
  .gallery-cell:nth-child(14) {
    grid-column: span 2;
    grid-row: span 1;
  }
  .gallery-cell:nth-child(15) {
    grid-column: span 2;
    grid-row: span 1;
  }
}

/* Layout de una sola columna para móviles */
@media (max-width: 767px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .gallery-cell {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }
}

/* Estilos para el Lightbox con Bootstrap */
#lightboxModal .modal-dialog {
  max-width: 90vw;
  width: 90vw;
}
#lightboxModal .modal-content {
  background-color: transparent;
  border: none;
}
#lightboxModal .btn-close {
  position: absolute;
  top: -2rem;
  right: -2rem;
  z-index: 10;
  filter: invert(1) grayscale(100) brightness(200%);
  font-size: 1.5rem;
}
#lightboxModal .carousel-item img {
  object-fit: contain;
  max-height: 80vh;
}
.footer-temporadas a {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.footer-poster {
  width: 25px;
  height: auto;
  border-radius: 3px;
}
