/* new_carousel.css */

#new-carousel-container {
    position: relative;
    width: 100%;
    max-width: 600px; /* Adjust based on your carousel width */
    margin: 2rem auto;
}
.carousel-wrapper {
    display: block; /* Changed back to block */
    position: relative;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.4),
            rgba(255, 255, 255, 0.1)
    );
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.1),
            inset 0 4px 30px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    margin: 2rem auto; /* This will center the block */
    width: fit-content; /* Makes the wrapper fit its content */
    max-width: 100%; /* Ensures it doesn't overflow on small screens */
}

/* Optional: Add a subtle animation for a more liquid effect */
@keyframes liquidEffect {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

.carousel-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
            45deg,
            rgba(139, 0, 0, 0.2),    /* --primary-maroon with opacity */
            rgba(255, 153, 51, 0.2), /* --saffron with opacity */
            rgba(0, 95, 115, 0.2)    /* --peacock-blue with opacity */
    );
    z-index: -1;
    opacity: 0.8;
    animation: liquidEffect 15s ease-in-out infinite;
}

.carousel-container {
    margin: 10px;
    width: 480px;
    height: 300px;
    overflow: hidden;
    border-radius: 12px;
    /*box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);*/
}

.carousel {
    display: flex;
    height: 100%;
    will-change: transform;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-image {
    flex: 0 0 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.carousel-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    width: 100%;
    z-index: 10;
    pointer-events: none;
}

/* Move buttons below carousel on mobile */
@media screen and (max-width: 768px) {
    .carousel-nav {
        position: static;
        transform: none;
        justify-content: center;
        gap: 2rem; /* Space between buttons */
        margin-top: 1.5rem;
        pointer-events: auto;
    }

    .carousel-prev,
    .carousel-next {
        position: static;
        margin: 0 !important; /* Remove any absolute positioning */
    }

    .carousel-wrapper {
        padding-bottom: 1.5rem; /* Add space for buttons */
    }
}

.carousel-nav button {
    background: var(--bg-card);
    border: 2px solid var(--border-gold);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    position: relative;
    z-index: 2;
}

/* Hover effects */
.carousel-nav button:hover {
    background: var(--primary-maroon);
    color: white;
    transform: scale(1.1);
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    #new-carousel-container {
        max-width: 100%;
        padding: 0 20px;
    }

    .carousel-nav button {
        width: 36px;
        height: 36px;
    }

    .carousel-wrapper {
        width: 90%;
        max-width: 100%;
        height: 300px;
    }

    .carousel-container {
        width: 90%;
        max-width: 100%;
        height: 250px;
    }

    .carousel-image {
        border-radius: 8px;
    }
}