/* =========================================================
   Finanzas Inteligentes — Hoja de estilos principal
   Estética: editorial / revista financiera de confianza
   Solo HTML + CSS + JS (sin frameworks)
   ========================================================= */

/* ---------- Variables ---------- */
:root {
  --paper:        #f6f3ec;
  --paper-2:      #efe9dc;
  --surface:      #ffffff;
  --ink:          #16221c;
  --ink-soft:     #2c3a32;
  --muted:        #5c6b62;
  --primary:      #15573e;
  --primary-700:  #0f3e2c;
  --primary-300:  #5e9a7f;
  --accent:       #c29a3b;
  --accent-soft:  #f0e4c4;
  --line:         #e2dccf;
  --danger:       #9d3b2f;

  --radius:       14px;
  --radius-sm:    9px;
  --radius-lg:    22px;
  --shadow-sm:    0 1px 2px rgba(22,34,28,.05), 0 2px 8px rgba(22,34,28,.04);
  --shadow-md:    0 10px 30px -12px rgba(22,34,28,.18);
  --shadow-lg:    0 30px 60px -24px rgba(15,62,44,.28);

  --maxw:         1180px;
  --gap:          clamp(1rem, 3vw, 2rem);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "IBM Plex Sans", system-ui, -apple-system, sans-serif;

  --ease:         cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 1.02rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, picture { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--primary-700); }
ul, ol { padding-left: 1.2rem; }
button { font: inherit; cursor: pointer; border: none; background: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Background texture ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(22,34,28,.025) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: .6;
}
.site-wrap { position: relative; z-index: 1; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: 1.12;
  letter-spacing: -.01em;
  color: var(--ink);
  font-variation-settings: "opsz" 40;
}
h1 { font-size: clamp(2.2rem, 5.4vw, 3.6rem); font-variation-settings: "opsz" 144; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.55rem); }
p { color: var(--ink-soft); }
.lead { font-size: 1.18rem; color: var(--muted); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.2rem); }
.section { padding-block: clamp(3.2rem, 7vw, 5.5rem); }
.section--tight { padding-block: clamp(2.4rem, 5vw, 3.6rem); }
.center { text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .76rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--primary);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); display: inline-block; }
.section-head { max-width: 720px; margin-bottom: clamp(1.8rem, 4vw, 2.6rem); }
.section-head.center { margin-inline: auto; }
.section-head p { margin-top: .7rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 999px;
  font-weight: 600; font-size: .98rem; letter-spacing: .01em;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
  white-space: nowrap;
}
.btn--primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--primary-700); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.btn--light { background: #fff; color: var(--primary-700); }
.btn--light:hover { background: var(--paper); color: var(--primary-700); transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246,243,236,.82);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.4rem; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; flex-shrink: 0; }
.brand__mark { width: 38px; height: 38px; flex-shrink: 0; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; color: var(--ink); letter-spacing: -.01em; }
.brand__tag { font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-top: 3px; }

.main-nav { display: flex; align-items: center; gap: .25rem; }
.main-nav a {
  position: relative; color: var(--ink-soft); font-weight: 500; font-size: .96rem;
  padding: .55rem .8rem; border-radius: 8px;
}
.main-nav a::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .3rem; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--primary-700); }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* Dropdown */
.has-dropdown { position: relative; }
.dropdown-toggle { display: inline-flex; align-items: center; gap: .3rem; }
.dropdown-toggle svg { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.has-dropdown:hover .dropdown-toggle svg, .has-dropdown:focus-within .dropdown-toggle svg { transform: rotate(180deg); }
.dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: .5rem; list-style: none; margin: 0;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .22s var(--ease);
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: flex; flex-direction: column; padding: .6rem .75rem; border-radius: 8px; }
.dropdown a::after { display: none; }
.dropdown a:hover { background: var(--paper-2); }
.dropdown a strong { font-weight: 600; color: var(--ink); font-size: .94rem; }
.dropdown a span { font-size: .8rem; color: var(--muted); }

.header-actions { display: flex; align-items: center; gap: .8rem; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 10px; align-items: center; justify-content: center; }
.nav-toggle span { position: relative; width: 22px; height: 2px; background: var(--ink); transition: .25s var(--ease); }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: var(--ink); transition: .25s var(--ease); }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
body.nav-open .nav-toggle span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(3rem, 8vw, 6rem); overflow: hidden; }
.hero::after {
  content: ""; position: absolute; right: -10%; top: -20%; width: 60%; height: 140%;
  background: radial-gradient(closest-side, rgba(21,87,62,.10), transparent 70%);
  z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: 1.1rem; }
.hero h1 em { font-style: italic; color: var(--primary); }
.hero .lead { margin-bottom: 1.8rem; max-width: 36ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-stats { display: flex; gap: 2.2rem; margin-top: 2.6rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.hero-stat strong { font-family: var(--font-display); font-size: 1.9rem; color: var(--primary); display: block; line-height: 1; }
.hero-stat span { font-size: .82rem; color: var(--muted); letter-spacing: .02em; }

.hero-visual {
  position: relative; background: linear-gradient(160deg, var(--primary), var(--primary-700));
  border-radius: var(--radius-lg); padding: 2rem; color: #fff; box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 5; display: flex; flex-direction: column; justify-content: space-between;
}
.hero-visual::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg);
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 18px 18px; pointer-events: none;
}
.hero-card-label { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-soft); }
.hero-chart { display: flex; align-items: flex-end; gap: 10px; height: 130px; margin: 1.4rem 0; }
.hero-chart .bar { flex: 1; background: rgba(255,255,255,.22); border-radius: 6px 6px 0 0; position: relative; }
.hero-chart .bar:last-child { background: var(--accent); }
.hero-figure { font-family: var(--font-display); font-size: 2.4rem; line-height: 1; }
.hero-figure span { font-size: .9rem; color: var(--accent-soft); display: block; font-family: var(--font-body); margin-top: .4rem; letter-spacing: .04em; }
.hero-pill {
  position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%);
  background: #fff; color: var(--primary-700); padding: .55rem 1.1rem; border-radius: 999px;
  font-weight: 600; font-size: .85rem; box-shadow: var(--shadow-md); white-space: nowrap;
}

/* ---------- Trust strip ---------- */
.trust { border-block: 1px solid var(--line); background: var(--paper-2); }
.trust-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(1rem, 5vw, 3rem); padding-block: 1.4rem; }
.trust-item { display: inline-flex; align-items: center; gap: .55rem; color: var(--muted); font-size: .88rem; font-weight: 500; }
.trust-item svg { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; }

/* ---------- Categories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.2rem; }
.cat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  display: flex; flex-direction: column; gap: .7rem; position: relative; overflow: hidden;
}
.cat-card::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent);
  transform: scaleY(0); transform-origin: top; transition: transform .3s var(--ease);
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.cat-card:hover::after { transform: scaleY(1); }
.cat-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; color: var(--primary-700); }
.cat-icon svg { width: 24px; height: 24px; }
.cat-card h3 { font-size: 1.25rem; }
.cat-card p { font-size: .92rem; color: var(--muted); flex: 1; }
.cat-card .cat-link { font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: .35rem; }
.cat-card .cat-link svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.cat-card:hover .cat-link svg { transform: translateX(4px); }

/* ---------- Article cards (para artículos futuros) ---------- */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.6rem; }
.article-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.article-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.article-card__media { aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--primary-300), var(--primary)); position: relative; }
.article-card__cat { position: absolute; top: 1rem; left: 1rem; background: #fff; color: var(--primary-700); padding: .25rem .7rem; border-radius: 999px; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.article-card__body { padding: 1.4rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.article-card__body h3 { font-size: 1.2rem; }
.article-card__excerpt { font-size: .92rem; color: var(--muted); flex: 1; }
.article-card__meta { display: flex; align-items: center; gap: .6rem; font-size: .8rem; color: var(--muted); margin-top: .4rem; }

/* Placeholder de "próximamente" */
.coming-soon { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 2.4rem; text-align: center; }
.coming-soon h3 { margin-bottom: .5rem; }
.coming-soon p { color: var(--muted); max-width: 46ch; margin-inline: auto; }

/* ---------- Feature / Mission split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 4.5rem); align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media {
  background: linear-gradient(165deg, var(--paper-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-sm);
}
.checklist { list-style: none; padding: 0; display: grid; gap: .9rem; margin-top: 1.4rem; }
.checklist li { display: flex; gap: .8rem; align-items: flex-start; color: var(--ink-soft); }
.checklist svg { width: 22px; height: 22px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }

/* mini-cards dentro de media */
.mini-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.1rem; box-shadow: var(--shadow-sm); }
.mini-card + .mini-card { margin-top: .9rem; }
.mini-card .label { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.mini-card .value { font-family: var(--font-display); font-size: 1.5rem; color: var(--primary); }
.mini-bar { height: 8px; background: var(--paper-2); border-radius: 99px; overflow: hidden; margin-top: .6rem; }
.mini-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

/* ---------- Newsletter ---------- */
.newsletter {
  background: linear-gradient(150deg, var(--primary-700), var(--primary));
  border-radius: var(--radius-lg); padding: clamp(2.2rem, 5vw, 3.6rem); color: #fff;
  position: relative; overflow: hidden; box-shadow: var(--shadow-lg);
}
.newsletter::before {
  content: ""; position: absolute; right: -60px; top: -60px; width: 280px; height: 280px;
  background: radial-gradient(closest-side, rgba(194,154,59,.4), transparent); pointer-events: none;
}
.newsletter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; position: relative; }
.newsletter h2 { color: #fff; }
.newsletter p { color: rgba(255,255,255,.85); margin-top: .6rem; }
.newsletter .eyebrow { color: var(--accent-soft); }
.newsletter .eyebrow::before { background: var(--accent); }
.news-form { display: flex; gap: .7rem; flex-wrap: wrap; }
.news-form input[type="email"] {
  flex: 1; min-width: 220px; padding: .9rem 1.1rem; border-radius: 999px; border: none;
  font: inherit; background: rgba(255,255,255,.95); color: var(--ink);
}
.news-form input::placeholder { color: var(--muted); }
.news-note { font-size: .8rem; color: rgba(255,255,255,.7); margin-top: .9rem; }
.form-msg { margin-top: .9rem; font-size: .9rem; font-weight: 500; }
.form-msg.ok { color: var(--accent-soft); }

/* ---------- Article / legal body ---------- */
.page-hero { background: var(--paper-2); border-bottom: 1px solid var(--line); padding-block: clamp(2.4rem, 6vw, 4rem); }
.page-hero h1 { margin-bottom: .6rem; }
.page-hero p { max-width: 60ch; color: var(--muted); }

.breadcrumbs { font-size: .85rem; color: var(--muted); margin-bottom: 1.2rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: .5rem; }
.breadcrumbs li + li::before { content: "/"; color: var(--line); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs [aria-current="page"] { color: var(--ink-soft); font-weight: 500; }

.prose { max-width: 760px; }
.prose > * + * { margin-top: 1.15rem; }
.prose h2 { margin-top: 2.6rem; }
.prose h3 { margin-top: 1.8rem; }
.prose h2 + p, .prose h3 + p { margin-top: .8rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: .4rem; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.prose blockquote {
  border-left: 4px solid var(--accent); padding: .4rem 0 .4rem 1.4rem; margin-left: 0;
  font-family: var(--font-display); font-style: italic; font-size: 1.25rem; color: var(--ink-soft);
}
.prose hr { border: none; border-top: 1px solid var(--line); margin-block: 2.4rem; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.6rem; margin-bottom: 2rem; }
.toc strong { display: block; font-family: var(--font-display); margin-bottom: .6rem; }
.toc ol { margin: 0; }

.layout-2col { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.sidebar { position: sticky; top: 92px; display: grid; gap: 1.4rem; }
.sidebar-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.sidebar-card h4 { font-size: 1.05rem; margin-bottom: .8rem; }
.sidebar-card ul { list-style: none; padding: 0; display: grid; gap: .55rem; }
.sidebar-card ul a { color: var(--ink-soft); font-size: .92rem; }
.sidebar-card ul a:hover { color: var(--primary); }

/* Ad placeholder (transparente, etiquetado) */
.ad-slot {
  margin-block: 2rem; padding: 1rem; border: 1px dashed var(--line); border-radius: var(--radius-sm);
  text-align: center; color: var(--muted); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  background: var(--paper-2);
}
.ad-slot::after { content: "Espacio publicitario"; display: block; }

/* Zonas reservadas para anuncios: vacías e invisibles hasta insertar AdSense */
.ad-zone { margin-block: 1.8rem; text-align: center; clear: both; min-height: 0; }
.ad-zone:empty { margin-block: 0; }
.ad-zone ins, .ad-zone iframe, .ad-zone img { max-width: 100%; height: auto; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; font-size: .85rem; color: var(--muted); margin-bottom: 1.8rem; }
.article-meta a { color: var(--primary); }

/* ---------- Author ---------- */
.author-hero { display: grid; grid-template-columns: auto 1fr; gap: 1.8rem; align-items: center; }
.author-avatar {
  width: 120px; height: 120px; border-radius: 50%; background: linear-gradient(150deg, var(--primary), var(--primary-700));
  display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-size: 2.6rem; box-shadow: var(--shadow-md);
}
.author-meta { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .8rem; }
.author-meta span { font-size: .85rem; color: var(--muted); display: inline-flex; align-items: center; gap: .4rem; }
.social-row { display: flex; gap: .7rem; margin-top: 1rem; }
.social-row a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-soft); }
.social-row a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.social-row svg { width: 18px; height: 18px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.contact-info { display: grid; gap: 1.2rem; }
.contact-item { display: flex; gap: 1rem; align-items: flex-start; }
.contact-item .ci-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; color: var(--primary-700); flex-shrink: 0; }
.contact-item .ci-icon svg { width: 22px; height: 22px; }
.contact-item h4 { font-size: 1.05rem; }
.contact-item p, .contact-item a { color: var(--muted); font-size: .94rem; }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.6rem, 4vw, 2.4rem); box-shadow: var(--shadow-sm); }
.field { display: grid; gap: .4rem; margin-bottom: 1.1rem; }
.field label { font-size: .88rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  width: 100%; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; background: var(--paper); color: var(--ink); transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,87,62,.12); }
.field textarea { resize: vertical; min-height: 140px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.checkbox-row { display: flex; gap: .6rem; align-items: flex-start; font-size: .86rem; color: var(--muted); margin-bottom: 1.2rem; }
.checkbox-row input { width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .8rem; max-width: 800px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 1.4rem; transition: box-shadow .25s var(--ease); }
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary { list-style: none; cursor: pointer; padding: 1.1rem 0; font-weight: 600; font-family: var(--font-display); font-size: 1.08rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; color: var(--primary); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 1.2rem; color: var(--muted); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.72); padding-block: clamp(3rem, 6vw, 4.5rem) 0; margin-top: clamp(3rem, 7vw, 5rem); }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.4rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-brand .brand__name { color: #fff; }
.footer-brand p { color: rgba(255,255,255,.6); font-size: .92rem; margin-top: 1rem; max-width: 34ch; }
.footer-col h4 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; font-family: var(--font-body); font-weight: 600; margin-bottom: 1.1rem; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: .7rem; }
.footer-col a { color: rgba(255,255,255,.66); font-size: .92rem; }
.footer-col a:hover { color: var(--accent); }
.footer-social { display: flex; gap: .7rem; margin-top: 1.3rem; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); display: grid; place-items: center; color: rgba(255,255,255,.7); }
.footer-social a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.footer-social svg { width: 17px; height: 17px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.6rem; font-size: .82rem; color: rgba(255,255,255,.5); }
.footer-bottom a { color: rgba(255,255,255,.6); }
.footer-bottom a:hover { color: var(--accent); }
.footer-legal-links { display: flex; flex-wrap: wrap; gap: 1.2rem; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%) translateY(160%);
  width: min(640px, calc(100% - 2rem)); background: var(--ink); color: #fff;
  border-radius: var(--radius); padding: 1.3rem 1.5rem; box-shadow: var(--shadow-lg); z-index: 200;
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; transition: transform .5s var(--ease);
}
.cookie-banner.show { transform: translateX(-50%) translateY(0); }
.cookie-banner p { color: rgba(255,255,255,.8); font-size: .88rem; flex: 1; min-width: 240px; margin: 0; }
.cookie-banner p a { color: var(--accent); text-decoration: underline; }
.cookie-actions { display: flex; gap: .6rem; flex-shrink: 0; }
.cookie-actions .btn { padding: .65rem 1.1rem; font-size: .88rem; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 1.4rem; bottom: 1.4rem; width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: all .3s var(--ease); z-index: 90;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--primary-700); color: #fff; }
.to-top svg { width: 20px; height: 20px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .split, .newsletter-grid, .contact-grid, .author-hero, .layout-2col { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
  .sidebar { position: static; }
  .author-hero { text-align: center; justify-items: center; }
  .author-avatar { margin-inline: auto; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 1rem;
    transform: translateY(-130%); transition: transform .4s var(--ease); box-shadow: var(--shadow-md);
    max-height: calc(100vh - 72px); overflow-y: auto;
  }
  body.nav-open .main-nav { transform: translateY(0); }
  .main-nav a { padding: .9rem .6rem; border-radius: 8px; font-size: 1.05rem; }
  .main-nav a::after { display: none; }
  .has-dropdown { width: 100%; }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; border-left: 2px solid var(--line); border-radius: 0; margin-left: .6rem; padding-left: .4rem; }
  .header-actions .btn--header { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.4rem; }
}

@media (max-width: 460px) {
  .footer-top { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ===== Imágenes destacadas de artículos y categorías (añadido) ===== */
.article-featured,
.cat-featured {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto clamp(1.4rem, 3.5vw, 2.4rem);
  padding-inline: clamp(1.1rem, 4vw, 2.2rem);
}
.article-featured img,
.cat-featured img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-radius: var(--radius, 16px);
  box-shadow: 0 18px 40px -24px rgba(15, 62, 44, .45);
  background: var(--surface, #fff);
}
.cat-featured { margin-top: .4rem; }
