/**
 * Carrusel de Carreras - Estilos
 * Estilos para el widget de carrusel de Swiper.js
 */

/* ==========================================================================
   Contenedor Principal
   ========================================================================== */

.wp-carreras-carousel-widget {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.wp-carreras-carousel-header {
    margin-bottom: 30px;
    text-align: center;
}

.wp-carreras-carousel-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.2;
}

.wp-carreras-carousel-container {
    position: relative;
    padding: 0 50px;
}

/* ==========================================================================
   Swiper Container
   ========================================================================== */

.wp-carreras-carousel {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.wp-carreras-carousel .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.wp-carreras-carousel .swiper-slide {
    height: auto;
    display: flex;
    align-items: stretch;
}

/* ==========================================================================
   Slide Individual
   ========================================================================== */

.wp-carreras-carousel-slide {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wp-carreras-carousel-slide:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.wp-carreras-carousel-link {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* ==========================================================================
   Imagen
   ========================================================================== */

.wp-carreras-carousel-image {
    position: relative;
    width: 100%;
    padding-top: 133.33%; /* Aspect ratio 3:4 (750x1000px) */
    overflow: hidden;
    background-color: #e0e0e0;
}

.wp-carreras-carousel-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.wp-carreras-carousel-link:hover .wp-carreras-carousel-image img {
    transform: scale(1.05);
}

/* Placeholder cuando no hay imagen */
.wp-carreras-carousel-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.wp-carreras-carousel-no-image .dashicons {
    position: absolute;
    font-size: 80px;
    width: 80px;
    height: 80px;
    color: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   Overlay con Información
   ========================================================================== */

.wp-carreras-carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 70%, transparent 100%);
    color: #fff;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.wp-carreras-carousel-link:hover .wp-carreras-carousel-overlay {
    padding-bottom: 25px;
}

.wp-carreras-carousel-title {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wp-carreras-carousel-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.wp-carreras-carousel-date .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-top: -2px;
}

/* ==========================================================================
   Flechas de Navegación
   ========================================================================== */

.wp-carreras-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wp-carreras-carousel-arrow:hover {
    background-color: #667eea;
    color: #fff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.wp-carreras-carousel-arrow.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.wp-carreras-carousel-prev {
    left: 0;
}

.wp-carreras-carousel-next {
    right: 0;
}

.wp-carreras-carousel-arrow .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* ==========================================================================
   Estado Sin Resultados
   ========================================================================== */

.wp-carreras-carousel-no-results {
    position: relative;
    padding: 60px 20px;
    text-align: center;
    background-color: #f5f5f5;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Overlay para no-results */
.wp-carreras-carousel-no-results.has-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.wp-carreras-carousel-no-results p {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: #666;
    margin: 0;
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet (≤992px) */
@media (max-width: 992px) {
    .wp-carreras-carousel-header h2 {
        font-size: 28px;
    }

    .wp-carreras-carousel-container {
        padding: 0 40px;
    }

    .wp-carreras-carousel-title {
        font-size: 16px;
    }

    .wp-carreras-carousel-date {
        font-size: 13px;
    }
}

/* Móvil (≤768px) */
@media (max-width: 768px) {
    .wp-carreras-carousel-header h2 {
        font-size: 24px;
    }

    .wp-carreras-carousel-container {
        padding: 0 35px;
    }

    .wp-carreras-carousel-arrow {
        width: 38px;
        height: 38px;
    }

    .wp-carreras-carousel-arrow .dashicons {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }

    .wp-carreras-carousel-overlay {
        padding: 15px;
    }

    .wp-carreras-carousel-title {
        font-size: 15px;
    }

    .wp-carreras-carousel-date {
        font-size: 12px;
    }

    .wp-carreras-carousel-date .dashicons {
        font-size: 14px;
        width: 14px;
        height: 14px;
    }
}

/* Móvil pequeño (≤480px) */
@media (max-width: 480px) {
    .wp-carreras-carousel-header h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .wp-carreras-carousel-container {
        padding: 0 30px;
    }

    .wp-carreras-carousel-arrow {
        width: 34px;
        height: 34px;
    }

    .wp-carreras-carousel-arrow .dashicons {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }

    .wp-carreras-carousel-overlay {
        padding: 12px;
    }

    .wp-carreras-carousel-title {
        font-size: 14px;
        -webkit-line-clamp: 2;
    }
}

/* ==========================================================================
   Accesibilidad - Movimiento Reducido
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .wp-carreras-carousel-slide,
    .wp-carreras-carousel-arrow,
    .wp-carreras-carousel-image img,
    .wp-carreras-carousel-overlay {
        transition: none;
    }

    .wp-carreras-carousel-link:hover .wp-carreras-carousel-image img {
        transform: none;
    }

    .wp-carreras-carousel-slide:hover {
        transform: none;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .wp-carreras-carousel-arrow {
        display: none;
    }

    .wp-carreras-carousel-slide {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
