/* ===== Custom Styles for Precious Angels Homecare ===== */

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

/* Float animation for hero cards */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

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

.animate-float-delayed {
    animation: float-delayed 4.5s ease-in-out infinite;
    animation-delay: 1s;
}

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

/* Only apply hidden state when JS adds the class (progressive enhancement) */
.js .scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
}

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

/* Staggered reveal delays */
.js .scroll-reveal:nth-child(1) { transition-delay: 0ms; }
.js .scroll-reveal:nth-child(2) { transition-delay: 100ms; }
.js .scroll-reveal:nth-child(3) { transition-delay: 200ms; }
.js .scroll-reveal:nth-child(4) { transition-delay: 300ms; }
.js .scroll-reveal:nth-child(5) { transition-delay: 400ms; }
.js .scroll-reveal:nth-child(6) { transition-delay: 500ms; }

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .animate-float,
    .animate-float-delayed {
        animation: none !important;
    }
    html {
        scroll-behavior: auto;
    }
}

/* Navbar transition states */
.navbar-scrolled {
    background: rgba(253, 252, 250, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(27, 67, 50, 0.08);
}

/* Ensure hero content is always visible - no opacity:0 gates */
#hero h1,
#hero p,
#hero a,
#hero .inline-flex,
#hero .relative {
    opacity: 1 !important;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #1B4332;
}

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

/* Mobile menu transitions */
#mobile-menu {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

#mobile-menu.hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobile-menu:not(.hidden) {
    max-height: 500px;
    opacity: 1;
}

/* Print styles */
@media print {
    nav, #mobile-menu-btn, footer {
        display: none;
    }
    body {
        color: #000;
        background: #fff;
    }
}
