/**
 * Gallery Splide Styles
 * Custom styling for Splide.js gallery implementation
 */

/* Splide Gallery Container */
.gallery-splide-enhanced {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    overflow: hidden;
    display: block;
    padding-bottom: 5em;
}

/* Full-width wrapper for the gallery */
.gallery-splide-enhanced .splide {
    width: 100%;
    max-width: 100vw;
}

/* Custom Arrow Styling */
.gallery-splide-arrows {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.gallery-splide-arrow {
    position: absolute;
    width: 50px;
    height: 130px;
    cursor: pointer;
    opacity: 1;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-splide-arrow:hover {
    opacity: 0.8;
}

.gallery-splide-arrow:focus {
    outline: none;
}

.gallery-splide-arrow:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Left/Right positioning */
.gallery-splide-arrow--prev {
    left: 30px;
}

.gallery-splide-arrow--next {
    right: 30px;
}

/* Arrow icons using your existing images */
.gallery-splide-arrow--prev .arrow-icon {
    background-image: url('/wp-content/uploads/HD_Slider-Arrow-left.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
    width: 100%;
    height: 100%;
    display: block;
}

.gallery-splide-arrow--next .arrow-icon {
    background-image: url('/wp-content/uploads/HD_Slider-Arrow-right.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
    width: 100%;
    height: 100%;
    display: block;
}

/* Splide Slide Styling */
.splide__slide {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
}

.splide__slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
    border: none;
    outline: none;
    transition: opacity 0.3s ease;
    box-shadow: none;
    object-fit: cover;
}

/* Splide Pagination (dots) - hidden by default */

/* Responsive Design */
@media (max-width: 959px) {
    .gallery-splide-arrow {
        width: 40px;
        height: 100px;
    }
    
    .gallery-splide-arrow--prev {
        left: 20px;
    }
    
    .gallery-splide-arrow--next {
        right: 20px;
    }
}

@media (max-width: 480px) {
    .gallery-splide-arrow {
        width: 35px;
        height: 80px;
    }
    
    .gallery-splide-arrow--prev {
        left: 15px;
    }
    
    .gallery-splide-arrow--next {
        right: 15px;
    }
}

/* Splide Progress Bar (hidden by default) */
.splide__progress {
    display: none;
}

/* Splide Track and List */
.splide__track {
    overflow: hidden;
}

.splide__list {
    display: flex;
    transition: transform 0.5s ease;
    width: 100vW;}

/* Ensure proper spacing */
.splide__slide {
    flex-shrink: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .gallery-splide-arrow {
        background: black;
        border: 2px solid white;
    }
    
    .gallery-splide-arrow:hover {
        background: white;
        color: black;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .splide__list {
        transition: none;
    }
    
    .gallery-splide-arrow {
        transition: none;
    }
}
 /* Splide Built-in Arrow Styling */
 .splide__arrow {
    width: 40px !important;
    height: 100px !important;
    background: none !important;
    border: none !important;
    opacity: 1 !important;
    transition: opacity 0.3s ease !important;
}

@media (width >= 960px) {
    /* Splide Built-in Arrow Styling */
    .splide__arrow {
        width: 50px !important;
        height: 130px !important;
    }
}

.splide__arrow:hover {
    opacity: 0.8 !important;
}

.splide__arrow:focus {
    outline: none !important;
}

.splide__arrow:focus-visible {
    outline: 2px solid white !important;
    outline-offset: 2px !important;
}

@media (width >= 960px) {

    /* Left/Right positioning */
    .splide__arrow--prev {
        left: 30px !important;
    }

    .splide__arrow--next {
        right: 30px !important;
    }
}

/* Arrow icons using your existing images */
.splide__arrow--prev::before {
    content: '';
    background-image: url('/wp-content/uploads/HD_Slider-Arrow-left.png') !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
}

.splide__arrow--next::before {
    content: '';
    background-image: url('/wp-content/uploads/HD_Slider-Arrow-right.png') !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
}

/* Hide default Splide arrow content */
.splide__arrow svg {
    display: none !important;
}
