/* Custom styles for Kids Academy Home & Repair */

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

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

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

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #45a888;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu animations */
#mobileMenu.open {
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: all !important;
}

.menu-line:last-child {
    transform-origin: right center;
}

button[aria-expanded="true"] .menu-line:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}

button[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}

button[aria-expanded="true"] .menu-line:last-child {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #7594b0;
}

/* Selection color */
::selection {
    background: #c9eddc;
    color: #0a1a26;
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid #45a888;
    outline-offset: 2px;
}

/* Button hover lift effect */
a[href^="tel:"],
button[type="submit"] {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a[href^="tel:"]:hover,
button[type="submit"]:hover {
    transform: translateY(-1px);
}

/* Image lazy load fade-in */
img[loading="lazy"] {
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

img[loading="lazy"] {
    opacity: 0;
}

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

/* Print styles */
@media print {
    nav,
    #contactForm,
    #successMessage,
    .scroll-reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a[href^="tel:"]::after {
        content: none;
    }
}
