/**
 * Services Slider Styles
 * Custom slider for business services section
 *
 * @package LabuanBajo_Business
 * @since 1.0.0
 */

/* Slider Wrapper */
.services-slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 0 0 4rem 0;
}

/* Slider Container */
.services-slider {
    position: relative;
    width: 100%;
    overflow: visible;
}

/* Slider Track */
.services-track {
    display: flex;
    gap: 2rem;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: grab;
    user-select: none;
}

.services-track:active {
    cursor: grabbing;
}

/* Service Slide */
.service-slide {
    flex-shrink: 0;
    box-sizing: border-box;
}

.service-slide > div {
    height: 100%;
    min-height: 500px;
}

/* Responsive min-height adjustments */
@media (max-width: 640px) {
    .service-slide > div {
        min-height: 450px;
    }
}

@media (min-width: 1024px) {
    .service-slide > div {
        min-height: 550px;
    }
}

/* Navigation Buttons */
.services-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 2px solid rgba(251, 185, 36, 0.3);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    color: #fbb924;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.services-nav:hover {
    background: rgba(251, 185, 36, 0.2);
    border-color: #fbb924;
    transform: translateY(-50%) scale(1.1);
}

.services-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.services-nav.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.services-prev {
    left: -1.5rem;
}

.services-next {
    right: -1.5rem;
}

/* Hide nav buttons on mobile */
@media (max-width: 768px) {
    .services-nav {
        display: none;
    }
}

/* Pagination Dots */
.services-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    padding: 0;
}

.pagination-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    border: 2px solid rgba(251, 185, 36, 0.3);
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    outline: none;
}

.pagination-dot:hover {
    background: rgba(251, 185, 36, 0.3);
    border-color: rgba(251, 185, 36, 0.5);
    transform: scale(1.2);
}

.pagination-dot.active {
    width: 2rem;
    border-radius: 1rem;
    background: #fbb924;
    border-color: #fbb924;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .services-slider-wrapper {
        padding: 0 2rem 4rem 2rem;
    }

    .services-prev {
        left: 0;
    }

    .services-next {
        right: 0;
    }
}

@media (min-width: 1024px) {
    .services-slider-wrapper {
        padding: 0 3rem 4rem 3rem;
    }

    .services-prev {
        left: 0.5rem;
    }

    .services-next {
        right: 0.5rem;
    }
}

/* Animation for slide transitions */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.service-slide {
    animation: slideIn 0.3s ease-out;
}

/* Touch device optimization */
@media (hover: none) and (pointer: coarse) {
    .services-track {
        cursor: default;
    }

    .services-track:active {
        cursor: default;
    }
}

/* Accessibility - Focus states */
.services-nav:focus-visible,
.pagination-dot:focus-visible {
    outline: 2px solid #fbb924;
    outline-offset: 2px;
}

/* Loading state placeholder */
.services-slider-wrapper.loading .service-slide {
    opacity: 0.5;
    pointer-events: none;
}

/* Prevent text selection during drag */
.services-track.dragging,
.services-track.dragging * {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* Smooth scroll behavior */
.services-slider {
    scroll-behavior: smooth;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .services-nav {
        border-width: 3px;
    }

    .pagination-dot {
        border-width: 3px;
    }

    .pagination-dot.active {
        outline: 2px solid #fbb924;
        outline-offset: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .services-track {
        transition: none;
    }

    .services-nav,
    .pagination-dot {
        transition: none;
    }

    .service-slide {
        animation: none;
    }
}
