/* ProTech Analytical - Enhanced Slider Styles */
/* Author: AI Assistant */
/* Version: 2.0 - Enhanced Text Visibility */

/* Industries Slider Main Container */
.industries-slider-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    background: #000;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.industries-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Slide Structure */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Background Image Container */
.slide-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Fallback gradient for when images don't load */
    background: linear-gradient(135deg, 
        #1e3c72 0%, 
        #2a5298 30%, 
        #3b82f6 70%, 
        #1e40af 100%);
}

.slide-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease-out;
    /* Ensure images load smoothly */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.slide-background img.loaded {
    animation: slideZoom 20s linear infinite;
}

@keyframes slideZoom {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* Enhanced Overlay for Better Text Readability with #1967ba Accent */
.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(25, 103, 186, 0.1) 20%,
        rgba(0, 0, 0, 0.4) 40%,
        rgba(25, 103, 186, 0.05) 60%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 2;
}

/* Add a subtle pattern overlay */
.slide-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(25, 103, 186, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(25, 103, 186, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Content Container */
.slide-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 3;
    padding: 80px 0 60px;
}

/* Text Content Styling - Enhanced Visibility */
.slide-text {
    color: white;
    max-width: 600px;
    position: relative;
    z-index: 10;
    /* Add background for emergency cases */
    padding: 20px;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.3) 0%, 
        rgba(25, 103, 186, 0.1) 50%, 
        rgba(0, 0, 0, 0.3) 100%);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.slide.active .slide-text {
    animation: slideInFromLeft 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100px) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

/* Category Badge with #1967ba Theme - Enhanced Visibility */
.slide-category {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, 
        rgba(25, 103, 186, 0.95) 0%, 
        rgba(25, 103, 186, 0.9) 50%, 
        rgba(100, 181, 246, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(25, 103, 186, 0.6);
    color: #ffffff !important;
    padding: 12px 22px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 28px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    box-shadow: 
        0 10px 35px rgba(25, 103, 186, 0.5),
        0 4px 15px rgba(0, 0, 0, 0.4),
        inset 0 1px 3px rgba(255, 255, 255, 0.3);
    /* Enhanced text shadow for category */
    text-shadow: 
        0 0 30px rgba(0, 0, 0, 1),
        0 0 20px rgba(0, 0, 0, 0.9),
        3px 3px 8px rgba(0, 0, 0, 0.8),
        -2px -2px 4px rgba(0, 0, 0, 0.7),
        0 0 10px rgba(25, 103, 186, 0.8),
        0 2px 4px rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    /* Force white text */
    -webkit-text-fill-color: #ffffff;
}

/* Add shine effect to category */
.slide-category::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transform: rotate(45deg);
    animation: categoryShine 4s infinite;
}

@keyframes categoryShine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.slide-category i {
    font-size: 16px;
    color: #ffffff !important;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
    -webkit-text-fill-color: #ffffff;
}

/* Main Title with #1967ba Color Theme - Fixed Visibility */
.slide-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    /* Primary color - always visible */
    color: #ffffff !important;
    /* Enhanced text shadows for maximum visibility */
    text-shadow: 
        0 0 60px rgba(0, 0, 0, 1),
        0 0 50px rgba(0, 0, 0, 1),
        0 0 40px rgba(0, 0, 0, 0.95),
        0 0 30px rgba(0, 0, 0, 0.9),
        5px 5px 12px rgba(0, 0, 0, 0.8),
        -5px -5px 10px rgba(0, 0, 0, 0.7),
        5px -5px 10px rgba(0, 0, 0, 0.7),
        -5px 5px 10px rgba(0, 0, 0, 0.7),
        0 0 20px rgba(25, 103, 186, 0.9),
        0 0 30px rgba(25, 103, 186, 0.7),
        0 0 8px rgba(255, 255, 255, 0.8);
    /* Add white text stroke for better visibility */
    -webkit-text-stroke: 1.5px rgba(0, 0, 0, 0.6);
    /* Remove problematic gradient - keep solid white */
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    background-clip: initial;
    /* Add subtle glow effect */
    filter: drop-shadow(0 0 20px rgba(25, 103, 186, 0.9)) 
            drop-shadow(0 0 8px rgba(0, 0, 0, 1))
            drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
    position: relative;
    /* Ensure text is always on top */
    z-index: 10;
    /* Add extra background for extreme cases */
    background-color: transparent;
    /* Force white color in all cases */
    -webkit-text-fill-color: #ffffff;
}

/* Add a highlight effect to titles */
.slide-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #1967ba 0%, #64b5f6 100%);
    border-radius: 2px;
    box-shadow: 0 0 15px rgba(25, 103, 186, 0.6);
}

/* Description Text with Enhanced Styling */
.slide-description {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    line-height: 1.8;
    margin-bottom: 36px;
    color: rgba(255, 255, 255, 0.98) !important;
    font-weight: 400;
    max-width: 520px;
    /* Enhanced text shadow for description */
    text-shadow: 
        0 0 30px rgba(0, 0, 0, 1),
        0 0 20px rgba(0, 0, 0, 0.9),
        3px 3px 8px rgba(0, 0, 0, 0.8),
        -2px -2px 4px rgba(0, 0, 0, 0.7),
        0 0 10px rgba(25, 103, 186, 0.4),
        0 2px 4px rgba(255, 255, 255, 0.2);
    position: relative;
    padding-left: 20px;
    /* Force white color */
    -webkit-text-fill-color: rgba(255, 255, 255, 0.98);
}

/* Add highlight line for description */
.slide-description::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, 
        #1967ba 0%, 
        #64b5f6 50%, 
        #1967ba 100%);
    border-radius: 2px;
    box-shadow: 0 0 15px rgba(25, 103, 186, 0.6);
}

/* Call to Action Button with #1967ba Theme */
.slide-btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, 
        #1967ba 0%, 
        #1455a0 30%, 
        #0d47a1 100%);
    color: white;
    padding: 18px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 12px 35px rgba(25, 103, 186, 0.5),
        0 6px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 3px rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(25, 103, 186, 0.3);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.slide-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.6s ease;
}

.slide-btn:hover::before {
    left: 100%;
}

.slide-btn:hover {
    background: linear-gradient(135deg, 
        #0d47a1 0%, 
        #1455a0 30%, 
        #1967ba 100%);
    transform: translateY(-6px) scale(1.03);
    box-shadow: 
        0 18px 45px rgba(25, 103, 186, 0.6),
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 3px rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
    border-color: rgba(25, 103, 186, 0.5);
}

.slide-btn:active {
    transform: translateY(-3px) scale(1.01);
}

/* Navigation Controls with #1967ba Theme */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, 
        rgba(25, 103, 186, 0.3) 0%, 
        rgba(25, 103, 186, 0.2) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(25, 103, 186, 0.4);
    color: white;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    z-index: 4;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 10px 35px rgba(25, 103, 186, 0.4),
        0 4px 15px rgba(0, 0, 0, 0.3);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.slider-nav:hover {
    background: linear-gradient(135deg, 
        rgba(25, 103, 186, 0.8) 0%, 
        rgba(25, 103, 186, 0.6) 100%);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 
        0 15px 45px rgba(25, 103, 186, 0.6),
        0 6px 20px rgba(0, 0, 0, 0.4);
    border-color: rgba(25, 103, 186, 0.6);
}

.slider-nav.prev {
    left: 40px;
}

.slider-nav.next {
    right: 40px;
}

/* Slide Indicators with #1967ba Theme */
.slider-indicators {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 18px;
    z-index: 4;
}

.indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(25, 103, 186, 0.4);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: linear-gradient(135deg, #1967ba 0%, #64b5f6 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

.indicator.active {
    background: linear-gradient(135deg, #1967ba 0%, #64b5f6 100%);
    transform: scale(1.5);
    box-shadow: 
        0 0 30px rgba(25, 103, 186, 0.8),
        0 4px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(25, 103, 186, 0.8);
}

.indicator.active::before {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.2) 100%);
}

.indicator:hover:not(.active) {
    background: rgba(25, 103, 186, 0.6);
    transform: scale(1.3);
    box-shadow: 0 0 20px rgba(25, 103, 186, 0.6);
    border-color: rgba(25, 103, 186, 0.6);
}

/* Progress Bar with #1967ba Theme */
.slide-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 6px;
    background: linear-gradient(90deg, 
        #1967ba 0%, 
        #64b5f6 50%, 
        #1967ba 100%);
    width: 0%;
    z-index: 4;
    border-radius: 3px 3px 0 0;
    box-shadow: 
        0 -6px 20px rgba(25, 103, 186, 0.8),
        0 0 15px rgba(25, 103, 186, 0.6);
    transition: width linear;
    position: relative;
}

.slide-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.3) 100%);
    border-radius: 3px 3px 0 0;
}

/* Enhanced Text Animations */
.slide.active .slide-category {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.slide.active .slide-title {
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
}

.slide.active .slide-description {
    animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.6s both;
}

.slide.active .slide-btn {
    animation: fadeInUp 1.4s cubic-bezier(0.4, 0, 0.2, 1) 0.8s both;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.slide-background img:not(.loaded) {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.slide-background img.loaded {
    opacity: 1;
}

/* Emergency Fallbacks for Extreme Cases */
.slide-text * {
    position: relative;
    z-index: 10;
}

/* Extra overlay for very bright images */
.slide-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
    pointer-events: none;
}

/* Emergency white text enforcement */
.slide-title,
.slide-category,
.slide-description {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Force visibility in all browsers */
@supports not (-webkit-text-fill-color: transparent) {
    .slide-title {
        color: #ffffff !important;
        background: none !important;
    }
}

/* Extra dark background for text container */
.slide-text::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(ellipse at center, 
        rgba(0, 0, 0, 0.4) 0%, 
        rgba(25, 103, 186, 0.1) 50%, 
        transparent 100%);
    z-index: -1;
    border-radius: 20px;
}

/* Responsive Design with Enhanced #1967ba Theme */
@media (max-width: 1200px) {
    .slide-content {
        padding: 60px 0 40px;
    }
    
    .slider-nav {
        width: 60px;
        height: 60px;
        font-size: 22px;
    }
    
    .slider-nav.prev { left: 30px; }
    .slider-nav.next { right: 30px; }
    
    .slide-title::after {
        width: 60px;
        height: 3px;
    }
}

@media (max-width: 992px) {
    .slide-title {
        margin-bottom: 22px;
    }
    
    .slide-description {
        margin-bottom: 30px;
        padding-left: 16px;
    }
    
    .slide-description::before {
        width: 3px;
    }
    
    .slide-btn {
        padding: 16px 30px;
        font-size: 15px;
        gap: 12px;
    }
    
    .slide-category {
        padding: 10px 18px;
        font-size: 13px;
        margin-bottom: 24px;
    }
}

@media (max-width: 768px) {
    .industries-slider-section {
        height: 80vh;
        min-height: 500px;
    }
    
    .slide-content {
        padding: 40px 0 30px;
    }
    
    .slide-category {
        font-size: 12px;
        padding: 8px 16px;
        margin-bottom: 20px;
        gap: 8px;
    }
    
    .slide-title::after {
        width: 50px;
        height: 3px;
        bottom: -6px;
    }
    
    .slide-description {
        margin-bottom: 26px;
        padding-left: 14px;
    }
    
    .slide-btn {
        padding: 14px 26px;
        font-size: 14px;
        gap: 10px;
    }
    
    .slider-nav {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }
    
    .slider-nav.prev { left: 20px; }
    .slider-nav.next { right: 20px; }
    
    .slider-indicators {
        bottom: 25px;
        gap: 14px;
    }
    
    .indicator {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 576px) {
    .slide-category {
        font-size: 11px;
        padding: 6px 12px;
        margin-bottom: 16px;
        gap: 6px;
    }
    
    .slide-title::after {
        width: 40px;
        height: 2px;
        bottom: -4px;
    }
    
    .slide-description {
        padding-left: 12px;
    }
    
    .slide-description::before {
        width: 2px;
    }
    
    .slide-btn {
        padding: 12px 22px;
        font-size: 13px;
        gap: 8px;
    }
    
    .slider-nav {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
    
    .slider-nav.prev { left: 15px; }
    .slider-nav.next { right: 15px; }
    
    .slide-progress {
        height: 4px;
    }
}

/* High Contrast Mode Support with #1967ba Theme */
@media (prefers-contrast: high) {
    .slide-overlay {
        background: rgba(0, 0, 0, 0.9) !important;
    }
    
    .slide-title,
    .slide-description,
    .slide-category {
        text-shadow: 
            0 0 20px #000,
            4px 4px 8px #000,
            -4px -4px 8px #000,
            4px -4px 8px #000,
            -4px 4px 8px #000,
            0 0 15px rgba(25, 103, 186, 1) !important;
    }
    
    .slide-btn {
        border: 3px solid #1967ba !important;
        box-shadow: 0 0 20px rgba(25, 103, 186, 0.8) !important;
    }
    
    .slide-category {
        background: rgba(25, 103, 186, 0.95) !important;
        border-color: #1967ba !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .slide,
    .slide-background img,
    .slider-nav,
    .indicator,
    .slide-btn {
        transition: none !important;
        animation: none !important;
    }
    
    .slide-progress {
        transition: width 0.3s ease !important;
    }
}

/* Print Styles */
@media print {
    .industries-slider-section {
        display: none;
    }
}

/* Hover Effects */
.slide:hover .slide-background img {
    transform: scale(1.02);
}

.slide-btn i {
    transition: transform 0.3s ease;
}

.slide-btn:hover i {
    transform: translateX(6px);
}

/* Focus States for Accessibility */
.slider-nav:focus,
.indicator:focus,
.slide-btn:focus {
    outline: 3px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

/* Performance Optimizations */
.slide-background,
.slide-overlay,
.slide-content {
    will-change: transform, opacity;
}

.slide-background img {
    image-rendering: optimizeQuality;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Debug Mode (for development) */
.slider-debug .slide-text {
    background: rgba(255, 0, 0, 0.3) !important;
    border: 2px dashed yellow !important;
}

.slider-debug .slide-overlay {
    background: rgba(0, 255, 0, 0.3) !important;
}
