/* Dauroh Image Slider - Frontend Styles */

.dauroh-slider {
    --dauroh-gap: 16px;
    --dauroh-img-width: 100%;
    --dauroh-arrow-size: 44px;
    --dauroh-arrow-bg: rgba( 0, 0, 0, 0.55 );
    --dauroh-arrow-bg-hover: rgba( 0, 0, 0, 0.8 );
    --dauroh-dot-size: 10px;
    --dauroh-dot-color: rgba( 0, 0, 0, 0.25 );
    --dauroh-dot-active: #1e1e1e;

    position: relative;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.dauroh-slider *,
.dauroh-slider *::before,
.dauroh-slider *::after {
    box-sizing: border-box;
}

.dauroh-slider__viewport {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.dauroh-slider__track {
    display: flex;
    flex-wrap: nowrap;
    gap: var( --dauroh-gap );
    transition: transform 0.45s cubic-bezier( 0.22, 0.61, 0.36, 1 );
    will-change: transform;
    touch-action: pan-y;
    transform: translate3d( 0, 0, 0 );
    margin: 0;
    padding: 0;
    list-style: none;
}

.dauroh-slider__slide {
    /* Desktop default: 2 gambar per view */
    flex: 0 0 calc( ( 100% - var( --dauroh-gap ) ) / 2 );
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dauroh-slider__slide img {
    display: block;
    width: var( --dauroh-img-width );
    height: auto;
    max-width: 100%;
    user-select: none;
    -webkit-user-drag: none;
    border-radius: 15px;
}

/* Arrow navigation */
.dauroh-slider__arrow {
    position: absolute;
    top: 50%;
    transform: translateY( -50% );
    width: var( --dauroh-arrow-size );
    height: var( --dauroh-arrow-size );
    border: none;
    border-radius: 50%;
    background: var( --dauroh-arrow-bg );
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: background 0.2s ease, opacity 0.2s ease;
    padding: 0;
}

.dauroh-slider__arrow:hover { background: var( --dauroh-arrow-bg-hover ); }

.dauroh-slider__arrow:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.dauroh-slider__arrow[disabled],
.dauroh-slider__arrow[aria-disabled="true"] {
    opacity: 0.35;
    cursor: not-allowed;
}

.dauroh-slider__arrow--prev { left: 10px; }
.dauroh-slider__arrow--next { right: 10px; }

.dauroh-slider__arrow svg {
    width: 24px;
    height: 24px;
}

/* Dot indicators */
.dauroh-slider__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.dauroh-slider__dot {
    width: var( --dauroh-dot-size );
    height: var( --dauroh-dot-size );
    border-radius: 50%;
    background: var( --dauroh-dot-color );
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.dauroh-slider__dot:hover { background: rgba( 0, 0, 0, 0.45 ); }

.dauroh-slider__dot.is-active {
    background: var( --dauroh-dot-active );
    transform: scale( 1.25 );
}

.dauroh-slider__dot:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Mobile: 1 gambar per view */
@media ( max-width: 782px ) {
    .dauroh-slider__slide { flex: 0 0 100%; }

    .dauroh-slider { --dauroh-arrow-size: 38px; }

    .dauroh-slider__arrow--prev { left: 6px; }
    .dauroh-slider__arrow--next { right: 6px; }

    .dauroh-slider__arrow svg {
        width: 20px;
        height: 20px;
    }
}

@media ( prefers-reduced-motion: reduce ) {
    .dauroh-slider__track { transition: none; }
}
