/* ============================================
   Carousel Styles - Karunesh Remedies
   Premium Design with Smooth Animations
   ============================================ */

/* Hero Carousel - Responsive Heights */
.hero-carousel {
    height: 100vh; /* Full viewport height */
    min-height: 500px;
    max-height: 900px;
}

@media (max-width: 640px) {
    .hero-carousel {
        height: 100vh;
        min-height: 550px;
        max-height: 700px;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .hero-carousel {
        min-height: 600px;
        max-height: 800px;
    }
}

/* Image Wrapper */
.carousel-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    background: linear-gradient(135deg, #0f172a 0%, #1a1a2e 100%);
}

.carousel-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Ken Burns Effect for Images */
.ken-burns-image {
    animation: kenBurns 8s ease-out forwards;
    will-change: transform;
}

@keyframes kenBurns {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

/* Slide Transitions - Smooth fade */
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1a1a2e 100%);
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity;
}

.carousel-slide.opacity-100 {
    opacity: 1 !important;
    z-index: 10;
    visibility: visible;
}

.carousel-slide.opacity-0 {
    opacity: 0 !important;
    z-index: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Modern Bar-style Dots */
.carousel-dot {
    display: inline-block;
    cursor: pointer;
    border: none;
    padding: 0;
    margin: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity, width;
    outline: none;
    border-radius: 4px;
}

.carousel-dot:hover {
    opacity: 0.8 !important;
}

.carousel-dot.opacity-100 {
    background-color: rgba(255, 255, 255, 1) !important;
    opacity: 1 !important;
    width: 48px !important;
}

.carousel-dot.opacity-40 {
    background-color: rgba(255, 255, 255, 0.6) !important;
    opacity: 0.6 !important;
}

/* Navigation Buttons */
.carousel-prev,
.carousel-next {
    position: relative;
    border: none;
    cursor: pointer;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    will-change: transform, background-color;
}

.carousel-prev:hover,
.carousel-next:hover {
    background-color: rgba(255, 255, 255, 0.5) !important;
}

.carousel-prev:active,
.carousel-next:active {
    transform: scale(0.95) !important;
}

.carousel-prev:focus,
.carousel-next:focus {
    outline: 2px solid #1B94AB;
    outline-offset: 2px;
}

/* Image Gallery Showcase */
.image-gallery-container {
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
}

.gallery-item:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-4px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: background;
}

.gallery-item:hover .gallery-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.gallery-overlay-text {
    color: white;
    text-align: center;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity;
    transform: translateY(10px);
}

.gallery-item:hover .gallery-overlay-text {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .carousel-prev,
    .carousel-next {
        padding: 0.5rem;
    }
    
    .carousel-prev svg,
    .carousel-next svg {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .carousel-dot {
        width: 0.625rem !important;
        height: 0.625rem !important;
    }
}

/* Accessibility */
.carousel-prev:focus,
.carousel-next:focus,
.carousel-dot:focus {
    outline: 2px solid #1B94AB;
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Animation utilities */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Backdrop blur support */
@supports (backdrop-filter: blur(10px)) {
    .carousel-prev,
    .carousel-next,
    .carousel-dot-container {
        backdrop-filter: blur(4px);
    }
}
