.bee1-hero-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 0 auto;
    direction: ltr; /* Ensure slider wrapper and math work identically in LTR/RTL */
    aspect-ratio: 1920 / 680;
}

.bee1-hero-slider__wrapper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.bee1-hero-slider__wrapper::-webkit-scrollbar {
    display: none;
}

.bee1-hero-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    min-height: 250px;
    background-size: cover;
    background-position: var(--bg-position-desktop, center center);
    background-repeat: no-repeat;
    scroll-snap-align: start;
    position: relative;
    /* Fallback when no <picture> (older markup): desktop CSS var */
    background-image: var(--bg-desktop);
    transition: background-image 0.15s ease-in-out;
    overflow: hidden;
}

/* Reliable mobile/desktop banners: real <img> via <picture>, not only CSS url() vars
   (Hebrew/non-ASCII filenames break CSS custom-property url() in some browsers). */
.bee1-hero-slide__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    z-index: 1;
    overflow: hidden;
}

.bee1-hero-slide__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--bg-position-desktop, center center);
    display: block;
}

/* Desktop default: show desktop image only */
.bee1-hero-slide__img--desktop {
    display: block;
}
.bee1-hero-slide__img--mobile {
    display: none;
}

.bee1-hero-slide--has-picture {
    background-image: none !important;
}

.bee1-hero-slide__link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: block;
    cursor: pointer;
}

/* Arrows Navigation */
.bee1-hero-slider__arrows {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 3;
}

.bee1-hero-slider__arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(23, 31, 59, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: background-color 0.2s, border-color 0.2s, transform 0.1s;
    outline: none;
    padding: 0;
}

.bee1-hero-slider__arrow:hover {
    background-color: rgba(23, 31, 59, 0.85);
    border-color: rgba(255, 255, 255, 0.4);
}

.bee1-hero-slider__arrow:active {
    transform: scale(0.92);
}

.bee1-hero-slider__arrow::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
}

.bee1-hero-slider__arrow--prev::after {
    transform: rotate(-135deg);
    margin-left: 4px;
}

.bee1-hero-slider__arrow--next::after {
    transform: rotate(45deg);
    margin-right: 4px;
}

/* Dots Navigation */
.bee1-hero-slider__dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
    pointer-events: auto;
}

.bee1-hero-slider__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    border: none;
    padding: 0;
    cursor: pointer;
    outline: none;
    transition: background-color 0.25s, transform 0.2s;
}

.bee1-hero-slider__dot:hover {
    background-color: rgba(255, 255, 255, 0.75);
}

.bee1-hero-slider__dot.is-active {
    background-color: #fbc109; /* Studio Bee1 Gold */
    transform: scale(1.2);
}

/* Responsive Styles */
@media (max-width: 767px) {
    .bee1-hero-slider {
        /* Follow the mobile image's own aspect ratio (set inline as --bs-mobile-aspect);
           falls back to the legacy landscape ratio when unknown. Prevents portrait
           mobile banners from being cropped to a wide/short box. */
        aspect-ratio: var(--bs-mobile-aspect, 960 / 340);
    }

    .bee1-hero-slide {
        /* Fallback path for legacy CSS-var-only markup */
        background-image: var(--bg-mobile) !important;
        background-position: var(--bg-position-mobile, center center);
        height: 100%;
        min-height: 0;
    }

    .bee1-hero-slide--has-picture {
        background-image: none !important;
    }

    /* Force mobile asset on small viewports (no <picture> dependency) */
    .bee1-hero-slide__img--desktop {
        display: none !important;
    }
    .bee1-hero-slide__img--mobile {
        display: block !important;
        object-position: var(--bg-position-mobile, center center);
    }

    .bee1-hero-slider__arrows {
        padding: 0 10px;
    }

    .bee1-hero-slider__arrow {
        width: 36px;
        height: 36px;
    }
}

/* Device Visibility Rules */
@media (min-width: 768px) {
    .bee1-hero-slide--visibility-mobile {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .bee1-hero-slide--visibility-desktop {
        display: none !important;
    }
}
