/* ========================================
   Nostrand Health Pharmacy — Custom Styles
   ======================================== */

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

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf5eb;
}
::-webkit-scrollbar-thumb {
    background: #065f46;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* Selection */
::selection {
    background: #065f46;
    color: #fdfbf7;
}

/* ========================================
   Navbar
   ======================================== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 95, 70, 0.08);
}

#navbar.scrolled .menu-line {
    background: #065f46 !important;
}

/* ========================================
   Mobile Menu
   ======================================== */
.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 24px;
    height: 2px;
    background: #059669;
    transition: transform 0.3s ease;
}

.mobile-nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* ========================================
   Service Cards
   ======================================== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #065f46, #10b981);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* ========================================
   Scroll Reveal Animations
   (Progressive Enhancement — content visible without JS)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .reveal[data-reveal] {
        opacity: 0;
        transform: translateY(30px);
    }

    .reveal[data-reveal="left"] {
        transform: translateX(-30px);
    }

    .reveal[data-reveal="right"] {
        transform: translateX(30px);
    }

    .reveal.visible {
        opacity: 1;
        transform: none;
    }
}

/* If JS is disabled, content is already visible — no animation needed */
.no-js .reveal {
    opacity: 1;
    transform: none;
}

/* ========================================
   Contact Form
   ======================================== */
#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

#contact-form .form-success {
    animation: fadeIn 0.4s ease;
}

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

/* ========================================
   Smooth anchor offset for fixed nav
   ======================================== */
section[id] {
    scroll-margin-top: 80px;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    section[id] {
        scroll-margin-top: 70px;
    }

    .service-card {
        padding: 1.5rem !important;
    }
}
