/* ===== Custom Styles for Oak Grove Elementary School ===== */

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

/* ===== Animations ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes float-delay {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-2deg); }
}

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

@keyframes twinkle {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

@keyframes twinkle-delay {
    0%, 100% { opacity: 0.1; transform: scale(0.9); }
    50% { opacity: 0.4; transform: scale(1.1); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
    animation: float-delay 8s ease-in-out infinite;
}

.animate-float-slow {
    animation: float-slow 10s ease-in-out infinite;
}

.animate-twinkle {
    animation: twinkle 3s ease-in-out infinite;
}

.animate-twinkle-delay {
    animation: twinkle-delay 4s ease-in-out infinite;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Hidden state for JS-enhanced reveals — only applied when JS runs */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Navbar styles ===== */
.nav-link {
    position: relative;
}

.nav-link:hover {
    background-color: rgba(52, 212, 168, 0.1);
    color: #0a2540;
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

.mobile-link {
    display: block;
    transition: background-color 0.2s ease, padding-left 0.2s ease;
}

.mobile-link:hover {
    padding-left: 0.75rem;
}

/* ===== Form styles ===== */
input:focus,
select:focus,
textarea:focus {
    border-color: #34d4a8 !important;
    box-shadow: 0 0 0 4px rgba(52, 212, 168, 0.15) !important;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #789cc9;
}

/* ===== Selection color ===== */
::selection {
    background: #34d4a8;
    color: #0a2540;
}

/* ===== 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;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

/* ===== Focus visible ===== */
:focus-visible {
    outline: 3px solid #34d4a8;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 640px) {
    h1 {
        font-size: 2.25rem !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
}
