@keyframes glow {
    0% { box-shadow: 0 0 20px rgba(0, 159, 226, 0.3); }
    50% { box-shadow: 0 0 40px rgba(0, 159, 226, 0.5); }
    100% { box-shadow: 0 0 20px rgba(0, 159, 226, 0.3); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes borderFlow {
    0% { border-image-source: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); }
    50% { border-image-source: linear-gradient(225deg, var(--secondary-color), var(--primary-color)); }
    100% { border-image-source: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); }
}

.carousel-section {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 4rem auto;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(46, 35, 129, 0.05) 0%, rgba(0, 159, 226, 0.1) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 10px 30px rgba(46, 35, 129, 0.2),
        inset 0 0 20px rgba(0, 159, 226, 0.1);
    padding: 0;
    position: relative;
}

.carousel-section::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(46, 35, 129, 0.3),
        rgba(0, 159, 226, 0.3));
    border-radius: 20px;
    z-index: -1;
    filter: blur(10px);
}

.carousel-section::after {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    border-radius: 20px;
    opacity: 0.5;
    animation: glow 4s ease-in-out infinite;
}

.carousel-container {
    display: flex;
    width: 100%;
    height: 800px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    min-width: 100%;
    width: 100%;
    height: 100%;
    position: relative;
    flex: 0 0 100%;
    padding: 1rem;
    transform-style: preserve-3d;
    transition: all 0.5s ease;
}

.carousel-slide.active {
    transform: scale(1) translateZ(50px);
    animation: float 6s ease-in-out infinite;
}

.carousel-slide:not(.active) {
    transform: scale(0.9) translateZ(0);
    filter: brightness(0.7) blur(2px);
}

.carousel-slide img {
    width: calc(100% - 2rem);
    height: calc(100% - 2rem);
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 15px;
    margin: 1rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.3),
        0 5px 15px rgba(0, 0, 0, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: glow 4s ease-in-out infinite;
}

.carousel-slide.active img {
    transform: translateY(-5px);
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(46, 35, 129, 0.2);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 30px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.carousel-button::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(46, 35, 129, 0.5),
        rgba(0, 159, 226, 0.5));
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-button:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 
        0 0 30px rgba(0, 159, 226, 0.4),
        0 0 60px rgba(0, 159, 226, 0.2);
}

.carousel-button:hover::before {
    opacity: 1;
}

.carousel-button.prev {
    left: 2rem;
}

.carousel-button.next {
    right: 2rem;
}

.carousel-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: rgba(46, 35, 129, 0.1);
    border-radius: 30px;
    backdrop-filter: blur(8px);
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.carousel-dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.carousel-dot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-dot:hover {
    transform: scale(1.2);
}

.carousel-dot:hover::before {
    opacity: 0.5;
}

.carousel-dot.active {
    width: 30px;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    box-shadow: 
        0 0 20px var(--secondary-color),
        0 0 40px rgba(0, 159, 226, 0.4);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .carousel-container {
        height: 600px;
    }
}

@media (max-width: 768px) {
    .carousel-container {
        height: 400px;
    }

    .carousel-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .carousel-button.prev {
        left: 1rem;
    }

    .carousel-button.next {
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .carousel-container {
        height: 300px;
    }

    .carousel-slide {
        padding: 0.5rem;
    }
    
    .carousel-slide img {
        margin: 0.5rem;
        width: calc(100% - 1rem);
        height: calc(100% - 1rem);
    }

    .carousel-dots {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .carousel-dot.active {
        width: 24px;
    }
}
