/**
 * Modern Carousel Styles
 * A beautiful, glassmorphism-style carousel with smooth animations
 */

/* Main Carousel Container */
.modern-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: var(--color-base-200);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15);
}

/* Carousel Track */
.modern-carousel__track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* Carousel Slides */
.modern-carousel__slide {
    flex: 0 0 100%;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    max-height: 70vh;
    padding: 1rem;
    box-sizing: border-box;
}

.modern-carousel__slide img {
    max-width: 100%;
    max-height: 65vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.75rem;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: zoom-in;
}

.modern-carousel__slide img:hover {
    transform: scale(1.01);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.15);
}

/* Navigation Buttons */
.modern-carousel__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.25s ease;
    color: #333;
    font-size: 1.25rem;
}

.modern-carousel__nav:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.modern-carousel__nav:active {
    transform: translateY(-50%) scale(0.95);
}

.modern-carousel__nav--prev {
    left: 1rem;
}

.modern-carousel__nav--next {
    right: 1rem;
}

@media (max-width: 640px) {
    .modern-carousel__nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .modern-carousel__nav--prev {
        left: 0.5rem;
    }

    .modern-carousel__nav--next {
        right: 0.5rem;
    }
}

/* Dots/Indicators */
.modern-carousel__dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--color-base-200);
}

.modern-carousel__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.modern-carousel__dot:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: scale(1.2);
}

.modern-carousel__dot--active {
    background: var(--color-primary);
    width: 24px;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Thumbnail Strip */
.modern-carousel__thumbnails {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    background: rgba(0, 0, 0, 0.03);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.modern-carousel__thumbnails::-webkit-scrollbar {
    height: 6px;
}

.modern-carousel__thumbnails::-webkit-scrollbar-track {
    background: transparent;
}

.modern-carousel__thumbnails::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.modern-carousel__thumb {
    flex: 0 0 auto;
    width: 80px;
    height: 60px;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    opacity: 0.6;
}

.modern-carousel__thumb:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.modern-carousel__thumb--active {
    border-color: var(--color-primary);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modern-carousel__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lightbox / Fullscreen Overlay */
.modern-carousel__lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modern-carousel__lightbox--open {
    display: flex;
    opacity: 1;
}

.modern-carousel__lightbox-inner {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-carousel__lightbox img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.modern-carousel__lightbox-close {
    position: absolute;
    top: -3rem;
    right: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.modern-carousel__lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.modern-carousel__lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.modern-carousel__lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.modern-carousel__lightbox-nav--prev {
    left: -4rem;
}

.modern-carousel__lightbox-nav--next {
    right: -4rem;
}

@media (max-width: 768px) {
    .modern-carousel__lightbox-nav--prev {
        left: 0.5rem;
    }

    .modern-carousel__lightbox-nav--next {
        right: 0.5rem;
    }

    .modern-carousel__lightbox-close {
        top: 0.5rem;
        right: 0.5rem;
        position: fixed;
    }
}

/* Image Counter */
.modern-carousel__counter {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 10;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .modern-carousel__slide {
        min-height: 250px;
        padding: 0.5rem;
    }

    .modern-carousel__slide img {
        max-height: 50vh;
        border-radius: 0.5rem;
    }

    .modern-carousel__dots {
        gap: 0.375rem;
        padding: 0.5rem 0.75rem;
    }

    .modern-carousel__dot {
        width: 8px;
        height: 8px;
    }

    .modern-carousel__dot--active {
        width: 20px;
    }

    .modern-carousel__thumbnails {
        padding: 0.75rem;
    }

    .modern-carousel__thumb {
        width: 60px;
        height: 45px;
    }

    .modern-carousel__counter {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}