/* ═══════════════════════════════════════════════════════
   Health Worth Specialist Hospital — Frontend Styles
   Complements Tailwind CDN. Defines custom components,
   animations, and elements not covered by utility classes.
   ═══════════════════════════════════════════════════════ */

:root {
    --brand-900: #0F4C81;
    --brand-950: #0a2e4f;
    --leaf-500:  #2E8B57;
    --sand:      #FBFAF8;
}

html { scroll-behavior: smooth; }
body { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }

/* ── Scroll progress bar ──────────────────────────────── */
#scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--brand-900), var(--leaf-500));
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* ── Nav links ────────────────────────────────────────── */
.nav-link {
    position: relative;
    padding: 0.5rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
    border-radius: 0.5rem;
    transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--brand-900); background: #eef6fb; }
.nav-link-active { color: var(--brand-900); font-weight: 600; }
.nav-link-active::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 50%;
    transform: translateX(-50%);
    width: 18px; height: 2px;
    border-radius: 2px;
    background: var(--leaf-500);
}

/* ── Sticky nav shadow on scroll ──────────────────────── */
#main-nav.scrolled { box-shadow: 0 4px 20px -8px rgba(15, 76, 129, 0.18); }

/* ── Mobile menu slide ────────────────────────────────── */
#mobile-menu {
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
#mobile-menu.open { transform: translateX(0); }

/* ── Scroll-reveal animations ─────────────────────────── */
.reveal-up, .reveal-left, .reveal-right {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}
.reveal-up    { transform: translateY(28px); }
.reveal-left  { transform: translateX(-28px); }
.reveal-right { transform: translateX(28px); }
.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
    opacity: 1;
    transform: translate(0, 0);
}
@media (prefers-reduced-motion: reduce) {
    .reveal-up, .reveal-left, .reveal-right { opacity: 1; transform: none; transition: none; }
}

/* ── Accordion (FAQ) ──────────────────────────────────── */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
.accordion-item.open .accordion-content { max-height: 500px; }
.accordion-icon { transition: transform 0.3s ease; }
.accordion-item.open .accordion-icon { transform: rotate(180deg); }
.accordion-item.open { box-shadow: 0 8px 24px -12px rgba(15,76,129,0.2); }

/* ── Floating WhatsApp button ─────────────────────────── */
#whatsapp-float {
    position: fixed;
    bottom: 1.5rem; right: 1.5rem;
    z-index: 40;
    display: grid;
    place-items: center;
    width: 56px; height: 56px;
    border-radius: 9999px;
    background: #25D366;
    color: #fff;
    box-shadow: 0 8px 24px -6px rgba(37, 211, 102, 0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}
#whatsapp-float:hover { transform: scale(1.08); box-shadow: 0 12px 28px -6px rgba(37, 211, 102, 0.6); }

/* ── Back-to-top button ───────────────────────────────── */
#back-to-top {
    position: fixed;
    bottom: 1.5rem; right: 5.5rem;
    z-index: 40;
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    border-radius: 9999px;
    background: var(--brand-900);
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s, background 0.2s;
}
#back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
#back-to-top:hover { background: var(--brand-950); }

/* ── Forms ────────────────────────────────────────────── */
.form-input,
.form-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus,
.form-field:focus {
    outline: none;
    border-color: var(--brand-900);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.1);
}
.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}

/* ── Prose (policy pages) ─────────────────────────────── */
.prose-content h2 { font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-size: 1.5rem; color: #0f172a; margin: 2rem 0 0.75rem; }
.prose-content h3 { font-weight: 600; font-size: 1.15rem; color: #1e293b; margin: 1.5rem 0 0.5rem; }
.prose-content p  { color: #475569; line-height: 1.75; margin-bottom: 1rem; }
.prose-content ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; color: #475569; }
.prose-content li { margin-bottom: 0.4rem; }
.prose-content a  { color: var(--brand-900); text-decoration: underline; }

/* ── Utility ──────────────────────────────────────────── */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
