/* -----------------------------------------------------------------------------
 * Little Fish - Tour carousel
 * A minimal, dependency-free image carousel using CSS scroll-snap.
 * ---------------------------------------------------------------------------*/

.lf-carousel {
    --lf-radius: 12px;
    --lf-hero-height: clamp(240px, 55vw, 520px);
    position: relative;
    margin: 1.5rem 0 2rem;
    background: #0000000a;
    border-radius: var(--lf-radius);
    overflow: hidden;
}

.lf-carousel__track {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;              /* Firefox */
}
.lf-carousel__track::-webkit-scrollbar { display: none; }

.lf-carousel__slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    aspect-ratio: 16 / 9;
    height: var(--lf-hero-height);
    max-height: var(--lf-hero-height);
    position: relative;
}

.lf-carousel__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Prev / next buttons */
.lf-carousel__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    color: #111;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: background 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
    opacity: 0.9;
}
.lf-carousel__btn:hover  { background: #fff; transform: translateY(-50%) scale(1.05); }
.lf-carousel__btn:focus-visible {
    outline: 2px solid #111;
    outline-offset: 3px;
}
.lf-carousel__btn[disabled] {
    opacity: 0.3;
    cursor: default;
    transform: translateY(-50%);
}
.lf-carousel__btn--prev { left: 12px; }
.lf-carousel__btn--next { right: 12px; }
.lf-carousel__btn svg { width: 22px; height: 22px; }

/* Dot indicators */
.lf-carousel__dots {
    position: absolute;
    bottom: 12px;
    left: 0; right: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 8px;
    pointer-events: none;   /* buttons still clickable */
}
.lf-carousel__dot {
    pointer-events: auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}
.lf-carousel__dot:hover { background: rgba(255, 255, 255, 0.85); }
.lf-carousel__dot[aria-current="true"] {
    background: #fff;
    transform: scale(1.25);
}

/* Counter (n / total) — subtle, top-right */
.lf-carousel__counter {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

/* Single-image mode: no controls */
.lf-carousel--single .lf-carousel__btn,
.lf-carousel--single .lf-carousel__dots,
.lf-carousel--single .lf-carousel__counter {
    display: none;
}

/* Hide arrow buttons on small screens (swipe is enough) */
@media (max-width: 600px) {
    .lf-carousel__btn { display: none; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .lf-carousel__track { scroll-behavior: auto; }
}
