/* Splide Services Slider Parity CSS (Attempt 3 - Screenshot Parity) */

.section-5 {
    overflow: visible !important;
}

.services-splide {
    /* BREAKOUT: Offset the entire slider to align with Webflow's breakout */
    margin-left: calc(var(--base--section-padding) - 40px) !important;
    width: auto !important;
    visibility: visible !important;
    position: relative;
    /* Keeps the overall container visible but allows track to clip */
    overflow: visible !important;
}

.services-splide .splide__track {
    /* Optimization: Clip invisible slides while allowing peek effect via padding in JS */
    overflow: hidden !important;
    border-radius: 4px;
    /* Force hardware acceleration */
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}

.services-splide .splide__list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    /* Hint to GPU about movement */
    will-change: transform;
}

.services-splide .splide__slide {
    flex-shrink: 0 !important;
    width: 92svw !important; /* Force width even if JS is late */
    margin: 0 !important;
    position: relative;
    list-style: none !important;
    /* Prevent flickering during movement */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Inner Card - Matches Screenshot precisely */
.services-splide .div-block-97 {
    border-radius: 4px;
    flex-flow: column;
    justify-content: space-between;
    align-items: flex-start;
    width: 100% !important; /* Card fills the slide width (92svw) */
    height: 74vh !important;
    padding-top: 32px;
    padding-left: 72px;
    padding-right: 16px;
    display: flex !important;
    position: relative;
    left: 0 !important; 
    box-sizing: border-box;
}

/* Image background layer */
.services-splide .div-block-103 {
    border-radius: 4px;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden; /* Ensure image doesn't bleed */
}

.services-splide .image-10 {
    object-fit: cover;
    border-radius: 4px;
    width: 100%;
    height: 100%;
    /* CLEAN IMAGE: No filters or shadows here for max performance */
    filter: none !important;
    box-shadow: none !important;
}

/* NEW OVERLAY STRATEGY: Separate div for effects */
.services-splide .inner-shadow-filter {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Above image */
    pointer-events: none; /* Let clicks pass through */
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 100%);
    box-shadow: inset 0 -40px 60px -20px rgba(0,0,0,0.7);
    border-radius: 4px;
}

/* Navigation Arrows (Positioned next to "Ver Tours") */
.services-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 0; /* Reset margin since button is gone */
}

.services-splide-arrow {
    width: 44px; /* Increased from 32px */
    height: 44px; /* Increased from 32px */
    border: 1px solid #cde0eb4d;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    color: var(--color--blue-dark);
    padding: 0;
    /* Disable reveal animations */
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

.services-splide-arrow:hover {
    background-color: #8fbbd34f;
    transform: scale(1.05);
}

.services-splide-arrow svg {
    width: 24px; /* Increased from 16px */
    height: 24px; /* Increased from 16px */
}

/* Ensure the header wrap for services can accommodate arrows */
.heading_wrap-2.services .div-block-98 {
    display: flex !important;
    align-items: center !important;
}

/* Responsive Overrides */
@media screen and (max-width: 991px) {
    .services-splide {
        margin-left: var(--mobile-margin) !important;
    }
    .services-splide .div-block-97 {
        height: 80vh !important;
    }
}

@media screen and (max-width: 767px) {
    .services-splide .div-block-97 {
        min-height: 570px !important;
        padding-top: 24px;
        padding-bottom: 24px;
        padding-left: 41px;
        box-shadow: 0 2px 9px 2px #0003;
    }
    .services-nav-wrapper {
        display: none; /* Often arrows are replaced by drag on mobile */
    }
}

/* Fix for reviews section disappearing on desktop */
@media screen and (min-width: 992px) {
    .section-project {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .section-project [style*="opacity: 0"],
    .section-project [style*="opacity: 0.0"],
    .section-project .comment-txt,
    .section-project .split-lines_large,
    .section-project .button-6 {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }

    .mobile-comments {
        display: none !important;
    }
}

@media screen and (max-width: 991px) {
    .section-project {
        display: none !important;
    }
    .mobile-comments {
        display: block !important;
    }
}
