/**
 * Social Media Carousel Styles
 * Estilos personalizados para el carrusel de publicaciones de redes sociales
 */

/* ==================== Swiper Customization ==================== */

.social-carousel {
    padding: 20px 0;
    overflow: visible;
}

.social-carousel.swiper {
    padding-bottom: 60px;
}

/* Estilos de slides */
.social-carousel .swiper-slide {
    height: auto;
    padding: 8px;
}

/* ==================== Pagination Styles ==================== */

:root {
    --swiper-pagination-color: #005daa;
    --swiper-pagination-bullet-size: 10px;
    --swiper-pagination-bullet-inactive-color: #d1d5db;
    --swiper-pagination-bullet-inactive-opacity: 0.6;
}

.social-pagination {
    bottom: 0 !important;
}

.social-pagination .swiper-pagination-bullet {
    transition: all 0.3s ease;
    opacity: 0.6;
}

.social-pagination .swiper-pagination-bullet.swiper-pagination-bullet-active {
    opacity: 1;
    background-color: var(--color-ti-azul);
    box-shadow: 0 0 8px rgba(1, 66, 106, 0.4);
}

.social-pagination .swiper-pagination-bullet:hover {
    opacity: 0.8;
    transform: scale(1.2);
}

/* ==================== Navigation Buttons ==================== */

.social-prev,
.social-next {
    cursor: pointer;
    z-index: 20;
    border: none;
    outline: none;
}

.social-prev:hover,
.social-next:hover {
    filter: brightness(1.1);
}

.social-prev::after,
.social-next::after {
    display: none;
}

/* Override Swiper defaults */
.swiper-button-prev:after,
.swiper-button-next:after {
    display: none;
}

/* ==================== Card Animations ==================== */

@keyframes card-entrance {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.social-carousel .swiper-slide {
    opacity: 1;
    animation: card-entrance 0.6s ease-out forwards;
}

/* ==================== Responsive Adjustments ==================== */

@media (max-width: 768px) {
    .social-carousel {
        padding: 15px 0;
    }

    .social-carousel.swiper {
        padding-bottom: 50px;
    }

    .social-pagination .swiper-pagination-bullet {
        --swiper-pagination-bullet-size: 8px;
    }
}

@media (max-width: 640px) {
    .social-carousel {
        padding: 10px 0;
    }

    .social-carousel.swiper {
        padding-bottom: 40px;
    }

    .social-pagination {
        bottom: -5px !important;
    }
}

/* ==================== Accessibility ==================== */

.social-carousel button:focus {
    outline: 2px solid var(--color-ti-azul);
    outline-offset: 2px;
}

/* ==================== Performance ==================== */

.social-carousel .swiper-slide img {
    will-change: transform;
    backface-visibility: hidden;
}

/* ==================== Efectos de interacción ==================== */

.social-carousel .swiper-slide:hover {
    z-index: 10;
}

/* Active slide effect */
.social-carousel .swiper-slide-active {
    z-index: 5;
}

/* ==================== Línea separadora ==================== */

.section-divider {
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--color-ti-azul) 20%,
        var(--color-ti-azul) 80%,
        transparent 100%
    );
    margin: 40px 0;
}

/* ==================== Loading State ==================== */

.social-carousel.loading {
    opacity: 0.5;
    pointer-events: none;
}

.social-carousel.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 93, 170, 0.2);
    border-top-color: var(--color-ti-azul);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ==================== Dark Mode Support ==================== */

@media (prefers-color-scheme: dark) {
    .social-pagination .swiper-pagination-bullet-inactive-color {
        background-color: #4b5563;
    }

    .social-pagination .swiper-pagination-bullet.swiper-pagination-bullet-active {
        box-shadow: 0 0 12px rgba(1, 66, 106, 0.6);
    }
}

/* ==================== Print Styles ==================== */

@media print {
    .social-prev,
    .social-next,
    .social-pagination {
        display: none;
    }

    .social-carousel .swiper-slide {
        page-break-inside: avoid;
    }
}
