/**
 * Estilos para el frontend del Vertical Image Slider
 * Relación de aspecto 9:16 para imágenes verticales
 */

.vis-slider-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
}

.vis-swiper {
    width: 100%;
    padding: 20px 0;
}

.vis-slide {
    height: auto;
}

.vis-slide-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.vis-slide-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 177.78%; /* Relación 9:16 (16/9 * 100) */
    background: #f0f0f0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.vis-slide-link:hover .vis-slide-image-wrapper {
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transform: translateY(-4px);
}

.vis-slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.vis-slide-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.vis-slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vis-slide-link:hover .vis-slide-overlay {
    opacity: 1;
}

.vis-slide-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vis-slide-excerpt {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255,255,255,0.9);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Botones de navegación */
.vis-swiper .swiper-button-next,
.vis-swiper .swiper-button-prev {
    color: #fff;
    background: rgba(0,0,0,0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.vis-swiper .swiper-button-next:hover,
.vis-swiper .swiper-button-prev:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.1);
}

.vis-swiper .swiper-button-next::after,
.vis-swiper .swiper-button-prev::after {
    font-size: 18px;
}

/* Paginación */
.vis-swiper .swiper-pagination {
    bottom: 0;
}

.vis-swiper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #fff;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.vis-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: #2271b1;
    transform: scale(1.2);
}

/* Estilos responsive */
@media screen and (max-width: 768px) {
    .vis-slide-title {
        font-size: 14px;
    }
    
    .vis-slide-excerpt {
        font-size: 12px;
    }
    
    .vis-slide-overlay {
        padding: 15px 10px;
    }
    
    .vis-swiper .swiper-button-next,
    .vis-swiper .swiper-button-prev {
        width: 35px;
        height: 35px;
    }
    
    .vis-swiper .swiper-button-next::after,
    .vis-swiper .swiper-button-prev::after {
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    .vis-swiper {
        padding: 10px 0;
    }
    
    .vis-slide-image-wrapper {
        border-radius: 6px;
    }
    
    .vis-slide-title {
        font-size: 13px;
        -webkit-line-clamp: 1;
    }
    
    .vis-slide-excerpt {
        display: none;
    }
    
    .vis-slide-overlay {
        padding: 12px 8px;
    }
}

/* Animaciones de carga */
@keyframes visSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.swiper-slide-visible .vis-slide-image-wrapper {
    animation: visSlideIn 0.5s ease-out;
}

/* Loading state */
.vis-slide-image-wrapper.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: visLoading 1.5s infinite;
}

@keyframes visLoading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Accesibilidad */
.vis-slide-link:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.vis-slide-link:focus .vis-slide-image-wrapper {
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.3);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .vis-slide-image-wrapper {
        background: #2d2d2d;
    }
    
    .vis-swiper .swiper-pagination-bullet-active {
        background: #4a9eff;
    }
}
