/*
Theme Name: AIVARA Blog (Figma)
Theme URI: https://aivara.com
Author: AIVARA
Description: Tema del Blog Volumetrics. Header y footer iguales a la landing de Volumetrics, encabezado con buscador, entrada destacada, pestañas por categoría, paginación numerada, artículos con índice lateral y formulario de diagnóstico.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aivara-blog-figma
*/

/* ==========================================================================
   Variables y base (examples/Blog - Diseño.dc.html)
   ========================================================================== */
:root {
  --orange: #E8612D;
  --orange-dark: #C4481A;
  --orange-soft: #FCEDE6;
  --orange-pale: #F4C2AD;
  --ink: #1A1A1A;
  --ink-dark: #1A1614;
  --ink-darker: #0F0D0B;
  --text: #2B2B2B;
  --text-2: #555;
  --muted: #777;
  --muted-dark: #A8A29D;
  --sand: #D9D4CF;
  --line: #E0E0E0;
  --line-2: #CFCFCF;
  --bg-soft: #F7F7F7;
  --gutter: clamp(20px, 4vw, 48px);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--orange-dark); text-decoration: none; }
a:hover { color: var(--orange); }
h1, h2, h3, h4 { text-wrap: pretty; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.wrap { max-width: 1320px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* Botones y piezas comunes */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 700 14px var(--font);
  padding: 12px 20px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.chev { flex: none; transition: transform .2s ease; }
a:hover .chev, button:hover .chev { transform: translateX(4px); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--orange); }

.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--orange); }
.chip {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--orange-dark);
  background: var(--orange-soft);
  padding: 3px 8px;
  border-radius: 2px;
}
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--orange); }
.crumbs .is-current { color: var(--ink); }

/* ==========================================================================
   Header - Igual que la landing de Volumetrics (partials/header.html)
   ========================================================================== */
.site-header {
  --vm-orange: #ED5517;
  --vm-orange-hover: #D94A0F;
  --vm-ink: #171717;
  --vm-line: #E5E5E5;
  --vm-line-strong: #D4D4D4;
  position: sticky;
  top: var(--wp-admin--admin-bar--height, 0px);
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--vm-line);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}
.site-header a,
.site-header a:hover { text-shadow: none; }
.header-inner {
  box-sizing: content-box;
  max-width: 1320px;
  height: 66px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  gap: 20px;
}
.site-branding { display: flex; align-items: center; flex-shrink: 0; }
.site-branding .logo-img { display: block; height: 22px; width: auto; max-width: none; }
.header-sep { display: none; width: 1px; height: 24px; background: var(--vm-line); flex-shrink: 0; margin: 0 -8px; }

/* Navegación principal (desktop: >820px) */
.main-navigation { display: none; align-items: center; gap: 18px; }
.main-navigation > a,
.nav-dropdown > a {
  color: var(--vm-ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.15s;
}
.main-navigation > a:hover,
.nav-dropdown > a:hover,
.main-navigation > a[aria-current="page"] { color: var(--vm-orange-hover); }

/* Dropdown Industrias */
.nav-dropdown { position: relative; display: flex; align-items: center; padding: 22px 0; }
.nav-dropdown > a { display: inline-flex; align-items: center; gap: 5px; }
.nav-dropdown .dropdown-menu {
  position: absolute;
  top: 100%;
  left: -16px;
  z-index: 50;
  min-width: 240px;
  padding: 8px;
  background: #fff;
  border: 1px solid #E6E3DF;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.nav-dropdown .dropdown-menu a {
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--vm-ink);
  border-radius: 3px;
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown .dropdown-menu a:hover { background: #F7F7F7; color: var(--vm-orange-hover); }

/* CTA + teléfono: siempre visibles, solo cambia el texto */
.header-actions { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.header-actions .btn-cta,
.header-actions .header-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 39px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 3px;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.header-actions .btn-cta { padding: 0 20px; background: var(--vm-orange); color: #fff; }
.header-actions .btn-cta:hover { background: var(--vm-orange-hover); color: #fff; }
.btn-cta-short { display: none; }
.header-actions .header-phone { gap: 8px; padding: 0 16px; border: 1px solid var(--vm-line-strong); color: var(--vm-ink); }
.header-actions .header-phone:hover { border-color: var(--vm-orange); color: var(--vm-orange-hover); }
.header-phone-number { display: none; }

/* Botón menú móvil (hamburguesa) */
.header-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: content-box;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--vm-line-strong);
  border-radius: 3px;
  color: #525252;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.header-menu-toggle:hover,
.header-menu-toggle[aria-expanded="true"] { border-color: var(--vm-orange); color: var(--vm-orange-hover); }

/* Menú móvil desplegable */
.mobile-menu-backdrop { position: absolute; top: 100%; left: 0; right: 0; height: 100vh; background: rgba(0, 0, 0, 0.4); }
.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - 66px);
  overflow-y: auto;
  background: #fff;
  border-top: 1px solid #EEE;
  box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.35);
  padding: 8px 20px 24px;
  display: flex;
  flex-direction: column;
}
.mobile-menu[hidden],
.mobile-menu-backdrop[hidden] { display: none; }
.mobile-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid #EEE;
  font-size: 17px;
  font-weight: 700;
  color: var(--vm-ink);
  transition: color 0.15s;
}
.mobile-menu a:hover { color: var(--vm-orange-hover); }
.mobile-menu a svg { flex: none; }
.mobile-menu .mobile-menu-phone {
  margin-top: 20px;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid #CFCFCF;
  border-radius: 3px;
  font-size: 15px;
}

/* Breakpoints de la landing: cta 601px · nav 821px · phone 1101px */
@media (max-width: 600px) {
  .header-inner { padding: 0 16px; }
  .btn-cta-long { display: none; }
  .btn-cta-short { display: inline; }
}
@media (min-width: 601px) {
  .site-branding .logo-img { height: 26px; }
}
@media (min-width: 821px) {
  .main-navigation { display: flex; }
  .header-menu-toggle,
  .mobile-menu,
  .mobile-menu-backdrop { display: none !important; }
}
@media (min-width: 821px) and (max-width: 920px) {
  .btn-cta-long { display: none; }
  .btn-cta-short { display: inline; }
}
@media (min-width: 821px) and (max-width: 1020px) {
  .header-inner,
  .main-navigation,
  .header-actions { gap: 14px; }
  .main-navigation > a,
  .nav-dropdown > a { font-size: 13px; }
}
@media (min-width: 1101px) {
  .header-inner { gap: 28px; }
  .header-sep { display: block; }
  .main-navigation { gap: 20px; }
  .header-actions { gap: 16px; }
  .header-phone-number { display: inline; }
}
@media (min-width: 1101px) and (max-width: 1199px) {
  .header-inner { gap: 12px; }
}
@media (min-width: 1200px) {
  .main-navigation { margin-left: 8px; }
}

/* Barra de progreso de lectura (solo en artículos) */
.read-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: var(--orange);
  transition: width .1s linear;
}

/* ==========================================================================
   Listado · Encabezado
   ========================================================================== */
.blog-hero { position: relative; overflow: hidden; background: var(--ink-dark); color: #fff; }
.blog-hero-fx { position: absolute; inset: 0; pointer-events: none; filter: blur(70px) saturate(.8); opacity: .9; }
.blog-hero-fx .fx { position: absolute; border-radius: 50%; }
.fx-spin {
  left: 72%; top: 50%;
  width: 70vw; height: 70vw; max-width: 1000px; max-height: 1000px;
  background: conic-gradient(from 0deg, #2F4FE0, #8AADFF, #E8612D, #2F4FE0, #0023D0, #2F4FE0);
  opacity: .55;
  transform: translate(-50%, -50%);
  animation: vmSpin 28s linear infinite;
}
.fx-ribbon-a {
  left: 40%; top: 5%;
  width: 62vw; height: 14vw; min-height: 120px;
  background: linear-gradient(90deg, transparent, #8AADFF 30%, #2F4FE0 70%, transparent);
  opacity: .9;
  animation: vmRibbonA 16s ease-in-out infinite;
}
.fx-ribbon-b {
  left: 48%; bottom: -6%;
  width: 58vw; height: 12vw; min-height: 110px;
  background: linear-gradient(90deg, transparent, #E8612D 40%, #8AADFF 80%, transparent);
  opacity: .75;
  animation: vmRibbonB 19s ease-in-out infinite;
}
.fx-orbit { position: absolute; left: 78%; top: 40%; width: 0; height: 0; }
.fx-dot { width: 18vw; height: 18vw; margin: -9vw 0 0 -9vw; background: var(--orange); opacity: .8; animation: vmOrbit 12s linear infinite; }
.blog-hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(15,13,11,.96) 0%, rgba(15,13,11,.88) 42%, rgba(15,13,11,.45) 72%, rgba(15,13,11,.2) 100%);
}
.blog-hero-inner {
  position: relative;
  padding-top: 110px;
  padding-bottom: 96px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 32px 64px;
  align-items: end;
}
.blog-hero-text { display: flex; flex-direction: column; gap: 18px; }
.blog-hero .crumbs, .blog-hero .crumbs a { color: var(--muted-dark); }
.blog-hero .crumbs a:hover, .blog-hero .crumbs .is-current { color: #fff; }
.blog-hero .eyebrow { letter-spacing: 2px; color: var(--orange-pale); }
.blog-hero h1 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -1.2px;
  color: #fff;
}
.blog-hero p { margin: 0; max-width: 54ch; font-size: 18px; line-height: 1.6; color: var(--sand); }

.search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 0 16px;
  background: #fff;
  border: 1px solid #fff;
  border-radius: 3px;
  transition: border-color .2s;
}
.search-form:focus-within { border-color: var(--orange); }
.search-form svg { flex: none; }
.search-field {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font: 500 15px var(--font);
  color: var(--ink);
}

@keyframes vmSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes vmRibbonA { 0%, 100% { transform: translate(0, 0) rotate(-18deg) scaleX(1); } 50% { transform: translate(-8vw, 6vh) rotate(-6deg) scaleX(1.25); } }
@keyframes vmRibbonB { 0%, 100% { transform: translate(0, 0) rotate(24deg) scaleX(1); } 50% { transform: translate(6vw, -8vh) rotate(38deg) scaleX(.8); } }
@keyframes vmOrbit { 0% { transform: rotate(0deg) translateX(9vw) rotate(0deg); } 100% { transform: rotate(360deg) translateX(9vw) rotate(-360deg); } }
@media (max-width: 760px) {
  .blog-hero-fx { filter: blur(56px); }
  .blog-hero-fx .fx { min-width: 380px; min-height: 380px; }
}

/* ==========================================================================
   Tarjetas
   ========================================================================== */
.card { display: flex; flex-direction: column; gap: 16px; color: var(--ink); }
.card:hover { color: var(--ink); }
.card-img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink-dark); }
.card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}
.card:hover .card-img img { transform: scale(1.04); }
.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--muted); }
.card-title { margin: 0; font-size: 21px; font-weight: 800; line-height: 1.25; letter-spacing: -.3px; transition: color .2s; }
.card:hover .card-title { color: var(--orange-dark); }
.card-excerpt { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-2); }

/* Destacada */
.featured { background: #fff; }
.featured .wrap { padding-top: 64px; }
.featured-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 0;
  border: 1px solid var(--line);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.featured-card:hover { border-color: var(--line-2); box-shadow: 0 24px 60px -34px rgba(26,22,20,.35); }
.featured-img { aspect-ratio: auto; min-height: 340px; }
.badge {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  background: var(--orange);
  padding: 6px 10px;
  border-radius: 2px;
}
.featured-body { display: flex; flex-direction: column; gap: 16px; padding: clamp(28px, 4vw, 52px); }
.featured-title { font-size: clamp(26px, 3vw, 38px); line-height: 1.12; letter-spacing: -.6px; }
.featured-excerpt { margin: 0; font-size: 17px; line-height: 1.6; color: var(--text-2); }
.featured-body .link-arrow { margin-top: auto; padding-top: 12px; font-size: 15px; }

/* ==========================================================================
   Listado · Pestañas, grid y paginación
   ========================================================================== */
.articles { background: #fff; }
.articles-inner { padding-top: 56px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 32px; }
.articles-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font: 600 14px var(--font);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  transition: border-color .2s, color .2s;
}
.tab:hover { border-color: var(--orange); color: var(--ink); }
.tab span { font-size: 12px; font-weight: 600; opacity: .7; }
.tab[aria-current="page"] { background: var(--ink-dark); border-color: var(--ink-dark); color: #fff; }
.tab:focus-visible { outline: 3px solid var(--orange-pale); outline-offset: 2px; }
.articles-count { font-size: 14px; color: var(--text-2); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 40px 28px; }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.pager-info { font-size: 14px; color: var(--text-2); }
.pager-btns { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pager-btns > * {
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 3px;
  font: 600 14px var(--font);
  transition: border-color .2s, background .2s, color .2s;
}
.pager-prev { padding: 0 16px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); }
.pager-prev:hover { border-color: var(--orange); color: var(--orange); }
.pager-num { width: 44px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font-weight: 700; }
.pager-num:hover { border-color: var(--orange); color: var(--ink); }
.pager-num[aria-current="page"] { background: var(--ink-dark); border-color: var(--ink-dark); color: #fff; }
.pager-next { padding: 0 16px; border: 1px solid var(--orange); background: var(--orange); color: #fff; font-weight: 700; }
.pager-next:hover { background: var(--orange-dark); color: #fff; }
.pager-gap { width: 20px; color: var(--muted); }
.pager .is-disabled { opacity: .4; pointer-events: none; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 40px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.empty strong { font-size: 18px; font-weight: 800; }
.empty span { font-size: 15px; line-height: 1.6; color: var(--text-2); }
.empty .btn { margin-top: 6px; }

/* ==========================================================================
   Artículo · Encabezado
   ========================================================================== */
.post-head { background: #fff; }
.post-head-inner { padding-top: 56px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 18px; }
.post-head .chip { align-self: flex-start; }
.post-head h1 {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(32px, 4.4vw, 54px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1.1px;
  text-wrap: balance;
}
.post-lead { margin: 0; max-width: 60ch; font-size: 20px; line-height: 1.55; color: var(--text-2); }
.post-byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.post-author { display: flex; align-items: center; gap: 12px; }
.post-author > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}
.post-author-name { font-size: 14px; font-weight: 700; }
.post-date { font-size: 13px; color: var(--muted); }
.share { display: flex; align-items: center; gap: 8px; }
.share > span { font-size: 13px; color: var(--muted); margin-right: 4px; }
.share a, .share button {
  height: 38px;
  min-width: 38px;
  border-radius: 3px;
  border: 1px solid var(--line-2);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink);
  font: 600 13px var(--font);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.share button { padding: 0 12px; }
.share a:hover, .share button:hover { border-color: var(--orange); color: var(--orange); }

.post-cover { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.post-cover-img { position: relative; aspect-ratio: 21 / 9; min-height: 240px; overflow: hidden; background: var(--ink-dark); }
.post-cover-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.post-cover figcaption { font-size: 13px; color: var(--muted); }

/* ==========================================================================
   Artículo · Índice y cuerpo
   ========================================================================== */
.post-main { background: #fff; }
.post-layout {
  padding-top: 56px;
  padding-bottom: 88px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 72px;
  align-items: start;
}
.post-layout.no-toc { grid-template-columns: minmax(0, 1fr); }
.post-layout.no-toc .entry-content { margin: 0 auto; }
.toc { position: sticky; top: calc(100px + var(--wp-admin--admin-bar--height, 0px)); display: flex; flex-direction: column; gap: 14px; }
.toc-label { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.toc nav { display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.toc nav a {
  margin-left: -1px;
  padding: 8px 0 8px 16px;
  border-left: 2px solid transparent;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
  transition: color .2s, border-color .2s;
}
.toc nav a:hover { color: var(--orange); }
.toc nav a.is-active { border-left-color: var(--orange); color: var(--ink); font-weight: 700; }
.toc .link-arrow { margin-top: 14px; }

.entry-content { max-width: 720px; display: flex; flex-direction: column; gap: 22px; }
.entry-content > * { margin: 0; }
.entry-content p { font-size: 18px; line-height: 1.75; color: var(--text); }
.entry-content li { font-size: 17px; line-height: 1.7; color: var(--text); }
.entry-content a:not(.btn) { text-decoration: underline; text-underline-offset: 3px; }
.entry-content h2 { margin-top: 22px; font-size: clamp(24px, 2.6vw, 30px); font-weight: 800; line-height: 1.2; letter-spacing: -.4px; }
.entry-content h3 { margin: 8px 0 -6px; font-size: 20px; font-weight: 800; line-height: 1.3; letter-spacing: -.2px; }
.entry-content h4 { margin: 4px 0 -8px; font-size: 17px; font-weight: 800; }

.entry-content ul:not(.blocks-gallery-grid) { padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.entry-content ul:not(.blocks-gallery-grid) > li { position: relative; padding-left: 18px; }
.entry-content ul:not(.blocks-gallery-grid) > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}
.entry-content ol { padding: 0; list-style: none; counter-reset: vm-ol; display: flex; flex-direction: column; gap: 12px; }
.entry-content ol > li { position: relative; padding-left: 42px; counter-increment: vm-ol; }
.entry-content ol > li::before {
  content: counter(vm-ol);
  position: absolute;
  left: 0;
  top: 1px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink-dark);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.entry-content blockquote {
  margin: 6px 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--orange);
}
.entry-content blockquote p { font-size: 22px; font-weight: 700; line-height: 1.45; letter-spacing: -.3px; color: var(--ink); }
.entry-content blockquote cite { display: block; margin-top: 8px; font-size: 13px; font-style: normal; color: var(--muted); }

.entry-content figure { margin: 8px 0; display: flex; flex-direction: column; gap: 10px; }
.entry-content figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.entry-content figcaption, .entry-content .wp-element-caption { font-size: 13px; color: var(--muted); text-align: left; }

.entry-content .wp-block-table, .entry-content .table-wrap { overflow-x: auto; border: 1px solid var(--line); }
.entry-content .wp-block-table figcaption { padding: 10px 18px; border-top: 1px solid var(--line); }
.entry-content table { width: 100%; min-width: 460px; border-collapse: collapse; font-size: 15px; }
.entry-content thead tr, .entry-content table tr:first-child th { background: var(--ink-dark); color: #fff; text-align: left; }
.entry-content th { padding: 14px 18px; font-weight: 700; text-align: left; border: 0; }
.entry-content td { padding: 14px 18px; line-height: 1.5; border: 0; border-top: 1px solid var(--line); }
.entry-content tbody tr:nth-child(even) { background: #FAFAFA; }

/* Bloques especiales: agrega la clase CSS "nota" o "fuentes" a un bloque Grupo o Párrafo. */
.entry-content .nota {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  background: var(--bg-soft);
  border-top: 2px solid var(--ink-dark);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}
.entry-content .nota > * { margin: 0; font-size: 15px; line-height: 1.6; }
.entry-content .nota > :first-child:not(:only-child) { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--ink); }
.entry-content .fuentes { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; padding-top: 24px; border-top: 1px solid var(--line); }
.entry-content .fuentes > * { margin: 0; }
.entry-content .fuentes > :first-child { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.entry-content .fuentes li, .entry-content .fuentes p { font-size: 14px; line-height: 1.55; color: var(--text-2); }
.entry-content .fuentes ul > li { padding-left: 0; }
.entry-content .fuentes ul > li::before { display: none; }

.article-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 10px 0;
  padding: 24px 28px;
  background: var(--ink-dark);
  color: #fff;
}
.article-cta > span { max-width: 44ch; font-size: 16px; font-weight: 600; line-height: 1.5; }

.post-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.entry-content .tags a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  background: #F2F2F2;
  padding: 6px 10px;
  border-radius: 2px;
  text-decoration: none;
}
.entry-content .tags a:hover { color: var(--orange); }
.entry-content .back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; }
.entry-content .back-link:hover { color: var(--orange); }

@media (max-width: 980px) {
  .toc { display: none; }
  .post-layout { grid-template-columns: minmax(0, 1fr); }
}

/* Relacionados */
.related { background: var(--bg-soft); border-top: 1px solid var(--line); }
.related-inner { padding-top: 80px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 32px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.section-head > div { display: flex; flex-direction: column; gap: 10px; }
.section-head h2 { margin: 0; font-size: clamp(26px, 3vw, 34px); font-weight: 800; line-height: 1.15; letter-spacing: -.5px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 28px; }
.card-boxed { gap: 0; background: #fff; border: 1px solid var(--line); transition: box-shadow .2s; }
.card-boxed:hover { box-shadow: 0 20px 50px -30px rgba(26,22,20,.35); }
.card-boxed .card-img { aspect-ratio: 16 / 9; }
.card-boxed-body { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px 26px; }
.card-boxed .card-meta strong { color: var(--orange-dark); }
.card-boxed .card-title { font-size: 19px; line-height: 1.3; letter-spacing: -.2px; }

/* ==========================================================================
   Newsletter y cierre
   ========================================================================== */
.newsletter { background: var(--ink-dark); color: #fff; }
.newsletter-inner {
  padding-top: 56px;
  padding-bottom: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 24px 64px;
  align-items: center;
}
.newsletter h2 { margin: 0 0 10px; font-size: clamp(24px, 2.6vw, 30px); font-weight: 800; line-height: 1.2; letter-spacing: -.4px; }
.newsletter p { margin: 0; max-width: 52ch; font-size: 16px; line-height: 1.6; color: var(--sand); }
.newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.newsletter-row { display: flex; flex-wrap: wrap; gap: 10px; }
.newsletter-row input { flex: 1 1 240px; }
.newsletter-row .btn { border-radius: 8px; padding: 14px 22px; font-size: 15px; }
.newsletter-note { font-size: 12px; color: var(--muted-dark); }
.newsletter-note a, .closing a { color: var(--orange-pale); }

.newsletter input,
.contact-form input:not([type="checkbox"]),
.contact-form textarea {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: #fff;
  font: 14px var(--font);
  transition: border-color .2s, box-shadow .2s;
}
.newsletter input { padding: 14px 16px; }
.newsletter input:focus,
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(232,97,45,.18); }
.contact-form textarea { resize: vertical; }

.closing { position: relative; background: var(--bg-soft); overflow: hidden; }
.closing-inner {
  position: relative;
  padding-top: 96px;
  padding-bottom: 96px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 48px;
  align-items: center;
}
.closing-text { display: flex; flex-direction: column; gap: 14px; align-self: start; padding-top: 44px; }
.closing-text .eyebrow { letter-spacing: 2px; }
.closing-text h2 { margin: 0; font-size: clamp(26px, 3vw, 34px); font-weight: 800; line-height: 1.15; letter-spacing: -.5px; }
.closing-text p { margin: 0; max-width: 50ch; font-size: 16px; line-height: 1.6; color: var(--text-2); }
.closing-card {
  position: relative;
  overflow: hidden;
  padding: 44px 40px;
  background: linear-gradient(160deg, #1F1B18, var(--ink-darker));
  border: 1px solid rgba(255,255,255,.08);
  color: #fff;
}
.closing-card h2 { margin: 0 0 24px; font-size: clamp(24px, 2.8vw, 32px); font-weight: 800; line-height: 1.15; letter-spacing: -.5px; }
.contact-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.contact-form .full { grid-column: 1 / -1; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #fff; }
.contact-form .hint { font-size: 12px; font-weight: 400; color: var(--muted-dark); }
.contact-form .consent { flex-direction: row; gap: 10px; align-items: flex-start; font-size: 12px; font-weight: 400; line-height: 1.55; color: var(--sand); }
.contact-form .consent input { margin-top: 3px; accent-color: var(--orange); flex: none; }
.contact-form .legal-links { display: flex; gap: 6px; font-size: 12px; color: var(--sand); }
.contact-form .btn-submit { padding: 15px; border-radius: 8px; font-size: 15px; }
.contact-form .form-foot { margin: 0; font-size: 12px; color: var(--muted-dark); text-align: center; }
.form-message { padding: 14px 16px; border-radius: 8px; font-size: 14px; }
.form-message.is-ok { background: #DCFCE7; color: #15803D; }
.form-message.is-error { background: #FEE2E2; color: #B91C1C; }
@media (max-width: 600px) {
  .closing-card { padding: 32px 22px; }
}

/* ==========================================================================
   Footer (igual que la landing)
   ========================================================================== */
.site-footer { background: var(--ink-dark); color: var(--muted-dark); border-top: 1px solid rgba(255,255,255,.08); }
.site-footer a { color: var(--muted-dark); transition: color .2s; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  padding-top: 48px;
  padding-bottom: 36px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  font-size: 13px;
  line-height: 1.7;
}
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-logo { color: #fff; font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
.footer-logo small { font-size: 10px; font-weight: 600; color: var(--muted-dark); }
.footer-col { display: flex; flex-direction: column; }
.footer-title { margin-bottom: 6px; color: #fff; font-weight: 700; }
.footer-title-gap { margin-top: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom-inner {
  padding-top: 16px;
  padding-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.footer-social a:hover { background: rgba(255,255,255,.18); }

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