/* Custom styles for Parkview Pharmacare */

/* Base transitions */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5faf5;
}
::-webkit-scrollbar-thumb {
    background: #b9d5c7;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8bbfa8;
}

/* Service card animations (progressive enhancement) */
.service-card {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .service-card {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out, background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    }
    .service-card.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile menu animations */
#mobileMenu {
    transition: opacity 0.4s ease, pointer-events 0.4s ease;
}
#mobileMenu.open {
    opacity: 1;
    pointer-events: auto;
}
#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Navbar transitions */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(250, 253, 249, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.06);
}

/* Hero entrance (above fold - always visible) */
#hero h1,
#hero p,
#hero .inline-flex,
#hero a,
#hero .flex {
    opacity: 1;
    transform: none;
}

/* Mobile link transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}
#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* Menu button animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.25rem;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #3d8268;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Image loading placeholder */
img {
    background-color: #e8f2e9;
}

/* Print styles */
@media print {
    #navbar,
    #menuBtn,
    .service-card {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
