/* =============================================
   Habitat Pharmacy — Custom Styles
   ============================================= */

/* Base & Smooth Scrolling */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: rgba(5, 150, 105, 0.2);
    color: #064e3b;
}

/* =============================================
   Navbar Styles
   ============================================= */
.navbar-scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 1px 20px rgba(6, 78, 59, 0.08);
}

.navbar-scrolled .nav-link {
    color: rgba(6, 78, 59, 0.7) !important;
}

.navbar-scrolled .nav-link:hover {
    color: #059669 !important;
}

.navbar-scrolled .logo-text {
    color: #0f2419 !important;
}

/* =============================================
   Hero Section
   ============================================= */
#hero {
    position: relative;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, #fefdf8, transparent);
    pointer-events: none;
}

/* =============================================
   Service Cards
   ============================================= */
.service-card {
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), 
                box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.service-card:hover {
    transform: translateY(-6px);
}

/* =============================================
   Scroll Reveal Animations
   ============================================= */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1), 
                transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.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; }

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #34d399;
}

/* =============================================
   Form Styles
   ============================================= */
select option {
    background: white;
    color: #0f2419;
}

/* =============================================
   Mobile Menu Transition
   ============================================= */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================
   Testimonial Cards
   ============================================= */
#community .group:hover {
    transform: translateY(-4px);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* =============================================
   Button Hover Effects
   ============================================= */
a[href^="tel"] {
    text-decoration: none;
}

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

.hero-badge {
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-title {
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.hero-cta {
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

.hero-stats {
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
    opacity: 0;
}

/* =============================================
   Responsive Adjustments
   ============================================= */
@media (max-width: 768px) {
    #hero::after {
        height: 80px;
    }
    
    .font-serif {
        line-height: 1.15;
    }
}

@media (min-width: 1024px) {
    .service-card {
        /* GPU acceleration for smoother hover */
        will-change: transform;
    }
}
