/* Animated Service Slider - Auto-Scroll with Navigation v2.1.0 */

/* Main slider container */
.animated-service-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    isolation: isolate;
}

.service-slider-container {
    position: relative;
    width: 100%;
    height: 100vh;
}

/* Slide transitions - optimized for performance */
.service-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    will-change: opacity; /* Hint browser for optimization */
    pointer-events: none; /* Prevent interaction with hidden slides */
}

.service-slide.active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto; /* Allow interaction with active slide */
}

/* Overlay - using will-change for performance */
.service-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
    transition: opacity 0.5s ease;
    will-change: opacity;
}

/* Content container - New Layout: Left (heading) + Right (cards) - Bottom Aligned */
.service-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 60px 120px;
    display: flex;
    align-items: flex-end; /* Bottom align all content */
    justify-content: space-between;
    gap: 80px;
}

@media (max-width: 1200px) {
    .service-content {
        max-width: 100%;
        gap: 60px;
        padding: 60px 40px 100px;
    }
}

@media (max-width: 768px) {
    .service-content {
        flex-direction: column;
        gap: 40px;
        padding: 40px 20px 100px;
    }
}

/* Service Left Section - Main Heading Area (Bottom Aligned) */
.service-left {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 20px;
    padding-right: 40px;
    padding-bottom: 0; /* No extra padding, parent handles it */
}

@media (max-width: 768px) {
    .service-left {
        flex: 1;
        padding-right: 0;
        align-items: center;
    }
}

/* Service title - Large heading on left (Bottom aligned) */
.service-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 15px 0;
    color: #ffffff;
    text-align: left;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    letter-spacing: -0.02em;
}

/* Service subtitle - Below main heading (Bottom aligned) */
.service-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .service-title,
    .service-subtitle {
        text-align: center;
    }
}

/* Service Right Section - Sub-service cards area (Bottom Aligned) */
.service-right {
    flex: 0 0 55%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 0;
    padding-bottom: 0; /* No extra padding, parent handles it */
}

@media (max-width: 768px) {
    .service-right {
        flex: 1;
        align-items: center;
    }
}

/* Sub-services container - No wrapper card needed */
.services-card {
    display: contents; /* Make it transparent, cards are individual */
}

/* Sub-Services List - Responsive Grid Layout */
.sub-services-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    width: 100%;
    max-width: 600px; /* Prevent cards from going too wide */
}

@media (max-width: 1200px) {
    .sub-services-list {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .sub-services-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .sub-services-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* Individual sub-service card - Button-sized with smaller fonts (No Icons) */
.sub-service-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: translateZ(0);
    will-change: transform, background-color;
    min-height: 50px;
}

.sub-service-item:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px) translateZ(0);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .sub-service-item {
        padding: 10px 14px;
        gap: 8px;
        min-height: 45px;
    }
}

/* Icon - Hidden/Removed */
.sub-service-icon {
    display: none !important;
}

.sub-service-content {
    flex: 1;
    min-width: 0; /* Allow text truncation in grid */
}

.sub-service-title {
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    font-weight: 600;
    margin: 0;
    color: rgba(255, 255, 255, 0.98);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sub-service-description {
    display: none; /* Hide descriptions in grid layout */
}

/* Show description as tooltip on hover */
.sub-service-item:hover .sub-service-description {
    display: none; /* Keep hidden even on hover for grid layout */
}

@media (max-width: 768px) {
    .sub-service-title {
        font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    }
}

/* Progress Steps - Bottom Center */
.progress-steps-container {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 768px) {
    .progress-steps-container {
        bottom: 20px;
        gap: 10px;
    }
}

/* Individual Progress Step */
.progress-step {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-step:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scaleY(1.2);
}

.progress-step.active {
    background: #00a8e8; /* Default color - customizable via Elementor */
    box-shadow: 0 0 10px rgba(0, 168, 232, 0.6);
}

@media (max-width: 768px) {
    .progress-step {
        width: 30px;
        height: 3px;
    }
}

/* Navigation Arrows - Bottom Right */
.slider-navigation {
    position: absolute;
    bottom: 40px;
    right: 60px;
    z-index: 10;
    display: flex;
    gap: 15px;
}

@media (max-width: 768px) {
    .slider-navigation {
        bottom: 20px;
        right: 20px;
        gap: 10px;
    }
}

.nav-arrow {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #ffffff;
    padding: 0;
    outline: none;
}

.nav-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.nav-arrow:active {
    transform: scale(0.95);
}

.nav-arrow:focus {
    outline: 2px solid #00a8e8;
    outline-offset: 2px;
}

.nav-arrow svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .nav-arrow {
        width: 44px;
        height: 44px;
    }
    
    .nav-arrow svg {
        width: 20px;
        height: 20px;
    }
}

/* Remove old scroll progress */
.scroll-progress {
    display: none;
}

/* Performance optimizations */
.animated-service-slider * {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Optimize font rendering */
.animated-service-slider {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Prevent layout shifts */
.service-title,
.sub-service-title,
.sub-service-description,
.progress-label {
    font-feature-settings: "kern" 1;
    -webkit-font-feature-settings: "kern" 1;
}

/* Smooth scrolling behavior (but not within slider) */
html {
    scroll-behavior: smooth;
}

/* Prevent scroll jump on slider load */
.animated-service-slider.loading {
    visibility: hidden;
}

.animated-service-slider:not(.loading) {
    visibility: visible;
}

/* Accessibility - Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .animated-service-slider *,
    .animated-service-slider *::before,
    .animated-service-slider *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
        will-change: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .services-card {
        background: rgba(255, 255, 255, 0.9);
        border: 2px solid #000000;
        color: #000000;
    }
    
    .service-slide::before {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .sub-service-item {
        border: 2px solid rgba(255, 255, 255, 0.8);
        background: rgba(0, 0, 0, 0.3);
    }
    
    .sub-service-title,
    .sub-service-description {
        color: #ffffff;
    }
    
    .progress-label {
        background: rgba(255, 255, 255, 0.9);
        color: #000000;
        border-color: #000000;
    }
}

/* Focus states for accessibility */
.progress-label:focus,
.sub-service-item:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Loading state */
.animated-service-slider.loading {
    pointer-events: none;
}

.animated-service-slider.loading .service-slide {
    transition: none;
} 