/* ─── Variables ─── */
:root {
    --green: #00A651;
    --green-dark: #008A44;
    --green-light: #E8F5EE;
    --green-muted: #f0f9f4;
    --black: #111111;
    --gray-900: #1a1a1a;
    --gray-700: #404040;
    --gray-500: #6b6b6b;
    --gray-300: #d4d4d4;
    --gray-100: #f5f5f5;
    --white: #ffffff;
    --accent: #0B4F30;
    --warm: #fafaf8;
    --night: #1a2332;
    --night-light: #243044;
    --night-text: #c8d4e0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gray-900);
    background: var(--white);
    line-height: 1.6;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ─── Sections – scroll margin for anchor links ─── */
section, footer {
    scroll-margin-top: 80px;
}

/* ─── Nav ─── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 0;
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

.nav-logo img {
    height: 32px;
    width: auto;
    transition: filter 0.3s ease;
}

.nav-pharmacist-link {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-700);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-pharmacist-link:hover {
    color: var(--green);
}

/* ─── Hero ─── */
.hero {
    padding: 120px 0 72px; /* extra top padding for fixed nav */
    background: var(--warm);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/images/pharmacy_cross.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.55;
    pointer-events: none;
}

.hero h1 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(30px, 5vw, 44px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    position: relative;
}

.hero-sub {
    font-size: 18px;
    line-height: 1.7;
    color: var(--gray-700);
    max-width: 520px;
    margin: 0 auto;
    position: relative;
}

/* ─── Symptoms ─── */
.symptoms {
    padding: 72px 0;
    background: var(--white);
    position: relative;
    overflow: hidden;
}

.symptoms::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/images/pharmacy_cross.png');
    background-size: cover;
    background-position: center;
    opacity: 0.55;
    pointer-events: none;
}

.symptoms h2 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: var(--black);
}

.symptom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 720px;
    margin: 0 auto;
}

.symptom-card {
    padding: 24px 28px;
    background: var(--warm);
    border-radius: 12px;
    border-left: 4px solid var(--green);
    font-size: 15px;
    line-height: 1.6;
    color: var(--gray-700);
    transition: transform 0.2s, box-shadow 0.2s;
}

.symptom-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.symptom-card strong {
    color: var(--gray-900);
}

.symptom-card:last-child {
    grid-column: 1 / -1;
    max-width: 352px;
    margin: 0 auto;
}

/* ─── Safe Section + Privacy (merged light green) ─── */
.safe {
    padding: 72px 0 0;
    background: var(--green-light);
}

.safe-inner {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

.safe h2 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 24px;
}

.safe p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--gray-700);
    margin-bottom: 16px;
}

.safe .emphasis {
    font-weight: 700;
    color: var(--gray-900);
}

.safe .decision {
    font-size: 17px;
    font-weight: 600;
    color: var(--accent);
    margin-top: 24px;
    margin-bottom: 32px;
}

.pills {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--white);
    border: 2px solid var(--green);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
}

.pill-icon {
    width: 20px;
    height: 20px;
    background: var(--green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    flex-shrink: 0;
}

/* ─── Privacy (merged into safe section) ─── */
.privacy {
    padding: 80px 0;
    background: var(--green-light);
}

.privacy-inner {
    max-width: 800px;
    margin: 0 auto;
}

.privacy h2 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--black);
    text-align: center;
    margin-bottom: 12px;
}

.privacy .privacy-subtitle {
    text-align: center;
    font-size: 16px;
    color: var(--gray-700);
    margin-bottom: 48px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.privacy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.privacy-point {
    text-align: center;
    padding: 24px 16px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
}

.privacy-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(0,166,81,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.privacy-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--green);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.privacy-point h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.privacy-point p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-700);
}

.privacy-why {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.privacy-why p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--gray-700);
}

/* ─── Steps ─── */
.steps-section {
    padding: 80px 0;
    background: var(--white);
}

.steps-section h2 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    color: var(--black);
    margin-bottom: 48px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    max-width: 840px;
    margin: 0 auto;
    position: relative;
}

.steps-grid::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 14%;
    right: 14%;
    height: 2px;
    background: var(--green-light);
    z-index: 0;
}

.step {
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-num {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--green);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
}

.step h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 8px;
}

.step p {
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.6;
    padding: 0 8px;
}

/* ─── Mobile Carousel for Steps ─── */
.steps-carousel {
    display: none;
}

.carousel-dots {
    display: none;
}

/* ─── Pharmacy Finder ─── */
.finder {
    padding: 72px 0;
    background: var(--warm);
}

.finder h2 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--black);
    text-align: center;
    margin-bottom: 8px;
}

.finder-subtitle {
    text-align: center;
    font-size: 16px;
    color: var(--gray-700);
    margin-bottom: 32px;
}

.finder-search {
    display: flex;
    gap: 12px;
    max-width: 440px;
    margin: 0 auto 32px;
}

.finder-search input {
    flex: 1;
    padding: 14px 18px;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    background: var(--white);
    color: var(--gray-900);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.finder-search input::placeholder {
    color: var(--gray-500);
}

.finder-search input:focus {
    border-color: var(--green);
}

/* Search box pulse animation */
@keyframes searchPulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 166, 81, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(0, 166, 81, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 166, 81, 0); }
}

.finder-search input.search-pulse {
    animation: searchPulse 1.2s ease-out 2;
    border-color: var(--green);
}

.finder-search button {
    padding: 14px 24px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.finder-search button:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,166,81,0.3);
}

.finder-results {
    max-width: 520px;
    margin: 0 auto;
}

.finder-empty {
    text-align: center;
    padding: 32px 24px;
    color: var(--gray-500);
    font-size: 15px;
}

.finder-loading {
    text-align: center;
    padding: 32px 24px;
    color: var(--gray-500);
    font-size: 15px;
}

.pharmacy-card {
    padding: 20px 24px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pharmacy-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.pharmacy-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.pharmacy-address {
    font-size: 14px;
    color: var(--gray-700);
    margin-bottom: 12px;
    line-height: 1.5;
}

.pharmacy-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.pharmacy-contact a {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

.pharmacy-contact a:hover {
    color: var(--green);
}

.pharmacy-contact a svg {
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
    position: relative;
    top: -1px;
}

.finder-growing {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--gray-500);
}

.finder-growing a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.finder-growing a:hover {
    color: var(--green);
}

/* ─── Footer ─── */
.footer {
    padding: 32px 0;
    background: var(--accent);
    text-align: center;
}

.footer-links {
    margin-bottom: 16px;
}

.footer-links a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-links span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 12px;
}

.footer p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

/* ─── Scroll Animations ─── */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grouped elements */
.fade-in-up[data-delay="1"] { transition-delay: 0.1s; }
.fade-in-up[data-delay="2"] { transition-delay: 0.2s; }
.fade-in-up[data-delay="3"] { transition-delay: 0.3s; }
.fade-in-up[data-delay="4"] { transition-delay: 0.4s; }

/* Hero entrance animation */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero h1, .hero-sub {
    animation: fadeUp 0.6s ease-out both;
}

.hero-sub { animation-delay: 0.15s; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .hero {
        padding: 100px 0 56px;
    }

    .hero::before {
        background-attachment: scroll;
    }

    .symptom-grid {
        grid-template-columns: 1fr;
    }

    .symptom-card:last-child {
        max-width: none;
    }

    .privacy-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Hide desktop grid, show carousel */
    .steps-grid {
        display: none;
    }

    .steps-carousel {
        display: block;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        display: flex;
        gap: 0;
        padding: 0 24px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .steps-carousel::-webkit-scrollbar {
        display: none;
    }

    .steps-carousel .step {
        flex: 0 0 calc(100vw - 48px);
        scroll-snap-align: center;
        padding: 0 16px;
    }

    .carousel-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 24px;
    }

    .carousel-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: var(--gray-300);
        border: none;
        padding: 0;
        cursor: pointer;
        transition: background 0.2s ease;
    }

    .carousel-dot.active {
        background: var(--green);
    }
}

@media (max-width: 480px) {
    .pills {
        flex-direction: column;
        align-items: center;
    }
    .finder-search {
        flex-direction: column;
    }
    .pharmacy-contact {
        flex-direction: column;
        gap: 8px;
    }
}

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
    .fade-in-up {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero h1, .hero-sub {
        animation: none;
    }

    .finder-search input.search-pulse {
        animation: none;
    }

    html {
        scroll-behavior: auto;
    }
}
