/* ============================================================
 * fitoterapia.css — Fitoterapia China para cultivate.com.ar
 * Adaptado al sistema de diseño de CULTIVATE
 * Basado en la obra de Colonques Garrido & Moltó Ripoll
 * ============================================================ */

:root {
  --bg: var(--color-bg, #F8F9F5);
  --bg2: #f0ebe4;
  --surface: #ffffff;
  --card: #faf8f5;
  --card-hover: #f0ebe4;
  --border: #d4cdc2;
  --border-light: #e5ddd2;
  --green-deep: var(--color-leaf-dark, #435E4E);
  --green: var(--color-leaf-dark, #435E4E);
  --green-mid: var(--color-leaf-light, #7E9E8B);
  --green-light: #95d5b2;
  --green-pale: #c8e0d0;
  --gold: var(--color-gold, #D4AF37);
  --gold-light: var(--color-gold-light, #F3E5AB);
  --earth: var(--color-earth, #8C6A50);
  --earth-light: #a0764a;
  --warm: #c4723a;
  --red: #a43333;
  --text: #333333;
  --text2: #666666;
  --text3: #8a7d6a;
  --font: 'Playfair Display', 'Georgia', serif;
  --font-sans: 'Outfit', system-ui, -apple-system, sans-serif;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

/* ── TOP BAR ── */
.topbar {
  background: var(--green-deep);
  color: #fff;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--gold);
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 8px;
}
.topbar .brand {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 800;
  color: var(--gold-light);
  text-decoration: none;
  letter-spacing: -0.3px;
  margin-right: 20px;
}
.topbar .brand span {
  color: #fff;
  font-weight: 400;
  font-size: 12px;
  opacity: 0.6;
  margin-left: 4px;
}
.topbar a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 13px;
  font-family: var(--font-sans);
  padding: 4px 10px;
  border-radius: 4px;
  transition: all 0.15s;
}
.topbar a:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}
.topbar a.active {
  color: var(--gold-light);
  font-weight: 600;
}
.topbar .nav-spacer {
  flex: 1;
}
.topbar .cultivate-link {
  font-size: 11px;
  padding: 3px 10px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 15px;
  color: rgba(255,255,255,0.6);
}

/* ── PAGE HEADER ── */
.page-header {
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green) 50%, var(--green-mid) 100%);
  color: #fff;
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
}
.page-header h1 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.page-header .subtitle {
  font-size: 1rem;
  opacity: 0.8;
  font-family: var(--font-sans);
  font-weight: 300;
}
.page-header .meta {
  font-size: 0.82rem;
  opacity: 0.6;
  margin-top: 8px;
  font-family: var(--font-sans);
}

/* ── CONTAINER ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ── SECTION TITLE ── */
.section-title {
  font-size: 1.5rem;
  color: var(--green-deep);
  margin: 2rem 0 1rem;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green-pale);
  font-weight: 700;
}
.section-title .badge {
  font-size: 0.7rem;
  font-family: var(--font-sans);
  background: var(--green-pale);
  color: var(--green-deep);
  padding: 2px 8px;
  border-radius: 10px;
  vertical-align: middle;
  margin-left: 8px;
  font-weight: 600;
}

/* ── CARD GRID ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 1rem 0 2rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}
.card:hover {
  border-color: var(--green-mid);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.card-body { padding: 18px; }
.card-body h3 {
  font-size: 1.1rem;
  color: var(--green);
  margin-bottom: 6px;
}
.card-body h3 a {
  color: var(--green);
  text-decoration: none;
}
.card-body h3 a:hover { color: var(--green-mid); text-decoration: underline; }
.card-body .sciname {
  font-style: italic;
  color: var(--text3);
  font-size: 0.85rem;
  margin-bottom: 6px;
}
.card-body .chinese-name {
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
}
.card-body .desc {
  color: var(--text2);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-top: 8px;
}
.card-body .tags { margin-top: 8px; }
.tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 8px;
  margin: 2px;
  font-weight: 500;
}
.tag-green { background: #e8f5e9; color: var(--green); }
.tag-gold { background: #fef9e7; color: var(--gold); }
.tag-red { background: #fde8e8; color: var(--red); }
.tag-blue { background: #e3f2fd; color: #1565c0; }
.tag-purple { background: #f3e5f5; color: #7b1fa2; }

/* ── CATEGORY BANNER ── */
.cat-banner {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 1rem 0;
  border-left: 4px solid var(--green-light);
}
.cat-banner h2 {
  font-size: 1.2rem;
  color: var(--green-deep);
  margin-bottom: 4px;
}
.cat-banner p {
  font-size: 0.9rem;
  color: var(--text2);
}

/* ── MONOGRAPH LAYOUT ── */
.monograph {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 30px;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
}
.monograph-header {
  border-bottom: 2px solid var(--green-pale);
  padding-bottom: 16px;
  margin-bottom: 20px;
}
.monograph-header h1 {
  font-size: 1.8rem;
  color: var(--green-deep);
}
.monograph-header .subhead {
  font-size: 0.95rem;
  color: var(--text3);
  margin-top: 4px;
}
.monograph-section {
  margin-bottom: 22px;
}
.monograph-section h2 {
  font-size: 1.05rem;
  color: var(--green);
  margin-bottom: 8px;
  font-weight: 700;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-light);
}
.monograph-section p, .monograph-section li {
  font-size: 0.92rem;
  color: var(--text2);
  line-height: 1.7;
}
.monograph-section ul {
  list-style: none;
  padding: 0;
}
.monograph-section ul li {
  padding: 3px 0 3px 18px;
  position: relative;
}
.monograph-section ul li::before {
  content: '•';
  position: absolute;
  left: 4px;
  color: var(--green-light);
  font-weight: bold;
}

/* Propiedades grid */
.prop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin: 10px 0;
}
.prop-item {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
}
.prop-item .label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.prop-item .value {
  font-size: 1rem;
  color: var(--green-deep);
  font-weight: 700;
  margin-top: 4px;
}

/* ── THEORY PAGES ── */
.theory-section {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  margin: 1.2rem 0;
  box-shadow: var(--shadow);
}
.theory-section h2 {
  color: var(--green-deep);
  font-size: 1.3rem;
  margin-bottom: 10px;
}
.theory-section h3 {
  color: var(--green);
  font-size: 1.05rem;
  margin: 14px 0 6px;
}
.theory-section p {
  color: var(--text2);
  font-size: 0.95rem;
  line-height: 1.7;
}
.theory-section ul {
  list-style: none;
  padding: 0;
}
.theory-section ul li {
  padding: 4px 0 4px 20px;
  position: relative;
  color: var(--text2);
  font-size: 0.92rem;
}
.theory-section ul li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--gold-light);
  font-size: 0.7rem;
}

/* ── BADGES ── */
.nature-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
}
.nature-hot { background: #fce4ec; color: #c62828; }
.nature-warm { background: #fff3e0; color: #e65100; }
.nature-neutral { background: #f5f5f5; color: #424242; }
.nature-cool { background: #e3f2fd; color: #1565c0; }
.nature-cold { background: #e8eaf6; color: #283593; }

.flavor-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  margin: 1px;
}
.flavor-sour { background: #fce4ec; color: #ad1457; }
.flavor-bitter { background: #e8f5e9; color: #2e7d32; }
.flavor-sweet { background: #fff8e1; color: #f57f17; }
.flavor-pungent { background: #fff3e0; color: #bf360c; }
.flavor-salty { background: #e0f7fa; color: #00695c; }

/* ── TABLE OF CONTENTS ── */
.toc {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 1.5rem 0;
}
.toc h3 {
  font-size: 1rem;
  color: var(--green-deep);
  margin-bottom: 8px;
}
.toc ol {
  list-style: none;
  counter-reset: toc-counter;
  padding: 0;
}
.toc ol li {
  counter-increment: toc-counter;
  padding: 4px 0;
  font-size: 0.9rem;
}
.toc ol li::before {
  content: counter(toc-counter) '.';
  color: var(--green-light);
  font-weight: 700;
  margin-right: 8px;
  font-family: var(--font-sans);
}
.toc ol li a {
  color: var(--text2);
  text-decoration: none;
}
.toc ol li a:hover {
  color: var(--green);
  text-decoration: underline;
}
.toc ol li ul {
  list-style: none;
  padding-left: 24px;
}
.toc ol li ul li {
  counter-increment: none;
  font-size: 0.85rem;
}
.toc ol li ul li::before {
  content: '–';
  color: var(--text3);
  font-weight: 400;
  margin-right: 6px;
}

/* ── BREADCRUMB ── */
.breadcrumb {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text3);
  padding: 12px 0;
  max-width: 1200px;
  margin: 0 auto;
}
.breadcrumb a {
  color: var(--green);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 6px; color: var(--text3); }

/* ── SEARCH ── */
.search-box {
  margin: 1rem 0;
}
.search-box input {
  width: 100%;
  max-width: 400px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border 0.2s;
}
.search-box input:focus {
  border-color: var(--green-mid);
}

/* ── FOOTER ── */
.footer {
  background: var(--green-deep);
  color: rgba(255,255,255,0.7);
  padding: 2rem;
  margin-top: 3rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  text-align: center;
}
.footer a {
  color: var(--gold-light);
  text-decoration: none;
}
.footer .footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .topbar-inner { flex-wrap: wrap; height: auto; padding: 8px 16px; gap: 4px; }
  .topbar .brand { font-size: 16px; margin-right: 8px; }
  .topbar a { font-size: 12px; padding: 3px 7px; }
  .page-header h1 { font-size: 1.6rem; }
  .monograph { padding: 18px; }
  .card-grid { grid-template-columns: 1fr; }
  .prop-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .prop-grid { grid-template-columns: 1fr; }
  .topbar .brand { font-size: 14px; }
}
