/* =============================================================================
   HT Tour Carousel — CSS scroll-snap, no Swiper.js, no Bootstrap.
   Card styles: ht-search.css (.ht-tour-card).
   Enqueued by [ht_tour_carousel] shortcode handler in functions.php.
   ============================================================================= */

/* ── Track ────────────────────────────────────────────────────────────────── */
.ht-carousel {
    position: relative;
}

.ht-carousel__viewport {
    overflow: hidden;
}

.ht-carousel__track {
    display:          flex;
    gap:              1rem;
    overflow-x:       auto;
    scroll-snap-type: x mandatory;
    scroll-behavior:  smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width:  none;          /* Firefox */
    padding-bottom:   4px;           /* prevent clipped focus rings */
}

.ht-carousel__track::-webkit-scrollbar {
    display: none;                   /* Chrome/Safari */
}

.ht-carousel__track > .ht-tour-card {
    flex:              0 0 var(--ht-slide-w, clamp(260px, 30vw, 300px));
    scroll-snap-align: start;
    min-width:         0;
}

/* ── Prev / Next controls ─────────────────────────────────────────────────── */
.ht-carousel__controls {
    display:         flex;
    justify-content: flex-end;
    gap:             0.5rem;
    margin-bottom:   0.75rem;
}

.ht-carousel__btn {
    width:         36px;
    height:        36px;
    border-radius: 50%;
    border:        1.5px solid #013C1A;
    background:    #ffffff;
    cursor:        pointer;
    display:       flex;
    align-items:   center;
    justify-content: center;
    transition:    background 0.15s, border-color 0.15s, opacity 0.15s;
    outline:       none;
    padding:       0;
    -webkit-tap-highlight-color: transparent;
}

.ht-carousel__btn svg {
    width:  16px;
    height: 16px;
    color:  #013C1A;
}

.ht-carousel__btn:hover,
.ht-carousel__btn:focus-visible {
    background:   #013C1A;
    border-color: #013C1A;
}

.ht-carousel__btn:hover svg,
.ht-carousel__btn:focus-visible svg {
    color: #ffffff;
}

.ht-carousel__btn:focus-visible {
    outline: 2px solid #01A347;
    outline-offset: 2px;
}

.ht-carousel__btn[disabled],
.ht-carousel__btn[aria-disabled="true"] {
    opacity:       0.35;
    cursor:        default;
    pointer-events: none;
}

/* ── Mobile ───────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .ht-carousel__track > .ht-tour-card {
        --ht-slide-w: 80vw;
    }

    .ht-carousel__controls {
        display: none;  /* touch swipe native on mobile */
    }
}

/* ── Reduced motion ───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .ht-carousel__track {
        scroll-snap-type: none;
        flex-wrap:        wrap;
        overflow-x:       visible;
    }

    .ht-carousel__track > .ht-tour-card {
        flex: 0 0 calc(50% - 0.5rem);
    }

    .ht-carousel__controls {
        display: none;
    }
}
