/* ============================================================
   Receta Kombucha - Hoja de estilos global
   Clon de arquitectura tipo recetakefir.com
   ============================================================ */

:root {
  --color-primary: #b8860b;      /* dorado kombucha (ámbar) */
  --color-primary-dark: #8a6508;
  --color-accent: #c9772f;       /* naranja té */
  --color-bg: #fffdf8;
  --color-bg-soft: #fdf6e9;
  --color-text: #2b2b2b;
  --color-muted: #6b6b6b;
  --color-border: #ece3d2;
  --color-white: #ffffff;
  --color-dark: #2a2218;
  --max-width: 1140px;
  --radius: 12px;
  --shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Georgia", "Times New Roman", serif;
}

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

html { scroll-behavior: smooth; }

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

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--color-dark);
  color: #f3ead6;
  font-size: 13px;
  text-align: center;
  padding: 7px 0;
  letter-spacing: .3px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.logo {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo .logo-img { height: 40px; width: auto; display: block; }
@media (max-width: 600px) { .logo .logo-img { height: 34px; } }
.logo .logo-mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: inline-block;
}
.logo span.sub { color: var(--color-accent); }

/* Navegación principal */
/* Navegación principal (barra inferior, estilo web de referencia) */
.main-nav { display: flex; justify-content: center; border-top: 1px solid var(--color-border); background: var(--color-white); }
.main-nav > ul { list-style: none; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; max-width: var(--max-width); width: 100%; margin: 0 auto; padding: 2px 20px; justify-content: flex-start; }
.main-nav > ul > li { position: relative; }
.main-nav a {
  display: block;
  padding: 10px 14px;
  color: var(--color-dark);
  font-weight: 600;
  font-size: 15px;
  border-radius: 8px;
}
.main-nav a:hover { background: var(--color-bg-soft); text-decoration: none; color: var(--color-primary-dark); }

/* Desplegables */
.has-dropdown > a::after { content: " ▾"; font-size: 11px; color: var(--color-muted); }
.dropdown {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-white);
  min-width: 240px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .18s ease;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { font-weight: 500; font-size: 14px; padding: 9px 12px; }

/* Toggle móvil */
.nav-toggle { display: none; background: none; border: 0; font-size: 26px; cursor: pointer; color: var(--color-dark); }
.nav-checkbox { display: none; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--color-bg-soft), #fbeccd);
  padding: 56px 0;
  text-align: center;
}
.hero h1 {
  font-family: var(--font-head);
  font-size: 40px;
  line-height: 1.2;
  color: var(--color-dark);
  max-width: 880px;
  margin: 0 auto 16px;
}
.hero p { font-size: 19px; color: var(--color-muted); max-width: 720px; margin: 0 auto 24px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: 13px 26px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 16px;
  transition: background .15s ease;
}
.btn:hover { background: var(--color-primary-dark); text-decoration: none; color:#fff; }
.btn-amazon { background: #ff9900; color:#111; }
.btn-amazon:hover { background: #e88a00; color:#111; }

/* ---------- Layout contenido ---------- */
.page-wrap { padding: 40px 0 60px; }
.breadcrumbs { font-size: 13px; color: var(--color-muted); margin-bottom: 22px; }
.breadcrumbs a { color: var(--color-muted); }
.breadcrumbs span { color: var(--color-primary-dark); }

.content-layout { display: grid; grid-template-columns: 1fr 320px; gap: 44px; align-items: start; }
@media (max-width: 900px) { .content-layout { grid-template-columns: 1fr; } }

article.post h1 {
  font-family: var(--font-head);
  font-size: 34px;
  line-height: 1.25;
  color: var(--color-dark);
  margin-bottom: 18px;
}
article.post h2 {
  font-family: var(--font-head);
  font-size: 26px;
  color: var(--color-primary-dark);
  margin: 34px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-border);
}
article.post h3 { font-size: 21px; color: var(--color-dark); margin: 24px 0 10px; }
article.post p { margin-bottom: 16px; }
article.post ul, article.post ol { margin: 0 0 18px 22px; }
article.post li { margin-bottom: 8px; }
.lead { font-size: 19px; color: #444; }

.gallery-title {
  font-family: var(--font-head);
  font-size: 20px; font-weight: 700; color: var(--color-primary-dark);
  margin: 6px 0 14px;
}
.topic-gallery { margin-bottom: 30px; }

/* Vídeo de YouTube responsive (16:9) */
.video-embed { position: relative; width: 100%; padding-top: 56.25%; margin: 26px 0; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* Imagen destacada (foto real, a tamaño natural sin recortes) */
.featured-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 460px;
  margin: 0 auto 26px;
  border-radius: var(--radius);
}
@media (max-width: 600px) { .featured-img { max-height: 320px; } }

/* Imagen intercalada en el cuerpo */
figure.inline-photo { margin: 26px 0; }
figure.inline-photo img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}
figure.inline-photo figcaption {
  font-size: 13px;
  color: var(--color-muted);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

.amazon-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* Banner de consentimiento de cookies (RGPD) */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000;
  max-width: 920px; margin: 0 auto;
  background: var(--color-dark); color: #f3efe6;
  border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.28);
  padding: 16px 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
}
.cookie-text { font-size: 14px; line-height: 1.5; flex: 1 1 320px; margin: 0; }
.cookie-text a { color: #f0c869; text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; margin-left: auto; }
.cookie-btn { cursor: pointer; border: 0; border-radius: 7px; padding: 9px 18px; font-size: 14px; font-weight: 600; }
.cookie-accept { background: var(--color-primary); color: #fff; }
.cookie-accept:hover { background: var(--color-primary-dark); }
.cookie-reject { background: transparent; color: #f3efe6; border: 1px solid rgba(243,239,230,.5); }
.cookie-reject:hover { background: rgba(255,255,255,.08); }
@media (max-width: 600px) { .cookie-actions { width: 100%; } .cookie-btn { flex: 1; } }

/* Botones de compartir en redes */
.share {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 30px 0 10px; padding: 16px 18px;
  background: var(--color-bg-soft); border: 1px solid var(--color-border);
  border-radius: 10px;
}
.share-label { font-weight: 700; color: var(--color-primary-dark); margin-right: 4px; }
.share-btn {
  display: inline-block; color: #fff; font-size: 13px; font-weight: 600;
  padding: 7px 13px; border-radius: 6px; line-height: 1;
}
.share-btn:hover { opacity: .88; text-decoration: none; color: #fff; }
.share-btn.wa { background: #25d366; }
.share-btn.fb { background: #1877f2; }
.share-btn.tw { background: #111827; }
.share-btn.tg { background: #29a9eb; }
.share-btn.mail { background: #6b7280; }
@media (max-width: 600px) { .share-label { width: 100%; margin-bottom: 4px; } }
nav.toc {
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-left: 5px solid var(--color-primary);
  border-radius: 8px;
  padding: 18px 22px;
  margin: 22px 0 28px;
}
nav.toc .toc-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  color: var(--color-primary-dark);
  margin-bottom: 10px;
}
nav.toc ol { margin: 0 0 0 20px; }
nav.toc li { margin-bottom: 6px; }
nav.toc a { color: var(--color-text); }
nav.toc a:hover { color: var(--color-primary-dark); text-decoration: underline; }
article.post h2 { scroll-margin-top: 130px; }

/* Cajas de info */
.callout {
  background: var(--color-bg-soft);
  border-left: 5px solid var(--color-primary);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 22px 0;
}
.callout.warn { border-left-color: #d9534f; background: #fdf0ef; }
.callout strong { color: var(--color-primary-dark); }

/* Tarjeta de receta */
.recipe-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--color-white);
  box-shadow: var(--shadow);
  margin: 26px 0;
}
.recipe-meta { display: flex; flex-wrap: wrap; gap: 18px; margin: 14px 0 18px; font-size: 14px; }
.recipe-meta span { background: var(--color-bg-soft); padding: 6px 12px; border-radius: 50px; font-weight: 600; }

/* Tabla */
table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 15px; }
th, td { border: 1px solid var(--color-border); padding: 10px 12px; text-align: left; }
th { background: var(--color-bg-soft); }

/* ---------- Sidebar ---------- */
.sidebar .widget {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.sidebar .widget h3 {
  font-family: var(--font-head);
  font-size: 19px;
  margin-bottom: 14px;
  color: var(--color-primary-dark);
}
.sidebar ul { list-style: none; }
.sidebar li { border-bottom: 1px dashed var(--color-border); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar li a { display: block; padding: 9px 0; font-size: 15px; color: var(--color-text); }
.sidebar li a:hover { color: var(--color-primary-dark); }

/* ---------- Grid de tarjetas (índices de silo) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin-top: 10px; }
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(0,0,0,.12); }
.card .thumb {
  height: 160px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-head); font-size: 18px; text-align: center; padding: 0;
  overflow: hidden;
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.card .card-body h3 { font-size: 18px; margin-bottom: 8px; line-height: 1.3; }
.card .card-body p { font-size: 14px; color: var(--color-muted); margin-bottom: 14px; flex: 1; }
.card .card-body a.more { font-weight: 700; font-size: 14px; color: var(--color-primary-dark); }

/* ---------- Secciones home ---------- */
.section { padding: 14px 0; }
.section h2 {
  font-family: var(--font-head);
  font-size: 30px;
  color: var(--color-dark);
  margin: 34px 0 10px;
}
.section > p { color: #444; max-width: 820px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-dark);
  color: #d9cdb6;
  padding: 48px 0 24px;
  margin-top: 50px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }
.site-footer h4 { color: #fff; font-family: var(--font-head); font-size: 18px; margin-bottom: 14px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #d9cdb6; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 34px; padding-top: 18px;
  text-align: center; font-size: 13px; color: #9a8e76;
}

/* ---------- Responsive nav ---------- */
@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--color-border);
    flex-direction: column; display: none; padding: 10px 16px 18px;
    box-shadow: var(--shadow);
  }
  .nav-checkbox:checked ~ .main-nav { display: flex; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-left: 2px solid var(--color-border);
    margin: 0 0 6px 14px; padding: 0;
  }
  .has-dropdown > a::after { content: " +"; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 30px; }
  article.post h1 { font-size: 27px; }
}


/* ---------- FAQ ---------- */
.faq { margin-top: 30px; }
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 14px;
  background: var(--color-white);
}
.faq-item h3 { font-size: 18px; color: var(--color-primary-dark); margin: 0 0 6px; }
.faq-item p { margin: 0; color: #444; }
