/* Custom Animations and Styles */

/* Modern Gradient Professional Palette */
:root {
    --primary-light: #dbeafe;
    --primary: #3b82f6;
    --primary-dark: #1e40af;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --success: #10b981;
    --info: #60a5fa;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --background: #f8fafc;
}

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

/* Background patterns */
.pattern-dots {
    background-image: radial-gradient(circle, #e2e8f0 1px, transparent 1px);
    background-size: 20px 20px;
}

.pattern-grid {
    background-image: linear-gradient(#e2e8f0 1px, transparent 1px),
                      linear-gradient(90deg, #e2e8f0 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Glassmorphism effect */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

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

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

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Apply animations */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
}

.slide-in {
    animation: slideIn 0.6s ease-out forwards;
}

/* Stat card animation on scroll */
.stat-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.3s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Service card animations */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.service-card:nth-child(1) {
    animation-delay: 0.2s;
}

.service-card:nth-child(2) {
    animation-delay: 0.4s;
}

.service-card:nth-child(3) {
    animation-delay: 0.6s;
}

/* Hover lift effect */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Button hover effects */
button,
a {
    transition: all 0.3s ease;
}

/* Form input focus animation */
input:focus,
textarea:focus,
select:focus {
    transform: scale(1.01);
    transition: all 0.3s ease;
}

/* Number counter animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse animation for icons */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

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

.gradient-animate {
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

/* Loading animation for form submission */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 0.6s linear infinite;
    display: inline-block;
    margin-left: 10px;
}

/* Scroll reveal animation */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease-out;
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}

/* FAQ accordion animations */
.faq-item {
    transition: all 0.3s ease;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer.show {
    max-height: 500px;
}

/* Card flip animation */
@keyframes cardFlip {
    from {
        transform: rotateY(90deg);
        opacity: 0;
    }
    to {
        transform: rotateY(0);
        opacity: 1;
    }
}

.card-flip {
    animation: cardFlip 0.6s ease-out;
}

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

.float {
    animation: float 3s ease-in-out infinite;
}

/* Shimmer effect for loading states */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(to right, #f0f0f0 4%, #e0e0e0 25%, #f0f0f0 36%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Success message animation */
@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-message {
    animation: successPop 0.5s ease-out;
}

/* Mobile menu slide animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .fade-in-up,
    .fade-in-left,
    .fade-in-right {
        animation-duration: 0.6s;
    }
    
    .hover-lift:hover {
        transform: translateY(-2px);
    }
}

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

/* Print styles */
@media print {
    nav,
    footer,
    button {
        display: none;
    }
    
    body {
        background: white;
    }
}

/* Advanced Animations */

/* Bounce in animation */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.bounce-in {
    animation: bounceIn 0.8s ease-out;
}

/* Slide from sides */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Zoom in effect */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Rotate in */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-200deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

/* Glow effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(56, 189, 248, 0.3),
                    0 0 10px rgba(56, 189, 248, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(56, 189, 248, 0.6),
                    0 0 30px rgba(56, 189, 248, 0.4),
                    0 0 40px rgba(56, 189, 248, 0.2);
    }
}

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

/* Floating with rotation */
@keyframes floatRotate {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(2deg);
    }
    50% {
        transform: translateY(-20px) rotate(0deg);
    }
    75% {
        transform: translateY(-10px) rotate(-2deg);
    }
}

.float-rotate {
    animation: floatRotate 4s ease-in-out infinite;
}

/* Wave animation */
@keyframes wave {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.wave {
    animation: wave 20s linear infinite;
}

/* Ripple effect */
@keyframes ripple {
    0% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7),
                    0 0 0 0 rgba(56, 189, 248, 0.7);
    }
    40% {
        box-shadow: 0 0 0 20px rgba(56, 189, 248, 0),
                    0 0 0 0 rgba(56, 189, 248, 0.7);
    }
    80% {
        box-shadow: 0 0 0 20px rgba(56, 189, 248, 0),
                    0 0 0 40px rgba(56, 189, 248, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0),
                    0 0 0 40px rgba(56, 189, 248, 0);
    }
}

.ripple-effect-bg {
    animation: ripple 2s infinite;
}

/* Tilt on hover */
.tilt-hover {
    transition: transform 0.3s ease;
}

.tilt-hover:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg) scale(1.05);
}

/* Shine effect */
@keyframes shine {
    0% {
        background-position: -200%;
    }
    100% {
        background-position: 200%;
    }
}

.shine {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    background-size: 200% 100%;
    animation: shine 3s infinite;
}

/* Blur fade in */
@keyframes blurFadeIn {
    0% {
        opacity: 0;
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        filter: blur(0);
    }
}

.blur-fade-in {
    animation: blurFadeIn 1s ease-out;
}

/* Scale pulse */
@keyframes scalePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

.scale-pulse {
    animation: scalePulse 2s ease-in-out infinite;
}

/* Text gradient animation */
@keyframes textGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.text-gradient-animate {
    background: linear-gradient(90deg, #38bdf8, #a5f3fc, #c4b5fd, #38bdf8);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGradient 3s ease infinite;
}

/* Morphing border */
@keyframes morphBorder {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

.morph-border {
    animation: morphBorder 8s ease-in-out infinite;
}

/* Particle effect placeholder */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

/* Card stack effect */
.card-stack {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-stack:hover {
    transform: translateY(-8px) rotate(0.5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1),
                0 0 0 1px rgba(56, 189, 248, 0.1);
}

/* Gradient border animation */
@keyframes borderGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-border {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(90deg, #38bdf8, #a5f3fc, #c4b5fd, #38bdf8) border-box;
    background-size: 200% 100%;
    animation: borderGradient 3s ease infinite;
}

/* Stagger animation for children */
.stagger-children > * {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }

/* Hover gradient shift */
.hover-gradient-shift {
    background: linear-gradient(135deg, #e0f2fe 0%, #ddd6fe 100%);
    background-size: 200% 200%;
    transition: background-position 0.5s ease;
}

.hover-gradient-shift:hover {
    background-position: 100% 100%;
}

/* Hero Slider Styles */
.slide {
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
    z-index: 0;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slide-dot {
    cursor: pointer;
    border: none;
    outline: none;
    background: transparent;
}

.slide-dot.active {
    background-color: #fbbf24 !important;
    transform: scale(1.2);
}

