/* ══════════════════════════════════════════════════════
   PsicoAsistIA — Blog
   Reusa la paleta y tipografía de la landing (landing-v4.css)
   y añade lo necesario para lectura larga.
   ══════════════════════════════════════════════════════ */

:root {
  --ink:        #14201c;
  --ink-2:      #33403b;
  --muted:      #66736e;
  --paper:      #fafaf6;
  --paper-2:    #f1efe8;
  --line:       #ddd9cf;
  --line-soft:  #ebe7dd;
  --deep:       #0b1f1a;
  --deep-2:     #10312a;
  --accent:     #1f6b5e;
  --accent-2:   #133f37;
  --accent-tint:#e7f3ee;
  --cyan:       #22b8c8;
  --cyan-soft:  #dbf2f5;
  --mint:       #10b981;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --sans:    'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.65;
}
::selection { background: var(--cyan); color: #06272b; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

/* ─────────────── NAV ─────────────── */
.blog-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 31, 26, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.blog-nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px;
}
.blog-nav .logo img { height: 96px; width: auto; margin: -24px 0; display: block; filter: brightness(0) invert(1); }
.blog-nav-cta { display: flex; align-items: center; gap: 18px; }
.blog-nav-cta a.link { color: rgba(255,255,255,0.85); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.blog-nav-cta a.link:hover { color: #fff; }
.blog-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--cyan); color: #06272b;
  font-weight: 700; font-size: 14px; text-decoration: none;
  padding: 9px 16px; border-radius: 999px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.blog-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -10px rgba(34,184,200,0.6); }

/* ─────────────── ÍNDICE ─────────────── */
.blog-hero {
  background: var(--deep);
  color: #fff;
  padding: 84px 24px 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 50% -10%, rgba(34,184,200,0.18), transparent 60%),
    linear-gradient(180deg, transparent, rgba(0,0,0,0.25));
  pointer-events: none;
}
.blog-hero .eyebrow {
  position: relative;
  display: inline-block;
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 18px;
}
.blog-hero h1 {
  position: relative;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.05;
  margin: 0 auto 18px; max-width: 15ch;
}
.blog-hero p {
  position: relative;
  color: rgba(255,255,255,0.75);
  font-size: clamp(1rem, 2vw, 1.18rem);
  max-width: 52ch; margin: 0 auto;
}

.blog-list {
  max-width: 1100px; margin: 0 auto; padding: 64px 24px 96px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}
.post-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line-soft);
  border-radius: 18px; overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.post-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line-soft));
  box-shadow: 0 26px 54px -28px rgba(19,63,55,0.34);
}
.post-card-top {
  height: 132px;
  background: linear-gradient(135deg, var(--deep-2), var(--accent-2));
  display: flex; align-items: flex-end; padding: 16px 20px;
  position: relative;
}
.post-card-top .tag {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--cyan); background: rgba(34,184,200,0.12);
  border: 1px solid rgba(34,184,200,0.3);
  padding: 4px 11px; border-radius: 999px;
}
.post-card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card-body h2 { font-family: var(--display); font-weight: 700; font-size: 1.28rem; line-height: 1.22; margin: 0; }
.post-card-body p { color: var(--muted); font-size: 0.96rem; margin: 0; flex: 1; }
.post-card-meta { color: var(--accent); font-size: 0.86rem; font-weight: 600; margin-top: 6px; }

/* ─────────────── ARTÍCULO ─────────────── */
.article-wrap { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.article-head { padding: 56px 0 8px; }
.breadcrumb { font-size: 13.5px; color: var(--muted); margin-bottom: 22px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.article-tag {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-tint);
  padding: 5px 13px; border-radius: 999px; margin-bottom: 20px;
}
.article-head h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.9rem, 4.6vw, 2.9rem); line-height: 1.08;
  margin: 0 0 20px; letter-spacing: -0.01em;
}
.article-byline {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  margin-bottom: 8px;
}
.article-byline .avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-family: var(--display); font-size: 1.05rem;
}
.article-byline .who { font-size: 14.5px; line-height: 1.4; }
.article-byline .who strong { color: var(--ink); font-weight: 600; }
.article-byline .who span { color: var(--muted); }

/* Cuerpo del artículo */
.article-body { padding: 32px 0 8px; font-size: 1.09rem; color: var(--ink-2); }
.article-body > *:first-child { margin-top: 0; }
.article-body h2 {
  font-family: var(--display); font-weight: 700; color: var(--ink);
  font-size: 1.62rem; line-height: 1.2; margin: 48px 0 16px;
  scroll-margin-top: 84px;
}
.article-body h3 {
  font-family: var(--display); font-weight: 600; color: var(--ink);
  font-size: 1.24rem; margin: 32px 0 12px;
}
.article-body p { margin: 0 0 20px; }
.article-body ul, .article-body ol { margin: 0 0 22px; padding-left: 1.3em; }
.article-body li { margin-bottom: 10px; }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body a { font-weight: 500; }

/* Callout de resumen (arriba del artículo) */
.article-summary {
  background: var(--accent-tint);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-left: 4px solid var(--accent);
  border-radius: 12px; padding: 20px 22px; margin: 0 0 8px;
  font-size: 1.03rem; color: var(--ink-2);
}
.article-summary strong { color: var(--accent-2); }

/* CTA embebido al final */
.article-cta {
  margin: 48px 0 8px;
  background: var(--deep); color: #fff;
  border-radius: 20px; padding: 40px 34px; text-align: center;
  position: relative; overflow: hidden;
}
.article-cta::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 90% at 50% 0%, rgba(34,184,200,0.2), transparent 60%);
  pointer-events: none;
}
.article-cta h2, .article-cta h3 { position: relative; font-family: var(--display); font-weight: 700; font-size: 1.5rem; margin: 0 0 12px; color: #fff; }
.article-cta p { position: relative; color: rgba(255,255,255,0.78); margin: 0 auto 24px; max-width: 46ch; }
.article-cta .blog-btn { position: relative; font-size: 15px; padding: 12px 24px; }

.article-disclaimer {
  color: var(--muted); font-size: 0.9rem; font-style: italic;
  border-top: 1px solid var(--line-soft); padding: 24px 0 0; margin-top: 40px;
}

/* ─────────────── FOOTER ─────────────── */
.blog-footer {
  background: var(--deep); color: rgba(255,255,255,0.7);
  padding: 44px 24px; text-align: center; font-size: 14px;
  margin-top: 72px;
}
.blog-footer a { color: var(--cyan); text-decoration: none; }
.blog-footer .foot-links { margin-bottom: 14px; display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; }
.blog-footer .foot-links a { color: rgba(255,255,255,0.82); font-weight: 500; }

/* ─────────────── REVEAL ─────────────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .blog-nav .logo img { height: 80px; margin: -18px 0; }
  .blog-nav-cta .link { display: none; }
  .blog-list { padding: 40px 20px 72px; grid-template-columns: 1fr; }
  .article-head { padding: 40px 0 8px; }
  .article-cta { padding: 32px 22px; }
}
