/* Custom Animations */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out forwards;
    opacity: 0;
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Smooth Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0A0E27;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0066FF, #00D4FF);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00D4FF, #0066FF);
}

/* Selection Color */
::selection {
    background: #0066FF;
    color: white;
}

::-moz-selection {
    background: #0066FF;
    color: white;
}

/* Loading State */
body {
    overflow-x: hidden;
}

body.loaded {
    animation: fade-in 0.5s ease-in;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Service Card Transition */
.service-card {
    transition: all 0.3s ease;
}

/* Button Hover Glow */
a[class*="bg-gradient-to-r"]:hover,
button[class*="bg-gradient-to-r"]:hover {
    box-shadow: 0 0 30px rgba(0, 102, 255, 0.5);
}

/* Gradient Text Animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.bg-clip-text {
    background-size: 200% auto;
    animation: gradient-shift 3s ease infinite;
}

/* Card Hover Effects */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Focus States */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #0066FF;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

/* Link Underline Animation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(90deg, #0066FF, #00D4FF);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Pulse Animation for Background Blobs */
@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

/* Glass Morphism Effect */
.backdrop-blur-sm {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Responsive Typography */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
}

/* Print Styles */
@media print {
    nav, footer, .fixed {
        display: none;
    }
}

/* Accessibility - Focus Visible */
*:focus-visible {
    outline: 2px solid #0066FF;
    outline-offset: 2px;
}

/* Smooth Transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading Spinner */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* Hero Section Background Pattern */
#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(0, 102, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Card Shadows */
.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Gradient Borders */
.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(#1A1F3A, #1A1F3A) padding-box,
                linear-gradient(90deg, #0066FF, #00D4FF) border-box;
}

/* Icon Spin on Hover */
.hover-spin:hover i {
    transform: rotate(360deg);
    transition: transform 0.6s ease;
}

/* Stats Counter */
[data-counter] {
    font-variant-numeric: tabular-nums;
}

/* Image Lazy Load Blur */
img.lazy {
    filter: blur(5px);
    transition: filter 0.3s;
}

img.lazy.loaded {
    filter: blur(0);
}

/* Mobile Menu Slide */
#mobile-menu {
    animation: slide-down 0.3s ease-out;
}

@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Input Animation */
input, textarea, select {
    transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    transform: translateY(-2px);
}

/* WhatsApp Button Pulse */
.fixed.bottom-8.right-8 {
    animation: pulse-shadow 2s infinite;
}

@keyframes pulse-shadow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(34, 197, 94, 0);
    }
}

/* Text Gradient Shimmer */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.text-shimmer {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0) 100%);
    background-size: 1000px 100%;
    animation: shimmer 3s infinite;
    -webkit-background-clip: text;
    background-clip: text;
}

/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: dark) {
    /* Already dark by default */
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    * {
        border-width: 2px !important;
    }
}

/* 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;
    }
}

/* Additional Utility Classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gradient-primary {
    background: linear-gradient(135deg, #0066FF 0%, #00D4FF 100%);
}

.gradient-dark {
    background: linear-gradient(180deg, #0A0E27 0%, #1A1F3A 100%);
}

/* Z-Index Management */
.z-max {
    z-index: 9999;
}

/* Container Max Width Override */
.container {
    max-width: 1400px;
}

/* Custom Grid Gaps */
.gap-custom {
    gap: 2rem;
}

@media (max-width: 768px) {
    .gap-custom {
        gap: 1rem;
    }
}