/* Custom CSS for SNP Solutions */

/* Import Orbitron font for modern tech look */
@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700&display=swap");

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(26, 26, 26, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #0066ff, #00d4ff);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #00d4ff, #0066ff);
}

/* Custom animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(1deg);
    }
    66% {
        transform: translateY(-10px) rotate(-1deg);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    }
    100% {
        box-shadow: 0 0 40px rgba(0, 212, 255, 0.6);
    }
}

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 212, 255, 0.8);
    }
}

/* Glassmorphism effects */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-strong {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Liquid Glass Navigation Effects */
#navbar {
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 2.2);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.02) 100%
    );
    backdrop-filter: url(#glass);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
}

#navbar.scrolled {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.03) 100%
    );
    backdrop-filter: url(#glass);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Glass Navigation Links */
.nav-link {
    position: relative;
    overflow: hidden;
    padding: 8px 16px;
    border-radius: 25px;
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 2.2);
    font-family: "Orbitron", sans-serif;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.nav-link:hover {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.03) 100%
    );
    backdrop-filter: url(#glass);
    border: 1px solid rgba(0, 212, 255, 0.3);
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.2);
}

.nav-link.active {
    background: linear-gradient(
        135deg,
        rgba(0, 212, 255, 0.2) 0%,
        rgba(0, 102, 255, 0.1) 50%,
        rgba(0, 212, 255, 0.05) 100%
    );
    border: 1px solid rgba(0, 212, 255, 0.4);
}

/* Glass Logo Effect */
.logo-glass {
    font-family: "Orbitron", sans-serif;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 2.2);
}

.logo-glass:hover {
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* Service cards hover effects */
.service-card {
    position: relative;
    overflow: visible;
    min-height: 220px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1;
    margin: 10px 0;
}

/* Services section spacing */
#services {
    padding-top: 100px;
    padding-bottom: 100px;
    overflow: visible;
}

#services .container {
    position: relative;
    z-index: 2;
}

/* Services grid layout */
#services .grid {
    gap: 24px;
    padding: 20px 0;
}

/* Ensure service cards are fully visible */
.service-card-container {
    padding: 10px;
}

/* Fix AOS visibility issues */
[data-aos] {
    opacity: 1 !important;
    transform: none !important;
}

/* Ensure service cards are always visible */
.service-card[data-aos] {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 212, 255, 0.2);
    transform: translateY(-8px) scale(1.02);
    z-index: 10;
}

/* Glass Button Effects */
.glass-nav-button {
    position: relative;
    overflow: hidden;
    border-radius: 999px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    background: linear-gradient(
        135deg,
        rgba(0, 102, 255, 0.3) 0%,
        rgba(0, 212, 255, 0.2) 50%,
        rgba(0, 102, 255, 0.1) 100%
    );
    backdrop-filter: url(#glass);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 2.2);
    font-family: "Orbitron", sans-serif;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.glass-nav-button:hover {
    transform: scale(1.05);
    background: linear-gradient(
        135deg,
        rgba(0, 212, 255, 0.4) 0%,
        rgba(0, 102, 255, 0.3) 50%,
        rgba(0, 212, 255, 0.2) 100%
    );
    border: 1px solid rgba(0, 212, 255, 0.5);
    box-shadow: 0 15px 35px rgba(0, 212, 255, 0.3);
}

/* Button hover effects */
.btn-primary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, #0066ff, #00d4ff);
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #00d4ff, #0066ff);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 0;
}

/* Form styling */
input[type="text"],
input[type="email"],
select,
textarea {
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

/* Loading animation */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Particle effects */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.7;
    animation: particle-float 6s infinite ease-in-out;
}

@keyframes particle-float {
    0%, 100% {
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0.7;
    }
    25% {
        transform: translateY(-20px) translateX(10px) scale(1.1);
        opacity: 0.9;
    }
    50% {
        transform: translateY(-40px) translateX(-10px) scale(0.9);
        opacity: 0.5;
    }
    75% {
        transform: translateY(-20px) translateX(15px) scale(1.05);
        opacity: 0.8;
    }
}

/* Text gradient effects */
.text-gradient {
    background: linear-gradient(45deg, #ffffff, #00d4ff, #0066ff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
}

#mobile-menu.show {
    max-height: 400px;
    opacity: 1;
}

/* Ensure mobile menu is visible when not hidden */
#mobile-menu:not(.hidden) {
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .service-card {
        margin-bottom: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .glass,
    .glass-strong {
        background: rgba(0, 0, 0, 0.8);
        border: 2px solid rgba(255, 255, 255, 0.5);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .glass,
    .glass-strong {
        background: white !important;
        border: 1px solid black !important;
    }
}

/* Focus styles for accessibility */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}

/* Custom selection */
::selection {
    background: rgba(0, 212, 255, 0.3);
    color: white;
}

::-moz-selection {
    background: rgba(0, 212, 255, 0.3);
    color: white;
}

/* Utility classes */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.text-shadow {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.border-gradient {
    border: 1px solid transparent;
    background: linear-gradient(45deg, rgba(0, 102, 255, 0.2), rgba(0, 212, 255, 0.2)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
}

/* Performance optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Dark theme adjustments */
@media (prefers-color-scheme: dark) {
    /* Already optimized for dark theme */
}

/* Light theme fallback */
@media (prefers-color-scheme: light) {
    body {
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
        color: #1a202c;
    }
    
    .text-white {
        color: #1a202c !important;
    }
    
    .text-gray-300 {
        color: #4a5568 !important;
    }
    
    .text-gray-400 {
        color: #718096 !important;
    }
}
