/* Estilos para el Modal y Slider de Anuncios */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    /* Ocupar hasta el 90% de pantalla con un límite de ancho para no verse mal en escritorio */
    width: 90vw;
    height: 90vh;
    max-width: 500px;
    background: transparent;
    border-radius: 20px;
    padding: 0 !important; /* Quita el padding interno si lo hay */
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5); /* Oscurecido ligeramente para contraste por si la imagen es clara */
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Para asegurar que Splide respete el tamaño del contenedor transparente */
.splide {
    width: 100%;
    height: 100%;
    border-radius: 20px;
}

.splide__track {
    height: 100%;
}

.splide__list {
    height: 100%;
}

.splide__slide {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

.splide__slide img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Mostrar imagen completa, ocupando lo más posible sin recortes */
    border-radius: 20px;
}

/* Opcional: Personalizar los dots (flechas las maneja Splide pero podemos darlas estilo) */
.splide__pagination {
    bottom: 15px !important;
}

.splide__pagination__page {
    background: rgba(255, 255, 255, 0.4) !important;
    transform: scale(1) !important;
    transition: all 0.3s ease !important;
}

.splide__pagination__page.is-active {
    background: white !important;
    transform: scale(1.3) !important;
}

.splide__arrow {
    background: rgba(0, 0, 0, 0.5) !important;
    opacity: 1 !important;
}

.splide__arrow:hover {
    background: rgba(0, 0, 0, 0.8) !important;
}

.splide__arrow svg {
    fill: white !important;
}

/* Responsive */
@media (max-width: 480px) {
    .modal-content {
        padding: 10px;
    }
}
