/* ============================================================
   responsive.css — TheHealthReference.com
   Link in every page <head> after </style>:
   <link rel="stylesheet" href="responsive.css">
   ============================================================ */

/* ── GLOBAL ── */
html { overflow-x: clip; }
body { overflow-x: clip; }
*, *::before, *::after { box-sizing: border-box; }

/* ── HAMBURGER BUTTON ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}
.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 1.5px;
  background: rgba(255,255,255,0.7);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle.is-open .nav-toggle__bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle__bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.is-open .nav-toggle__bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── MOBILE STYLES ── */
@media (max-width: 768px) {

  /* Header — keep sticky, just fix padding */
  .site-header { padding: 0 16px; }
  .site-header__nav { display: none !important; }
  .nav-toggle { display: flex; }

  /* Hero */
  .hero { padding: 50px 20px 50px; }
  .hero::after { font-size: clamp(50px,18vw,100px); right: -10px; bottom: -15px; }
  .hero__title { font-size: clamp(2.4rem,10vw,4rem); letter-spacing: -1.5px; line-height: 1; word-break: break-word; }
  .hero__subtitle { font-size: 14px; margin: 16px 0 24px; }
  .hero__breadcrumb { font-size: 11px; flex-wrap: wrap; margin-bottom: 20px; }

  /* Stat bar — 2x2 grid */
  .stat-bar { display: grid !important; grid-template-columns: 1fr 1fr; width: 100%; border-radius: 12px; }
  .stat-pill { padding: 14px 10px; border-right: 1px solid rgba(255,255,255,0.06); border-bottom: 1px solid rgba(255,255,255,0.06); }
  .stat-pill:nth-child(2), .stat-pill:nth-child(4) { border-right: none; }
  .stat-pill:nth-child(3), .stat-pill:nth-child(4) { border-bottom: none; }
  .stat-pill__num { font-size: 20px !important; }
  .stat-pill__label { font-size: 9px; }

  /* Hero meta */
  .hero__meta { display: grid !important; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 24px; margin-top: 24px !important; border-top: 1px solid rgba(255,255,255,0.08); }
  .hero__meta-item { border-right: none !important; padding: 12px 14px !important; margin-right: 0 !important; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06) !important; border-radius: 10px; }
  .hero__meta-item:nth-child(1) { order: 1; }
  .hero__meta-item:nth-child(2) { order: 3; grid-column: 1 / -1; }
  .hero__meta-item:nth-child(3) { order: 2; }
  .hero__meta-label { font-size: 9px; }
  .hero__meta-value { font-size: 12px; line-height: 1.4; }
  .hero__meta-value a { color: rgba(255,255,255,0.7) !important; }

  .toc-section { padding: 32px 20px 0px; }
  .toc-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; grid-auto-rows: 64px !important; list-style: none !important; padding: 0 !important; margin: 0 !important; gap: 0; }
  .toc-grid li { list-style: none !important; height: 64px !important; overflow: hidden; border-bottom: 1px solid var(--line-light); }
  .toc-grid li:nth-last-child(-n+2) { border-bottom: none; height: auto !important; }
  .toc-item a { font-size: 12px; padding: 9px 10px; height: 100%; align-items: flex-start; }

  /* Sections */
  .section { padding: 56px 20px; }
  .section-heading { font-size: clamp(1.7rem,6vw,3rem); letter-spacing: -0.5px; }
  .section-header { margin-bottom: 40px; }
  .section-sub { font-size: 15px; }

  /* All multi-column layouts collapse */
  .grid-2, .grid-3, .grid-4,
  .split, .split--rev,
  .safety-grid, .bib-grid { grid-template-columns: 1fr !important; gap: 16px; }

  /* Bio box */
  .bio-box { padding: 24px 18px; }
  .bio-box h2 { font-size: 20px; }
  .bio-box p { font-size: 13.5px; margin-bottom: 20px; }
  .bio-box__stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .bio-stat { padding: 10px 8px; }
  .bio-stat__val { font-size: 11.5px; line-height: 1.4; }
  .bio-stat__label { font-size: 8px; }

  /* Taxonomy */
  .taxon-dl div { flex-direction: column; gap: 3px; align-items: flex-start; padding: 10px 0; }
  .taxon-dl dt { min-width: unset; }
  .taxon-dl dd { text-align: left; font-size: 13px; }

  /* Dosage table */
  .dosage-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 16px; }
  .dosage-table { min-width: 540px; }
  .dosage-table th, .dosage-table td { padding: 10px 12px; font-size: 12.5px; }

  /* Evidence bar */
  .evidence-bar { flex-direction: column; align-items: flex-start; padding: 22px 18px; gap: 14px; margin-bottom: 40px; }
  .evidence-bar__text h3 { font-size: 17px; }
  .evidence-chips { width: 100%; flex-wrap: wrap; gap: 8px; }
  .evidence-chip { font-size: 10px; padding: 6px 12px; }

  /* Affiliate box */
  .affiliate-wrap { padding: 14px 16px; }
  .affiliate-inner { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; }
  .aff-cta { width: 100%; justify-content: center; }
  .aff-title { font-size: 13.5px; }

  /* Prop cards */
  .prop-card { padding: 20px 18px; }
  .prop-card h3 { font-size: 14px; }
  .prop-card p { font-size: 13px; }

  /* MOA cards */
  .moa-card { flex-direction: column; gap: 12px; padding: 20px 18px; }
  .moa-card h3 { font-size: 14px; }
  .moa-card p { font-size: 13px; }

  /* Indication panels */
  .indication-panel__head { padding: 14px 16px; }
  .indication-panel__body { padding: 14px 16px; }
  .indication-list li { font-size: 13px; }

  /* Safety cards */
  .safety-card { padding: 22px 18px; }
  .safety-list li { font-size: 13px; }

  /* Bibliography */
  .bib-item { padding: 14px 42px 14px 14px; font-size: 11.5px; }

  /* FAQ */
  .faq-item summary { padding: 16px 18px; font-size: 13.5px; }
  .faq-item__body { padding: 4px 18px 18px; font-size: 13.5px; }

  /* Form steps & reg items */
  .form-step { gap: 12px; }
  .reg-item { padding: 16px; }

  /* Compound rows */
  .compound-row { flex-direction: column; gap: 6px; }
  .compound-row__badge { align-self: flex-start; }

  /* Cards */
  .card { padding: 24px 18px; }

  /* Disclaimer */
  .disclaimer { padding: 18px; font-size: 12.5px; }

  /* Footer */
  .site-footer { padding: 40px 20px; }
  .site-footer p { font-size: 12px; }

  /* Columns override */
  div[style*="columns:2"] { columns: 1 !important; }
}



@media (prefers-reduced-motion: reduce) {
  .nav-toggle__bar { transition: none !important; }
}

a[href^="tel"] {
  color: inherit;
  text-decoration: none;
  pointer-events: none;
}