/* Custom styles for DataSpec Tech website */

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Modern CSS variables for easier theming */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* New modern animations */
@keyframes floatUp {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Animate elements on scroll */
.animate-on-scroll {
    animation: fadeInUp 0.8s ease-out;
}

/* Navbar shadow on scroll */
.navbar-scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Service cards hover effect */
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    backdrop-filter: blur(10px);
}

.service-card:hover {
    transform: translateY(-12px) rotateX(2deg);
    box-shadow:
        0 0 0 1px rgba(37, 99, 235, 0.1),
        0 10px 20px -5px rgba(37, 99, 235, 0.2),
        0 20px 40px -10px rgba(37, 99, 235, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(37, 99, 235, 0.03) 100%);
}

/* Process steps connector line - hidden on mobile */
@media (min-width: 768px) {
    .process-step::after {
        content: '';
        position: absolute;
        top: 24px;
        right: -50%;
        width: 100%;
        height: 3px;
        background: linear-gradient(to right, #2563eb 0%, #60a5fa 50%, transparent 100%);
        z-index: -1;
    }

    .process-step:last-child::after {
        display: none;
    }

    .process-step {
        animation: fadeInUp 0.6s ease-out forwards;
        opacity: 0;
    }

    .process-step:nth-child(1) { animation-delay: 0.1s; }
    .process-step:nth-child(2) { animation-delay: 0.2s; }
    .process-step:nth-child(3) { animation-delay: 0.3s; }
    .process-step:nth-child(4) { animation-delay: 0.4s; }
    .process-step:nth-child(5) { animation-delay: 0.5s; }
}

/* Active navigation link */
.nav-link.active {
    color: #2563eb;
    font-weight: 600;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(to right, #2563eb, #1e40af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Form focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Scroll to top button animation */
#scroll-top {
    transition: all 0.3s ease;
}

#scroll-top.show {
    opacity: 1;
    pointer-events: all;
}

/* Loading animation for form submission */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #2563eb, #1e40af);
    border-radius: 10px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #1e40af, #1e3a8a);
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.5);
}

/* Responsive typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
}

/* Stats counter animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number {
    animation: countUp 0.8s ease-out;
}

/* Hero background pattern */
#home {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(37, 99, 235, 0.05) 0%, transparent 50%);
}

/* Card hover glow effect */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 1rem;
    padding: 2px;
    background: linear-gradient(135deg, transparent, rgba(37, 99, 235, 0.3), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* Button hover effects */
button,
a.bg-blue-600 {
    position: relative;
    overflow: hidden;
}

button::before,
a.bg-blue-600::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before,
a.bg-blue-600:hover::before {
    width: 300px;
    height: 300px;
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobile-menu.show {
    max-height: 500px;
}

/* Section reveal animation */
@media (prefers-reduced-motion: no-preference) {
    section {
        opacity: 0;
        animation: fadeIn 0.8s ease-out forwards;
    }
    
    section:nth-child(2) {
        animation-delay: 0.2s;
    }
    
    section:nth-child(3) {
        animation-delay: 0.4s;
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Modern section styling */
section {
    position: relative;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(37, 99, 235, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Navbar improvements */
nav {
    backdrop-filter: blur(10px);
    background: linear-gradient(to right, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95)) !important;
}

/* Links hover effect */
a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Print styles */
@media print {
    nav,
    #scroll-top,
    #mobile-menu-button {
        display: none;
    }
    
    section {
        page-break-inside: avoid;
    }
}