/* Custom styles for Boston English Center */

/* Smooth scroll offset for fixed header */
section[id] {
    scroll-margin-top: 80px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f1219;
}
::-webkit-scrollbar-thumb {
    background: #474d62;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #61677e;
}

/* Selection color */
::selection {
    background: rgba(245, 77, 46, 0.3);
    color: #ffffff;
}

/* Mobile navigation transitions */
#mobile-nav.open {
    opacity: 1 !important;
    pointer-events: all !important;
}

#mobile-nav.open .mobile-nav-link {
    animation: fadeDown 0.4s ease forwards;
    opacity: 0;
}

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

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hamburger animation */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Subtle hover glow on coral elements */
.bg-coral-500 {
    box-shadow: 0 0 30px rgba(245, 77, 46, 0.15);
}
.bg-coral-500:hover {
    box-shadow: 0 0 40px rgba(245, 77, 46, 0.25);
}

/* Image lazy-load fallback */
img {
    max-width: 100%;
    height: auto;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #ffa893;
    outline-offset: 2px;
}

/* 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;
    }
}
