/* Custom styles for Little Scholars Bilingual Institute */

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

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

/* Service card hover effects */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #eda824, transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

/* Navbar transition */
.nav-text {
    transition: color 0.3s ease;
}

.nav-text-muted {
    transition: color 0.3s ease;
}

/* Mobile menu animations */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* Mobile menu open state */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

/* Hamburger animation */
#menuIcon.active #bar1 {
    transform: translateY(4px) rotate(45deg);
}

#menuIcon.active #bar2 {
    opacity: 0;
}

#menuIcon.active #bar3 {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* Scroll reveal animations (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.revealed {
    opacity: 0;
    transform: translateY(30px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back to top button */
#backToTop.visible {
    opacity: 1;
    pointer-events: all;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 1px currentColor;
}

/* Subtle text selection color */
::selection {
    background-color: rgba(237, 168, 36, 0.2);
    color: #102a43;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #627d98;
}

/* Loading state for form */
button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Print styles */
@media print {
    nav,
    #backToTop,
    .service-card::before {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .bg-navy-900,
    .bg-navy-950 {
        background: #fff !important;
    }
    
    .text-white,
    .text-navy-900 {
        color: #000 !important;
    }
}
