/* =====================================================================
   KiteAML · Actividades Vulnerables — hoja de estilos
   Ritmo de bandas como rampasistemas.com: fondo blanco en el contenido,
   bandas oscuras (azul marino / casi negro) en barra superior, menú, hero,
   cifras, llamada a la acción y pie.
   Colores de marca: azul marino #002068 y gris azulado #485868.
   ===================================================================== */

:root {
  /* Marca */
  --navy: #002068;
  --navy-700: #0b2d85;
  --navy-500: #1f4fd8;      /* azul de acción (botones, enlaces) */
  --navy-400: #4d7bff;      /* acento sobre fondos oscuros */
  --slate: #485868;         /* gris azulado del logotipo */
  --slate-300: #9aa6b4;
  --slate-200: #c5cdd8;

  /* Tema claro (contenido) */
  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --surface: #ffffff;
  --line: rgba(0, 32, 104, 0.1);
  --text: #2b3440;
  --text-muted: #5d6877;
  --heading: #0d1a3a;
  --link: var(--navy-500);
  --link-hover: var(--navy);

  /* Tema oscuro (bandas) */
  --dark: #0a0e18;
  --dark-2: #0f1524;
  --dark-surface: #151d31;
  --dark-line: rgba(255, 255, 255, 0.1);
  --dark-text: #e8ecf3;
  --dark-muted: #a8b1c0;

  --white: #ffffff;
  --font-head: 'Poppins', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --container: 1220px;
  --radius: 6px;
  --shadow: 0 18px 45px rgba(13, 26, 58, 0.14);
  --shadow-dark: 0 20px 50px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dots: radial-gradient(rgba(0, 32, 104, 0.16) 1.2px, transparent 1.2px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.7; color: var(--text); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; transition: color .2s; }
a:hover { color: var(--link-hover); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--heading); line-height: 1.2; margin: 0 0 .6em; font-weight: 600; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -0.01em; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }
strong { color: var(--heading); font-weight: 600; }
ul { padding-left: 1.2em; }
.container { width: min(var(--container), calc(100% - 2rem)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Banda oscura: cualquier sección con .dark hereda estos colores */
.dark { background: var(--dark); color: var(--dark-text); }
.dark h1, .dark h2, .dark h3, .dark h4, .dark strong { color: var(--white); }
.dark a { color: var(--navy-400); }
.dark a:hover { color: var(--white); }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .85rem 1.8rem; border-radius: var(--radius); border: 1px solid transparent; font-family: var(--font-head); font-weight: 600; font-size: .95rem; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; white-space: nowrap; }
.btn-primary { background: var(--navy-500); color: var(--white); }
.btn-primary:hover { background: var(--navy); color: var(--white); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.4); }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,.08); color: var(--white); }
.btn-lg { padding: 1.05rem 2.2rem; font-size: 1.02rem; }

/* ---------- Barra superior (oscura) ---------- */
.topbar { background: var(--navy); color: var(--white); font-size: .85rem; padding: .45rem 0; text-align: center; }

/* ---------- Cabecera de contacto (BLANCA, como RAMPA) ---------- */
.header-info { background: var(--white); border-bottom: 1px solid var(--line); }
.header-info .container { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 1.2rem 0; }
.brand img { height: 60px; width: auto; }
.info-list { display: flex; gap: 2.5rem; list-style: none; margin: 0; padding: 0; }
.info-list li { display: flex; align-items: center; gap: .8rem; font-size: .9rem; line-height: 1.45; }
.info-list svg { width: 38px; height: 38px; flex: none; color: var(--navy); }
.info-list b { display: block; color: var(--heading); font-weight: 600; }
.info-list span { color: var(--text-muted); }

/* ---------- Navegación (oscura, sobre el hero) ---------- */
.nav-wrap { position: sticky; top: 0; z-index: 50; background: rgba(10, 14, 24, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--dark-line); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.nav .brand-mini { display: none; }
.nav .brand-mini img { height: 38px; }
.menu { display: flex; list-style: none; margin: 0; padding: 0; gap: .25rem; }
.menu a { display: block; padding: 1.3rem 1.25rem; color: var(--dark-text); font-family: var(--font-head); font-weight: 500; font-size: .98rem; position: relative; border-left: 1px solid var(--dark-line); }
.menu li:first-child a { border-left: 0; padding-left: 0; }
.menu a::after { content: ''; position: absolute; left: 1.25rem; right: 1.25rem; bottom: 1rem; height: 2px; background: var(--navy-400); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.menu li:first-child a::after { left: 0; }
.menu a:hover, .menu a.active { color: var(--white); }
.menu a:hover::after, .menu a.active::after { transform: scaleX(1); }
.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-right .btn-primary { border-radius: 0; align-self: stretch; padding: 1.3rem 2rem; }
.nav-right .btn-primary:hover { transform: none; background: var(--navy-400); }
.nav-toggle { display: none; background: none; border: 0; color: var(--white); width: 44px; height: 44px; cursor: pointer; }
.nav-toggle svg { width: 26px; height: 26px; }

/* ---------- Hero (oscuro) ---------- */
.hero { position: relative; min-height: 640px; display: flex; align-items: center; overflow: hidden; background: #060912 url('../img/hero.jpg') center/cover no-repeat; color: var(--dark-text); }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 9, 18, .95) 0%, rgba(0, 32, 104, .75) 45%, rgba(6, 9, 18, .5) 100%); }
.hero .container { position: relative; z-index: 1; padding: 6.5rem 0 11.5rem; max-width: 760px; margin-left: max(1rem, calc((100% - var(--container)) / 2)); }
.hero h1 { color: var(--white); }
.eyebrow { font-family: var(--font-head); font-size: .82rem; letter-spacing: .18em; text-transform: uppercase; color: var(--navy-500); font-weight: 600; margin-bottom: 1rem; display: flex; align-items: center; gap: .75rem; }
.eyebrow::before { content: ''; width: 36px; height: 2px; background: currentColor; }
.hero .eyebrow, .dark .eyebrow { color: var(--navy-400); }
.hero p.lead { font-size: 1.15rem; color: var(--slate-200); max-width: 600px; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- Tarjetas destacadas (blancas, superpuestas al hero) ---------- */
.feature-cards { position: relative; z-index: 2; margin-top: -150px; padding-bottom: 1rem; }
.feature-cards::before { content: ''; position: absolute; left: 0; right: 40%; top: 150px; bottom: -40px; background-image: var(--dots); background-size: 14px 14px; z-index: -1; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card { position: relative; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 2.4rem 2rem 2.2rem; border-radius: var(--radius); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s; }
.card:hover { transform: translateY(-6px); box-shadow: 0 26px 55px rgba(13, 26, 58, 0.2); }
.card .icon { width: 56px; height: 56px; color: var(--navy); margin-bottom: 1.4rem; }
.card .icon svg { width: 100%; height: 100%; }
.card h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.card h3::after { content: ''; display: block; width: 44px; height: 3px; background: var(--navy-500); margin-top: .9rem; }
.card p { color: var(--text-muted); margin: 1.1rem 0 0; font-size: .95rem; }
.card .ghost { position: absolute; right: -10px; bottom: -14px; width: 130px; height: 130px; color: var(--navy); opacity: .08; pointer-events: none; }
.card .ghost svg { width: 100%; height: 100%; }
.feature-cards .note { text-align: right; color: var(--text-muted); font-size: .95rem; margin-top: 2.5rem; }
.feature-cards .note a { font-weight: 600; }

/* ---------- Secciones ---------- */
.section { padding: 6rem 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 680px; margin-bottom: 3rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }
.dark .section-head p { color: var(--dark-muted); }

/* Dos columnas: imagen + texto */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.split .media { position: relative; }
.split .media img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 4.6; object-fit: cover; width: 100%; }
.split .media::before { content: ''; position: absolute; top: -28px; right: -28px; width: 60%; height: 55%; background-image: repeating-linear-gradient(45deg, rgba(0,32,104,.18) 0 2px, transparent 2px 12px); border-radius: var(--radius); z-index: -1; }
.split .media .badge { position: absolute; left: -20px; bottom: 32px; background: var(--navy); color: var(--white); padding: 1.1rem 1.4rem; border-radius: var(--radius); box-shadow: var(--shadow-dark); }
.split .media .badge b { font-family: var(--font-head); font-size: 2rem; display: block; line-height: 1; color: var(--white); }
.split .media .badge span { font-size: .85rem; color: var(--slate-200); }
.split p { color: var(--text-muted); }
.checks { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem 1.5rem; }
.checks li { display: flex; align-items: center; gap: .6rem; font-weight: 500; color: var(--heading); font-size: .95rem; }
.checks li::before { content: ''; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--navy); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E"); background-size: 12px; background-position: center; background-repeat: no-repeat; }

/* ---------- Cuadrícula de servicios (banda clara) ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.service { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; display: flex; flex-direction: column; gap: 1rem; transition: transform .3s var(--ease), box-shadow .3s; }
.service:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.service .num { font-family: var(--font-head); font-size: .8rem; letter-spacing: .15em; color: var(--navy-500); font-weight: 600; }
.service .icon { width: 48px; height: 48px; color: var(--navy); }
.service .icon svg { width: 100%; height: 100%; }
.service h3 { font-size: 1.15rem; margin: 0; }
.service p { color: var(--text-muted); font-size: .95rem; margin: 0; }
.service .more { margin-top: auto; font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: .4rem; }
.service .more svg { width: 16px; height: 16px; transition: transform .2s; }
.service .more:hover svg { transform: translateX(4px); }

/* Servicio detallado (página servicios) */
.service-detail { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3.5rem; align-items: center; padding: 4rem 0; border-top: 1px solid var(--line); }
.service-detail:first-of-type { border-top: 0; }
.service-detail:nth-child(even) .media { order: 2; }
.service-detail .media img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.service-detail p, .service-detail ul { color: var(--text-muted); }
.service-detail ul { padding-left: 1.2em; }
.service-detail ul li { margin-bottom: .35rem; }

/* ---------- Cifras (banda oscura con imagen, como RAMPA) ---------- */
.stats { position: relative; overflow: hidden; background: var(--navy); color: var(--white); }
.stats::before { content: ''; position: absolute; inset: 0; background: url('../img/edificio.jpg') center/cover no-repeat; opacity: .14; mix-blend-mode: luminosity; }
.stats::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,32,104,.4), rgba(6,9,18,.6)); }
.stats .container { position: relative; z-index: 1; padding: 4.5rem 0; }
.stats .section-head { margin-bottom: 2.5rem; }
.stats h2 { color: var(--white); }
.stats .section-head p { color: var(--slate-200); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.stat { text-align: center; border-left: 1px solid rgba(255,255,255,.18); }
.stat:first-child { border-left: 0; }
.stat b { font-family: var(--font-head); font-size: 2.8rem; color: var(--white); display: block; line-height: 1; }
.stat span { color: var(--slate-200); font-size: .9rem; }

/* ---------- Proceso (pasos, banda clara) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: paso; }
.step { position: relative; padding: 2rem 1.6rem 1.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.step::before { counter-increment: paso; content: counter(paso, decimal-leading-zero); font-family: var(--font-head); font-size: 2.6rem; font-weight: 700; color: rgba(0,32,104,.14); line-height: 1; display: block; margin-bottom: .8rem; }
.step h3 { font-size: 1.05rem; }
.step p { color: var(--text-muted); font-size: .92rem; margin: 0; }

/* ---------- Llamada a la acción (oscura) ---------- */
.cta { background: linear-gradient(135deg, var(--navy) 0%, #0a1230 100%); color: var(--dark-text); }
.cta .container { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 3.5rem 0; }
.cta h2 { margin: 0 0 .3rem; font-size: 1.8rem; color: var(--white); }
.cta p { margin: 0; color: var(--slate-200); }

/* ---------- Cabecera de página interior (oscura) ---------- */
.page-head { position: relative; padding: 5.5rem 0 4.5rem; background: var(--dark-2); color: var(--dark-text); overflow: hidden; }
.page-head::before { content: ''; position: absolute; inset: 0; background: var(--page-img, url('../img/edificio.jpg')) center/cover no-repeat; opacity: .3; }
.page-head::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--dark) 0%, rgba(10,14,24,.65) 60%, rgba(10,14,24,.2) 100%); }
.page-head .container { position: relative; z-index: 1; }
.page-head h1 { margin-bottom: .5rem; color: var(--white); }
.page-head p { color: var(--dark-muted); max-width: 620px; font-size: 1.08rem; margin: 0; }
.breadcrumb { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; gap: .5rem; font-size: .85rem; color: var(--slate-300); }
.breadcrumb a { color: var(--navy-400); }
.breadcrumb li + li::before { content: '/'; margin-right: .5rem; color: var(--slate); }

/* ---------- Valores ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.value { padding: 2rem; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--navy); border-radius: var(--radius); }
.value h3 { font-size: 1.1rem; }
.value p { color: var(--text-muted); margin: 0; font-size: .95rem; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3.5rem; align-items: start; }
.contact-info { display: grid; gap: 1.2rem; }
.contact-info .item { display: flex; gap: 1rem; padding: 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.contact-info .item svg { width: 40px; height: 40px; flex: none; color: var(--navy); }
.contact-info .item b { display: block; color: var(--heading); font-family: var(--font-head); margin-bottom: .2rem; }
.contact-info .item span, .contact-info .item a { color: var(--text-muted); display: block; font-size: .95rem; }
.contact-info .item a:hover { color: var(--navy); }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2.4rem; box-shadow: var(--shadow); }
.form h3 { margin-bottom: 1.6rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .85rem; font-weight: 500; color: var(--heading); margin-bottom: .4rem; }
.field label .req { color: var(--navy-500); }
.field input, .field select, .field textarea { width: 100%; padding: .8rem 1rem; border-radius: var(--radius); border: 1px solid rgba(0,32,104,.2); background: var(--bg-soft); color: var(--heading); font: inherit; font-size: .95rem; transition: border-color .2s, box-shadow .2s, background .2s; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6877' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; background-size: 16px; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy-500); background: var(--white); box-shadow: 0 0 0 3px rgba(31,79,216,.15); }
.field.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; color: var(--text-muted); }
.field.check input { width: 18px; height: 18px; margin-top: .2rem; flex: none; accent-color: var(--navy); }
.field.check label { margin: 0; font-weight: 400; color: var(--text-muted); }
.hp { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; width: 0; }
.alert { display: none; padding: 1rem 1.2rem; border-radius: var(--radius); margin-bottom: 1.4rem; font-size: .95rem; border: 1px solid; }
.alert.show { display: block; }
.alert-ok { background: #e9f8ef; border-color: #9fdcb8; color: #146c3a; }
.alert-error { background: #fdecec; border-color: #f1a9a9; color: #9b1c1c; }
.alert-warn { background: #fff6e5; border-color: #f5d08a; color: #8a5a00; }
.map { margin-top: 3rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.map iframe { width: 100%; height: 360px; border: 0; display: block; }

/* ---------- Página de gracias ---------- */
.thanks { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 5rem 0; }
.thanks .mark { width: 84px; height: 84px; border-radius: 50%; background: var(--navy); display: grid; place-items: center; margin: 0 auto 1.5rem; }
.thanks .mark svg { width: 42px; height: 42px; color: var(--white); }
.thanks p { color: var(--text-muted); max-width: 520px; margin-inline: auto; }

/* ---------- Pie de página (oscuro) ---------- */
.footer { background: #070a12; color: var(--dark-text); padding: 4.5rem 0 0; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 3rem; }
.footer img { height: 44px; width: auto; margin-bottom: 1.2rem; }
.footer p { color: var(--dark-muted); }
.footer h4 { font-size: 1rem; margin-bottom: 1.1rem; color: var(--white); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: .55rem; color: var(--dark-muted); }
.footer ul a { color: var(--dark-muted); }
.footer ul a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid var(--dark-line); margin-top: 3.5rem; padding: 1.3rem 0; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--slate-300); font-size: .85rem; }
.footer-bottom a { color: var(--slate-300); }
.footer-bottom a:hover { color: var(--white); }

/* ---------- Animación de entrada ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .info-list { gap: 1.5rem; }
  .info-list li:nth-child(1) { display: none; }
}
@media (max-width: 960px) {
  .header-info { display: none; }
  .nav .brand-mini { display: block; }
  .menu { position: fixed; inset: 64px 0 auto 0; flex-direction: column; background: var(--dark-2); border-bottom: 1px solid var(--dark-line); padding: .5rem 1rem 1rem; gap: 0; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
  .menu.open { transform: none; opacity: 1; pointer-events: auto; }
  .menu a, .menu li:first-child a { border-left: 0; padding: .9rem .25rem; border-bottom: 1px solid var(--dark-line); }
  .menu a::after { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-right .btn-primary { display: none; }
  .cards-3, .services-grid, .values, .steps, .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .split, .contact-grid, .service-detail { grid-template-columns: 1fr; }
  .service-detail:nth-child(even) .media { order: 0; }
  .split .media .badge { left: 12px; }
  .cta .container { flex-direction: column; text-align: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hero { min-height: 560px; }
  .hero .container { padding: 4.5rem 0 9.5rem; }
  .hero-actions .btn { width: 100%; }
  .feature-cards { margin-top: -80px; }
  .feature-cards::before { top: 80px; right: 0; }
  .cards-3, .services-grid, .values, .steps { grid-template-columns: 1fr; }
  .feature-cards .note { text-align: left; }
  .form { padding: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .checks { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .section { padding: 4rem 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .stat b { font-size: 2.2rem; }
}

/* =====================================================================
   BLOG
   ===================================================================== */
.blog-layout { display: grid; grid-template-columns: 1fr 320px; gap: 3rem; align-items: start; }
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.post-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; }
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.post-card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.post-card:hover .post-card-img img { transform: scale(1.04); }
.post-card-body { padding: 1.4rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.post-meta { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .8rem; color: var(--text-muted); }
.post-meta li { display: flex; align-items: center; gap: .4rem; }
.post-meta li + li::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--slate-300); }
.post-meta a { font-weight: 600; color: var(--navy-500); text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; }
.post-card h3 { font-size: 1.15rem; margin: 0; }
.post-card h3 a { color: var(--heading); }
.post-card h3 a:hover { color: var(--navy-500); }
.post-card p { color: var(--text-muted); font-size: .93rem; margin: 0; flex: 1; }
.post-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--text-muted); }
.post-card-foot .more { font-weight: 600; display: inline-flex; align-items: center; gap: .3rem; }
.post-card-foot .more svg { width: 15px; height: 15px; }
.sin-resultados { color: var(--text-muted); padding: 2rem; background: var(--bg-soft); border-radius: var(--radius); }

.paginacion { margin-top: 2.5rem; }
.paginacion ul { list-style: none; padding: 0; margin: 0; display: flex; gap: .4rem; flex-wrap: wrap; }
.paginacion a, .paginacion .actual { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 .6rem; border-radius: var(--radius); border: 1px solid var(--line); font-weight: 600; font-size: .9rem; }
.paginacion a:hover { border-color: var(--navy-500); }
.paginacion .actual { background: var(--navy); color: var(--white); border-color: var(--navy); }

.blog-sidebar { display: grid; gap: 1.5rem; position: sticky; top: 84px; }
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.widget h4 { font-size: 1rem; margin-bottom: 1rem; padding-bottom: .6rem; border-bottom: 2px solid var(--navy); display: inline-block; }
.widget-list { list-style: none; padding: 0; margin: 0; }
.widget-list li { display: flex; justify-content: space-between; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.widget-list li:last-child { border-bottom: 0; }
.widget-list a { color: var(--text); }
.widget-list a:hover { color: var(--navy-500); }
.widget-list span { font-size: .75rem; background: var(--bg-soft); border-radius: 999px; padding: .1rem .55rem; color: var(--text-muted); }
.widget-recent { list-style: none; padding: 0; margin: 0; }
.widget-recent li { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.widget-recent li:last-child { border-bottom: 0; }
.widget-recent a { display: block; color: var(--heading); font-weight: 500; font-size: .93rem; line-height: 1.4; }
.widget-recent a:hover { color: var(--navy-500); }
.widget-recent time { font-size: .78rem; color: var(--text-muted); }
.buscador { display: flex; }
.buscador input { flex: 1; padding: .7rem .9rem; border: 1px solid var(--line); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); font: inherit; font-size: .93rem; background: var(--bg-soft); min-width: 0; }
.buscador input:focus { outline: none; border-color: var(--navy-500); background: var(--white); }
.buscador button { width: 46px; border: 0; background: var(--navy); color: var(--white); border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; display: grid; place-items: center; }
.buscador button svg { width: 18px; height: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tags a, .post-tags a { display: inline-block; padding: .25rem .7rem; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); font-size: .8rem; color: var(--text); }
.tags a:hover, .post-tags a:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.widget-cta { background: var(--navy); border-color: var(--navy); color: var(--white); }
.widget-cta h4 { color: var(--white); border-color: var(--navy-400); }
.widget-cta p { color: var(--slate-200); font-size: .93rem; }
.widget-cta .btn { width: 100%; }

/* Artículo */
.preview-bar { background: #fff6e5; color: #8a5a00; border-bottom: 1px solid #f5d08a; padding: .6rem 1rem; text-align: center; font-size: .9rem; }
.post-head { position: relative; padding: 4.5rem 0 3.5rem; background: var(--dark-2); color: var(--dark-text); overflow: hidden; }
.post-head::before { content: ''; position: absolute; inset: 0; background: url('../img/documentos.jpg') center/cover no-repeat; opacity: .18; }
.post-head::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--dark) 0%, rgba(10,14,24,.7) 70%, rgba(10,14,24,.4) 100%); }
.post-head-inner { position: relative; z-index: 1; max-width: 860px; margin-left: max(1rem, calc((100% - var(--container)) / 2)); }
.post-head h1 { color: var(--white); font-size: clamp(1.8rem, 4vw, 2.8rem); margin: .8rem 0 1rem; }
.post-head .post-meta { color: var(--slate-200); font-size: .9rem; }
.post-head .post-meta a { color: var(--navy-400); text-transform: none; letter-spacing: 0; font-size: .9rem; }
.post-head .breadcrumb { margin: 0; }
.post .blog-layout { padding: 3.5rem 0 5rem; }
.post-cover { margin: 0 0 2rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.post-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-content { font-size: 1.05rem; line-height: 1.8; max-width: 760px; }
.post-content h2 { font-size: 1.6rem; margin-top: 2.2rem; }
.post-content h3 { font-size: 1.3rem; margin-top: 1.8rem; }
.post-content h4 { font-size: 1.1rem; margin-top: 1.5rem; }
.post-content p, .post-content ul, .post-content ol { margin-bottom: 1.2em; }
.post-content li { margin-bottom: .4em; }
.post-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.post-content blockquote { margin: 1.8rem 0; padding: 1.2rem 1.6rem; border-left: 4px solid var(--navy); background: var(--bg-soft); border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; color: var(--heading); }
.post-content blockquote p:last-child { margin: 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; }
.post-content th, .post-content td { border: 1px solid var(--line); padding: .6rem .8rem; text-align: left; }
.post-content th { background: var(--bg-soft); color: var(--heading); }
.post-content pre { background: var(--dark-2); color: var(--dark-text); padding: 1rem 1.2rem; border-radius: var(--radius); overflow: auto; font-size: .9rem; }
.post-content a { text-decoration: underline; text-underline-offset: 2px; }
.post-content hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.post-tags { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .9rem; color: var(--text-muted); }
.post-share { margin-top: 1.2rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .9rem; color: var(--text-muted); }
.post-share a { padding: .35rem .9rem; border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600; font-size: .85rem; }
.post-share a:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.post-cta { margin-top: 3rem; padding: 2rem; border-radius: var(--radius); background: linear-gradient(135deg, var(--navy) 0%, #0a1230 100%); color: var(--white); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.post-cta h3 { color: var(--white); margin-bottom: .3rem; font-size: 1.2rem; }
.post-cta p { margin: 0; color: var(--slate-200); font-size: .95rem; }
.relacionadas { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--line); }
.relacionadas h2 { font-size: 1.5rem; margin-bottom: 1.5rem; }
.relacionadas .post-grid { grid-template-columns: repeat(3, 1fr); }
.relacionadas .post-card p { display: none; }

/* Sección "Actualidad" en la portada (se llena desde /blog/recientes) */
.recientes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.recientes-grid:empty { display: none; }
.recientes-foot { text-align: center; margin-top: 2.5rem; }

@media (max-width: 960px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; }
  .relacionadas .post-grid, .recientes-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .post-grid, .relacionadas .post-grid, .recientes-grid { grid-template-columns: 1fr; }
  .post-content { font-size: 1rem; }
}
.btn-outline-dark { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline-dark:hover { background: var(--navy); color: var(--white); }
