/* Custom styles for SDA Language School */

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

/* Scroll reveal base state - content is always visible by default */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Only apply hidden state when animation is active (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.animated {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .scroll-reveal.animated.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar transition */
.nav-scrolled {
    background: rgba(253, 252, 250, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(31, 54, 35, 0.08);
}

.nav-scrolled .nav-link {
    color: #1f3623 !important;
}

.nav-scrolled .menu-line {
    background: #1f3623 !important;
}

.nav-scrolled .font-serif,
.nav-scrolled .font-sans {
    color: #1f3623 !important;
}

/* Mobile menu active state */
.mobile-menu-open #mobileMenu {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.mobile-menu-open .menu-line:first-child {
    transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-open .menu-line:last-child {
    width: 24px !important;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Custom select styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232f5234' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* Subtle hover lift for cards */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Selection color */
::selection {
    background: #9cc49e;
    color: #0f1a0f;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #4d8352;
    outline-offset: 2px;
}

/* Subtle pattern for cream sections */
.bg-cream-50 {
    background-image: radial-gradient(ellipse at 20% 50%, rgba(156, 196, 158, 0.06) 0%, transparent 50%),
                      radial-gradient(ellipse at 80% 20%, rgba(156, 196, 158, 0.04) 0%, transparent 50%);
}

/* Animation for floating stat cards */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

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

.floating-card-2 {
    animation: float-delayed 5s ease-in-out infinite;
    animation-delay: 1s;
}

.floating-card-3 {
    animation: float 7s ease-in-out infinite;
    animation-delay: 2s;
}

/* 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;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
