/* ══════════════════════════════════════════════════
   BLOG CSS — Independiente de la landing
   Estilos propios para /blog/ y artículos
   ══════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ── */
:root {
  --bg:        #FFFFFF;
  --bg-2:      #F4F8F6;
  --surface:   #FFFFFF;
  --surface-2: #EAF2EE;
  --green:     #2A7A5C;
  --green-mid: #359970;
  --green-l:   #1E6B4F;
  --border:    rgba(0,0,0,.09);
  --border-2:  rgba(0,0,0,.04);
  --text:      #0D1F18;
  --muted:     #4A7A6A;
  --dim:       #9AB8AE;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

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

/* ══════════════════════════════════════════════════
   NAV
   ══════════════════════════════════════════════════ */
.blog-nav {
  position: sticky; top: 0; z-index: 100;
  height: 64px; padding: 0 56px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.blog-nav-logo img { height: 28px; }
.blog-nav-links { display: flex; align-items: center; gap: 24px; }
.blog-nav-back {
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .2s;
}
.blog-nav-back:hover { color: var(--text); }
.blog-nav-cta {
  display: inline-flex; align-items: center;
  padding: 10px 20px; border-radius: 7px;
  background: var(--green); color: white;
  font-size: 13.5px; font-weight: 600;
  transition: background .2s;
}
.blog-nav-cta:hover { background: var(--green-mid); }

/* ══════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════ */
.blog-hero {
  padding: 80px 0 64px;
  text-align: center;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.blog-hero h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(36px, 5vw, 56px);
  font-style: italic;
  line-height: 1.08;
  letter-spacing: -2px;
  color: var(--text);
  margin-bottom: 16px;
}
.blog-hero h1 em { color: var(--green-l); }
.blog-hero p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ══════════════════════════════════════════════════
   ARTICLE GRID
   ══════════════════════════════════════════════════ */
.blog-grid-section { padding: 72px 0; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ── CARD ── */
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow .2s, transform .15s;
}
.blog-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.08);
  transform: translateY(-2px);
}
.blog-card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}
.blog-card-body { padding: 24px; }
.blog-card-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .3px; text-transform: uppercase;
  margin-bottom: 12px;
}
.blog-card-tag--normativa {
  background: rgba(42,122,92,.08);
  color: var(--green-l);
}
.blog-card-tag--gestion {
  background: rgba(184,111,32,.08);
  color: var(--amber, #B86F20);
}
.blog-card-tag--comparativa {
  background: rgba(59,100,180,.08);
  color: #3B64B4;
}
.blog-card h2 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.3px;
  margin-bottom: 8px;
}
.blog-card-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--green-l);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap .2s;
}
.blog-card:hover .blog-card-link { gap: 8px; }

/* ══════════════════════════════════════════════════
   ARTICLE PAGE
   ══════════════════════════════════════════════════ */

/* Header image — small rounded below title */
.article-header-img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 12px;
  margin-top: 32px;
  aspect-ratio: 8 / 3;
}

/* Header */
.article-header {
  padding: 56px 0 0;
  max-width: 720px;
  margin: 0 auto;
}
.article-meta {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px; flex-wrap: wrap;
}
.article-meta time {
  font-size: 13px; color: var(--muted);
}
.article-reading {
  font-size: 13px; color: var(--dim);
}
.article-author {
  font-size: 13px; color: var(--muted);
}
.article-author a {
  color: var(--green-l); font-weight: 600;
  text-decoration: underline; text-underline-offset: 2px;
  transition: color .2s;
}
.article-author a:hover { color: var(--green-mid); }
.article-header h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(30px, 4vw, 44px);
  font-style: italic;
  line-height: 1.14;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}
.article-header h1 em { color: var(--green-l); }
.article-subtitle {
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 0;
}

/* Content */
.article-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 64px 0 96px;
}
.article-content h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(22px, 2.5vw, 30px);
  font-style: italic;
  line-height: 1.15;
  letter-spacing: -1px;
  margin: 80px 0 28px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.article-content h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.article-content h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.3px;
  margin: 48px 0 16px;
}
.article-content p {
  font-size: 17px;
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 36px;
}
.article-content ul,
.article-content ol {
  margin: 0 0 40px 24px;
  font-size: 17px;
  line-height: 1.9;
}
.article-content li { margin-bottom: 14px; }
.article-content li strong { color: var(--text); }
.article-content strong { font-weight: 700; }
.article-content a {
  color: var(--green-l);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-content a:hover { color: var(--green-mid); }
.article-content blockquote {
  margin: 48px 0;
  padding: 28px 32px;
  border-left: 3px solid var(--green);
  background: var(--bg-2);
  border-radius: 0 10px 10px 0;
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--muted);
}
.article-content blockquote strong { color: var(--text); }

/* Subtle product mention — replaces heavy CTA */
.article-tip {
  margin: 56px 0;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-left: 3px solid var(--green);
  background: var(--bg-2);
  border-radius: 0 10px 10px 0;
}
.article-tip-img {
  width: 56px; height: 56px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.article-tip p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}
.article-tip strong { color: var(--text); }
.article-tip a {
  color: var(--green-l);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.article-tip a:hover { text-decoration: underline; }

/* Comparison table */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 36px 0 48px;
  font-size: 14px;
  table-layout: fixed;
}
.article-content thead { background: var(--bg-2); }
.article-content th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
}
.article-content td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.article-content tr:last-child td { border-bottom: none; }
.article-content tbody tr:hover { background: var(--bg-2); }

/* Back to blog link */
.article-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--green-l);
  margin-bottom: 32px;
  transition: gap .2s;
}
.article-back:hover { gap: 10px; text-decoration: none; }

/* ══════════════════════════════════════════════════
   CTA BAND
   ══════════════════════════════════════════════════ */
.blog-cta {
  padding: 96px 0;
  text-align: center;
  background: #0C1610;
  color: #EEF5F2;
  position: relative;
  overflow: hidden;
}
.blog-cta::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(78,122,107,.1) 0%, transparent 70%);
}
.blog-cta h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
  position: relative;
}
.blog-cta h2 em { font-style: italic; color: #72B09A; }
.blog-cta > .container > p {
  font-size: 16px;
  color: #7A9E94;
  margin-bottom: 36px;
  position: relative;
}
.blog-cta-btn {
  display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 15px 30px; border-radius: 8px;
  background: var(--green); color: white;
  font-size: 15px; font-weight: 700; font-family: inherit;
  border: none; cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 24px rgba(78,122,107,.25);
  position: relative;
}
.blog-cta-btn:hover {
  background: var(--green-mid);
  transform: translateY(-1px);
  box-shadow: 0 8px 36px rgba(78,122,107,.3);
}
.blog-cta-btn .btn-sub {
  font-size: 11px; font-weight: 400; opacity: .75; letter-spacing: .2px;
}
.blog-cta-micro {
  font-size: 13px; color: #3D5C52; margin-top: 14px; position: relative;
}

/* ══════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════ */
.blog-footer {
  background: #0C1610;
  border-top: none;
  padding: 64px 0 36px;
}
.ft-top {
  display: grid; grid-template-columns: 1.5fr 2fr;
  gap: 80px; margin-bottom: 52px;
}
.ft-brand img {
  height: 30px; margin-bottom: 16px; display: block;
  filter: brightness(0) invert(1);
}
.ft-brand p { font-size: 13.5px; line-height: 1.7; color: #A3C4B9; max-width: 280px; }
.ft-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.ft-col h4, .ft-col .ft-heading {
  font-size: 11.5px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: #A3C4B9; margin-bottom: 16px;
}
.ft-col a {
  display: block; font-size: 14px; color: #8FB3A6;
  text-decoration: none; margin-bottom: 10px; transition: color .2s;
}
.ft-col a:hover { color: #EEF5F2; }
.ft-bot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px; border-top: 1px solid rgba(114,176,154,.1);
  font-size: 12.5px; color: #8FB3A6;
}

/* ══════════════════════════════════════════════════
   COOKIE BANNER
   ══════════════════════════════════════════════════ */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #FFF; border-top: 1px solid var(--border);
  padding: 16px 32px;
  display: flex; align-items: center; gap: 16px;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform .3s ease;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner p { font-size: 14px; color: var(--muted); line-height: 1.5; flex: 1; margin: 0; }
.cookie-banner p a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
.cookie-btns { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-btn {
  padding: 8px 20px; border-radius: 6px;
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; border: none; transition: background .2s;
}
.cookie-btn.accept { background: var(--green); color: #FFF; }
.cookie-btn.accept:hover { background: var(--green-mid); }
.cookie-btn.reject { background: var(--bg-2); color: var(--muted); border: 1px solid var(--border); }

/* ══════════════════════════════════════════════════
   RESPONSIVE — TABLET (≤ 1024px)
   ══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .container { padding: 0 32px; }
  .blog-nav { padding: 0 32px; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .article-header, .article-content { padding-left: 32px; padding-right: 32px; }
  .ft-top { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .ft-brand { display: flex; flex-direction: column; align-items: center; }
  .ft-brand p { max-width: 400px; }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 768px)
   ══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .blog-nav { padding: 0 20px; }
  .blog-hero { padding: 56px 0 48px; }
  .blog-hero h1 { font-size: 32px; letter-spacing: -1px; }
  .blog-hero p { font-size: 15px; }
  .blog-grid-section { padding: 48px 0; }
  .blog-grid { grid-template-columns: 1fr; gap: 20px; }
  .blog-card-body { padding: 20px; }
  .article-header { padding: 40px 20px 0; }
  .article-header h1 { font-size: 28px; letter-spacing: -1px; }
  .article-header-img { max-height: 220px; margin-top: 24px; }
  .article-subtitle { font-size: 16px; }
  .article-content { padding: 36px 20px 48px; }
  .article-content h2 { font-size: 22px; margin-top: 40px; }
  .article-content h3 { font-size: 16px; }
  .article-content p { font-size: 16px; line-height: 1.8; margin-bottom: 20px; }
  .article-tip { flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px 20px; }
  .article-content table { font-size: 13px; }
  .article-content th, .article-content td { padding: 10px 12px; }
  .blog-cta { padding: 64px 0; }
  .blog-cta h2 { font-size: 28px; letter-spacing: -1px; }
  .blog-footer { padding: 48px 0 28px; }
  .ft-top { grid-template-columns: 1fr; gap: 32px; }
  .ft-cols { grid-template-columns: 1fr 1fr; gap: 24px; }
  .ft-bot { flex-direction: column; gap: 8px; text-align: center; }
  .cookie-banner { flex-direction: column; padding: 16px 20px; }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE (≤ 480px)
   ══════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .blog-nav { padding: 0 16px; }
  .blog-nav-back span { display: none; }
  .blog-hero { padding: 44px 0 36px; }
  .blog-hero h1 { font-size: 26px; letter-spacing: -.8px; }
  .blog-hero p { font-size: 14px; }
  .blog-grid-section { padding: 36px 0; }
  .blog-card h2 { font-size: 16px; }
  .article-header h1 { font-size: 24px; letter-spacing: -.8px; }
  .article-header-img { max-height: 180px; border-radius: 10px; }
  .article-content p, .article-content ul, .article-content ol { font-size: 15px; }
  .blog-cta { padding: 48px 0; }
  .blog-cta h2 { font-size: 24px; letter-spacing: -.8px; }
  .blog-cta > .container > p { font-size: 14px; }
  .ft-cols { grid-template-columns: 1fr; gap: 20px; }
}

/* ══════════════════════════════════════════════════
   STICKY BAR — Bottom CTA for articles
   ══════════════════════════════════════════════════ */
.sticky-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #0C1610;
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  z-index: 999;
  transform: translateY(100%);
  transition: transform .35s ease;
}
.sticky-bar.visible { transform: translateY(0); }
.sticky-bar-text {
  font-size: 14px; color: #A3C4B9; margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sticky-bar-text strong { color: #EEF5F2; }
.sticky-bar-cta {
  display: inline-flex; align-items: center;
  padding: 9px 20px; border-radius: 6px;
  background: var(--green); color: #FFF;
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  text-decoration: none; white-space: nowrap;
  transition: background .2s;
  flex-shrink: 0;
}
.sticky-bar-cta:hover { background: var(--green-mid); color: #FFF; }
.sticky-bar-close {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #5A8A7A; cursor: pointer;
  font-size: 18px; line-height: 1; padding: 4px 8px;
}
.sticky-bar-close:hover { color: #EEF5F2; }

@media (max-width: 768px) {
  .sticky-bar { padding: 10px 16px; gap: 10px; }
  .sticky-bar-text { font-size: 12.5px; }
  .sticky-bar-cta { padding: 8px 16px; font-size: 12.5px; }
}
