/* ===========================
   GALERÍA – DISEÑO PROFESIONAL
=========================== */

.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 40px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

/* ===========================
   ITEM GALERÍA – EFECTO HOJA
=========================== */

.galeria-item {
  position: relative;
  height: 260px;
  padding: 14px;
}

/* “Hoja” detrás */
.galeria-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 14px 35px rgba(0,0,0,0.14);
  transform: rotate(-1.5deg);
  transition: transform .3s ease;
  z-index: 0;
}

/* Imagen preview */
.galeria-item img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  cursor: pointer;
  transition: transform .4s ease;
}

/* Hover solo desktop */
@media (hover: hover) {
  .galeria-item:hover::before {
    transform: rotate(0deg);
  }

  .galeria-item:hover img {
    transform: scale(1.04);
  }
}

/* ===========================
   TÍTULO Y TEXTO
=========================== */

.white h1 {
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.white p {
  font-size: 1.1rem;
  color: #666;
  max-width: 600px;
}

/* ===========================
   LIGHTBOX (NO TOCAR)
=========================== */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox.active {
  display: flex;
}

/* 🔥 IMAGEN GRANDE REAL */
.lightbox-img {
  width: 80vw;
  max-width: 1200px;
  height: auto;
  max-height: 85vh;

  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,.6);
}

/* Botones */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  padding: 20px;
  user-select: none;
}

.lightbox-prev { left: 30px; }
.lightbox-next { right: 30px; }

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
}

/* ===========================
   RESPONSIVE
=========================== */

@media (max-width: 768px) {
  .galeria-item {
    height: 220px;
  }

  .white h1 {
    font-size: 2.1rem;
  }

  .lightbox-img {
    width: 95vw;
    max-width: none;
    max-height: 80vh;
  }
}

/* ===========================
   SUBTÍTULO GALERÍA
=========================== */

.galeria-subtitulo {
  font-size: 1.25rem;
  font-weight: 600;
  color: #555;
  margin-top: 6px;
  margin-bottom: 32px;
  max-width: 700px;
}
/* ===========================
   SUBTÍTULO – ESTILO CARPA
=========================== */

.galeria-subtitulo-box {
  display: inline-block;
  background: #ffffff;
  padding: 14px 26px;
  border-radius: 14px;
  margin: 14px 0 36px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
  position: relative;
}

/* “Sombrilla / carpa” sutil */
.galeria-subtitulo-box::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 40px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  transform: rotate(45deg);
  box-shadow: 6px 6px 14px rgba(0,0,0,0.08);
}

.galeria-subtitulo-box h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #444;
}

/* ===========================
   HEADER DE ÁLBUM
=========================== */

.galeria-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}

.btn-volver {
  display: inline-block;
  width: fit-content;
  font-size: 0.9rem;
  color: #005b96;
  text-decoration: none;
  background: #f2f6fb;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background .2s ease;
}

.btn-volver:hover {
  background: #e6eef8;
}

.galeria-header h1 {
  margin: 0;
}
