/* ===== UNIVERSAL SLIDER SYSTEM ===== */

/* Base container for any slider */
.universal-slider {
    position: relative;
    width: 100%;
    margin-bottom: 60px;
}

/* Container for all slides */
.universal-slides {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
}

/* Individual slide - base logic */
.universal-slide {
    display: none; /* Hidden by default */
    width: 100%;
    opacity: 0;
    position: relative;
    transition: opacity 0.3s ease-in-out;
}

/* Active slide */
.universal-slide.active {
    display: block; /* Show active */
    opacity: 1;
}

/* SLIDER NAVIGATION */
.universal-slider-nav {
    position: absolute;
    bottom: -50px;
    right: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
}

/* Navigation buttons */
.universal-slider-btn {
    width: 44px;
    height: 44px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.universal-slider-btn:hover {
    border-color: #007bff;
    background: #f8f9fa;
}

.universal-slider-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.universal-slider-btn svg {
    width: 20px;
    height: 20px;
    color: #666;
}

.universal-slider-btn:hover svg {
    color: #007bff;
}

/* Slide counter */
.universal-slider-counter {
    background: white;
    border: 2px solid #ddd;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.universal-slider-counter .current-slide {
    color: #007bff;
}

/* SPECIFIC STYLES FOR DIFFERENT SLIDER TYPES */

/* Home About Slider */
.about-slider {
    min-height: 400px;
}

/* Employee Testimonials Slider */
.employee-testimonials-wrapper {
    min-height: 300px;
}


/* Success Stories Slider */
.success-stories-wrapper {
    min-height: 250px;
}

/* GRID LAYOUTS for multiple-video slides */
.videos-grid {
    display: grid;
    gap: 40px;
    width: 100%;
}

.videos-grid.videos-2 {
    grid-template-columns: repeat(2, 1fr);
}

.videos-grid.videos-3 {
    grid-template-columns: repeat(3, 1fr);
    margin-top:40px;
}

.videos-grid.videos-4 {
    grid-template-columns: repeat(4, 1fr);
}

.videos-grid.videos-6 {
    grid-template-columns: repeat(3, 1fr);
}

/* MOBILE VERSION */
@media (max-width: 991px) {
    .universal-slider {
        margin-bottom: 80px;
    }
    
    .universal-slider-nav {
        bottom: -60px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    .universal-slider-btn {
        width: 40px;
        height: 40px;
    }
    
    .universal-slider-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .universal-slider-counter {
        padding: 5px 10px;
        font-size: 13px;
    }
    
    /* Mobile grids */
    .videos-grid.videos-2,
    .videos-grid.videos-3,
    .videos-grid.videos-4,
    .videos-grid.videos-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 479px) {
    .videos-grid.videos-2,
    .videos-grid.videos-3,
    .videos-grid.videos-4,
    .videos-grid.videos-6 {
        grid-template-columns: 1fr;
    }
}

/* AUTOPLAY INDICATORS */
.universal-slider.autoplay-active .universal-slider-counter {
    border-color: #28a745;
}

.universal-slider.autoplay-paused .universal-slider-counter {
    border-color: #ffc107;
}

/* LEGACY SUPPORT - mapping old classes to new ones */
.about-slider .about-slides { @apply universal-slides; }
.about-slider .about-slide { @apply universal-slide; }
.about-slider .about-slider-nav { @apply universal-slider-nav; }

.employee-testimonials-wrapper .employee-testimonials-slides { @apply universal-slides; }
.employee-testimonials-wrapper .employee-testimonials-slide { @apply universal-slide; }
.employee-testimonials-wrapper .employee-testimonials-slider-nav { @apply universal-slider-nav; }

.testimonials-wrapper .testimonials-slides { @apply universal-slides; }
.testimonials-wrapper .testimonials-slide { @apply universal-slide; }
.testimonials-wrapper .testimonials-slider-nav { @apply universal-slider-nav; }

.success-stories-wrapper .success-stories-slides { @apply universal-slides; }
.success-stories-wrapper .success-stories-slide { @apply universal-slide; }
.success-stories-wrapper .success-stories-slider-nav { @apply universal-slider-nav; }

/* FALLBACK without Tailwind */
.about-slides,
.employee-testimonials-slides,
.testimonials-slides,
.success-stories-slides {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    /* Preparation for GSAP animations */
    will-change: height;
}

.about-slide,
.employee-testimonials-slide,
.testimonials-slide,
.success-stories-slide {
    display: none;
    width: 100%;
    opacity: 0;
    position: relative;
    transition: opacity 0.3s ease-in-out;
}

.about-slide.active,
.employee-testimonials-slide.active,
.testimonials-slide.active,
.success-stories-slide.active {
    display: block;
    opacity: 1;
}

.about-slider-nav,
.employee-testimonials-slider-nav,
.testimonials-slider-nav,
.success-stories-slider-nav {
    position: absolute;
    bottom: -50px;
    right: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
}

.slider-btn {
    width: 44px;
    height: 44px;
    /* border: 2px solid #ddd; */
    background: #003088;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* .slider-btn:hover {
    border-color: #007bff;
    background: #f8f9fa;
} */

.slider-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.slider-btn svg {
    width: 20px;
    height: 20px;
    color: white;
}

/* .slider-btn:hover svg {
    color: #007bff;
} */

.slider-counter {
    background: #E1EAF9;
    /* border: 2px solid #ddd; */
    border-radius: 30px;
    padding: 12px 22px;
    font-size: 16px;
    font-weight: 600;
    color: #003088;
}
/* 
.slider-counter .current-slide {
    color: #007bff;
} */

/* GSAP Height Animation Improvements */
.testimonials-slides,
.employee-testimonials-slides,
.success-stories-slides {
    transition: none; /* GSAP controls height animation */
}

/* Prevent layout shifts during animation */
.universal-slider.height-animating .testimonials-slides,
.universal-slider.height-animating .employee-testimonials-slides,
.universal-slider.height-animating .success-stories-slides {
    overflow: hidden;
}