/* Custom styles for Murphy's Pharmacy */

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

/* Navbar scroll effect */
.navbar-scrolled {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Hero animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content > * {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.hero-content > *:nth-child(1) { animation-delay: 0.2s; }
.hero-content > *:nth-child(2) { animation-delay: 0.4s; }
.hero-content > *:nth-child(3) { animation-delay: 0.6s; }
.hero-content > *:nth-child(4) { animation-delay: 0.8s; }

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Mobile menu transitions */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobileMenu.open {
    max-height: 400px;
}

/* Service card hover effect */
.group:hover .w-14 {
    transform: scale(1.05) rotate(-3deg);
}

/* Custom focus styles */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

/* Image lazy load fade-in */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[data-src] {
    opacity: 0;
}

img[data-src].loaded {
    opacity: 1;
}

/* Subtle parallax on hero */
#hero {
    background-attachment: fixed;
}

@media (max-width: 768px) {
    #hero {
        background-attachment: scroll;
    }
}

/* Button ripple effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Selection color */
::selection {
    background-color: rgba(13, 148, 136, 0.2);
    color: #0f766e;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .hero-content > * {
        animation: none;
        opacity: 1;
    }
}
