/*
Theme Name: MicroNutri Expert
Theme URI: https://micronutri.esnaturopathiemaroc.com/
Author: ESNM
Description: Formation scientifique complète en micronutrition, antioxydants et stress oxydant
Version: 1.0.0
License: Private
Text Domain: micronutri-expert
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --primary: #1d4ed8;
  --primary-dark: #1e3a8a;
  --primary-light: #3b82f6;
  --primary-pale: #dbeafe;
  --primary-xpale: #eff6ff;
  --accent: #7c3aed;
  --accent-light: #8b5cf6;
  --accent-pale: #ede9fe;
  --green: #15803d;
  --green-light: #22c55e;
  --green-pale: #dcfce7;
  --orange: #c2410c;
  --orange-pale: #ffedd5;
  --red: #dc2626;
  --red-pale: #fee2e2;
  --yellow: #b45309;
  --yellow-pale: #fef3c7;
  --teal: #0d9488;
  --teal-pale: #ccfbf1;

  --text: #1c1917;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-alt2: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  --radius: 0.625rem;
  --radius-sm: 0.375rem;
  --radius-lg: 1rem;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);

  --sidebar-w: 260px;
  --header-h: 64px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 1rem;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
h1,h2,h3,h4,h5,h6 { line-height: 1.25; font-weight: 700; }

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;600;700&display=swap');

/* ============================================================
   LAYOUT
   ============================================================ */
.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }

/* Top Header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
  box-shadow: var(--shadow-sm);
}
.header-logo {
  display: flex; align-items: center; gap: .6rem; font-weight: 700;
  font-size: 1.1rem; color: var(--text);
}
.header-logo .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.1rem;
}
.header-logo span.logo-text { color: var(--primary); }
.header-nav { display: flex; align-items: center; gap: .25rem; }
.header-nav a {
  font-size: .82rem; font-weight: 500; color: var(--text-muted);
  padding: .35rem .7rem; border-radius: var(--radius-sm);
  transition: all .2s;
}
.header-nav a:hover, .header-nav a.active {
  color: var(--primary); background: var(--primary-xpale);
  text-decoration: none;
}
.header-cta {
  background: var(--primary); color: white; padding: .4rem 1rem;
  border-radius: var(--radius-sm); font-size: .82rem; font-weight: 600;
  transition: background .2s;
}
.header-cta:hover { background: var(--primary-dark); text-decoration: none; color: white; }
.menu-toggle { display: none; background: none; border: none; padding: .5rem; }

/* Inner page layout: sidebar + content */
.page-layout {
  display: flex;
  padding-top: var(--header-h);
  min-height: 100vh;
}
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  overflow-y: auto;
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
  padding: 1.25rem 0;
  z-index: 50;
}
.sidebar-section { margin-bottom: .25rem; }
.sidebar-label {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-light);
  padding: .75rem 1.25rem .25rem;
}
.sidebar-link {
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem 1.25rem;
  font-size: .82rem; font-weight: 500; color: var(--text-muted);
  border-radius: 0; transition: all .15s;
  border-left: 3px solid transparent;
}
.sidebar-link:hover {
  background: var(--border-light); color: var(--primary);
  text-decoration: none; border-left-color: var(--primary-light);
}
.sidebar-link.active {
  background: var(--primary-xpale); color: var(--primary);
  border-left-color: var(--primary); font-weight: 600;
}
.sidebar-link .icon { font-size: 1rem; flex-shrink: 0; }

.page-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 2.5rem 2rem;
  max-width: calc(100% - var(--sidebar-w));
  min-width: 0;
}

/* Full-width layout (no sidebar) */
.no-sidebar .page-main { margin-left: 0; max-width: 100%; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #1e40af 40%, var(--accent) 100%);
  color: white; padding: 6rem 1.5rem 5rem;
  text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner { position: relative; max-width: 820px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.9); font-size: .78rem; font-weight: 600;
  padding: .35rem .9rem; border-radius: 100px; margin-bottom: 1.5rem;
  letter-spacing: .03em;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800;
  margin-bottom: 1.25rem; line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.hero h1 em { font-style: normal; color: #93c5fd; }
.hero p { font-size: 1.1rem; opacity: .85; max-width: 640px; margin: 0 auto 2rem; line-height: 1.65; }
.hero-stats {
  display: flex; justify-content: center; gap: 2.5rem;
  margin-bottom: 2.5rem; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .value { font-size: 2rem; font-weight: 800; color: #93c5fd; }
.hero-stat .label { font-size: .8rem; opacity: .75; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  background: white; color: var(--primary);
  padding: .8rem 2rem; border-radius: var(--radius-sm);
  font-weight: 700; font-size: .95rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  transition: all .2s; display: inline-flex; align-items: center; gap: .5rem;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2); text-decoration: none; color: var(--primary); }
.btn-outline {
  background: rgba(255,255,255,.1); color: white;
  border: 2px solid rgba(255,255,255,.35);
  padding: .8rem 2rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .95rem; transition: all .2s;
  display: inline-flex; align-items: center; gap: .5rem;
}
.btn-outline:hover { background: rgba(255,255,255,.2); text-decoration: none; color: white; }

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark), #2563eb);
  color: white; padding: 3rem 2rem 2.5rem;
  border-radius: var(--radius-lg); margin-bottom: 2rem;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M20 20c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10zm10 0c0 5.5 4.5 10 10 10s10-4.5 10-10-4.5-10-10-10-10 4.5-10 10z'/%3E%3C/g%3E%3C/svg%3E");
}
.page-hero-inner { position: relative; }
.breadcrumb { display: flex; align-items: center; gap: .4rem; margin-bottom: 1rem; }
.breadcrumb a { color: rgba(255,255,255,.7); font-size: .82rem; }
.breadcrumb a:hover { color: white; text-decoration: none; }
.breadcrumb span { color: rgba(255,255,255,.4); font-size: .82rem; }
.page-hero h1 { font-size: clamp(1.6rem, 4vw, 2.5rem); margin-bottom: .75rem; }
.page-hero p { font-size: 1rem; opacity: .82; max-width: 640px; line-height: 1.6; }

/* ============================================================
   SECTION
   ============================================================ */
.section { padding: 2.5rem 0; }
.section + .section { padding-top: 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

.section-header { margin-bottom: 2rem; }
.section-tag {
  display: inline-block; font-size: .73rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary); background: var(--primary-pale);
  padding: .25rem .75rem; border-radius: 100px; margin-bottom: .5rem;
}
.section-header h2 { font-size: 1.8rem; color: var(--text); }
.section-header p { font-size: 1rem; color: var(--text-muted); margin-top: .5rem; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow-sm); transition: all .2s;
}
.card:hover { box-shadow: var(--shadow); border-color: var(--primary-light); }
.card-link:hover { text-decoration: none; }

.card-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 1rem;
}
.card h3 { font-size: 1.05rem; margin-bottom: .5rem; color: var(--text); }
.card p { font-size: .875rem; color: var(--text-muted); line-height: 1.55; }

/* Module grid */
.modules-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }

/* ============================================================
   GRIDS
   ============================================================ */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }

/* ============================================================
   BADGES & TAGS
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  padding: .2rem .65rem; border-radius: 100px; white-space: nowrap;
}
.badge-blue { background: var(--primary-pale); color: var(--primary); }
.badge-green { background: var(--green-pale); color: var(--green); }
.badge-purple { background: var(--accent-pale); color: var(--accent); }
.badge-orange { background: var(--orange-pale); color: var(--orange); }
.badge-red { background: var(--red-pale); color: var(--red); }
.badge-yellow { background: var(--yellow-pale); color: var(--yellow); }
.badge-teal { background: var(--teal-pale); color: var(--teal); }
.badge-outline { background: transparent; border: 1px solid currentColor; }

/* ============================================================
   INFO BOXES
   ============================================================ */
.info-box {
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
  border-left: 4px solid; margin: 1.5rem 0;
}
.info-box.blue { background: var(--primary-xpale); border-color: var(--primary); color: var(--primary-dark); }
.info-box.green { background: var(--green-pale); border-color: var(--green); color: #14532d; }
.info-box.orange { background: var(--orange-pale); border-color: var(--orange); color: #7c2d12; }
.info-box.purple { background: var(--accent-pale); border-color: var(--accent); color: #4c1d95; }
.info-box.yellow { background: var(--yellow-pale); border-color: var(--yellow); color: #78350f; }
.info-box strong { display: block; font-size: .85rem; font-weight: 700; margin-bottom: .35rem; }
.info-box p, .info-box ul { font-size: .875rem; }
.info-box ul li { padding: .15rem 0 .15rem 1rem; position: relative; }
.info-box ul li::before { content: '✓'; position: absolute; left: 0; }

/* ============================================================
   MOLECULE / SCIENCE CARDS
   ============================================================ */
.molecule-card {
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.molecule-card .card-head {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-xpale), var(--accent-pale));
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 1rem;
}
.molecule-card .card-head .mol-icon {
  width: 48px; height: 48px; background: white;
  border-radius: var(--radius-sm); display: flex;
  align-items: center; justify-content: center; font-size: 1.4rem;
  box-shadow: var(--shadow-sm); flex-shrink: 0;
}
.molecule-card .card-head h3 { font-size: 1.1rem; color: var(--text); }
.molecule-card .card-head p { font-size: .82rem; color: var(--text-muted); margin-top: .25rem; }
.molecule-card .card-body { padding: 1.25rem 1.5rem; }
.molecule-card .card-body h4 { font-size: .85rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin: 1rem 0 .5rem; }
.molecule-card .card-body h4:first-child { margin-top: 0; }
.molecule-card .card-body ul { padding-left: 1rem; }
.molecule-card .card-body ul li { font-size: .875rem; color: var(--text); padding: .2rem 0; list-style: disc; }
.molecule-card .card-body p { font-size: .875rem; color: var(--text-muted); line-height: 1.6; }
.molecule-card .dosage-strip {
  background: var(--primary-xpale); border-top: 1px solid var(--border);
  padding: .75rem 1.5rem; display: flex; align-items: center; gap: .75rem;
}
.molecule-card .dosage-strip .label { font-size: .75rem; font-weight: 700; color: var(--primary); text-transform: uppercase; }
.molecule-card .dosage-strip .value { font-size: .875rem; color: var(--text); font-weight: 500; }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead th {
  background: var(--primary); color: white;
  padding: .8rem 1rem; text-align: left; font-weight: 600; font-size: .8rem;
  white-space: nowrap;
}
tbody td { padding: .75rem 1rem; border-bottom: 1px solid var(--border-light); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-alt); }
tbody tr:nth-child(even) { background: var(--bg-alt2); }
tbody tr:nth-child(even):hover { background: var(--border-light); }
td .badge { margin: .1rem; }

/* ============================================================
   TABS
   ============================================================ */
.tabs { margin-bottom: 2rem; }
.tab-list { display: flex; gap: .25rem; flex-wrap: wrap; padding: .35rem; background: var(--bg-alt); border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 1.5rem; }
.tab-btn {
  padding: .5rem 1rem; font-size: .82rem; font-weight: 600; border: none;
  border-radius: var(--radius-sm); background: transparent; color: var(--text-muted);
  transition: all .2s; cursor: pointer;
}
.tab-btn.active { background: white; color: var(--primary); box-shadow: var(--shadow-sm); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================================
   ACCORDION
   ============================================================ */
.accordion { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-item:last-child { border-bottom: none; }
.accordion-btn {
  width: 100%; text-align: left; padding: 1rem 1.25rem;
  background: white; border: none; font-size: .9rem; font-weight: 600;
  color: var(--text); cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; gap: 1rem; transition: background .15s;
}
.accordion-btn:hover { background: var(--bg-alt); }
.accordion-btn.open { background: var(--primary-xpale); color: var(--primary); }
.accordion-btn .chevron { font-size: .75rem; transition: transform .2s; }
.accordion-btn.open .chevron { transform: rotate(180deg); }
.accordion-body { display: none; padding: 1.25rem; background: var(--bg-alt); border-top: 1px solid var(--border); }
.accordion-body.open { display: block; }
.accordion-body p { font-size: .875rem; color: var(--text); line-height: 1.65; }
.accordion-body ul { padding-left: 1.25rem; margin-top: .5rem; }
.accordion-body ul li { font-size: .875rem; color: var(--text-muted); list-style: disc; padding: .2rem 0; }

/* ============================================================
   PROTOCOL CARD
   ============================================================ */
.protocol-card {
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.protocol-card .proto-head {
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 1rem;
}
.protocol-card .proto-icon { font-size: 1.75rem; }
.protocol-card .proto-head h3 { font-size: 1.05rem; }
.protocol-card .proto-head p { font-size: .82rem; color: var(--text-muted); margin-top: .2rem; }
.protocol-card .proto-body { padding: 1.25rem 1.5rem; }
.protocol-card .proto-item { padding: .6rem 0; border-bottom: 1px dashed var(--border); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.protocol-card .proto-item:last-child { border-bottom: none; }
.protocol-card .proto-item .name { font-size: .875rem; font-weight: 600; color: var(--text); }
.protocol-card .proto-item .dose { font-size: .82rem; color: var(--text-muted); }

/* ============================================================
   BIOMARKER
   ============================================================ */
.biomarker-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.biomarker-card .bm-head { padding: 1rem 1.25rem; background: var(--bg-alt); border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.biomarker-card .bm-head h4 { font-size: .9rem; font-weight: 700; }
.biomarker-card .bm-body { padding: 1rem 1.25rem; }
.biomarker-row { display: flex; justify-content: space-between; align-items: baseline; padding: .4rem 0; border-bottom: 1px solid var(--border-light); font-size: .82rem; }
.biomarker-row:last-child { border-bottom: none; }
.biomarker-row .label { color: var(--text-muted); }
.biomarker-row .ref { color: var(--text); font-weight: 500; }
.biomarker-row .interp { color: var(--green); font-size: .75rem; }

/* ============================================================
   STATS ROW
   ============================================================ */
.stats-row { display: flex; gap: 1.5rem; flex-wrap: wrap; margin: 2rem 0; }
.stat-box {
  flex: 1; min-width: 140px;
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; text-align: center; box-shadow: var(--shadow-sm);
}
.stat-box .stat-val { font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat-box .stat-lbl { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  color: white; border-radius: var(--radius-lg); padding: 3rem 2rem;
  text-align: center; margin: 2.5rem 0;
}
.cta-banner h2 { font-size: 1.8rem; margin-bottom: .75rem; }
.cta-banner p { opacity: .82; margin-bottom: 1.75rem; max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: white; color: var(--primary); font-weight: 700;
  padding: .8rem 2rem; border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0,0,0,.15); transition: all .2s;
}
.cta-btn:hover { transform: translateY(-2px); text-decoration: none; color: var(--primary); }

/* ============================================================
   STEP FLOW
   ============================================================ */
.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: flex; gap: 1.25rem; padding: 1.25rem 0; border-bottom: 1px dashed var(--border); }
.step:last-child { border-bottom: none; }
.step-num {
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--primary); color: white;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .85rem;
}
.step-body h4 { font-size: .95rem; margin-bottom: .35rem; }
.step-body p { font-size: .875rem; color: var(--text-muted); line-height: 1.55; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #0f172a; color: #94a3b8;
  padding: 3rem 1.5rem 1.5rem;
  margin-left: var(--sidebar-w);
}
.no-sidebar .site-footer { margin-left: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-brand .logo { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.footer-brand .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-sm); display: flex; align-items: center;
  justify-content: center; color: white; font-size: 1.1rem;
}
.footer-brand .logo span { color: white; font-weight: 700; }
.footer-brand p { font-size: .82rem; line-height: 1.6; }
.footer-col h4 { color: white; font-size: .85rem; font-weight: 700; margin-bottom: .75rem; }
.footer-col ul li a { color: #94a3b8; font-size: .82rem; display: block; padding: .2rem 0; }
.footer-col ul li a:hover { color: white; text-decoration: none; }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 1.25rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.footer-bottom p { font-size: .78rem; }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .78rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; } .flex-wrap { flex-wrap: wrap; } .gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; } .items-center { align-items: center; }
.inline-flex { display: inline-flex; }

/* ============================================================
   HOME MODULES SECTION
   ============================================================ */
.home-section { padding: 4rem 0; }
.home-section.alt { background: var(--bg-alt); }
.module-card {
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.75rem; display: flex; flex-direction: column; gap: 1rem;
  box-shadow: var(--shadow-sm); transition: all .2s; text-decoration: none; color: inherit;
}
.module-card:hover { box-shadow: var(--shadow); border-color: var(--primary-light); transform: translateY(-2px); text-decoration: none; }
.module-card .mod-icon {
  width: 52px; height: 52px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.module-card h3 { font-size: 1.05rem; color: var(--text); }
.module-card p { font-size: .875rem; color: var(--text-muted); line-height: 1.55; flex: 1; }
.module-card .arrow { color: var(--primary); font-size: .85rem; font-weight: 600; margin-top: auto; }

/* ============================================================
   MISSING UTILITY
   ============================================================ */
.mb-4 { margin-bottom: 2rem; }
.mb-0 { margin-bottom: 0; }
.mt-0 { margin-top: 0; }

/* ============================================================
   SIDEBAR BACKDROP (mobile)
   ============================================================ */
.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0; z-index: 45;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
}
.sidebar-backdrop.visible { display: block; }

/* Sidebar close button (mobile only) */
.sidebar-close {
  display: none;
  position: absolute; top: .75rem; right: .75rem;
  background: var(--border-light); border: 1px solid var(--border);
  border-radius: 50%; width: 30px; height: 30px;
  align-items: center; justify-content: center;
  font-size: 1rem; color: var(--text-muted); cursor: pointer;
  z-index: 10;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    z-index: 60;
    position: fixed;
  }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .sidebar-close { display: flex; }
  .page-main { margin-left: 0; max-width: 100%; }
  .site-footer { margin-left: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .menu-toggle { display: flex; align-items: center; }
}

@media (max-width: 768px) {
  /* Header */
  .header-nav { display: none; }
  .header-cta { font-size: .75rem; padding: .35rem .75rem; }

  /* Hero */
  .hero { padding: 4.5rem 1rem 3.5rem; }
  .hero h1 { font-size: 1.8rem; }
  .hero-stats { gap: 1rem; }
  .hero-stat .value { font-size: 1.6rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn-primary, .btn-outline { width: 100%; max-width: 320px; justify-content: center; }

  /* Page layout */
  .page-main { padding: 1.25rem .875rem; }
  .page-hero { padding: 1.75rem 1rem; border-radius: var(--radius); margin-bottom: 1.25rem; }
  .page-hero h1 { font-size: 1.4rem; }

  /* Grids → single column */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .modules-grid { grid-template-columns: 1fr; }

  /* Tabs → horizontal scroll on mobile */
  .tab-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: .2rem;
    padding: .3rem;
  }
  .tab-list::-webkit-scrollbar { display: none; }
  .tab-btn { white-space: nowrap; flex-shrink: 0; font-size: .78rem; padding: .45rem .75rem; }

  /* Tables */
  .table-wrap { font-size: .78rem; }
  thead th { font-size: .72rem; padding: .6rem .75rem; }
  tbody td { padding: .55rem .75rem; font-size: .78rem; }

  /* Cards */
  .card { padding: 1.1rem; }
  .molecule-card .card-body { padding: 1rem; }
  .molecule-card .card-head { padding: 1rem; gap: .75rem; }
  .protocol-card .proto-head { padding: 1rem; }
  .protocol-card .proto-body { padding: 1rem; }

  /* Stats */
  .stats-row { gap: .6rem; }
  .stat-box { min-width: 100px; padding: .9rem; }
  .stat-box .stat-val { font-size: 1.5rem; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .site-footer { padding: 2rem 1rem 1.25rem; }

  /* CTA banner */
  .cta-banner { padding: 2rem 1.25rem; }
  .cta-banner h2 { font-size: 1.4rem; }

  /* Steps */
  .step { gap: .875rem; }
}

@media (max-width: 480px) {
  .site-header { padding: 0 .875rem; }
  .header-logo .logo-text { font-size: .95rem; }
  .header-cta { display: none; } /* hide CTA on very small phones, sidebar has it */
  .page-main { padding: 1rem .75rem; }
  .hero-badge { font-size: .72rem; padding: .3rem .7rem; }
  .tab-btn { font-size: .73rem; padding: .4rem .6rem; }
  .accordion-btn { font-size: .84rem; padding: .875rem 1rem; }
}
