/* Performance Optimizations */
img {
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

/* Accessibility Improvements */
.keyboard-navigation *:focus {
    outline: 2px solid #16a085;
    outline-offset: 2px;
}

/* Touch Device Optimizations */
.touch-device .feature-card,
.touch-device .testimonial-card,
.touch-device .mode-card {
    transition: transform 0.2s ease;
}

/* Loading Animation */
body:not(.loaded) .hero-content {
    opacity: 0;
    transform: translateY(50px);
}

/* Enhanced Hover Effects */
.download-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.download-btn:hover {
    transform: translateY(-5px) scale(1.05);
    filter: brightness(1.1);
}

/* Improved FAQ Animation */
.faq-answer {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s ease,
                padding 0.3s ease;
}

/* Enhanced CTA Buttons */
.cta-primary,
.cta-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-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;
}

.cta-primary:hover::before {
    left: 100%;
}

/* Improved Mobile Navigation */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(26, 26, 46, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 50px;
        transition: left 0.3s ease;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
    }
}

/* Enhanced Animations */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.testimonial-card:nth-child(odd) {
    animation: slideInFromLeft 0.6s ease forwards;
}

.testimonial-card:nth-child(even) {
    animation: slideInFromRight 0.6s ease forwards;
}

/* Improved Counter Animation */
.counter-number {
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
}

/* Enhanced Parallax Effect */
.hero-bg-image {
    will-change: transform;
}

/* Better Focus Management */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #16a085;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    transition: top 0.3s;
}

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

/* Print Styles */
@media print {
    .navbar,
    .language-toggle,
    .cta-primary,
    .cta-secondary,
    .download-buttons {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero,
    .problem,
    .solution,
    .features,
    .testimonials {
        background: white;
        color: black;
    }
}

