/* Hero Images Carousel Styles */
/* Mobile-first responsive carousel for hero section */

/* ============================================
   DESKTOP: Hide carousel, show original layout
   ============================================ */
@media (min-width: 992px) {
    .hero-images-carousel {
        display: none !important;
    }

    .hero-images-layout {
        display: flex !important;
    }
}

/* ============================================
   MOBILE: Hide original, show carousel
   ============================================ */
@media (max-width: 768px) {
    .hero-images-layout {
        display: none !important;
    }

    .hero-images-carousel {
        display: block !important;
    }
}

/* ============================================
   CAROUSEL STRUCTURE
   ============================================ */

.hero-images-carousel {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    overflow: hidden;
    display: none; /* Hidden by default, shown on mobile via media query */
    touch-action: pan-y pinch-zoom; /* Allow vertical scroll and pinch zoom, JS handles horizontal swipes */
    -webkit-user-select: none; /* Prevent text selection during swipe */
    user-select: none;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Ensure images inside carousel maintain their styling */
.carousel-slide .hero-main-image,
.carousel-slide .side-image {
    width: 100%;
    max-width: 350px;
    height: 450px;
}

.carousel-slide img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* ============================================
   INDICATOR DOTS
   ============================================ */

.carousel-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 24px;
    padding: 8px 0;
}

.carousel-indicators .indicator {
    width: 44px; /* Touch target size */
    height: 44px;
    border-radius: 50%;
    background-color: transparent; /* Transparent background, visual dot is in ::before */
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

/* Visual dot inside touch target */
.carousel-indicators .indicator::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #D4C4B0;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: absolute;
}

.carousel-indicators .indicator:hover::before {
    background-color: #8B7355;
    transform: scale(1.2);
}

.carousel-indicators .indicator.active::before {
    background-color: #8B7355;
    transform: scale(1.3);
}

.carousel-indicators .indicator:focus {
    outline: 2px solid #8B7355;
    outline-offset: 4px;
}

/* Focus visible for keyboard navigation */
.carousel-indicators .indicator:focus-visible {
    outline: 2px solid #8B7355;
    outline-offset: 4px;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .carousel-track {
        transition: none !important;
    }

    .carousel-indicators .indicator,
    .carousel-indicators .indicator::before {
        transition: none !important;
    }
}

/* ============================================
   MOBILE SPECIFIC ADJUSTMENTS
   ============================================ */

@media (max-width: 576px) {
    .hero-images-carousel {
        max-width: 100%;
        padding: 0 20px;
    }

    .carousel-slide .hero-main-image,
    .carousel-slide .side-image {
        height: 400px;
    }

    .carousel-slide img {
        height: 400px;
        border-radius: 8px;
    }

    .carousel-indicators {
        gap: 6px;
        margin-top: 12px;
        margin-bottom: 20px;
        padding: 4px 0;
    }

    .carousel-indicators .indicator {
        width: 40px;
        height: 40px;
    }

    .carousel-indicators .indicator::before {
        width: 10px;
        height: 10px;
    }
}

/* ============================================
   LOADING STATE
   ============================================ */

.carousel-slide img:not(.loaded) {
    opacity: 0;
    filter: blur(10px);
}

.carousel-slide img.loaded {
    opacity: 1;
    filter: blur(0);
}
