/* ============================================================
   ESTILOS GENERALES
   ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

/* ============================================================
   BANNER
   ============================================================ */
.banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  height: 280px;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.8);
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
}

.title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.1rem;
  font-weight: 400;
}

/* ============================================================
   CONTENEDOR PRINCIPAL
   ============================================================ */
.main-content {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.grid {
  display: grid;
  gap: 20px;
}

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

@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================================
   TARJETAS DE ÁLBUMES Y ESTADOS
   ============================================================ */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 25px 10px;
  text-align: center;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.state-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.state-card:hover {
  transform: scale(1.03);
}

.img-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.state-card:hover .img-box img {
  transform: scale(1.08);
}

.state-label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
}

.no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
  background: #ddd;
  color: #777;
  font-style: italic;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 25px;
  text-align: center;
}

.back {
  background-color: #8B1E25;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 20px;
  transition: background 0.3s ease;
}

.back:hover {
  background-color: #A52A2A;
}

/* ============================================================
   GALERÍA DE IMÁGENES (Masonry Adaptativo)
   ============================================================ */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-auto-rows: 10px;
  gap: 20px;
}

.img-card {
  position: relative;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.img-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.img-card:hover img {
  transform: scale(1.05);
}

.img-card:hover {
  transform: scale(1.02);
}

/* Permite alturas variables tipo masonry */
.gallery > .img-card {
  break-inside: avoid;
}

/* ============================================================
   VISOR MODAL DE IMÁGENES
   ============================================================ */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.4s ease;
}

.modal-content img {
  width: auto;
  max-width: 100%;
  max-height: 85vh;
  height: auto;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 0 25px rgba(255,255,255,0.25);
  cursor: zoom-in;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal-content.zoomed img {
  transform: scale(1.5);
  cursor: zoom-out;
}

.modal-caption {
  margin-top: 20px;
  color: #ffffff;
  font-size: 1rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 12px 20px;
  border-radius: 10px;
  max-width: 80%;
  line-height: 1.4;
}

.modal button {
  position: absolute;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  font-size: 22px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal button:hover {
  background: rgba(255,255,255,0.2);
}

#closeModal {
  top: 15px;
  right: 20px;
}

.fullscreen-btn {
  bottom: 25px;
  right: 25px;
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 8px 14px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.fullscreen-btn:hover {
  background: rgba(255,255,255,0.3);
}

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 45px;
  color: white;
  background: rgba(0,0,0,0.3);
  border: none;
  border-radius: 50%;
  width: 55px;
  height: 55px;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s ease;
}

.nav-arrow:hover {
  background: rgba(255,255,255,0.2);
}

#prevArrow { left: 25px; }
#nextArrow { right: 25px; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============================================================
   PIE DE PÁGINA
   ============================================================ */
.footer {
  text-align: center;
  padding: 20px;
  background: #8B1E25;
  color: white;
  font-weight: 500;
}


