/* ============================================================
   HERBAFAMA — Main Stylesheet
   ============================================================ */

:root {
  --green: #2d6a4f;
  --green-mid: #40916c;
  --green-light: #74c69d;
  --green-pale: #d8f3dc;
  --green-ultra: #f0faf2;
  --amber: #e76f51;
  --amber-pale: #fdebd0;
  --slate: #1b2d27;
  --slate-2: #2f4a3e;
  --muted: #6b8f7a;
  --muted-2: #9ab8a7;
  --border: #c8e6d0;
  --bg: #f7fbf8;
  --white: #fff;
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 20px;
  --font-head: 'Lora', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --shadow: 0 2px 8px rgba(45,106,79,0.09);
  --shadow-md: 0 6px 24px rgba(45,106,79,0.13);
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--slate);
  font-size: 14px;
  line-height: 1.65;
}

/* ── PROMO BAR ── */
.promo-bar {
  background: var(--green);
  color: var(--green-pale);
  font-size: 12px;
  text-align: center;
  padding: 7px 16px;
}
.promo-bar a { color: var(--green-light); text-decoration: none; font-weight: 600; }

/* ── NAV ── */
.nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow);
}
.nav-logo { display: flex; align-items: center; gap: 10px; margin-right: 12px; text-decoration: none; }
.nav-logo-mark { width: 34px; height: 34px; background: var(--green); border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.nav-logo-text { font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--green); }
.nav-logo-sub { font-size: 9.5px; color: var(--muted); }
.nav-tabs { display: flex; gap: 2px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tab {
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  text-decoration: none;
  font-family: var(--font-body);
  transition: all 0.15s;
  font-weight: 500;
}
.nav-tab:hover { background: var(--green-ultra); color: var(--green); }
.nav-tab.active { background: var(--green-pale); color: var(--green); font-weight: 600; }
.nav-actions { margin-left: auto; }

/* ── BUTTONS ── */
.btn {
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  text-decoration: none;
}
.btn-ghost { background: transparent; color: var(--green); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--green-ultra); }
.btn-primary { background: var(--green); color: white; }
.btn-primary:hover { background: var(--slate-2); }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ── PAGE LAYOUT ── */
.page-content { padding: 18px 20px; max-width: 980px; margin: 0 auto; }

/* ── BREADCRUMB ── */
.breadcrumb {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  gap: 5px;
  align-items: center;
}
.breadcrumb a { color: var(--green-mid); text-decoration: none; }

/* ── AD UNITS ── */
.ad-unit {
  width: 100%;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 14px 0;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-unit ins { display: block; width: 100%; }
.ad-sidebar {
  width: 100%;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
}
.ad-sidebar ins { display: block; width: 100%; }

/* ── CARDS ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card-title { font-family: var(--font-head); font-size: 15px; font-weight: 600; color: var(--slate); margin-bottom: 3px; }
.card-sub { font-size: 12px; color: var(--muted); margin-bottom: 12px; }

/* ── GRIDS ── */
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.g4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.calc-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-bottom: 22px; }

/* ── FORMS ── */
label { font-size: 12px; font-weight: 500; color: var(--slate-2); display: block; margin-bottom: 4px; }
input, select, textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--slate);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s;
  font-family: var(--font-body);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(64,145,108,0.1);
}
.fg { margin-bottom: 12px; }
input[type=range] {
  -webkit-appearance: none;
  height: 5px;
  background: var(--green-pale);
  border-radius: 3px;
  padding: 0;
  border: none;
  cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green);
  cursor: pointer;
}
input[type=range]:focus { box-shadow: none; border: none; }

/* ── BADGES ── */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 20px; font-size: 10.5px; font-weight: 600; }
.bg-green { background: var(--green-pale); color: var(--green); }
.bg-amber { background: var(--amber-pale); color: #a63d2f; }
.bg-blue { background: #e0f2fe; color: #075985; }
.bg-violet { background: #ede9fe; color: #5b21b6; }
.bg-red { background: #ffe4e6; color: #9f1239; }
.bg-gray { background: #f1f5f9; color: #475569; }

/* ── ALERTS ── */
.alert { padding: 10px 13px; border-radius: var(--radius-sm); font-size: 12px; margin-bottom: 12px; border-left: 3px solid; }
.al-info { background: #f0fdf4; border-color: var(--green-mid); color: var(--green); }
.al-warn { background: #fffbeb; border-color: #d97706; color: #92400e; }
.al-danger { background: #fff1f2; border-color: #f43f5e; color: #9f1239; }

/* ── RESULTS ── */
.result-num { font-family: var(--font-head); font-size: 34px; font-weight: 700; color: var(--green); }
.result-label { font-size: 12px; color: var(--muted); }
.result-box { background: var(--green-ultra); border: 1px solid var(--green-pale); border-radius: var(--radius-sm); padding: 13px; margin-top: 12px; }

/* ── AI RESPONSE ── */
.ai-resp {
  background: linear-gradient(135deg, var(--green-ultra), #f0fdf4);
  border: 1px solid var(--green-pale);
  border-radius: var(--radius-sm);
  padding: 13px;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--slate-2);
  position: relative;
}
.ai-badge {
  position: absolute;
  top: 9px;
  right: 9px;
  background: var(--green);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 9px;
}

/* ── HERO ── */
.hero {
  background: var(--green);
  color: white;
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.hero::before { content: '🌿'; position: absolute; right: 36px; top: 50%; transform: translateY(-50%); font-size: 100px; opacity: 0.1; }
.hero-ey { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green-light); margin-bottom: 8px; }
.hero h1 { font-family: var(--font-head); font-size: 26px; font-weight: 700; margin-bottom: 8px; line-height: 1.22; }
.hero-sub { font-size: 14px; opacity: .88; margin-bottom: 20px; max-width: 540px; line-height: 1.6; }
.hero-btns { display: flex; gap: 9px; flex-wrap: wrap; }
.hbtn { padding: 10px 20px; border-radius: var(--radius-sm); border: none; cursor: pointer; font-size: 13px; font-weight: 600; font-family: var(--font-body); transition: all 0.15s; text-decoration: none; display: inline-block; }
.hbtn-w { background: white; color: var(--green); }
.hbtn-w:hover { background: var(--green-pale); }
.hbtn-o { background: rgba(255,255,255,.15); color: white; border: 1.5px solid rgba(255,255,255,.3); }
.hbtn-o:hover { background: rgba(255,255,255,.25); }

/* ── PAGE HEADER ── */
.ph { margin-bottom: 16px; }
.ph h1 { font-family: var(--font-head); font-size: 20px; font-weight: 700; color: var(--slate); margin-bottom: 4px; }
.ph-sub { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.ph-kw { font-size: 11px; color: var(--muted-2); line-height: 1.6; }

/* ── SECTION HEADERS ── */
.sec-hd { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.sec-title { font-family: var(--font-head); font-size: 18px; font-weight: 700; color: var(--slate); }
.sec-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.sec-link { font-size: 12px; color: var(--green-mid); text-decoration: none; font-weight: 600; }

/* ── TOOL CARDS ── */
.tool-feat {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  text-decoration: none;
}
.tool-feat:hover { border-color: var(--green-mid); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tools-featured { margin-bottom: 12px; }
.tools-secondary { margin-bottom: 22px; }
.tf-icon { width: 50px; height: 50px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.tf-name { font-family: var(--font-head); font-weight: 700; font-size: 15px; color: var(--slate); margin-bottom: 4px; }
.tf-desc { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-bottom: 7px; }
.tf-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 7px; }
.tf-cta { font-size: 12px; font-weight: 600; color: var(--green); }
.tool-sm {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 15px;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.tool-sm:hover { border-color: var(--green-mid); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.ts-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 19px; margin-bottom: 9px; }
.ts-name { font-family: var(--font-head); font-weight: 600; font-size: 13px; color: var(--slate); margin-bottom: 3px; }
.ts-desc { font-size: 11.5px; color: var(--muted); line-height: 1.4; flex: 1; }
.ts-ft { margin-top: 9px; display: flex; align-items: center; justify-content: space-between; }
.ts-cta { font-size: 11px; color: var(--green-mid); font-weight: 600; }

/* ── CALC CARDS ── */
.calc-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 13px;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
  text-decoration: none;
  display: block;
}
.calc-card:hover { border-color: var(--green-mid); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cc-icon { font-size: 26px; margin-bottom: 7px; }
.cc-name { font-family: var(--font-head); font-weight: 600; font-size: 12.5px; color: var(--slate); margin-bottom: 2px; }
.cc-desc { font-size: 11px; color: var(--muted); line-height: 1.35; }

/* ── TRUST STRIP ── */
.trust {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.ti { display: flex; align-items: center; gap: 9px; }
.ti-icon { font-size: 20px; }
.ti-val { font-family: var(--font-head); font-size: 14px; font-weight: 700; color: var(--slate); line-height: 1.2; }
.ti-lbl { font-size: 11px; color: var(--muted); }
.tdiv { width: 1px; height: 32px; background: var(--border); }

/* ── STATS ── */
.stats-row { margin-bottom: 20px; }
.stat { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; text-align: center; }
.stat-v { font-family: var(--font-head); font-size: 22px; font-weight: 700; color: var(--green); }
.stat-l { font-size: 11px; color: var(--muted); margin-top: 2px; }
.stat-c { font-size: 10.5px; font-weight: 600; color: var(--green-mid); margin-top: 4px; }

/* ── BLOG ── */
.blog-row { margin-bottom: 22px; }
.blog-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: all .2s; text-decoration: none; display: block; }
.blog-card:hover { box-shadow: var(--shadow-md); }
.bt { height: 90px; display: flex; align-items: center; justify-content: center; font-size: 38px; }
.bb { padding: 12px; }
.bc { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--green-mid); margin-bottom: 4px; }
.btit { font-family: var(--font-head); font-size: 13px; font-weight: 600; color: var(--slate); line-height: 1.4; }

/* ── INTERNAL LINKS ── */
.int-links { background: var(--green-ultra); border: 1px solid var(--green-pale); border-radius: var(--radius-sm); padding: 13px 16px; margin-top: 16px; }
.int-links-title { font-size: 12px; font-weight: 600; color: var(--green); margin-bottom: 9px; }
.int-links-row { display: flex; flex-wrap: wrap; gap: 7px; }
.int-link {
  padding: 5px 11px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--green-mid);
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  transition: all .15s;
}
.int-link:hover { background: var(--green-pale); border-color: var(--green-mid); }

/* ── CHAT ── */
.chat-box { height: 260px; overflow-y: auto; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 11px; background: var(--bg); margin-bottom: 9px; }
.cm { margin-bottom: 10px; }
.cm-u { text-align: right; }
.cb { display: inline-block; padding: 7px 13px; border-radius: 13px; font-size: 13px; max-width: 82%; line-height: 1.5; }
.cb-u { background: var(--green); color: white; border-bottom-right-radius: 3px; }
.cb-a { background: white; border: 1px solid var(--border); color: var(--slate-2); border-bottom-left-radius: 3px; box-shadow: var(--shadow); }
.ci-row { display: flex; gap: 7px; }
.ci-row input { flex: 1; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--muted-2); animation: bounce 1.2s infinite; display: inline-block; }
.dot:nth-child(2) { animation-delay: .2s; }
.dot:nth-child(3) { animation-delay: .4s; }
@keyframes bounce { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }

/* ── DRUG TAGS ── */
.dtag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; background: var(--green-pale); color: var(--green); border-radius: 18px; font-size: 12px; font-weight: 500; margin: 3px; }
.dtag button { background: none; border: none; cursor: pointer; color: var(--green-mid); font-size: 13px; padding: 0; }

/* ── MED ITEMS ── */
.med-item { display: flex; align-items: center; gap: 10px; padding: 10px; background: white; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 7px; }
.med-ic { width: 34px; height: 34px; background: var(--green-pale); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.med-info { flex: 1; }
.med-n { font-weight: 600; font-size: 12.5px; color: var(--slate); }
.med-d { font-size: 11px; color: var(--muted); }
.med-t { font-size: 11.5px; font-weight: 600; color: var(--green); background: var(--green-pale); padding: 2px 7px; border-radius: 9px; }

/* ── BMI BAR ── */
.bmi-bar { height: 13px; border-radius: 7px; background: linear-gradient(to right,#60a5fa 0%,#4ade80 25%,#facc15 50%,#f97316 70%,#ef4444 100%); position: relative; margin: 11px 0; }
.bmi-needle { position: absolute; top: -4px; width: 3px; height: 21px; background: var(--slate); border-radius: 2px; transform: translateX(-50%); transition: left .5s; }

/* ── PROGRESS ── */
.prog { height: 6px; background: var(--green-pale); border-radius: 3px; overflow: hidden; }
.prog-f { height: 100%; border-radius: 3px; background: var(--green-mid); transition: width .5s; }

/* ── BP CATEGORY ── */
.bp-cat { padding: 11px 14px; border-radius: var(--radius-sm); margin-top: 11px; font-weight: 600; font-size: 14px; border-left: 4px solid; }

/* ── TABS ── */
.tabs { display: flex; gap: 1px; border-bottom: 1.5px solid var(--border); margin-bottom: 13px; }
.tab { padding: 7px 12px; cursor: pointer; font-size: 12px; color: var(--muted); border-bottom: 2px solid transparent; transition: all .15s; font-weight: 500; margin-bottom: -1.5px; background: none; border-top: none; border-left: none; border-right: none; font-family: var(--font-body); }
.tab.active { color: var(--green); border-bottom-color: var(--green); font-weight: 600; }
.tab:hover { color: var(--green); }

/* ── TABLE ── */
table { width: 100%; border-collapse: collapse; font-size: 12.5px; table-layout: fixed; }
th { background: var(--green-ultra); font-weight: 600; color: var(--green); padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--border); }
td { padding: 8px 10px; border-bottom: 1px solid var(--green-ultra); color: var(--slate-2); word-break: break-word; }
tr:hover td { background: var(--green-ultra); }

/* ── SKELETON LOADER ── */
.skel { background: linear-gradient(90deg,var(--green-ultra) 25%,var(--green-pale) 50%,var(--green-ultra) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 7px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.ld-ring { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4); border-radius: 50%; border-top-color: white; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── DISCLAIMER ── */
.disclaim { background: var(--green-ultra); border: 1px solid var(--green-pale); border-radius: var(--radius-sm); padding: 10px 13px; font-size: 11px; color: var(--muted); display: flex; gap: 7px; align-items: flex-start; margin-top: 14px; }

/* ── FAQ ── */
.faq-section { margin-bottom: 20px; }
.faq-item { border-bottom: 1px solid var(--border); padding: 11px 0; }
.faq-q { font-family: var(--font-head); font-weight: 600; font-size: 13.5px; color: var(--slate); cursor: pointer; display: flex; justify-content: space-between; width: 100%; background: none; border: none; text-align: left; padding: 0; }
.faq-a { font-size: 12.5px; color: var(--muted); margin-top: 7px; line-height: 1.7; display: none; }
.faq-a.open { display: block; }

/* ── FOOTER ── */
.footer { background: var(--slate); color: var(--muted-2); padding: 26px 22px; border-radius: var(--radius-lg); margin: 20px 20px 20px; font-size: 12px; max-width: 980px; margin-left: auto; margin-right: auto; }
.ft { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 20px; margin-bottom: 18px; }
.fl { font-family: var(--font-head); font-size: 16px; font-weight: 700; color: var(--green-light); margin-bottom: 7px; }
.fct { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--green-light); margin-bottom: 7px; }
.fa { display: block; color: var(--muted-2); text-decoration: none; margin-bottom: 4px; }
.fa:hover { color: var(--green-light); }
.fb { border-top: 1px solid var(--slate-2); padding-top: 12px; text-align: center; color: #4a7a5e; font-size: 11px; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .g2, .g3, .g4, .calc-grid, .tools-secondary, .ft { grid-template-columns: 1fr 1fr; }
  .hero { padding: 24px 20px; }
  .hero h1 { font-size: 20px; }
  .trust { gap: 8px; }
  .tdiv { display: none; }
  .nav-tabs { gap: 1px; }
}
@media (max-width: 480px) {
  .g2, .g3, .g4, .calc-grid, .tools-secondary, .ft { grid-template-columns: 1fr; }
  .tools-featured { grid-template-columns: 1fr; }
  .hero h1 { font-size: 18px; }
  .footer { margin: 10px; }
}
