/* ============================================
   IMAGE SLIDERS - OPTIMIZED STYLES
   ============================================ */

/* ============================================
   SPLIDE SLIDER - MOVIES & SPORTS
   ============================================ */

.splide {
    position: relative;
    visibility: hidden;
    margin: 40px 0;
}

.splide.is-initialized,
.splide.is-rendered {
    visibility: visible;
}

.splide__track {
    overflow: hidden;
    position: relative;
    z-index: 0;
    padding: 10px 0;
}

.splide__list {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    will-change: transform;
    align-items: stretch;
}

.splide__slide {
    position: relative;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 0 10px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Movie Posters - Fixed Aspect Ratio */
#movies-slider .splide__slide {
    width: 200px !important;
    height: 300px !important;
    margin: 0;
    padding: 0 10px;
}

#movies-slider .splide__slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    background: var(--bg-card);
    display: block;
}

#movies-slider .splide__slide:hover img {
    transform: scale(1.08);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
    z-index: 10;
    position: relative;
}

/* Sports Images - Fixed Aspect Ratio */
#sports-slider .splide__slide {
    width: 300px !important;
    height: 400px !important;
    margin: 0;
    padding: 0 10px;
}

#sports-slider .splide__slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    background: var(--bg-card);
    display: block;
}

#sports-slider .splide__slide:hover img {
    transform: scale(1.08);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
    z-index: 10;
    position: relative;
}

/* Image Loading States */
.splide__slide img {
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
    min-height: 100%;
    min-width: 100%;
}

.splide__slide img[src] {
    opacity: 1;
}

/* Loading placeholder */
.splide__slide img:not([src]),
.splide__slide img[src=""] {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-hover) 100%);
    opacity: 0.5;
}

/* Fallback for broken images */
.splide__slide img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
}

.splide__slide img[src=""],
.splide__slide img:not([src]) {
    background: var(--bg-card);
    border: 2px dashed var(--border-color);
}

/* ============================================
   SLIDER CONTAINER FIXES
   ============================================ */

#movies-slider,
#sports-slider {
    width: 100%;
    overflow: visible;
    margin: 40px 0 60px;
}

#movies-slider .splide__track,
#sports-slider .splide__track {
    overflow: visible;
}

#movies-slider .splide__list,
#sports-slider .splide__list {
    display: flex;
    align-items: stretch;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 1200px) {
    #movies-slider .splide__slide {
        width: 180px !important;
        height: 270px !important;
    }
    
    #sports-slider .splide__slide {
        width: 250px !important;
        height: 333px !important;
    }
}

@media (max-width: 992px) {
    #movies-slider .splide__slide {
        width: 160px !important;
        height: 240px !important;
    }
    
    #sports-slider .splide__slide {
        width: 220px !important;
        height: 293px !important;
    }
}

@media (max-width: 768px) {
    #movies-slider .splide__slide {
        width: 140px !important;
        height: 210px !important;
    }
    
    #sports-slider .splide__slide {
        width: 200px !important;
        height: 267px !important;
    }
    
    .splide__slide {
        padding: 0 5px;
    }
}

@media (max-width: 576px) {
    #movies-slider .splide__slide {
        width: 120px !important;
        height: 180px !important;
    }
    
    #sports-slider .splide__slide {
        width: 180px !important;
        height: 240px !important;
    }
}

/* ============================================
   SLIDER ARROWS - DARK THEME
   ============================================ */

.splide__arrow {
    position: absolute;
    z-index: 2;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(30, 40, 56, 0.9);
    border: 1px solid var(--border-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.splide__arrow:hover {
    opacity: 1;
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-50%) scale(1.1);
}

.splide__arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.splide__arrow svg {
    fill: var(--text-primary);
    width: 20px;
    height: 20px;
}

.splide__arrow--prev {
    left: 10px;
}

.splide__arrow--next {
    right: 10px;
}

/* ============================================
   PAGINATION - HIDDEN (DOTS REMOVED)
   ============================================ */

/* Hide all pagination dots from sliders */
.splide__pagination {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

.splide__pagination__page {
    display: none !important;
    visibility: hidden !important;
}

/* Hide Swiper pagination dots */
.swiper-pagination {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

.swiper-pagination-bullet {
    display: none !important;
    visibility: hidden !important;
}

/* ============================================
   BRAND LOGOS - ORGANIZED GRID
   ============================================ */

.app_list_item {
    padding: 25px;
    min-height: 120px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.app_list_item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.app_list_item:hover::before {
    opacity: 1;
}

.app_list_item:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.app_list_item img {
    max-width: 90%;
    max-height: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: brightness(0.95) contrast(1.1);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.app_list_item:hover img {
    filter: brightness(1.2) contrast(1.2);
    transform: scale(1.15);
}

/* Ensure logos are centered and properly sized */
.app_list_item img[alt*="dazn"],
.app_list_item img[alt*="netflix"],
.app_list_item img[alt*="prime"],
.app_list_item img[alt*="disney"] {
    max-height: 60px;
}

.app_list_item img[alt*="canal"],
.app_list_item img[alt*="beinsport"] {
    max-height: 65px;
}

/* ============================================
   CAN 2025 SPINNER IMAGES
   ============================================ */

.can2025-slide {
    position: absolute;
    width: 200px;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    background: var(--bg-card);
}

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

.can2025-slide:hover {
    transform: scale(1.15);
    z-index: 10;
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

/* ============================================
   REVIEW IMAGES
   ============================================ */

.hm2-feedback-item img[src*="reviewimg"] {
    max-width: 100%;
    max-height: 200px;
    height: auto;
    width: auto;
    border-radius: 8px;
    margin: 0 auto;
    display: block;
    object-fit: contain;
}

.hm2-feedback-item img[src*="star"] {
    max-width: 120px;
    height: auto;
    margin-bottom: 10px;
}

/* ============================================
   IMAGE LOADING ANIMATION
   ============================================ */

@keyframes imageFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.splide__slide img {
    animation: imageFadeIn 0.5s ease-out;
    background: var(--bg-card);
}

/* Ensure images maintain aspect ratio */
.splide__slide {
    aspect-ratio: auto;
}

#movies-slider .splide__slide {
    aspect-ratio: 2/3; /* Poster ratio */
}

#sports-slider .splide__slide {
    aspect-ratio: 3/4; /* Sports poster ratio */
}

/* ============================================
   ERROR HANDLING FOR BROKEN IMAGES
   ============================================ */

.splide__slide img[src=""],
.splide__slide img:not([src]),
.splide__slide img[src*="undefined"] {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 12px;
    border: 2px dashed var(--border-color);
    min-height: 100%;
}

.splide__slide img[src=""]:after,
.splide__slide img:not([src]):after {
    content: 'Image';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Image container fixes */
.splide__slide {
    overflow: hidden;
    border-radius: 12px;
}

/* Prevent image stretching */
.splide__slide img {
    min-width: 100%;
    min-height: 100%;
    object-position: center;
}

