
/* GALERIA IMAGENES */

.gallery {
  padding: 60px 20px;
  background: #f8f9fa;
  text-align: center;
}

.gallery h2 {
  /* font-size: 2rem; */
  margin-bottom: 30px;
  text-align: left !important;
  /* color: #333; */
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
}

.gallery-item {
  width: 100%;
  height: 120px;           /*  altura fija para la celda */
  overflow: hidden;        /*  oculta lo que sobresalga */
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;           /*  asegura que la imagen se estire bien */
  align-items: center;
  justify-content: center;
}

.gallery-item img {
  width: 100%;
  height: 100%;            /*  ocupa toda la celda */
  object-fit: cover;       /*  recorte sin deformar */
  transition: transform .3s ease;
}

.gallery-item:hover img {
    cursor: pointer;
    transform: scale(1.1);
}



.gallery-carousel {
  padding: 50px 20px;
  background: #063982;
  text-align: left;
}

.carousel-container {
  position: relative;
  max-width: 1100px; /* antes 900px → +200px (100px a cada lado) */
  margin: 0 auto;
  overflow: hidden;
  padding: 0 100px; /* área extra a derecha e izquierda */
  box-sizing: border-box;
}

.carousel-track-container {
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
}

.carousel-item {
  flex: 0 0 calc(25% - 10px); /* 4 por fila en desktop, restamos el gap */
  margin-right: 10px;         /* el espacio entre items */
  box-sizing: border-box;
}

.carousel-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
  cursor: pointer;
}

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

/* Ajustes para pantallas menores a 1024px (móviles y tabletas) */
@media (max-width: 1024px) {
  .carousel-item {
    flex: 0 0 100%; /* Mostrar solo una imagen a la vez */
    margin-right: 0; /* Eliminar el espacio entre las imágenes */
  }
}



.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  /* background: rgba(0, 0, 0, 0.5); */
  color: #342a9f;
  border: none;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10;
  transition: background 0.3s, transform 0.3s;
}

.carousel-btn:hover {
  /* background: rgba(0,0,0,0.8); */
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }


/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.lightbox.show {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Centrar imagen con margen automático */
.lightbox img {
  max-width: 90%;
  max-height: 80%;
  display: block;
  margin: auto;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.lightbox .close {
  position: absolute;
  top: 5px;
  right: 35px;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
  transition: color 0.3s ease;
}

.lightbox .close:hover {
  color: #BABBB7;
}

/* Botones de navegación lightbox */
/* Botones estilo profesional */
.lightbox-btn.prev,
.lightbox-btn.next {
  position: fixed;                /* fijados a la ventana completa */
  top: 50%;
  transform: translateY(-50%);
  font-size: 4rem;                /* tamaño grande pero balanceado */
  font-weight: bold;
  color: #fff;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  width: 70px;                    /* tamaño uniforme */
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  z-index: 10000;
  transition: background 0.3s, transform 0.3s;
}

.lightbox-btn.prev { left: 50px; }
.lightbox-btn.next { right: 50px; }

.lightbox-btn.prev:hover,
.lightbox-btn.next:hover {
  background: #063982;
  color: #BABBB7;
  transform: translateY(-50%) scale(1.15);
  cursor: pointer;
}


/* Mostrar botones cuando el mouse entra en lightbox */
.lightbox:hover .lightbox-btn {
  opacity: 1;
  pointer-events: auto;
}
