/**
 * Enhanced Sliders CSS for WISDOM FOUNDATION Website
 * This file contains all slider-related styles and animations
 */

/* General Slider Enhancements */
.carousel {
    overflow: hidden;
    position: relative;
}

/* Progress Bar for Sliders */
.carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 0;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    z-index: 10;
    transition: width 0.1s linear;
}

/* Hero Slider Animations */
.hero-slider {
    width: 100%;
    overflow: hidden;
    margin-bottom: 30px;
}

.hero-slider .carousel-item {
    transition: transform 1.2s ease, opacity 1.2s ease;
    height: 500px;
    background-size: cover;
    background-position: center;
    width: 100%;
}

/* Fade-Zoom Animation */
.hero-slider .carousel-item.fade-zoom {
    transition: transform 1.5s ease, opacity 1.5s ease;
}

.hero-slider .carousel-item.fade-zoom.active {
    animation: fadeZoom 1.5s forwards;
}

@keyframes fadeZoom {
    0% {
        opacity: 0.3;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide-Up Animation */
.hero-slider .carousel-item.slide-up {
    transition: transform 1.5s ease, opacity 1.5s ease;
}

.hero-slider .carousel-item.slide-up.active {
    animation: slideUp 1.5s forwards;
}

@keyframes slideUp {
    0% {
        opacity: 0.3;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide-Left Animation */
.hero-slider .carousel-item.slide-left {
    transition: transform 1.5s ease, opacity 1.5s ease;
}

.hero-slider .carousel-item.slide-left.active {
    animation: slideLeft 1.5s forwards;
}

@keyframes slideLeft {
    0% {
        opacity: 0.3;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Caption Element Animations */
.hero-slider .animate-element {
    opacity: 0;
    transition: all 0.8s ease;
}

.hero-slider .animate-element.animated {
    opacity: 1;
}

.hero-slider .fade-in-down {
    transform: translateY(-30px);
}

.hero-slider .fade-in-down.animated {
    transform: translateY(0);
}

.hero-slider .fade-in-up {
    transform: translateY(30px);
}

.hero-slider .fade-in-up.animated {
    transform: translateY(0);
}

.hero-slider .fade-in-right {
    transform: translateX(-30px);
}

.hero-slider .fade-in-right.animated {
    transform: translateX(0);
}

/* Enhanced Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s ease;
}

.carousel:hover .carousel-control-prev,
.carousel:hover .carousel-control-next {
    opacity: 0.7;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1 !important;
    background-color: var(--secondary-color);
}

.carousel-control-prev {
    left: 20px;
}

.carousel-control-next {
    right: 20px;
}

/* Enhanced Carousel Captions */
.hero-slider .carousel-caption {
    max-width: 600px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    left: 50%;
    right: auto;
    bottom: 50px;
    transform: translateX(-50%);
}

.hero-slider .carousel-caption h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-slider .carousel-caption p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Enhanced Carousel Indicators */
.carousel-indicators {
    bottom: 20px;
    z-index: 15;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.carousel-indicators button.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

/* Testimonial Slider (Fade Effect) */
.carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    left: 0;
    transform: none;
}

.carousel-fade .carousel-item.active {
    opacity: 1;
    z-index: 1;
}

/* Testimonials Section Styles */
.testimonials-section {
    background-color: #f9f9f9;
    position: relative;
    overflow: hidden;
}

.testimonials-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="1" fill="%23f0f0f0" /></svg>');
    background-size: 20px 20px;
    opacity: 0.5;
}

.testimonial-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin: 20px 0;
    position: relative;
    z-index: 1;
}

.testimonial-card img {
    border: 5px solid #f0f0f0;
    transition: all 0.3s ease;
}

.testimonial-card:hover img {
    transform: scale(1.05);
    border-color: var(--primary-color);
}

.testimonial-content {
    position: relative;
    padding-left: 20px;
}

.testimonial-content i {
    color: var(--primary-color);
    opacity: 0.3;
    position: absolute;
    top: 0;
    left: 0;
    transform: translateX(-50%);
}

#testimonialSlider .carousel-control-prev,
#testimonialSlider .carousel-control-next {
    width: 40px;
    height: 40px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-color);
    border-radius: 50%;
    opacity: 0.7;
}

#testimonialSlider .carousel-indicators {
    bottom: -40px;
}

/* Gallery Slider (3D Effect) */
.carousel-3d .carousel-inner {
    perspective: 1000px;
}

.carousel-3d .carousel-item {
    transition: transform 1s ease, opacity 1s ease;
    transform-style: preserve-3d;
}

.carousel-3d .carousel-item:not(.active) {
    transform: rotateY(20deg) scale(0.9);
    opacity: 0.5;
    z-index: 0;
}

.carousel-3d .carousel-item.active {
    transform: rotateY(0) scale(1);
    opacity: 1;
    z-index: 1;
}

/* Team Slider (Cube Effect) */
.carousel-cube .carousel-inner {
    perspective: 1000px;
}

.carousel-cube .carousel-item {
    transition: transform 1s ease, opacity 1s ease;
    transform-style: preserve-3d;
}

.carousel-cube .carousel-item:not(.active) {
    transform: rotateY(90deg);
    opacity: 0;
    z-index: 0;
}

.carousel-cube .carousel-item.active {
    transform: rotateY(0);
    opacity: 1;
    z-index: 1;
}

/* Projects Slider (Flip Effect) */
.carousel-flip .carousel-inner {
    perspective: 1000px;
}

.carousel-flip .carousel-item {
    transition: transform 1s ease, opacity 1s ease;
    transform-style: preserve-3d;
}

.carousel-flip .carousel-item:not(.active) {
    transform: rotateX(90deg);
    opacity: 0;
    z-index: 0;
}

.carousel-flip .carousel-item.active {
    transform: rotateX(0);
    opacity: 1;
    z-index: 1;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .hero-slider .carousel-item {
        height: 450px;
    }

    .hero-slider .carousel-caption {
        max-width: 500px;
    }

    .hero-slider .carousel-caption h2 {
        font-size: 2rem;
    }
}

@media (max-width: 991px) {
    .hero-slider .carousel-item {
        height: 400px;
    }

    .carousel-progress {
        height: 3px;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
    }

    .hero-slider .carousel-caption {
        max-width: 450px;
        padding: 20px;
    }

    .hero-slider .carousel-caption h2 {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }

    .hero-slider .carousel-caption p {
        font-size: 1rem;
        margin-bottom: 15px;
    }
}

@media (max-width: 767px) {
    .hero-slider .carousel-item {
        height: 350px;
    }

    .carousel-progress {
        height: 2px;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 35px;
        height: 35px;
    }

    .carousel-indicators button {
        width: 10px;
        height: 10px;
        margin: 0 3px;
    }

    .hero-slider .carousel-caption {
        max-width: 90%;
        padding: 15px;
        bottom: 30px;
    }

    .hero-slider .carousel-caption h2 {
        font-size: 1.5rem;
    }

    .hero-slider .carousel-caption p {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .hero-slider .carousel-item {
        height: 300px;
    }

    .hero-slider .carousel-caption {
        max-width: 90%;
        padding: 10px;
        bottom: 20px;
    }

    .hero-slider .carousel-caption h2 {
        font-size: 1.3rem;
    }

    .hero-slider .carousel-caption p {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }

    .hero-slider .carousel-caption .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
}
