@charset "UTF-8";
/* Contenedor principal de la galería */
.ulagos-gallery {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr 15px 1fr;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin: 20px 0;
}

/* Items de la galería */
.ulagos-gallery-item {
  overflow: hidden;
  border-radius: 4px;
  position: relative;
}

/* Miniaturas */
.ulagos-gallery-thumb {
  width: 100%;
  height: auto;
  display: block;
  -webkit-transition: -webkit-transform 0.3s ease;
  transition: -webkit-transform 0.3s ease;
  transition: transform 0.3s ease;
  transition: transform 0.3s ease, -webkit-transform 0.3s ease;
}

/* Hover en miniaturas */
.ulagos-gallery-link:hover .ulagos-gallery-thumb {
  -webkit-transform: scale(1.05);
  transform: scale(1.05);
}

/* Enlace de la miniatura */
.ulagos-gallery-link {
  display: block;
  position: relative;
}

/* Caption en miniatura */
.ulagos-gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.8)), to(transparent));
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: #fff;
  padding: 20px 10px 10px;
  font-size: 12px;
  opacity: 0;
  -webkit-transition: opacity 0.3s ease;
  transition: opacity 0.3s ease;
}

.ulagos-gallery-item:hover .ulagos-gallery-caption {
  opacity: 1;
}

/* Lightbox */
.ulagos-gallery-lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  opacity: 0;
  -webkit-transition: opacity 0.3s ease;
  transition: opacity 0.3s ease;
}

.ulagos-gallery-lightbox.active {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  opacity: 1;
}

/* Contenido del lightbox */
.ulagos-gallery-lightbox-content {
  position: relative;
  width: 100%;
  max-width: 90vw;
  max-height: 90vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

/* Contenedor de la imagen */
.ulagos-gallery-image-container {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  max-height: 80vh;
  min-height: 200px;
  overflow: hidden;
  position: relative;
}

/* Imagen actual */
.ulagos-gallery-current-image {
  max-width: 90vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  -o-object-fit: contain;
  object-fit: contain;
  -o-object-position: center;
  object-position: center;
  -webkit-box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  -webkit-transform-origin: center center;
  transform-origin: center center;
  -webkit-transition: -webkit-transform 0.15s ease-out;
  transition: -webkit-transform 0.15s ease-out;
  transition: transform 0.15s ease-out;
  transition: transform 0.15s ease-out, -webkit-transform 0.15s ease-out;
  will-change: transform;
  -ms-touch-action: none;
  touch-action: none;
}

/* Botón cerrar */
.ulagos-gallery-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  padding: 5px 15px;
  z-index: 10000;
  line-height: 1;
  -webkit-transition: color 0.3s ease;
  transition: color 0.3s ease;
}

.ulagos-gallery-close:hover {
  color: #ccc;
}

.ulagos-gallery-close:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Botones de navegación */
.ulagos-gallery-prev,
.ulagos-gallery-next {
  position: absolute;
  top: 50%;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  padding: 15px 20px;
  -webkit-transition: background 0.3s ease;
  transition: background 0.3s ease;
  z-index: 10000;
  border-radius: 4px;
}

.ulagos-gallery-prev {
  left: -60px;
}

.ulagos-gallery-next {
  right: -60px;
}

.ulagos-gallery-prev:hover,
.ulagos-gallery-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

.ulagos-gallery-prev:focus,
.ulagos-gallery-next:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Información de la imagen */
.ulagos-gallery-info {
  margin-top: 15px;
  text-align: center;
  color: #fff;
  max-width: 80%;
}

.ulagos-gallery-counter {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 5px;
  opacity: 0.8;
}

.ulagos-gallery-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
}

.ulagos-gallery-caption {
  font-size: 14px;
  opacity: 0.7;
}

/* Cursor para indicar que es clickeable */
.ulagos-gallery-link {
  cursor: pointer;
}

/* Loading state para imágenes */
.ulagos-gallery-current-image.loading {
  opacity: 0.3;
}

/* Responsive */
@media (max-width: 768px) {
  .ulagos-gallery {
    -ms-grid-columns: 1fr 10px 1fr;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .ulagos-gallery-lightbox-content {
    max-width: 100vw;
    max-height: 100vh;
    height: 100%;
    width: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    padding: 0;
  }
  .ulagos-gallery-image-container {
    -webkit-box-ordinal-group: 3;
        -ms-flex-order: 2;
            order: 2;
    width: 100%;
    max-height: 70vh;
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
    margin: 0;
  }
  .ulagos-gallery-current-image {
    max-width: 100vw;
    max-height: 70vh;
  }
  .ulagos-gallery-prev,
  .ulagos-gallery-next {
    position: fixed;
    bottom: 20px;
    top: auto;
    -webkit-transform: none;
            transform: none;
    z-index: 10010;
    margin: 0;
    background: rgba(0, 0, 0, 0.6);
    width: 60px;
    height: 60px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    border-radius: 50%;
  }
  .ulagos-gallery-prev {
    left: 20px;
    right: auto;
  }
  .ulagos-gallery-next {
    right: 20px;
    left: auto;
  }
  .ulagos-gallery-zoom-controls {
    position: fixed;
    top: 70px; /* Debajo del botón de cierre */
    left: 50%;
    -webkit-transform: translateX(-50%);
            transform: translateX(-50%);
    z-index: 10010;
    background: rgba(0, 0, 0, 0.6);
  }
  .ulagos-gallery-close {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 10011;
    background: rgba(0, 0, 0, 0.6);
  }
  .ulagos-gallery-info {
    -webkit-box-ordinal-group: 4;
        -ms-flex-order: 3;
            order: 3;
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    margin-top: 0;
    margin-bottom: 90px; /* Espacio para los botones de abajo */
    max-width: 100%;
  }
}
@media (max-width: 480px) {
  .ulagos-gallery {
    -ms-grid-columns: 1fr [1];
    grid-template-columns: repeat(1, 1fr);
  }
}
/* Animación de carga de imagen */
@-webkit-keyframes ulagos-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes ulagos-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.ulagos-gallery-current-image:not(.loading) {
  -webkit-animation: ulagos-fade-in 0.3s ease;
  animation: ulagos-fade-in 0.3s ease;
}

/* Controles de zoom */
.ulagos-gallery-zoom-controls {
  position: absolute;
  top: 10px;
  left: 50%;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 8px;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 12px;
  border-radius: 25px;
}

.ulagos-gallery-zoom-in,
.ulagos-gallery-zoom-out,
.ulagos-gallery-zoom-reset {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-transition: background 0.2s ease, -webkit-transform 0.2s ease;
  transition: background 0.2s ease, -webkit-transform 0.2s ease;
  transition: background 0.2s ease, transform 0.2s ease;
  transition: background 0.2s ease, transform 0.2s ease, -webkit-transform 0.2s ease;
  line-height: 1;
}

.ulagos-gallery-zoom-in:hover,
.ulagos-gallery-zoom-out:hover,
.ulagos-gallery-zoom-reset:hover {
  background: rgba(255, 255, 255, 0.3);
  -webkit-transform: scale(1.1);
  transform: scale(1.1);
}

.ulagos-gallery-zoom-in:active,
.ulagos-gallery-zoom-out:active,
.ulagos-gallery-zoom-reset:active {
  -webkit-transform: scale(0.95);
  transform: scale(0.95);
}

.ulagos-gallery-zoom-in:focus,
.ulagos-gallery-zoom-out:focus,
.ulagos-gallery-zoom-reset:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.ulagos-gallery-zoom-in:disabled,
.ulagos-gallery-zoom-out:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ulagos-gallery-zoom-in:disabled:hover,
.ulagos-gallery-zoom-out:disabled:hover {
  background: rgba(255, 255, 255, 0.15);
  -webkit-transform: none;
  transform: none;
}

.ulagos-gallery-zoom-level {
  color: #fff;
  font-size: 13px;
  min-width: 45px;
  text-align: center;
  font-weight: 500;
}

/* Imagen con transform para zoom */
.ulagos-gallery-current-image {
  -webkit-transform-origin: center center;
  transform-origin: center center;
  -webkit-transition: -webkit-transform 0.1s ease-out;
  transition: -webkit-transform 0.1s ease-out;
  transition: transform 0.1s ease-out;
  transition: transform 0.1s ease-out, -webkit-transform 0.1s ease-out;
  will-change: transform;
}

.ulagos-gallery-current-image.dragging {
  -webkit-transition: none !important;
  transition: none !important;
}

/* Cursor de arrastre cuando hay zoom */
.ulagos-gallery-image-container.grabbing {
  cursor: -webkit-grabbing !important;
  cursor: grabbing !important;
}

/* Soporte para pantallas con preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  .ulagos-gallery-thumb,
  .ulagos-gallery-lightbox,
  .ulagos-gallery-current-image,
  .ulagos-gallery-prev,
  .ulagos-gallery-next,
  .ulagos-gallery-zoom-in,
  .ulagos-gallery-zoom-out,
  .ulagos-gallery-zoom-reset {
    -webkit-transition: none;
    transition: none;
    -webkit-animation: none;
    animation: none;
  }
}