/* Custom styles for IMDigital website - Modern Professional Design */

/* IMDigital brand color palette */
:root {
    --primary-orange: #F59E0B;
    --primary-blue: #3B82F6;
    --primary-gray: #6B7280;
    --accent-light-gray: #9CA3AF;
    --deep-black: #0A0A0A;
    --carbon-gray: #1A1A1A;
    --slate-dark: #0F0F10;
    --glass-white: rgba(255, 255, 255, 0.1);
    --glass-orange: rgba(245, 158, 11, 0.1);
    --glass-blue: rgba(59, 130, 246, 0.1);
    --glass-gray: rgba(107, 114, 128, 0.1);
    
    /* Legacy color mappings to brand colors */
    --cyber-purple: #F59E0B; /* Mapped to primary orange */
    --neon-green: #3B82F6; /* Mapped to primary blue */
    --matrix-green: #6B7280; /* Mapped to primary gray */
    --electric-blue: #3B82F6; /* Mapped to primary blue */
    --neon-pink: #F59E0B; /* Mapped to primary orange */
    --cyber-blue: #3B82F6; /* Mapped to primary blue */
    --dark-bg: #0A0A0A; /* Mapped to deep black */
    --secondary-orange: #F59E0B; /* Mapped to primary orange */
}

/* Modern color utilities */
.text-primary-orange {
    color: var(--primary-orange) !important;
}

.text-primary-blue {
    color: var(--primary-blue) !important;
}

.text-primary-gray {
    color: var(--primary-gray) !important;
}

.text-accent-light-gray {
    color: var(--accent-light-gray) !important;
}

/* Z-index layering fix - Force navigation on top */
nav {
    z-index: 9999 !important;
    position: fixed !important;
    isolation: isolate !important;
}

section {
    z-index: 1 !important;
    position: relative !important;
    transform: none !important;
}

#services {
    z-index: 1 !important;
    transform: none !important;
}

#services * {
    z-index: auto !important;
    transform: none;
}

#services h2 {
    z-index: auto !important;
    position: relative !important;
}

#home {
    transform: none !important;
}

.backdrop-blur-sm, .backdrop-blur-xl {
    z-index: auto !important;
    position: relative !important;
}

/* Background utilities */
.bg-cyber-orange {
    background-color: var(--primary-orange) !important;
}

.bg-primary-orange {
    background-color: var(--primary-orange) !important;
}

.bg-primary-blue {
    background-color: var(--primary-blue) !important;
}

.bg-primary-gray {
    background-color: var(--primary-gray) !important;
}

.bg-accent-light-gray {
    background-color: var(--accent-light-gray) !important;
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Advanced animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 20px var(--primary-orange), 0 0 40px var(--primary-orange);
    }
    100% {
        box-shadow: 0 0 40px var(--primary-blue), 0 0 80px var(--primary-blue);
    }
}

@keyframes slideIn {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeUp {
    0% {
        transform: translateY(30px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes cyberBlink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0.3;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes matrix {
    0% {
        transform: translateY(-100vh);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

@keyframes neonGlow {
    0% {
        text-shadow: 0 0 10px var(--neon-green), 0 0 20px var(--neon-green), 0 0 30px var(--neon-green);
    }
    100% {
        text-shadow: 0 0 20px var(--neon-green), 0 0 30px var(--neon-green), 0 0 40px var(--neon-green);
    }
}

@keyframes electronFlow {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Animation classes */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite alternate;
}

.animate-slide-in {
    animation: slideIn 0.8s ease-out;
}

.animate-fade-up {
    animation: fadeUp 0.8s ease-out;
}

.animate-cyber-blink {
    animation: cyberBlink 2s ease-in-out infinite;
}

.animate-pulse-slow {
    animation: pulse 4s ease-in-out infinite;
}

.animate-matrix {
    animation: matrix 3s linear infinite;
}

.animate-neon-glow {
    animation: neonGlow 2s ease-in-out infinite alternate;
}

.animate-electron-flow {
    animation: electronFlow 3s ease-in-out infinite;
}

/* Animation delay utilities */
.animate-delay-1 {
    animation-delay: 1s;
}

.animate-delay-2 {
    animation-delay: 2s;
}

.animate-delay-3 {
    animation-delay: 3s;
}

.animate-delay-4 {
    animation-delay: 4s;
}

.animate-delay-half {
    animation-delay: 0.5s;
}

.animate-delay-1-5 {
    animation-delay: 1.5s;
}

/* Glassmorphism effects */
.glass-card {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.glass-orange {
    backdrop-filter: blur(20px);
    background: var(--glass-orange);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.glass-gray {
    backdrop-filter: blur(20px);
    background: var(--glass-gray);
    border: 1px solid rgba(107, 114, 128, 0.3);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--deep-black);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary-orange), var(--primary-blue));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--primary-blue), var(--primary-gray));
}

/* Selection colors */
::selection {
    background: var(--primary-orange);
    color: white;
}

::-moz-selection {
    background: var(--primary-orange);
    color: white;
}

/* Custom focus styles */
.custom-focus:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-orange);
    border-color: var(--primary-orange);
}

/* Terminal-style text effects */
.terminal-text {
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary-blue);
    text-shadow: 0 0 10px var(--primary-blue);
}

.cyber-text {
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-blue), var(--primary-gray));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

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

/* Holographic effects */
.holographic {
    position: relative;
    background: linear-gradient(45deg, transparent, var(--primary-orange), transparent);
    background-size: 200% 200%;
    animation: holographicShine 2s linear infinite;
}

@keyframes holographicShine {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Grid pattern utilities */
.cyber-grid {
    background-image: 
        linear-gradient(rgba(245, 158, 11, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(245, 158, 11, 0.1) 1px, transparent 1px);
}

.neural-grid {
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(245, 158, 11, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(59, 130, 246, 0.15) 0%, transparent 50%);
}

/* Button enhancements */
.btn-cyber {
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-blue));
    border: none;
    color: white;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-cyber::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-cyber:hover::before {
    left: 100%;
}

.btn-cyber:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Neon border effect */
.neon-border {
    border: 2px solid;
    border-image: linear-gradient(45deg, var(--primary-orange), var(--primary-blue), var(--primary-gray)) 1;
    animation: neonBorderGlow 2s ease-in-out infinite alternate;
}

@keyframes neonBorderGlow {
    0% {
        filter: drop-shadow(0 0 5px var(--primary-orange));
    }
    100% {
        filter: drop-shadow(0 0 20px var(--primary-blue));
    }
}

/* Loading animation */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

/* Responsive utilities */
@media (max-width: 768px) {
    .animate-float {
        animation-duration: 4s;
    }
    
    .card-hover:hover {
        transform: translateY(-4px) scale(1.01);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .animate-float,
    .animate-glow,
    .animate-slide-in,
    .animate-fade-up,
    .animate-cyber-blink,
    .animate-pulse-slow {
        animation: none !important;
    }
    
    .glass-card,
    .glass-orange,
    .glass-gray {
        background: white !important;
        border: 1px solid #ccc !important;
    }
}

/* Animation classes */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes cyberGlitch {
    0%, 100% {
        transform: translateX(0);
    }
    10% {
        transform: translateX(-2px);
    }
    20% {
        transform: translateX(2px);
    }
    30% {
        transform: translateX(-1px);
    }
    40% {
        transform: translateX(1px);
    }
    50% {
        transform: translateX(-1px);
    }
    60% {
        transform: translateX(1px);
    }
    70% {
        transform: translateX(-2px);
    }
    80% {
        transform: translateX(2px);
    }
    90% {
        transform: translateX(-1px);
    }
}

/* Animation delay classes */
.animate-delay-1 {
    animation-delay: 1s;
}

.animate-delay-2 {
    animation-delay: 2s;
}

.animate-delay-half {
    animation-delay: 0.5s;
}

.animate-delay-1-5 {
    animation-delay: 1.5s;
}

/* Matrix rain effect */
.matrix-rain {
    background: linear-gradient(0deg, transparent 0%, var(--matrix-green) 50%, transparent 100%);
    background-size: 100% 100px;
    animation: matrixRain 20s linear infinite;
}

/* Glassmorphism effects */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

.glass-nav {
    background: rgba(10, 10, 15, 0.8);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

/* Cyber gradient backgrounds */
.cyber-gradient {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-orange));
}

.cyber-gradient-text {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Neon text effects */
.neon-text {
    text-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
}

/* Simplified holographic effect */
.holographic {
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(245, 158, 11, 0.2) 40%, 
        rgba(59, 130, 246, 0.2) 60%, 
        transparent 70%);
    background-size: 200% 200%;
    animation: hologram 4s ease-in-out infinite;
}

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

/* Slow spin animation */
@keyframes spin-slow {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spin-slow 8s linear infinite;
}

/* Service card hover effects */
.service-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.2), transparent);
    transition: left 0.5s;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(245, 158, 11, 0.25);
    border-color: var(--primary-orange);
}

/* Portfolio item effects */
.portfolio-item {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.portfolio-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(245, 158, 11, 0.1), rgba(59, 130, 246, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover::after {
    opacity: 1;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.2);
}

/* Button styles */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-orange));
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.btn-primary::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.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 15px 40px rgba(245, 158, 11, 0.5);
}

/* Navigation effects */
.nav-link.active {
    color: var(--primary-blue);
    text-shadow: 0 0 10px var(--primary-blue);
}

/* Form styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-blue);
    border-color: var(--primary-blue);
    background: rgba(59, 130, 246, 0.1);
}

/* Cyber loading animation */
.cyber-loading {
    border: 4px solid rgba(59, 130, 246, 0.3);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: cyber-spin 1s linear infinite;
}

@keyframes cyber-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Quantum scroll indicator */
.quantum-scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--cyber-blue), var(--neon-pink), var(--matrix-green));
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.3s ease;
    z-index: 9999;
}

/* Cyber parallax effect */
.cyber-parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Quantum typography */
.quantum-text {
    background: linear-gradient(45deg, var(--cyber-blue), var(--neon-pink), var(--matrix-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: quantum-text 3s ease-in-out infinite;
}

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

/* Cyber shadows */
.cyber-shadow {
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2);
}

.cyber-shadow-hover:hover {
    box-shadow: 0 25px 50px rgba(59, 130, 246, 0.3);
}

/* Quantum grid background */
.quantum-grid {
    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: quantum-grid 20s linear infinite;
}

@keyframes quantum-grid {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 50px 50px;
    }
}

/* Responsive quantum design */
@media (max-width: 768px) {
    .quantum-title {
        font-size: 2.5rem;
    }
    
    .service-card {
        margin-bottom: 2rem;
    }
    
    .cyber-section {
        padding: 60px 0;
    }
}

@media (max-width: 640px) {
    .quantum-title {
        font-size: 2rem;
    }
    
    .cyber-section {
        padding: 40px 0;
    }
}

/* Quantum dark mode enhancements */
@media (prefers-color-scheme: dark) {
    .quantum-dark-mode {
        background-color: var(--dark-bg);
        color: #ffffff;
    }
}

/* Quantum accessibility */
.quantum-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Quantum focus indicators */
button:focus,
a:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3);
}

/* Quantum print styles */
@media print {
    .quantum-no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Quantum scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--cyber-blue), var(--neon-pink));
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--neon-pink), var(--matrix-green));
}

/* Quantum image optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Quantum form validation */
.quantum-form-error {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.quantum-form-success {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Quantum utility classes */
.quantum-gradient {
    background: linear-gradient(135deg, var(--cyber-blue), var(--neon-pink), var(--matrix-green));
}

.quantum-pattern {
    background-image: 
        radial-gradient(circle at 2px 2px, rgba(59, 130, 246, 0.3) 1px, transparent 0);
    background-size: 20px 20px;
}

/* Quantum glitch effect */
.quantum-glitch {
    animation: quantum-glitch 2s ease-in-out infinite;
}

@keyframes quantum-glitch {
    0%, 100% {
        transform: translate(0);
    }
    10% {
        transform: translate(-2px, 2px);
    }
    20% {
        transform: translate(2px, -2px);
    }
    30% {
        transform: translate(-2px, -2px);
    }
    40% {
        transform: translate(2px, 2px);
    }
    50% {
        transform: translate(-2px, 2px);
    }
    60% {
        transform: translate(2px, -2px);
    }
    70% {
        transform: translate(-2px, -2px);
    }
    80% {
        transform: translate(2px, 2px);
    }
    90% {
        transform: translate(-2px, 2px);
    }
}

/* Quantum particle effect */
.quantum-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-blue);
    border-radius: 50%;
    animation: quantum-particle 10s linear infinite;
}

@keyframes quantum-particle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Quantum border animations */
.quantum-border {
    position: relative;
    overflow: hidden;
}

.quantum-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--primary-blue), transparent);
    animation: quantum-border 2s linear infinite;
}

@keyframes quantum-border {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}
