/* Slider de divs - Para todas las resoluciones */
.animacion-imagenes-container {
    width: 100%;
    position: relative;
    user-select: none;
    contain: content;
}

.animacion-imagenes-main {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
}

.animacion-imagenes-arrow {
    font-size: 34px;
    color: #fff;
    cursor: pointer;
    z-index: 2;
    padding: 0;
    transition: transform 0.2s;
    background: transparent;
    border: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.animacion-imagenes-left {
    left: 10px;
}

.animacion-imagenes-right {
    right: 10px;
}

.animacion-imagenes-arrow:hover {
    transform: translateY(-50%) scale(1.1);
}

.animacion-imagenes-wrapper {
    overflow: hidden;
    width: 100%;
    height: auto;
    position: relative;
    cursor: grab;
    touch-action: pan-y;
    contain: layout;
    min-height: 200px;
}

.animacion-imagenes-wrapper:active {
    cursor: grabbing;
}

.animacion-imagenes-track {
    display: flex;
    width: max-content;
    height: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 15px;
    will-change: transform;
}

.animacion-imagenes-item {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
    position: relative;
}

/* Enlace que envuelve imagen y overlay */
.animacion-imagenes-link {
    display: block;
    position: relative;
    line-height: 0;
    text-decoration: none;
}

/* Lupa pequena en esquina inferior derecha */
.animacion-imagenes-link::after {
    content: '';
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background-image: url('/animacion_imagenes_inicio/lupa.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 3;
    display: none;
}

.animacion-imagenes-link:hover::after {
    opacity: 0;
}

/* Overlay oscuro al hacer hover */
.animacion-imagenes-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.animacion-imagenes-link:hover .animacion-imagenes-overlay {
    opacity: 1;
}

/* Lupa grande en el centro al hacer hover */
.animacion-imagenes-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 60px;
    height: 60px;
    background-image: url('/animacion_imagenes_inicio/lupa.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.animacion-imagenes-link:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.animacion-imagenes-image {
    width: auto;
    height: auto;
    max-height: 200px;
    border-radius: 0;
    display: block;
    position: relative;
    z-index: 0;
}

.animacion-imagenes-title {
    margin: 0 0 15px 0;
    font-size: 22px;
    font-weight: bold;
    padding: 0 15px;
    line-height: 1.24;
}

.animacion-imagenes-text {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
    padding: 0 15px;
    color: #5D666F;
}

.animacion-imagenes-overlay-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: white;
    background: rgba(0,0,0,0.6);
    padding: 10px 20px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.animacion-imagenes-pause-btn {
    position: absolute;
    inset: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 5;
}

/* Estilos para flechas con imagenes */
.animacion-imagenes-arrow img {
    width: 35px;
    height: 35px;
    display: block;
    filter: drop-shadow(0px 2px 0px rgb(0, 0, 0));
}

.animacion-imagenes-arrow .arrow-hover {
    display: none;
}

.animacion-imagenes-arrow:hover .arrow-default {
    display: none;
}

.animacion-imagenes-arrow:hover .arrow-hover {
    display: block;
}

/* Responsive para carrusel - Pantallas hasta 500px */
@media (max-width: 500px) {
    .animacion-imagenes-image {
        max-height: 230px!important;
    }
    .animacion-imagenes-wrapper {
        min-height: 230px;
    }
}

/* Responsive para carrusel - Pantallas hasta 991px */
@media (max-width: 991px) {
    .animacion-imagenes-image {
        max-height: 200px;
    }
}

/* Responsive para carrusel - Pantallas desde 992px a 1199px */
@media (min-width: 992px) and (max-width: 1199px) {
    .animacion-imagenes-image {
        max-height: 210px;
    }
}

/* Responsive para carrusel - Pantallas desde 1200px a 1399px */
@media (min-width: 1200px) and (max-width: 1399px) {
    .animacion-imagenes-image {
        max-height: 220px;
    }
}

/* Responsive para carrusel - Pantallas desde 1366px */
@media (min-width: 1366px) {
    .animacion-imagenes-link::after {
        width: 25px;
        height: 25px;
        display: none;
    }
}

/* Responsive para carrusel - Pantallas desde 1400px a 1599px */
@media (min-width: 1400px) and (max-width: 1599px) {
    .animacion-imagenes-image {
        max-height: 200px;
    }
}

/* Responsive para carrusel - Pantallas desde 1600px */
@media (min-width: 1600px) {
    .animacion-imagenes-image {
        max-height: 240px;
    }
}

/* Galería ampliada del carrusel. Se monta al final del body para evitar recortes. */
.animacion-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2147483640;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .94);
    padding: 48px 54px;
    box-sizing: border-box;
}

.animacion-lightbox.is-open { display: flex; }
.animacion-lightbox-content { position: relative; max-width: 100%; max-height: 100%; text-align: center; }
.animacion-lightbox-image { display: block; max-width: 100%; max-height: calc(100vh - 120px); width: auto; height: auto; object-fit: contain; }
.animacion-lightbox.is-loading .animacion-lightbox-image { opacity: .25; }
.animacion-lightbox-status { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #fff; font-size: 16px; white-space: nowrap; }
.animacion-lightbox-counter { color: #fff; font-size: 14px; margin-top: 10px; }
.animacion-lightbox button { position: absolute; z-index: 1; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 36px; line-height: 1; cursor: pointer; }
.animacion-lightbox button:hover, .animacion-lightbox button:focus-visible { background: #24a29e; border-color: #24a29e; color: #fff; }
.animacion-lightbox-close { top: 12px; right: 12px; }
.animacion-lightbox-prev, .animacion-lightbox-next { top: 50%; transform: translateY(-50%); }
.animacion-lightbox-prev { left: 8px; }
.animacion-lightbox-next { right: 8px; }

@media (max-width: 575px) {
    .animacion-lightbox { padding: 54px 44px; }
    .animacion-lightbox-image { max-height: calc(100vh - 110px); }
    .animacion-lightbox button { width: 36px; height: 36px; font-size: 30px; }
    .animacion-lightbox-prev { left: 3px; }
    .animacion-lightbox-next { right: 3px; }
}
