/* Custom animations and enhanced styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* Smooth scrolling for all elements */
* {
    scroll-behavior: smooth;
}

/* Custom gradient animations */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

/* Enhanced hover effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Custom button animations */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::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-primary:hover::before {
    left: 100%;
}

/* Language switcher styles */
.language-switcher button.active {
    color: #d946ef;
    font-weight: 600;
}

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

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

/* Enhanced card hover effects */
.card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-hover:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.15);
}

/* Testimonial card enhancements */
.testimonial-card {
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(217, 70, 239, 0.05), transparent);
    transform: rotate(-45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.testimonial-card:hover::before {
    opacity: 1;
    transform: rotate(-45deg) translate(50%, 50%);
}

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

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

/* Benefits section icon animations */
.benefit-icon {
    transition: all 0.3s ease;
}

.benefit-icon:hover {
    transform: rotateY(180deg) scale(1.1);
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #d946ef, #c026d3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #c026d3, #a21caf);
}

/* Mobile navigation improvements */
#mobile-menu {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* Enhanced text gradients */
.text-gradient {
    background: linear-gradient(135deg, #0f172a, #d946ef, #f59e0b);
    background-size: 300% 300%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 8s ease infinite;
}

/* Stats counter enhanced styling */
.stats-section {
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" patternUnits="userSpaceOnUse" width="100" height="100"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)" opacity="0.05"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.1;
    mix-blend-mode: overlay;
}

/* CTA section enhancements */
.cta-card {
    position: relative;
    backdrop-filter: blur(10px);
}

.cta-card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(135deg, #d946ef, #f59e0b, #06b6d4);
    border-radius: inherit;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    -webkit-mask-composite: xor;
    opacity: 0.1;
}

/* Form styling enhancements */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #e2e8f0, #cbd5e1) border-box;
}

.form-input:focus {
    outline: none;
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #d946ef, #c026d3) border-box;
    box-shadow: 0 0 0 4px rgba(217, 70, 239, 0.1);
}

/* Success and error states */
.success-state {
    color: #059669;
    background-color: #ecfdf5;
    border-color: #10b981;
}

.error-state {
    color: #dc2626;
    background-color: #fef2f2;
    border-color: #ef4444;
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #d946ef;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Intersection observer fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation backdrop blur effect */
nav {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Enhanced mobile responsiveness */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .section-padding {
        padding: 3rem 0;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Dark mode support preparation */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f172a;
        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
    }
}

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

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #d946ef;
    outline-offset: 2px;
}

/* Skip to content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #d946ef;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}