/* =========================================================================
   SNAP SLIDER CORE STYLES (snap-slider.css)
   ========================================================================= */

.slider-wrapper {
    position: relative;
    width: 100%;
}

.slider-track {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 1.5rem; /* Matches Bootstrap standard gutter spacing */
    padding: 10px 0 20px 0;

    /* Hide scrollbars across browsers */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.slider-track::-webkit-scrollbar {
    display: none;
}

/* Responsive Widths matching bootstrap breakpoints */
.slider-item {
    flex: 0 0 calc(50% - 12px); /* 2 items visible on mobile */
    scroll-snap-align: start;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .slider-item {
        flex: 0 0 calc(33.333% - 16px); /* 3 items on tablet */
    }
}

@media (min-width: 992px) {
    .slider-item {
        flex: 0 0 calc(20% - 20px); /* 5 items on desktop */
    }
}

/* Navigation Buttons (Visible by default; JS dynamically manages limits) */
.slider-arrow-btn {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #212529;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: background-color 0.2s, color 0.2s, transform 0.1s, opacity 0.2s ease;
    opacity: 1; /* Changed from 0 to 1 for graceful failure support */
    pointer-events: auto; /* Changed from none to auto */
}

.slider-arrow-btn:hover {
    background-color: #212529;
    color: #ffffff;
}

.slider-arrow-btn:active {
    transform: translateY(-50%) scale(0.92);
}

.slider-arrow-btn.prev {
    left: -22px;
}

.slider-arrow-btn.next {
    right: -22px;
}

@media (hover: none) {
    .slider-arrow-btn {
        display: none !important;
    }
}

/* Visual styles matching trending-card designs */
.trending-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    background-color: #ffffff;
    /* transition only the shadow and border to keep card physically stationary */
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    height: 100%;
}

.trending-card:hover {
    /* No transforms, translateY, or scale rules to prevent physical shifts */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12); /* Clean, modern elevated shadow box */
    border-color: rgba(0, 0, 0, 0.15); /* Subtle border accent shift */
}

.poster-wrapper {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}