/* Custom styles for Five K's Daycare */

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

/* Prevent content flash on scroll reveal */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
}

/* Scroll reveal classes - applied via JS for progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-30px);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(30px);
    }
    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: none;
    }
}

/* Fallback: ensure content is visible if JS is disabled */
.no-js .reveal-up,
.no-js .reveal-left,
.no-js .reveal-right {
    opacity: 1;
    transform: none;
}

/* Navbar background transition */
#navbar.scrolled {
    background: rgba(253, 242, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(157, 23, 77, 0.08);
}

#navbar.scrolled .nav-text-color {
    color: #9d174d;
}

#navbar.scrolled .nav-link {
    color: #9d174d;
}

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

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

/* Scroll indicator animation */
.scroll-indicator {
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Subtle hover effects on cards */
.group:hover .group-hover\:bg-amber-400 {
    background-color: #fbbf24;
}

/* Custom select arrow */
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='%239d174d' 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;
}

/* Focus visible styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Selection color */
::selection {
    background-color: #fbcfe8;
    color: #500724;
}

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

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

::-webkit-scrollbar-thumb {
    background: #f9a8d4;
    border-radius: 5px;
}

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