/* MoguWind Blog — estilos comunes para index.html, cada artículo y el
 * footer. Hereda la paleta de la suite landing para que los tres
 * espacios (moguwind.com, /blog, plan.moguwind.com) se sientan del
 * mismo producto. */

:root {
  --green-500: #10b981;
  --green-600: #059669;
  --green-700: #047857;
  --ink:    #1a1a2e;
  --ink-2:  #374151;
  --muted:  #6b7280;
  --soft:   #9ca3af;
  --line:   #e5e7eb;
  --bg:     #ffffff;
  --bg-alt: #f8fafc;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow:    0 6px 24px rgba(0,0,0,0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }

/* === Nav común === */
.blog-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.blog-nav-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.blog-brand img { height: 28px; display: block; }
.blog-nav-links {
  display: flex; gap: 18px;
  font-size: 0.92rem; font-weight: 600;
  color: var(--ink-2);
}
.blog-nav-links a:hover { color: var(--green-700); }
@media (max-width: 540px) {
  .blog-nav-links { gap: 14px; font-size: 0.84rem; }
  .blog-brand img { height: 24px; }
}

/* === Listado (index.html del blog) === */
.blog-list {
  max-width: 920px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}
.blog-list-hero { margin-bottom: 40px; }
.blog-eyebrow {
  display: inline-block;
  font-size: 0.78rem; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--green-700);
  background: var(--green-50, #ecfdf5);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.blog-list-hero h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 12px;
}
.blog-lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 600px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.post-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--green-500);
}
.post-card-cover {
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-alt);
}
.post-card-cover--empty {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}
.post-card-body { padding: 18px 20px 20px; }
.post-card-body time {
  font-size: 0.78rem;
  color: var(--soft);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.post-card-body h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin: 6px 0 8px;
  line-height: 1.3;
}
.post-card-body p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}
.blog-empty {
  color: var(--muted);
  font-style: italic;
  padding: 48px 0;
  text-align: center;
}

/* === Artículo individual === */
.post {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.post-header { margin-bottom: 32px; }
.post-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.post-meta time { font-weight: 600; }
.post-meta .dot { margin: 0 8px; }
.post-header h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}
.post-header .post-lead {
  font-size: 1.1rem;
  color: var(--ink-2);
  line-height: 1.55;
}
.post-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  margin: 12px 0 36px;
  background: var(--bg-alt);
}

/* Cuerpo del artículo: tipografía editorial cómoda de leer en bloques
 * largos. Anchura limitada y line-height generoso. */
.post-body { font-size: 1.05rem; }
.post-body p,
.post-body ul,
.post-body ol,
.post-body blockquote,
.post-body figure,
.post-body pre,
.post-body table { margin: 0 0 18px; }
.post-body h2 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 40px 0 14px;
  line-height: 1.25;
}
.post-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 28px 0 10px;
  line-height: 1.3;
}
.post-body p { line-height: 1.7; }
.post-body a {
  color: var(--green-700);
  border-bottom: 1px solid color-mix(in srgb, var(--green-700) 30%, transparent);
  transition: border-color 0.15s;
}
.post-body a:hover { border-bottom-color: var(--green-700); }
.post-body ul, .post-body ol { padding-left: 22px; }
.post-body li { margin-bottom: 6px; line-height: 1.6; }
.post-body strong { color: var(--ink); font-weight: 700; }
.post-body em { font-style: italic; }
.post-body blockquote {
  border-left: 3px solid var(--green-500);
  padding: 4px 18px;
  color: var(--ink-2);
  font-style: italic;
}
.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  margin: 8px 0;
}
.post-body figure { text-align: center; }
.post-body figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 6px;
}
.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
}
.post-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 32px 0;
}

/* Bloque de referencias al final del artículo. El agente puede usarlo
 * para citar papers / fuentes, igual que en /como-funciona del planner. */
.post-references {
  margin-top: 40px;
  padding: 18px 20px;
  background: var(--bg-alt);
  border-radius: 12px;
  font-size: 0.88rem;
}
.post-references h3 {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
}
.post-references ol { padding-left: 22px; }
.post-references li { margin-bottom: 8px; color: var(--ink-2); }
.post-references li a { color: var(--green-700); }

/* === CTA block — botón de conversión al planificador === */
.cta-block {
  margin: 40px 0;
  padding: 28px 24px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: center;
}
.cta-block p {
  font-size: 1rem;
  color: var(--ink-2);
  margin-bottom: 16px !important;
}
.cta-btn {
  display: inline-block;
  background: var(--green-500);
  color: #fff !important;
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 28px;
  border-radius: 10px;
  border-bottom: none !important;
  transition: background 0.15s, transform 0.12s;
  letter-spacing: -0.01em;
}
.cta-btn:hover {
  background: var(--green-600);
  transform: translateY(-1px);
  border-bottom: none !important;
}

/* Volver al listado */
.post-back {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}
.post-back:hover { color: var(--ink); }

/* === Footer común === */
.blog-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  padding: 28px 0;
  margin-top: 60px;
}
.blog-footer-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 12px;
}
.blog-footer a { color: var(--green-700); font-weight: 600; }
.blog-footer a:hover { color: var(--green-600); }
