/* Modern High-Tech Full-Page Backgrounds for Service Pages */

/* Base full-page background with animated particles */
.modern-tech-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #0f172a 50%, #1e293b 75%, #0f172a 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -1;
    overflow: hidden;
}

/* Animated gradient background */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animated tech grid overlay */
.modern-tech-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    opacity: 0.3;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* Content overlay styling */
.content-overlay {
    position: relative;
    z-index: 1;
}

/* Hero section text styling */
.hero-tech-enhanced,
.hero-tech-enhanced h1,
.hero-tech-enhanced h2,
.hero-tech-enhanced p,
.hero-tech-enhanced .lead {
    color: white !important;
}

.hero-tech-enhanced .text-primary {
    color: #00d4ff !important;
}

/* Tech glow effect for better visibility */
.tech-glow {
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* Sections with dark backgrounds should have white text */
.content-overlay section[style*="background: linear-gradient"] h1,
.content-overlay section[style*="background: linear-gradient"] h2,
.content-overlay section[style*="background: linear-gradient"] h3,
.content-overlay section[style*="background: linear-gradient"] h4,
.content-overlay section[style*="background: linear-gradient"] h5,
.content-overlay section[style*="background: linear-gradient"] p,
.content-overlay section[style*="background: linear-gradient"] .lead {
    color: white !important;
}

/* Regular sections on transparent background need white text */
.content-overlay section:not([style*="background"]):not(.bg-light) h1,
.content-overlay section:not([style*="background"]):not(.bg-light) h2,
.content-overlay section:not([style*="background"]):not(.bg-light) h3,
.content-overlay section:not([style*="background"]):not(.bg-light) h4,
.content-overlay section:not([style*="background"]):not(.bg-light) h5,
.content-overlay section:not([style*="background"]):not(.bg-light) p,
.content-overlay section:not([style*="background"]):not(.bg-light) .lead {
    color: white !important;
}

/* Light background sections keep their normal styling */
.content-overlay .bg-light {
    background-color: #f8f9fa !important;
}

.content-overlay .bg-light h1,
.content-overlay .bg-light h2,
.content-overlay .bg-light h3,
.content-overlay .bg-light h4,
.content-overlay .bg-light h5,
.content-overlay .bg-light p,
.content-overlay .bg-light .text-muted {
    color: #333 !important;
}

/* Card content should have dark text on white/light backgrounds */
.content-overlay .card {
    background: white !important;
    border: 1px solid rgba(0, 0, 0, 0.125) !important;
    color: #333 !important;
}

.content-overlay .card h1,
.content-overlay .card h2,
.content-overlay .card h3,
.content-overlay .card h4,
.content-overlay .card h5,
.content-overlay .card h6,
.content-overlay .card p,
.content-overlay .card .text-muted {
    color: #333 !important;
}

.content-overlay .card .text-muted {
    color: #6c757d !important;
}

/* Card body specifically */
.content-overlay .card-body,
.content-overlay .card-body h1,
.content-overlay .card-body h2,
.content-overlay .card-body h3,
.content-overlay .card-body h4,
.content-overlay .card-body h5,
.content-overlay .card-body h6,
.content-overlay .card-body p,
.content-overlay .card-body span {
    color: #333 !important;
}
}

/* Icon colors should remain as intended */
.content-overlay [data-feather] {
    color: currentColor !important;
}

/* Floating particles effect */
.modern-tech-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.3) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.3) 1px, transparent 1px),
        radial-gradient(circle at 40% 60%, rgba(245, 101, 101, 0.3) 1px, transparent 1px),
        radial-gradient(circle at 60% 40%, rgba(251, 191, 36, 0.3) 1px, transparent 1px);
    background-size: 200px 200px, 300px 300px, 150px 150px, 250px 250px;
    animation: particleFloat 25s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -20px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 30px) scale(0.9);
    }
    75% {
        transform: translate(20px, -30px) scale(1.05);
    }
}

/* Content overlay to ensure readability */
.content-overlay {
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(1px);
    min-height: 100vh;
}

/* Hero section enhancements */
.hero-tech-enhanced {
    position: relative;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin: 20px;
    padding: 40px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Glowing tech accents */
.tech-glow {
    box-shadow: 
        0 0 20px rgba(59, 130, 246, 0.3),
        0 0 40px rgba(59, 130, 246, 0.1),
        inset 0 0 20px rgba(59, 130, 246, 0.1);
}

/* Animated tech borders */
.tech-border {
    position: relative;
    overflow: hidden;
}

.tech-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        transparent, 
        rgba(59, 130, 246, 0.5), 
        transparent, 
        rgba(16, 185, 129, 0.5), 
        transparent);
    background-size: 200% 200%;
    animation: borderGlow 3s ease-in-out infinite;
    border-radius: inherit;
    z-index: -1;
}

@keyframes borderGlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Card enhancements for service pages */
.tech-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
}

.tech-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 10px 30px rgba(59, 130, 246, 0.2),
        0 0 20px rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modern-tech-background::before {
        background-size: 30px 30px;
    }
    
    .modern-tech-background::after {
        background-size: 150px 150px, 200px 200px, 100px 100px, 180px 180px;
    }
    
    .hero-tech-enhanced {
        margin: 10px;
        padding: 20px;
    }
}

/* Dark mode optimizations */
@media (prefers-color-scheme: dark) {
    .modern-tech-background {
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 25%, #0a0a0a 50%, #1a1a2e 75%, #0a0a0a 100%);
    }
    
    .content-overlay {
        background: rgba(0, 0, 0, 0.2);
    }
}