/* MedPub Assist — site styles */
:root {
  --emerald-600: #059669;
  --emerald-700: #047857;
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --amber-50: #fffbeb;
  --amber-600: #d97706;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  color: var(--slate-600);
  background: #ffffff;
  line-height: 1.7;
  font-size: 1rem;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--emerald-600); text-decoration: none; }
a:hover { color: var(--emerald-700); }

h1, h2, h3, h4 { color: var(--slate-900); line-height: 1.25; font-weight: 700; }

.container { max-width: 76rem; margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: 48rem; margin: 0 auto; padding: 0 1.25rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--slate-900); color: #fff; padding: .6rem 1rem; border-radius: 0 0 .5rem 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--slate-200);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 4.25rem; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .55rem; font-size: 1.3rem; font-weight: 800; color: var(--slate-900); }
.brand img { width: 2.2rem; height: 2.2rem; }
.brand span { color: var(--emerald-600); }
.main-nav { display: flex; align-items: center; gap: 1.4rem; }
.main-nav a { color: var(--slate-700); font-weight: 500; font-size: .95rem; padding: .3rem 0; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--emerald-600); }
.main-nav a[aria-current="page"] { border-bottom: 2px solid var(--emerald-600); }
.btn {
  display: inline-block; background: var(--emerald-600); color: #fff !important;
  font-weight: 600; padding: .65rem 1.35rem; border-radius: .55rem; border: 0;
  cursor: pointer; font-size: .95rem; font-family: inherit; transition: background .15s;
}
.btn:hover { background: var(--emerald-700); }
.btn-outline {
  background: #fff; color: var(--emerald-700) !important;
  border: 1.5px solid var(--emerald-600);
}
.btn-outline:hover { background: var(--emerald-50); }
.btn-lg { padding: .85rem 1.75rem; font-size: 1.05rem; }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: .4rem;
  color: var(--slate-700);
}
.nav-toggle svg { width: 1.7rem; height: 1.7rem; display: block; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 4.25rem; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--slate-200);
    flex-direction: column; align-items: stretch; padding: .75rem 1.25rem 1.25rem; gap: .15rem;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: .65rem .25rem; border-bottom: 1px solid var(--slate-100); }
  .main-nav a[aria-current="page"] { border-bottom: 1px solid var(--slate-100); }
  .main-nav .btn { margin-top: .75rem; text-align: center; }
}

/* Hero */
.hero { background: linear-gradient(180deg, var(--slate-50) 0%, #fff 100%); padding: 4.5rem 0 4rem; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--emerald-100); color: var(--emerald-700);
  font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .35rem .9rem; border-radius: 999px; margin-bottom: 1.4rem;
}
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); letter-spacing: -.02em; margin-bottom: 1.2rem; }
.hero h1 em { font-style: normal; color: var(--emerald-600); }
.hero .lede { font-size: 1.13rem; max-width: 34rem; margin-bottom: 1.8rem; }
.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; }
.hero-art { position: relative; }
.hero-art .stat-float {
  position: absolute; bottom: -1.2rem; left: -1.2rem;
  background: #fff; border: 1px solid var(--slate-200); border-radius: 1rem;
  padding: .9rem 1.3rem; box-shadow: 0 12px 30px rgba(15,23,42,.12);
  display: flex; align-items: center; gap: .8rem;
}
.stat-float .num { font-size: 1.4rem; font-weight: 800; color: var(--slate-900); display: block; line-height: 1.2; }
.stat-float .lbl { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--slate-500); }
@media (max-width: 900px) { .hero-art { display: none; } }

/* Sections */
.section { padding: 4rem 0; }
.section-alt { background: var(--slate-50); }
.section-head { text-align: center; max-width: 44rem; margin: 0 auto 2.8rem; }
.section-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: .8rem; }
.section-head p { font-size: 1.05rem; }

/* Cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--slate-200); border-radius: 1rem;
  padding: 1.75rem; transition: box-shadow .18s, transform .18s;
}
.card:hover { box-shadow: 0 14px 34px rgba(15,23,42,.09); transform: translateY(-2px); }
.card h3 { font-size: 1.15rem; margin: .9rem 0 .55rem; }
.card p { font-size: .95rem; }
.card .icon {
  width: 2.9rem; height: 2.9rem; border-radius: .8rem;
  background: var(--emerald-50); color: var(--emerald-600);
  display: flex; align-items: center; justify-content: center;
}
.card .icon svg { width: 1.5rem; height: 1.5rem; }
.card-link { font-weight: 600; font-size: .92rem; display: inline-block; margin-top: .8rem; }

/* Feature list inside service cards */
.feature-list { list-style: none; margin: .9rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: .45rem .8rem; }
.feature-list li { font-size: .88rem; color: var(--slate-600); display: flex; align-items: center; gap: .45rem; }
.feature-list li::before {
  content: ""; flex: 0 0 auto; width: .45rem; height: .45rem; border-radius: 999px; background: var(--emerald-600);
}

/* Stats band */
.stats-band { background: var(--emerald-600); color: #fff; }
.stats-band .grid-4 { gap: 1rem; }
.stats-band .stat { text-align: center; padding: .8rem 0; }
.stats-band .num { font-size: 2.1rem; font-weight: 800; display: block; }
.stats-band .lbl { font-size: .85rem; opacity: .92; }

/* Steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 1.6rem 1.4rem 1.4rem; background: #fff; border: 1px solid var(--slate-200); border-radius: 1rem; }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.2rem; height: 2.2rem; border-radius: 999px;
  background: var(--emerald-600); color: #fff; font-weight: 700; margin-bottom: .8rem;
}
.step h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.step p { font-size: .92rem; }

/* Ethics strip */
.ethics-strip {
  background: var(--slate-900); color: var(--slate-200);
  border-radius: 1.25rem; padding: 2.2rem 2rem; text-align: center;
}
.ethics-strip h2 { color: #fff; font-size: 1.35rem; margin-bottom: .6rem; }
.ethics-strip p { max-width: 46rem; margin: 0 auto .5rem; font-size: .97rem; }
.ethics-strip a { color: #6ee7b7; font-weight: 600; }

/* CTA panel */
.cta-panel {
  background: linear-gradient(135deg, var(--emerald-600), #0d9488);
  border-radius: 1.25rem; color: #fff; text-align: center; padding: 3rem 2rem;
}
.cta-panel h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .7rem; }
.cta-panel p { max-width: 40rem; margin: 0 auto 1.6rem; font-size: 1.02rem; opacity: .95; }
.cta-panel .btn { background: #fff; color: var(--emerald-700) !important; }
.cta-panel .btn:hover { background: var(--emerald-50); }

/* Breadcrumbs */
.breadcrumbs { font-size: .85rem; color: var(--slate-500); padding: 1.1rem 0 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; }
.breadcrumbs li + li::before { content: "›"; margin-right: .35rem; color: var(--slate-400); }
.breadcrumbs a { color: var(--slate-500); }
.breadcrumbs a:hover { color: var(--emerald-600); }
.breadcrumbs [aria-current] { color: var(--slate-700); font-weight: 600; }

/* Page hero (inner pages) */
.page-hero { background: var(--slate-50); padding: 2.6rem 0 2.8rem; text-align: left; }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: .7rem; letter-spacing: -.015em; }
.page-hero .lede { font-size: 1.1rem; max-width: 44rem; }

/* Service detail */
.service-detail { border-top: 1px solid var(--slate-200); padding: 2.6rem 0; }
.service-detail:first-of-type { border-top: 0; }
.service-detail h2 { font-size: 1.5rem; margin-bottom: .7rem; }
.service-detail .grid-svc { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2.2rem; align-items: start; }
@media (max-width: 800px) { .service-detail .grid-svc { grid-template-columns: 1fr; } }
.svc-box { background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: 1rem; padding: 1.4rem 1.5rem; }
.svc-box h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; color: var(--slate-700); margin-bottom: .7rem; }
.svc-box ul { list-style: none; }
.svc-box li { padding: .32rem 0; font-size: .93rem; display: flex; gap: .5rem; }
.svc-box li::before { content: "✓"; color: var(--emerald-600); font-weight: 700; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.4rem 0; border: 1px solid var(--slate-200); border-radius: .8rem; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; min-width: 34rem; }
th, td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--slate-200); vertical-align: top; }
th { background: var(--slate-50); color: var(--slate-800); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }

/* FAQ accordions */
.faq-group h2 { font-size: 1.3rem; margin: 2.2rem 0 1rem; }
details.faq {
  background: #fff; border: 1px solid var(--slate-200); border-radius: .8rem;
  margin-bottom: .8rem; overflow: hidden;
}
details.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem;
  padding: 1.05rem 1.3rem; font-weight: 600; color: var(--slate-800); font-size: 1rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--emerald-600); font-weight: 700; font-size: 1.2rem; line-height: 1.4; }
details.faq[open] summary::after { content: "–"; }
details.faq .faq-a { padding: 0 1.3rem 1.15rem; font-size: .96rem; }
details.faq .faq-a p + p { margin-top: .6rem; }

/* Forms */
.form-card {
  background: #fff; border: 1px solid var(--slate-200); border-radius: 1.1rem;
  padding: 2rem; box-shadow: 0 10px 30px rgba(15,23,42,.06);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; color: var(--slate-800); font-size: .92rem; margin-bottom: .4rem; }
.field .hint { font-size: .8rem; color: var(--slate-500); margin-top: .35rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: .7rem .9rem; border: 1.5px solid var(--slate-200); border-radius: .6rem;
  font: inherit; color: var(--slate-800); background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--emerald-600); outline-offset: 1px; border-color: var(--emerald-600);
}
.field input[type="file"] { padding: .55rem .7rem; background: var(--slate-50); }
.form-status { display: none; margin-top: 1rem; padding: .85rem 1.1rem; border-radius: .6rem; font-size: .95rem; font-weight: 500; }
.form-status.success { display: block; background: var(--emerald-50); color: var(--emerald-700); border: 1px solid var(--emerald-100); }
.form-status.error { display: block; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* Contact cards */
.contact-card { display: flex; gap: 1rem; align-items: flex-start; }
.contact-card .icon {
  flex: 0 0 auto; width: 2.7rem; height: 2.7rem; border-radius: .7rem;
  background: var(--emerald-50); color: var(--emerald-600);
  display: flex; align-items: center; justify-content: center;
}
.contact-card .icon svg { width: 1.35rem; height: 1.35rem; }
.contact-card h3 { font-size: 1rem; margin-bottom: .2rem; }
.contact-card p { font-size: .92rem; }

/* Article / prose */
.prose { font-size: 1.02rem; }
.prose h2 { font-size: 1.55rem; margin: 2.4rem 0 .9rem; }
.prose h3 { font-size: 1.18rem; margin: 1.8rem 0 .7rem; }
.prose p { margin-bottom: 1.05rem; }
.prose ul, .prose ol { margin: 0 0 1.05rem 1.4rem; }
.prose li { margin-bottom: .45rem; }
.prose strong { color: var(--slate-800); }
.prose blockquote {
  border-left: 4px solid var(--emerald-600); background: var(--emerald-50);
  padding: 1rem 1.3rem; border-radius: 0 .7rem .7rem 0; margin: 1.4rem 0; color: var(--slate-700);
}
.note-box {
  background: var(--amber-50); border: 1px solid #fde68a; border-radius: .8rem;
  padding: 1.1rem 1.3rem; margin: 1.5rem 0; font-size: .95rem;
}
.note-box strong { color: var(--amber-600); }
.article-meta { color: var(--slate-500); font-size: .88rem; margin-bottom: 1.8rem; }
.article-hero { padding: 2.8rem 0 1rem; }
.article-hero h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -.015em; margin-bottom: .8rem; max-width: 50rem; }

/* Resource cards */
.resource-card h3 { margin-top: 0; }
.resource-card h3 a { color: var(--slate-900); }
.resource-card h3 a:hover { color: var(--emerald-600); }
.resource-card .tag {
  display: inline-block; background: var(--emerald-50); color: var(--emerald-700);
  font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: .25rem .7rem; border-radius: 999px; margin-bottom: .8rem;
}

/* Footer */
.site-footer { background: var(--slate-900); color: var(--slate-400); margin-top: 4rem; }
.site-footer .cols {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.2rem; padding: 3.2rem 0 2.2rem;
}
@media (max-width: 900px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .site-footer .cols { grid-template-columns: 1fr; } }
.site-footer h3 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1rem; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: .55rem; }
.site-footer a { color: var(--slate-400); font-size: .93rem; }
.site-footer a:hover { color: #6ee7b7; }
.site-footer .brand { color: #fff; margin-bottom: .9rem; }
.site-footer .blurb { font-size: .93rem; max-width: 22rem; }
.site-footer .legal {
  border-top: 1px solid var(--slate-800); padding: 1.4rem 0;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem;
}
.site-footer .legal ul { display: flex; gap: 1.2rem; flex-wrap: wrap; }

/* WhatsApp float */
.wa-float {
  position: fixed; right: 1.3rem; bottom: 1.3rem; z-index: 60;
  width: 3.4rem; height: 3.4rem; border-radius: 999px; background: #25d366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(37,211,102,.45);
}
.wa-float svg { width: 1.9rem; height: 1.9rem; fill: #fff; }
.wa-float:hover { transform: scale(1.06); }

/* 404 */
.error-page { text-align: center; padding: 5.5rem 0; }
.error-page .code { font-size: 5.5rem; font-weight: 800; color: var(--emerald-600); line-height: 1; }
.error-page h1 { font-size: 1.8rem; margin: .8rem 0; }
.error-page p { max-width: 30rem; margin: 0 auto 1.8rem; }

/* Utility */
.mt-2 { margin-top: 2rem; }
.center { text-align: center; }
.checklist { list-style: none; margin: 1rem 0 1.4rem; }
.checklist li { padding: .4rem 0 .4rem 1.9rem; position: relative; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: .4rem;
  width: 1.35rem; height: 1.35rem; border-radius: 999px; background: var(--emerald-100);
  color: var(--emerald-700); font-weight: 700; font-size: .8rem;
  display: flex; align-items: center; justify-content: center;
}
