/* Fix for Elementor Editor */
.elementor-editor-active .netsurf-image-carousel.splide {
    visibility: visible !important;
}

/* Header Layout (Shared structure) */
.netsurf-carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 48px;
}

/* 
   Image Carousel Styles 
   ========================================================================== */

.netsurf-image-carousel {
    position: relative;
    padding-bottom: 50px; /* Space for progress bar */
}
.netsurf-image-carousel .splide__track {
    overflow: visible;
}
.netsurf-image-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 550 / 420; /* Standard ratio, can be adjusted */
    width: 100%;
    cursor: pointer;
}

.netsurf-image-card-full-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.netsurf-image-card-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.netsurf-image-card:hover .netsurf-image-card-bg {
    transform: scale(1.05);
}

.netsurf-image-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    z-index: 1;
}

.netsurf-image-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 2;
}

.netsurf-image-card-title {
    margin: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    max-width: 70%;
}

.netsurf-image-card-link {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    padding-bottom: 2px;
}

/* Underline effect on hover */
.netsurf-image-card-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #fff;
    transition: width 0.3s ease;
}

.netsurf-image-card:hover .netsurf-image-card-link::after {
    width: 100%;
}

/* Pagination Dots Customization */
.netsurf-image-carousel .splide__pagination {
    bottom: -30px; /* Position below images */
    padding: 0;
}

.netsurf-image-carousel .netsurf-carousel-header .splide__arrows .splide__arrow {
    position: relative;
    inset: initial;
    transform: none;
    background: #E2E2E2;
    opacity: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}
.netsurf-image-carousel .netsurf-carousel-header .splide__arrows .splide__arrow[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
}
.netsurf-image-carousel .netsurf-carousel-header .splide__arrow svg {
    fill: #333;
    width: 16px;
    height: 16px;
}

.netsurf-image-carousel .netsurf-carousel-header .splide__arrow--prev svg {
    transform: scaleX(-1);
}

.netsurf-image-carousel .netsurf-carousel-header .splide__arrow:hover {
    background: #FF0000;
}
.netsurf-image-carousel .netsurf-carousel-header .splide__arrow:hover svg {
    fill: #fff;
}

.netsurf-image-carousel .netsurf-carousel-header .splide__arrows {
    display: flex;
    gap: 16px;
    flex-shrink: 0; /* Prevent arrows from being squeezed */
}
.netsurf-image-carousel .splide__pagination__page {
    background: #000;
    border-radius: 50%;
    margin: 2px;
    width: 6px;
    opacity: 0.5;
    height: 6px;
}
.netsurf-image-carousel .splide__pagination__page.is-active {
    background: #0c0c0c;
    border-radius: 33px;
    margin: 0 2px;
    width: 24px;
    opacity: 1;
    transform: scale(1);
}

/* Ensure header arrows are always on the right */
.netsurf-carousel-header {
    justify-content: space-between;
}

.netsurf-carousel-header .splide__arrows {
    margin-left: auto; /* Push arrows to the far right */
}

@media (max-width: 768px) {
    .netsurf-card-carousel {
        margin-bottom: 60px; /* Space for arrows */
    }
}

/* Progress Bar Styles */
.netsurf-image-carousel .splide__progress {
    margin-top: 30px;
    background: #E5E5E5;
    height: 2px;
    width: 100%;
}

.netsurf-image-carousel .splide__progress__bar {
    background: #000;
    height: 2px;
    width: 0;
    transition: width 0.3s ease;
}
