/* Custom styles for Salina's Mandarin Chinese Academy */

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

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

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #4f4f4f;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff6b35;
}

/* Selection color */
::selection {
    background: rgba(255, 107, 53, 0.3);
    color: #f6f6f6;
}

/* Floating animation for stat cards */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(var(--rotation, 0deg));
    }
    50% {
        transform: translateY(-12px) rotate(var(--rotation, 0deg));
    }
}

/* Subtle pulse for the hero accent */
@keyframes softPulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

.animate-float-1 {
    animation: float 4s ease-in-out infinite;
    --rotation: -3deg;
}

.animate-float-2 {
    animation: float 5s ease-in-out infinite;
    --rotation: 2deg;
    animation-delay: 0.5s;
}

.animate-float-3 {
    animation: float 4.5s ease-in-out infinite;
    --rotation: 6deg;
    animation-delay: 1s;
}

.animate-soft-pulse {
    animation: softPulse 3s ease-in-out infinite;
}

/* Program card hover effects */
.program-card {
    position: relative;
    overflow: hidden;
}

.program-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.03), transparent);
    transition: left 0.6s ease;
}

.program-card:hover::before {
    left: 100%;
}

/* Testimonial card hover */
.testimonial-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(15, 15, 15, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(79, 79, 79, 0.3);
}

.nav-scrolled .logo-text {
    color: #ff6b35 !important;
}

/* Mobile menu animation */
.mobile-menu-open {
    transform: translateX(0) !important;
}

/* Input focus animation */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Button press effect */
button:active {
    transform: scale(0.98);
}

/* Image lazy load fade-in */
img[loading="lazy"] {
    transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

img[loading="lazy"] {
    opacity: 0;
}

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

/* Tablet adjustments */
@media (max-width: 768px) {
    .program-card {
        padding: 1.5rem !important;
    }
}

/* Large screen optimizations */
@media (min-width: 1280px) {
    .hero-heading {
        font-size: clamp(3rem, 5vw, 5rem);
    }
}
