/* ==========================================================================
   Criterio Financiero — hoja de estilos principal
   Paleta: azul marino institucional + dorado + crema editorial
   ========================================================================== */

:root {
  --navy-900: #071528;
  --navy-800: #0b1f3a;
  --navy-700: #13305a;
  --navy-600: #1d4577;
  --gold-500: #c9a227;
  --gold-400: #d9b84a;
  --gold-100: #f6edd0;
  --cream: #faf8f3;
  --paper: #ffffff;
  --ink: #16202e;
  --ink-soft: #4a5566;
  --ink-muted: #6b7686;
  --line: #e5e1d6;
  --green: #1f7a5a;
  --green-100: #e3f2ec;
  --red: #a83a32;
  --red-100: #f8e6e4;
  --blue-100: #e7eef8;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(11, 31, 58, .06), 0 2px 8px rgba(11, 31, 58, .05);
  --shadow: 0 10px 30px -12px rgba(11, 31, 58, .25);
  --max: 1200px;
  --prose: 720px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--navy-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy-800); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--navy-800);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}

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

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--navy-800); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; }

/* ---------- Barra superior / cabecera ---------- */

.topbar {
  background: var(--navy-900);
  color: #c7d1e0;
  font-size: 13px;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 36px; }
.topbar a { color: #e8edf5; text-decoration: none; }
.topbar a:hover { color: var(--gold-400); }

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy-800); }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
  display: grid; place-items: center; flex-shrink: 0;
}
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1; }
.brand-name span { color: var(--gold-500); }
.brand-tag { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); margin-top: 4px; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav a {
  display: block; padding: 10px 14px; border-radius: 8px;
  text-decoration: none; color: var(--ink); font-weight: 500; font-size: 15px;
}
.nav a:hover { background: var(--cream); color: var(--navy-800); }
.nav a[aria-current="page"] { color: var(--navy-800); box-shadow: inset 0 -2px 0 var(--gold-500); border-radius: 0; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 8px;
  width: 44px; height: 44px; cursor: pointer; color: var(--navy-800);
}

/* ---------- Botones y etiquetas ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; border: 0;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-gold { background: var(--gold-500); color: var(--navy-900); }
.btn-gold:hover { background: var(--gold-400); color: var(--navy-900); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.btn-ghost:hover { color: #fff; box-shadow: inset 0 0 0 1px #fff; }
.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-700); color: #fff; }

.tag {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--navy-700); background: var(--blue-100); padding: 5px 10px; border-radius: 999px; text-decoration: none;
}
.tag--gold { background: var(--gold-100); color: #7a5f0c; }
.tag--green { background: var(--green-100); color: var(--green); }

/* ---------- Hero portada ---------- */

.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(201,162,39,.22), transparent 60%),
    radial-gradient(800px 400px at -10% 110%, rgba(29,69,119,.6), transparent 60%),
    var(--navy-800);
  color: #dfe6f0;
  padding: 88px 0 96px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent);
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero-eyebrow { color: var(--gold-400); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; margin-bottom: 18px; }
.hero h1 { color: #fff; font-size: clamp(36px, 5vw, 58px); font-weight: 500; margin-bottom: 20px; }
.hero h1 em { color: var(--gold-400); font-style: italic; }
.hero p.lead { font-size: 19px; max-width: 560px; color: #c9d3e2; margin: 0 0 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px; padding: 28px; backdrop-filter: blur(6px);
}
.hero-card h2 { color: #fff; font-size: 18px; font-family: var(--sans); font-weight: 600; margin-bottom: 4px; }
.hero-card .muted { color: #9fb0c7; font-size: 14px; margin: 0 0 18px; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.hero-stat { background: rgba(7,21,40,.45); border-radius: 12px; padding: 14px 16px; }
.hero-stat strong { display: block; font-family: var(--serif); font-size: 26px; color: #fff; font-weight: 500; }
.hero-stat span { font-size: 13px; color: #9fb0c7; }

/* ---------- Secciones ---------- */

.section { padding: 80px 0; }
.section--white { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 38px); margin: 0; }
.section-head p { margin: 8px 0 0; color: var(--ink-soft); max-width: 560px; }
.kicker { display: block; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-500); font-weight: 700; margin-bottom: 10px; }

/* ---------- Tarjetas de artículo ---------- */

.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-cover { aspect-ratio: 16 / 9; }
.card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.card .card-title { font-size: 21px; margin: 12px 0 10px; }
.card .card-title a { color: var(--navy-800); text-decoration: none; }
.card .card-title a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card p { color: var(--ink-soft); font-size: 15.5px; margin: 0 0 18px; flex: 1; }
.card-meta { font-size: 13px; color: var(--ink-muted); display: flex; gap: 14px; }

.card--featured { display: grid; grid-template-columns: 1.1fr 1fr; }
.card--featured .card-cover { aspect-ratio: auto; min-height: 340px; }
.card--featured .card-body { padding: 40px; justify-content: center; }
.card--featured .card-title { font-size: clamp(26px, 3vw, 34px); }
.card--featured p { flex: 0; font-size: 17px; }

/* ---------- Portadas ilustradas (sin imágenes externas) ---------- */

.cover {
  position: relative; overflow: hidden; width: 100%; height: 100%;
  display: grid; place-items: center; color: rgba(255,255,255,.95);
}
.cover svg { width: 46%; max-width: 220px; height: auto; position: relative; z-index: 1; filter: drop-shadow(0 8px 20px rgba(0,0,0,.18)); }
.cover::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 18px 18px;
}
.cover--navy   { background: linear-gradient(135deg, #0b1f3a 0%, #1d4577 100%); }
.cover--gold   { background: linear-gradient(135deg, #8a6a12 0%, #d9b84a 100%); }
.cover--green  { background: linear-gradient(135deg, #0f4a37 0%, #2a9a72 100%); }
.cover--wine   { background: linear-gradient(135deg, #4a1426 0%, #a83a52 100%); }
.cover--slate  { background: linear-gradient(135deg, #1f2937 0%, #4b5d75 100%); }
.cover--teal   { background: linear-gradient(135deg, #0d3b4a 0%, #1f7f8f 100%); }
.cover--indigo { background: linear-gradient(135deg, #1e1b4b 0%, #4f46a5 100%); }
.cover--copper { background: linear-gradient(135deg, #5a2a10 0%, #c06a2b 100%); }
.cover--forest { background: linear-gradient(135deg, #14281d 0%, #3d6b4f 100%); }

/* ---------- Categorías ---------- */

.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cat {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; text-decoration: none; color: var(--ink);
  transition: border-color .2s ease, transform .2s ease;
}
.cat:hover { border-color: var(--gold-500); transform: translateY(-2px); color: var(--ink); }
.cat-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--gold-100); display: grid; place-items: center; margin-bottom: 16px; color: #7a5f0c; }
.cat h3 { font-size: 19px; margin: 0 0 6px; }
.cat p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }

/* ---------- Banda de valores / confianza ---------- */

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.pillar h3 { font-size: 20px; display: flex; align-items: center; gap: 10px; }
.pillar h3::before { content: ""; width: 26px; height: 2px; background: var(--gold-500); }
.pillar p { color: var(--ink-soft); margin: 0; }

/* ---------- Newsletter / CTA ---------- */

.cta {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
  border-radius: 22px; padding: 56px; color: #dfe6f0;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
  position: relative; overflow: hidden;
}
.cta::after { content: ""; position: absolute; width: 380px; height: 380px; right: -120px; top: -160px; border-radius: 50%; border: 1px solid rgba(201,162,39,.35); }
.cta h2 { color: #fff; font-size: clamp(26px, 3vw, 34px); }
.cta p { margin: 0; color: #c2cddd; }
.cta form { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.cta input[type="email"] {
  flex: 1; min-width: 220px; padding: 14px 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08); color: #fff; font: inherit; font-size: 15px;
}
.cta input::placeholder { color: #9fb0c7; }
.cta small { display: block; margin-top: 10px; color: #9fb0c7; font-size: 12.5px; width: 100%; }
.cta small a { color: #dfe6f0; }

/* ---------- Página de artículo ---------- */

.breadcrumb { font-size: 13.5px; color: var(--ink-muted); padding: 22px 0 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--ink-muted); }
.breadcrumb a { color: var(--ink-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--navy-700); text-decoration: underline; }

.article-header { padding: 28px 0 32px; max-width: 860px; }
.article-header h1 { font-size: clamp(32px, 4.4vw, 50px); font-weight: 500; margin: 16px 0 18px; }
.article-header .dek { font-size: 20px; color: var(--ink-soft); line-height: 1.55; margin: 0 0 24px; font-family: var(--serif); font-weight: 400; }
.byline { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--ink-muted); flex-wrap: wrap; }
.byline .avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--navy-800); color: var(--gold-400); display: grid; place-items: center; font-family: var(--serif); font-weight: 600; }
.byline strong { color: var(--ink); font-weight: 600; display: block; }
.byline .sep { width: 4px; height: 4px; background: var(--line); border-radius: 50%; }

.article-cover { border-radius: 18px; overflow: hidden; aspect-ratio: 21 / 9; margin-bottom: 48px; box-shadow: var(--shadow); }
.article-cover .cover svg { width: 26%; max-width: 260px; }

.article-layout { display: grid; grid-template-columns: minmax(0, var(--prose)) 300px; gap: 64px; justify-content: space-between; padding-bottom: 80px; }

.prose { font-size: 18px; line-height: 1.78; }
.prose > * + * { margin-top: 1.15em; }
.prose p { margin: 0; }
.prose h2 { font-size: 30px; margin: 2.2em 0 .6em; scroll-margin-top: 96px; }
.prose h3 { font-size: 22px; margin: 1.8em 0 .5em; scroll-margin-top: 96px; }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 0; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--gold-500); font-weight: 700; }
.prose strong { color: var(--navy-800); }
.prose blockquote {
  margin: 1.8em 0; padding: 4px 0 4px 26px; border-left: 3px solid var(--gold-500);
  font-family: var(--serif); font-size: 22px; line-height: 1.5; color: var(--navy-700); font-style: italic;
}
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }

.prose > p:first-of-type::first-letter {
  float: left; font-family: var(--serif); font-size: 4.1em; line-height: .85; padding: 6px 12px 0 0; color: var(--navy-800); font-weight: 600;
}

.callout { border-radius: var(--radius); padding: 22px 24px; border: 1px solid; font-size: 16.5px; line-height: 1.65; }
.callout-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.callout p + p { margin-top: .6em; }
.callout--info { background: var(--blue-100); border-color: #c9d8ee; }
.callout--info .callout-title { color: var(--navy-700); }
.callout--tip { background: var(--green-100); border-color: #bfe0d2; }
.callout--tip .callout-title { color: var(--green); }
.callout--warn { background: var(--red-100); border-color: #ecc8c4; }
.callout--warn .callout-title { color: var(--red); }

.keypoints { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--gold-500); border-radius: var(--radius); padding: 26px 28px; }
.keypoints h2, .keypoints .kp-title { font-family: var(--sans); font-size: 13px !important; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); margin: 0 0 12px !important; font-weight: 700; }
.keypoints ul { margin: 0; }
.keypoints li { font-size: 16.5px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.prose th, .prose td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th { background: var(--navy-800); color: #fff; font-weight: 600; font-size: 14px; letter-spacing: .02em; }
.prose tbody tr:nth-child(even) { background: #fcfbf7; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose td.num, .prose th.num { text-align: right; font-variant-numeric: tabular-nums; }
.prose caption { caption-side: bottom; text-align: left; font-size: 13.5px; color: var(--ink-muted); padding: 10px 16px; }

.formula {
  background: var(--navy-800); color: #fff; border-radius: var(--radius); padding: 22px 26px;
  font-family: var(--serif); font-size: 22px; text-align: center; letter-spacing: .01em;
}
.formula small { display: block; font-family: var(--sans); font-size: 13.5px; color: #a9b8cc; margin-top: 8px; letter-spacing: 0; }

.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; color: var(--navy-800); list-style: none; display: flex; justify-content: space-between; gap: 16px; font-size: 17.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--gold-500); line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; color: var(--ink-soft); font-size: 16.5px; }

.disclaimer { margin-top: 3em !important; font-size: 14px; line-height: 1.6; color: var(--ink-muted); background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
.disclaimer strong { color: var(--ink-soft); }

.author-box { display: flex; gap: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-top: 2.4em !important; }
.author-box .avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--navy-800); color: var(--gold-400); display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 20px; flex-shrink: 0; }
.author-box h3, .author-box .ab-name { font-size: 18px !important; margin: 0 0 4px !important; font-family: var(--serif); color: var(--navy-800); font-weight: 600; }
.author-box p { font-size: 15px; color: var(--ink-soft); margin: 0; line-height: 1.6; }

/* Barra lateral */
.sidebar { position: relative; }
.sidebar-sticky { position: sticky; top: 96px; display: grid; gap: 22px; }
.widget { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.widget-title { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); font-weight: 700; margin: 0 0 14px; font-family: var(--sans); }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; padding: 7px 0; font-size: 14.5px; line-height: 1.4; color: var(--ink-soft); text-decoration: none; border-left: 2px solid transparent; padding-left: 10px; margin-left: -12px; }
.toc a::before { content: counter(toc, decimal-leading-zero); color: var(--gold-500); font-weight: 700; font-size: 12px; padding-top: 2px; }
.toc a:hover, .toc a.active { color: var(--navy-800); border-left-color: var(--gold-500); }
.widget--navy { background: var(--navy-800); border-color: var(--navy-800); color: #c9d3e2; }
.widget--navy .widget-title { color: var(--gold-400); }
.widget--navy p { font-size: 14.5px; margin: 0 0 14px; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li + li { border-top: 1px solid var(--line); }
.mini-list a { display: block; padding: 10px 0; font-size: 14.5px; text-decoration: none; color: var(--ink); line-height: 1.4; font-weight: 500; }
.mini-list a:hover { color: var(--navy-600); }

/* Bloques reservados para anuncios (AdSense). Se mantienen vacíos hasta que AdSense los rellene. */
.ad-slot { min-height: 0; margin: 2em 0; text-align: center; }
.ad-slot:empty { display: none; }

/* Progreso de lectura */
.read-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--gold-500); z-index: 60; transition: width .1s linear; }

/* ---------- Páginas institucionales ---------- */

.page-hero { background: var(--navy-800); color: #c9d3e2; padding: 64px 0 56px; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; width: 420px; height: 420px; right: -140px; top: -200px; border-radius: 50%; border: 1px solid rgba(201,162,39,.35); }
.page-hero h1 { color: #fff; font-size: clamp(32px, 4vw, 46px); font-weight: 500; margin: 0 0 12px; }
.page-hero p { max-width: 640px; margin: 0; font-size: 18px; }
.page-body { padding: 56px 0 88px; }
.page-body .prose { max-width: 780px; }
.page-body .prose > p:first-of-type::first-letter { all: unset; }
.updated { font-size: 14px; color: var(--ink-muted); }

.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; }
.form { display: grid; gap: 16px; }
.form label { font-weight: 600; font-size: 14.5px; color: var(--navy-800); display: block; margin-bottom: 6px; }
.form input, .form textarea, .form select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 16px; background: var(--paper); color: var(--ink);
}
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--navy-600); outline: 2px solid rgba(29,69,119,.15); }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink-soft); font-weight: 400; }
.form .check input { width: auto; margin-top: 4px; }
.form-note { font-size: 14px; color: var(--green); min-height: 1em; margin: 0; }

/* Filtros listado */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.filter-btn { border: 1px solid var(--line); background: var(--paper); padding: 9px 16px; border-radius: 999px; font: inherit; font-size: 14.5px; cursor: pointer; color: var(--ink-soft); font-weight: 500; }
.filter-btn:hover { border-color: var(--navy-600); color: var(--navy-800); }
.filter-btn.is-active { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }

/* ---------- Pie ---------- */

.site-footer { background: var(--navy-900); color: #9fb0c7; padding: 64px 0 28px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.08); }
.site-footer .brand { color: #fff; margin-bottom: 16px; }
.site-footer .brand-tag { color: #8597b0; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 8px; }
.site-footer a { color: #c7d1e0; text-decoration: none; }
.site-footer a:hover { color: var(--gold-400); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; font-size: 13.5px; flex-wrap: wrap; }
.footer-legal { font-size: 13px; color: #7d8ea6; margin-top: 18px; line-height: 1.6; max-width: 900px; }
.linklike { background: none; border: 0; color: #c7d1e0; font: inherit; cursor: pointer; padding: 0; }
.linklike:hover { color: var(--gold-400); }

/* ---------- Aviso de cookies ---------- */

.cookie-banner {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 80;
  max-width: 760px; margin: 0 auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 50px -10px rgba(7,21,40,.35);
  padding: 22px 24px; display: none; gap: 18px; align-items: center;
}
.cookie-banner.is-visible { display: flex; }
.cookie-banner p { margin: 0; font-size: 14.5px; color: var(--ink-soft); line-height: 1.55; }
.cookie-banner strong { color: var(--navy-800); display: block; margin-bottom: 4px; font-size: 15.5px; }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-actions .btn { padding: 10px 18px; font-size: 14px; }
.btn-outline { background: transparent; color: var(--navy-800); box-shadow: inset 0 0 0 1px var(--line); }
.btn-outline:hover { box-shadow: inset 0 0 0 1px var(--navy-600); color: var(--navy-800); }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .card--featured { grid-template-columns: 1fr; }
  .card--featured .card-cover { min-height: 0; aspect-ratio: 16 / 9; }
  .card--featured .card-body { padding: 28px; }
  .pillars { grid-template-columns: 1fr; gap: 24px; }
  .cta { grid-template-columns: 1fr; padding: 36px 28px; }
  .contact-grid { grid-template-columns: 1fr; }

  .nav-toggle { display: grid; place-items: center; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); display: none; box-shadow: var(--shadow); }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; padding: 12px 16px 18px; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--gold-500); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .topbar .hide-sm { display: none; }
  .hero { padding: 56px 0 64px; }
  .grid-3, .grid-2, .cat-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .prose { font-size: 17px; }
  .prose h2 { font-size: 25px; }
  .article-cover { aspect-ratio: 16 / 9; border-radius: 12px; margin-bottom: 32px; }
  .footer-grid { grid-template-columns: 1fr; }
  .cookie-banner { flex-direction: column; align-items: stretch; left: 12px; right: 12px; bottom: 12px; }
  .cookie-actions { justify-content: flex-end; }
  .brand-tag { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .topbar, .site-footer, .sidebar, .cookie-banner, .read-progress, .ad-slot { display: none !important; }
  body { background: #fff; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.footer-domain { color: #7d8ea6; letter-spacing: .06em; font-size: 12.5px; }
