/*
Theme Name: WeiBook Blog
Theme URI: https://blog.weibook.co
Author: WeiBook
Author URI: https://weibook.co
Description: Tema editorial para el blog de WeiBook. Modo claro/oscuro, multilingue (Polylang ES/EN/PT con URLs reales), carrusel de destacados con autoplay y articulos vistosos. Logo y marca reales de WeiBook.
Version: 4.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: weibook-blog-pro
*/

/* ============================================================
   WeiBook Blog — editorial de belleza
   Marca: azul #2C5BFF · morado #A35BFF · crema #FBF9F4
   Títulos Bricolage Grotesque · cuerpo Geist
   Acento Instrument Serif itálica (azul) · labels JetBrains Mono
   Modo claro + oscuro (data-theme en <html>)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Geist:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ---------- THEME TOKENS ---------- */
:root,
[data-theme="light"] {
  background-color: #FBF9F4;
  --bg:           #FBF9F4;
  --bg-2:         #F2EFE8;
  --surface:      #FFFFFF;
  --surface-alt:  #F2EFE8;
  --surface-elev: #FFFFFF;
  --ink:          #0B0B12;
  --text:         #1A1B24;
  --muted:        #6B7280;
  --line:         rgba(11,11,18,.10);
  --line-strong:  rgba(11,11,18,.16);

  --blue:         #2C5BFF;   /* fills sólidos */
  --blue-hover:   #1A3FE0;
  --blue-soft:    #E8EEFF;
  --accent:       #2C5BFF;   /* texto/links/keyword */
  --purple:       #A35BFF;
  --green:        #1F8A5B;
  --amber:        #B4691A;
  --pink:         #D14B6E;

  --btn-bg:       #0B0B12;
  --btn-bg-hover: #2C5BFF;
  --btn-fg:       #FFFFFF;

  --footer-bg:    #0B0B12;
  --footer-surface: #16161f;
  --footer-text:  #FBF9F4;
  --footer-muted: rgba(251,249,244,.6);
  --footer-line:  rgba(255,255,255,.12);

  --header-bg:    rgba(251,249,244,.82);
  --header-bg-solid: rgba(251,249,244,.96);

  --shadow-sm: 0 1px 2px rgba(11,11,18,.05), 0 4px 12px rgba(11,11,18,.06);
  --shadow-md: 0 10px 34px rgba(11,11,18,.10);
  --shadow-lg: 0 24px 60px rgba(11,11,18,.16);
  color-scheme: light;
}

[data-theme="dark"] {
  background-color: #0B0B12;
  --bg:           #0B0B12;
  --bg-2:         #14141C;
  --surface:      #1A1B25;
  --surface-alt:  #14141C;
  --surface-elev: #20212D;
  --ink:          #FBF9F4;
  --text:         #E7E4DC;
  --muted:        #9AA0AC;
  --line:         rgba(255,255,255,.12);
  --line-strong:  rgba(255,255,255,.22);

  --blue:         #2C5BFF;
  --blue-hover:   #4D74FF;
  --blue-soft:    rgba(44,91,255,.18);
  --accent:       #6E8BFF;   /* azul aclarado para contraste */
  --purple:       #BD8BFF;
  --green:        #46B985;
  --amber:        #E0954A;
  --pink:         #E8748F;

  --btn-bg:       #2C5BFF;
  --btn-bg-hover: #4D74FF;
  --btn-fg:       #FFFFFF;

  --footer-bg:    #07070C;
  --footer-surface: #14141C;
  --footer-text:  #FBF9F4;
  --footer-muted: rgba(251,249,244,.55);
  --footer-line:  rgba(255,255,255,.10);

  --header-bg:    rgba(11,11,18,.78);
  --header-bg-solid: rgba(11,11,18,.95);

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.45);
  --shadow-md: 0 12px 36px rgba(0,0,0,.5);
  --shadow-lg: 0 24px 64px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ---------- category accents ---------- */
[data-cat="tendencias"]  { --cat: var(--pink);   --cat-g1:#D14B6E; --cat-g2:#A35BFF; }
[data-cat="gestion"]     { --cat: var(--accent); --cat-g1:#2C5BFF; --cat-g2:#6E8BFF; }
[data-cat="crecimiento"] { --cat: var(--green);  --cat-g1:#1F8A5B; --cat-g2:#2C5BFF; }
[data-cat="marketing"]   { --cat: var(--purple); --cat-g1:#A35BFF; --cat-g2:#2C5BFF; }
[data-cat="historias"]   { --cat: var(--amber);  --cat-g1:#B4691A; --cat-g2:#D14B6E; }

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; transition: background-color .35s ease; }
body {
  font-family: 'Geist', system-ui, sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.6; font-size: 17px; -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .35s ease, color .35s ease;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
input, select { font: inherit; }
ul { list-style: none; padding: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); z-index: 200; padding: .6rem 1.1rem;
  border-radius: 0 0 10px 10px; font-family: 'JetBrains Mono', monospace; font-size: .8rem;
  transition: top .2s ease;
}
.skip-link:focus { top: 0; }

/* ---------- HELPERS ---------- */
.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.6rem); }
.eyebrow, .label {
  font-family: 'JetBrains Mono', monospace; font-weight: 500; font-size: .72rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.eyebrow.accent { color: var(--accent); }
.serif { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: 0; }
em.serif, h1 em, h2 em, h3 em, .card-title em, .cover-title em {
  font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400;
  color: var(--accent); letter-spacing: 0;
}
.visually-hidden { position:absolute!important; width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg); backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease, background .25s ease, border-color .35s ease;
}
.site-header.is-stuck { box-shadow: var(--shadow-sm); background: var(--header-bg-solid); }
.header-bar { display: flex; align-items: center; gap: 1.1rem; height: 76px; }

.logo { display: flex; align-items: center; gap: .6rem; flex: 0 0 auto; }
.logo-mark {
  width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto;
}
.logo-mark img, .logo-mark svg { width: 100%; height: 100%; display: block; }
.logo-name { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 1.22rem; letter-spacing: -.03em; color: var(--ink); line-height: 1; }
.logo-sub { font-family: 'JetBrains Mono', monospace; font-size: .6rem; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); margin-top: 3px; }
.logo-text { display: flex; flex-direction: column; }

.nav { display: flex; align-items: center; gap: .1rem; }
.nav a {
  font-family: 'Geist', sans-serif; font-weight: 500; font-size: .94rem; color: var(--muted);
  padding: .5rem .72rem; border-radius: 8px; transition: color .15s, background .15s;
}
.nav a:hover { color: var(--ink); background: var(--surface-alt); }
.nav a[aria-current="page"] { color: var(--accent); }

.header-spacer { flex: 1 1 auto; }
.header-tools { display: flex; align-items: center; gap: .55rem; }

/* OJO: scopear a form.search — WordPress pone class="search" en <body> en páginas de resultados */
form.search {
  display: flex; align-items: center; gap: .5rem; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: .5rem .9rem; min-width: 200px;
  transition: border-color .15s, box-shadow .15s, background .35s;
}
form.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--blue-soft); }
form.search svg { width: 17px; height: 17px; color: var(--muted); flex: 0 0 auto; }
form.search input { border: none; outline: none; background: none; width: 100%; font-size: .9rem; color: var(--text); }
form.search input::placeholder { color: var(--muted); }
form.search .search-submit { background: none; border: none; padding: 0; margin: 0; cursor: pointer; display: flex; align-items: center; color: var(--muted); }
form.search .search-submit:hover { color: var(--accent); }

/* round icon buttons (theme + lang globe + mobile triggers) */
.iconbtn {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  flex: 0 0 auto; transition: border-color .15s, background .15s, color .15s, transform .15s;
}
.iconbtn:hover { border-color: var(--accent); color: var(--accent); }
.iconbtn:active { transform: scale(.94); }
.iconbtn svg { width: 19px; height: 19px; }

/* theme toggle icon swap */
.theme-toggle .i-sun { display: none; }
.theme-toggle .i-moon { display: block; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* language: compact globe */
.lang { position: relative; flex: 0 0 auto; }
.lang-btn.iconbtn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.lang-flag-current {
  position: absolute; right: 5px; bottom: 5px; width: 13px; height: 9px; border-radius: 2px;
  overflow: hidden; box-shadow: 0 0 0 1.5px var(--surface); pointer-events: none;
}
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 10px); background: var(--surface-elev);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: .4rem; min-width: 210px; z-index: 120;
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.lang.open .lang-menu { opacity: 1; transform: none; pointer-events: auto; }
.lang-menu .lm-head { font-family:'JetBrains Mono',monospace; font-size:.62rem; letter-spacing:.16em; text-transform:uppercase; color:var(--muted); padding:.5rem .65rem .3rem; }
.lang-opt {
  display: flex; align-items: center; gap: .7rem; width: 100%; padding: .58rem .65rem;
  border-radius: 9px; text-align: left; font-weight: 500; font-size: .94rem; color: var(--text);
  transition: background .12s;
}
.lang-opt:hover { background: var(--surface-alt); }
.lang-opt .lflag { width: 24px; height: 16px; border-radius: 3px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); flex: 0 0 auto; }
.lang-opt .name { flex: 1 1 auto; }
.lang-opt .native { font-family:'JetBrains Mono',monospace; font-size:.66rem; color: var(--muted); letter-spacing:.05em; }
.lang-opt .check { width: 16px; height: 16px; color: var(--accent); opacity: 0; flex: 0 0 auto; }
.lang-opt[aria-checked="true"] { background: var(--blue-soft); }
.lang-opt[aria-checked="true"] .check { opacity: 1; }

.mobile-only { display: none; }

/* mobile panel */
.mobile-panel { display: none; border-top: 1px solid var(--line); background: var(--bg); padding: 1rem clamp(1.1rem,4vw,2.6rem) 1.5rem; }
.mobile-panel.open { display: block; animation: fadeDown .2s ease; }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-8px); } }
.mobile-search { display: flex; align-items: center; gap: .6rem; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: .7rem 1rem; margin-bottom: 1rem; }
.mobile-search svg { width: 18px; height: 18px; color: var(--muted); }
.mobile-search input { border: none; outline: none; background: none; width: 100%; color: var(--text); }
.mobile-nav a { display: flex; align-items: center; justify-content: space-between; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.12rem; color: var(--ink); padding: .85rem .2rem; border-bottom: 1px solid var(--line); }
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a::after { content: '→'; color: var(--accent); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn { display: inline-flex; align-items: center; gap: .55rem; font-family: 'Geist', sans-serif; font-weight: 600; font-size: .95rem; padding: .82rem 1.4rem; border-radius: 10px; line-height: 1; transition: background .18s, color .18s, box-shadow .18s, transform .15s, border-color .18s; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { background: var(--btn-bg-hover); box-shadow: 0 10px 26px rgba(44,91,255,.34); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-pill { border-radius: 999px; }

.readmore { display: inline-flex; align-items: center; gap: .42rem; font-family: 'Geist', sans-serif; font-weight: 600; font-size: .9rem; color: var(--accent); }
.readmore svg { width: 16px; height: 16px; transition: transform .18s ease; }
a:hover .readmore svg { transform: translateX(4px); }

/* ============================================================
   BADGES / CHIPS
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: .4rem; font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; background: var(--cat, var(--accent)); padding: .36rem .6rem; border-radius: 999px;
}
.badge-soft { color: var(--cat, var(--accent)); background: color-mix(in srgb, var(--cat, var(--accent)) 14%, transparent); }
.badge-dot::before { content:''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.chips { display: flex; gap: .55rem; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; font-family: 'Geist', sans-serif; font-weight: 500; font-size: .9rem; padding: .55rem 1.05rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); white-space: nowrap; transition: all .15s; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ============================================================
   IMAGE PLACEHOLDERS (duotono por categoría — sustituir en WP)
   ============================================================ */
.ph {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--cat-g1, #2C5BFF), var(--cat-g2, #A35BFF));
}
.ph::before {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.10) 0 1.5px, transparent 1.5px 13px);
  mix-blend-mode: overlay;
}
.ph[data-ph]::after {
  content: attr(data-ph); position: absolute; left: 14px; bottom: 12px; z-index: 2;
  font-family: 'JetBrains Mono', monospace; font-size: .62rem; letter-spacing: .08em;
  color: #fff; background: rgba(0,0,0,.28); backdrop-filter: blur(3px);
  border: 1px solid rgba(255,255,255,.35); border-radius: 6px; padding: .25rem .5rem;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section { padding-block: clamp(2.6rem, 6vw, 4.6rem); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-head .titles { display: flex; flex-direction: column; gap: .5rem; }
.section-head h2 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; letter-spacing: -.025em; font-size: clamp(1.7rem, 3.6vw, 2.4rem); line-height: 1.02; color: var(--ink); }
.section-head .link { font-family: 'Geist', sans-serif; font-weight: 600; font-size: .92rem; color: var(--accent); display: inline-flex; align-items: center; gap: .4rem; }
.section-head .link svg { width: 16px; height: 16px; }

/* ============================================================
   CLASSIC HERO (portada estilo editorial — intro + destacados)
   ============================================================ */
.hero-intro { max-width: 680px; margin-bottom: clamp(1.8rem, 4vw, 2.6rem); }
.hero-intro h1 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; letter-spacing: -.03em; font-size: clamp(2.2rem, 6vw, 3.7rem); line-height: 1.02; margin-top: .85rem; color: var(--ink); text-wrap: balance; }
.hero-intro p { font-size: 1.2rem; color: var(--muted); margin-top: 1.05rem; max-width: 52ch; text-wrap: pretty; }

.featured-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(1.4rem, 3vw, 2.6rem); align-items: start; }
.feat-main .card-media { aspect-ratio: 16/10; margin-bottom: 1.2rem; }
.feat-main .card-title { font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.08; }
.feat-main .card-excerpt { font-size: 1.08rem; max-width: 54ch; }

.feat-side { display: flex; flex-direction: column; }
.feat-item { display: grid; grid-template-columns: 108px 1fr; gap: 1.15rem; align-items: center; padding-block: 1.2rem; border-bottom: 1px solid var(--line); }
.feat-item:first-child { padding-top: 0; }
.feat-item:last-child { border-bottom: none; padding-bottom: 0; }
.feat-item .thumb { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.feat-item .thumb .ph { position: absolute; inset: 0; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.feat-item:hover .thumb .ph { transform: scale(1.06); }
.feat-item .card-cat { font-size: .64rem; }
.feat-item h3 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; letter-spacing: -.02em; font-size: 1.1rem; line-height: 1.16; margin-top: .35rem; color: var(--ink); transition: color .15s; }
.feat-item:hover h3 { color: var(--accent); }
.feat-item .card-meta { margin-top: .45rem; }

/* ============================================================
   CARRUSEL DINÁMICO (portada)
   ============================================================ */
.carousel { position: relative; }
.cz-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.cz-controls { display: flex; align-items: center; gap: .7rem; }
.cz-dots { display: flex; align-items: center; gap: .42rem; }
.cz-dot { width: 9px; height: 9px; padding: 0; border-radius: 999px; background: var(--line-strong); transition: width .3s var(--ease, cubic-bezier(.2,.7,.2,1)), background .3s; }
.cz-dot:hover { background: var(--muted); }
.cz-dot.on { width: 30px; background: var(--accent); }
.cz-btns { display: flex; align-items: center; gap: .4rem; }
.cz-btn { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); transition: border-color .15s, color .15s, background .15s, transform .15s; }
.cz-btn:hover { border-color: var(--accent); color: var(--accent); }
.cz-btn:active { transform: scale(.93); }
.cz-btn svg { width: 17px; height: 17px; }
.cz-btn .i-pause { display: block; } .cz-btn .i-play { display: none; }
.carousel.is-paused .cz-btn.cz-play .i-pause { display: none; }
.carousel.is-paused .cz-btn.cz-play .i-play { display: block; }

/* progress bar sobre la portada grande */
.feat-main { position: relative; }
.feat-main .cz-progress { display: none; }

/* entradas/salidas */
@keyframes wbMainIn  { from { opacity: 0; transform: translateY(28px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes wbMainOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-20px) scale(.99); } }
@keyframes wbKen     { from { transform: scale(1.14); } to { transform: scale(1); } }
@keyframes wbUp      { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes wbSideIn  { from { opacity: 0; transform: translateY(38px); } to { opacity: 1; transform: none; } }
@keyframes wbSideOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-26px); } }
@keyframes wbRiseToMain { 0% { opacity: 1; transform: translateY(0) scale(1); } 60% { opacity: .25; } 100% { opacity: 0; transform: translateY(-46px) scale(1.04); } }

@media (prefers-reduced-motion: no-preference) {
  .feat-main.anim-in { animation: wbMainIn .62s cubic-bezier(.2,.7,.2,1) both; }
  .feat-main.anim-out { animation: wbMainOut .4s ease both; }
  .feat-main.anim-in .card-media .ph { animation: wbKen 6.2s ease-out both; }
  .feat-main.anim-in .badge       { animation: wbUp .5s .06s both; }
  .feat-main.anim-in .card-title  { animation: wbUp .5s .14s both; }
  .feat-main.anim-in .card-excerpt{ animation: wbUp .5s .22s both; }
  .feat-main.anim-in .card-meta   { animation: wbUp .5s .3s both; }
  .feat-main.anim-in .readmore    { animation: wbUp .5s .36s both; }
  .feat-item.sin  { animation: wbSideIn .55s cubic-bezier(.2,.7,.2,1) both; }
  .feat-item.sout { animation: wbSideOut .4s ease both; }
  .feat-item.rise { animation: wbRiseToMain .5s ease both; }
}

/* la portada del carrusel muestra "Leer más" */
.feat-main .readmore { margin-top: .9rem; }
.feat-main .card-media .ph { will-change: transform; }
/* item lateral: señal de clicable */
.carousel .feat-item { cursor: pointer; border-radius: 14px; transition: background .15s; }
.carousel .feat-item:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.carousel .feat-item .thumb { transition: box-shadow .2s; }
.carousel .feat-item:hover .thumb { box-shadow: var(--shadow-md); }

/* ============================================================
   HERO DE PORTADA
   ============================================================ */
.hero { padding-top: clamp(1.4rem, 3vw, 2.2rem); }
.hero-grid { display: grid; grid-template-columns: 1.62fr 1fr; gap: clamp(1rem, 2vw, 1.4rem); }

/* gran portada con título superpuesto */
.cover-card { position: relative; display: block; border-radius: 22px; overflow: hidden; min-height: 540px; box-shadow: var(--shadow-md); isolation: isolate; }
.cover-card .ph { position: absolute; inset: 0; }
.cover-card .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-card::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(7,7,12,.86) 0%, rgba(7,7,12,.45) 38%, rgba(7,7,12,.05) 70%); transition: opacity .3s; }
.cover-overlay { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: .9rem; padding: clamp(1.5rem, 3vw, 2.4rem); }
.cover-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; letter-spacing: -.03em; color: #fff; font-size: clamp(2rem, 3.6vw, 3.05rem); line-height: 1.02; text-wrap: balance; max-width: 18ch; }
.cover-title em { color: #9DB2FF; }
.cover-meta { width: 100%; display: flex; align-items: center; gap: .6rem; font-family: 'JetBrains Mono', monospace; font-size: .72rem; color: rgba(255,255,255,.82); flex-wrap: wrap; }
.cover-meta > span { white-space: nowrap; }
.cover-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.cover-card .ph { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.cover-card:hover .ph { transform: scale(1.05); }
.cover-overlay .badge, .side-overlay .badge { align-self: flex-start; }
.cover-readmore { align-self: flex-start; white-space: nowrap; display: inline-flex; align-items: center; gap: .45rem; font-family:'Geist',sans-serif; font-weight: 600; font-size: .92rem; color: #fff; margin-top: .2rem; }
.cover-readmore svg { width: 17px; height: 17px; transition: transform .18s; }
.cover-card:hover .cover-readmore svg { transform: translateX(4px); }

/* side stacked covers */
.hero-side { display: grid; grid-template-rows: 1fr 1fr; gap: clamp(1rem, 2vw, 1.4rem); min-height: 540px; }
.side-card { position: relative; display: block; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-sm); isolation: isolate; }
.side-card .ph { position: absolute; inset: 0; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.side-card:hover .ph { transform: scale(1.06); }
.side-card::after { content:''; position:absolute; inset:0; z-index:1; background: linear-gradient(to top, rgba(7,7,12,.85), rgba(7,7,12,.15) 65%, transparent); }
.side-overlay { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: .5rem; padding: 1.3rem; }
.side-overlay h3 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; letter-spacing: -.02em; color: #fff; font-size: 1.25rem; line-height: 1.1; text-wrap: balance; }
.side-overlay .cover-meta { font-size: .68rem; }

/* ============================================================
   CARD (mosaico)
   ============================================================ */
.card { display: flex; flex-direction: column; background: transparent; }
.card-media { position: relative; aspect-ratio: 3/2; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 1rem; }
.card-media .ph { position: absolute; inset: 0; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.card:hover .card-media .ph { transform: scale(1.05); }
.card-media .badge { position: absolute; left: 12px; top: 12px; z-index: 3; }
.card-cat { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cat, var(--accent)); }
.card-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; letter-spacing: -.02em; font-size: 1.34rem; line-height: 1.14; color: var(--ink); transition: color .15s; margin-top: .4rem; }
.card:hover .card-title { color: var(--accent); }
.card-excerpt { font-size: 1rem; line-height: 1.55; color: var(--muted); margin-top: .5rem; text-wrap: pretty; }
.card-meta { display: flex; align-items: center; gap: .5rem; margin-top: .7rem; font-family: 'JetBrains Mono', monospace; font-size: .72rem; color: var(--muted); flex-wrap: wrap; }
.card-meta > span { white-space: nowrap; }
.card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.avatar { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; background: var(--blue-soft); color: var(--accent); font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: .78rem; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent); }

/* mosaic grid: varied sizes */
.mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.6rem,3vw,2.4rem) clamp(1.4rem,2.5vw,2rem); }
.mosaic .card.wide { grid-column: span 2; }
.mosaic .card.wide .card-media { aspect-ratio: 16/9; }
.mosaic .card.wide .card-title { font-size: clamp(1.5rem, 2.6vw, 2rem); }

/* horizontal card (text-led, for rhythm) */
.card.row { flex-direction: row; gap: 1.3rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.1rem; }
.card.row .card-media { width: 40%; flex: 0 0 40%; aspect-ratio: 4/3; margin: 0; }
.card.row .card-body { padding-right: .4rem; }

/* generic article grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.6rem,3vw,2.4rem) clamp(1.4rem,2.5vw,2rem); }

/* ============================================================
   NEWSLETTER CTA
   ============================================================ */
.cta-band { position: relative; overflow: hidden; border-radius: 24px; padding: clamp(2.2rem,5vw,3.6rem); background: linear-gradient(125deg, #2C5BFF 0%, #5B3DF0 55%, #A35BFF 100%); color: #fff; }
.cta-band::before { content:''; position:absolute; inset:0; background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 1px, transparent 1px 16px); }
.cta-inner { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; gap: 2rem; align-items: center; }
.cta-band h2 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; letter-spacing: -.025em; font-size: clamp(1.7rem,3.6vw,2.5rem); line-height: 1.04; }
.cta-band h2 em { color: #DCE4FF; }
.cta-band p { color: rgba(255,255,255,.85); margin-top: .8rem; max-width: 42ch; }
.newsletter-form { display: flex; gap: .6rem; flex-wrap: wrap; }
.newsletter-form input { flex: 1 1 200px; min-width: 0; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.12); color: #fff; border-radius: 999px; padding: .85rem 1.2rem; outline: none; }
.newsletter-form input::placeholder { color: rgba(255,255,255,.6); }
.newsletter-form input:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
.newsletter-form .btn { background: #fff; color: var(--blue); }
.newsletter-form .btn:hover { background: #0B0B12; color: #fff; }
.cta-note { font-family: 'JetBrains Mono', monospace; font-size: .68rem; color: rgba(255,255,255,.6); margin-top: .8rem; letter-spacing: .03em; }

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.breadcrumb { display: flex; align-items: center; gap: .5rem; padding-top: 1.4rem; font-family: 'JetBrains Mono', monospace; font-size: .72rem; color: var(--muted); flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: .5; }

.article-head { max-width: 800px; margin-inline: auto; text-align: center; padding-block: clamp(1.6rem,3.5vw,2.6rem) clamp(1.2rem,2.5vw,2rem); }
.article-head h1 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; letter-spacing: -.03em; font-size: clamp(2.1rem,5.4vw,3.5rem); line-height: 1.04; margin-top: 1rem; text-wrap: balance; color: var(--ink); }
.article-head .deck { font-size: 1.25rem; color: var(--muted); margin-top: 1.1rem; max-width: 56ch; margin-inline: auto; text-wrap: pretty; }
.article-meta { display: flex; align-items: center; justify-content: center; gap: .9rem; flex-wrap: wrap; margin-top: 1.6rem; font-family: 'JetBrains Mono', monospace; font-size: .76rem; color: var(--muted); }
.article-meta .byline { display: flex; align-items: center; gap: .55rem; white-space: nowrap; }
.article-meta .byline .who { font-family:'Geist',sans-serif; font-size: .92rem; color: var(--ink); font-weight: 600; }
.article-meta .avatar { width: 38px; height: 38px; }
.article-meta .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); }

.article-cover { position: relative; aspect-ratio: 16/8; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-md); margin-block: clamp(1.4rem,3.5vw,2.4rem); }
.article-cover .ph { position: absolute; inset: 0; }

/* prose */
.prose { max-width: 41rem; margin-inline: auto; }
.prose > * + * { margin-top: 1.45rem; }
.prose p { font-size: 1.2rem; line-height: 1.75; color: var(--text); }
.prose > p:first-of-type::first-letter {
  float: left; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; color: var(--accent);
  font-size: 4.6rem; line-height: .82; padding: .3rem .55rem 0 0; margin-top: .1rem;
}
.prose h2 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; letter-spacing: -.02em; font-size: 1.85rem; line-height: 1.14; margin-top: 2.8rem; color: var(--ink); }
.prose h2 .num { font-family: 'JetBrains Mono', monospace; font-size: 1rem; color: var(--accent); vertical-align: super; margin-right: .3rem; }
.prose h3 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.34rem; margin-top: 2rem; color: var(--ink); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { font-size: 1.16rem; line-height: 1.62; margin-top: .55rem; }
.prose ul li { list-style: disc; } .prose ol li { list-style: decimal; }
.prose li::marker { color: var(--accent); }
.prose strong { font-weight: 600; color: var(--ink); }

/* big blue pull-quote */
.prose blockquote {
  margin-block: 2.6rem; padding: 0; border: none; position: relative;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(1.6rem, 3vw, 2.15rem); line-height: 1.15; color: var(--accent); text-wrap: balance;
}
.prose blockquote::before { content: '“'; display: block; font-size: 3.4rem; line-height: .6; color: var(--accent); opacity: .4; margin-bottom: .4rem; }

/* intercalated full image (rompe el ancho de lectura) */
.prose-figure { margin-block: 2.6rem; max-width: 52rem; margin-inline: auto; }
.prose-figure .ph { position: relative; aspect-ratio: 16/9; border-radius: 18px; }
.prose-figure figcaption { font-family: 'JetBrains Mono', monospace; font-size: .72rem; color: var(--muted); margin-top: .7rem; text-align: center; letter-spacing: .03em; }

/* data / tip callout box */
.callout { border-radius: 18px; padding: 1.5rem 1.7rem; margin-block: 2.2rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--cat, var(--accent)); box-shadow: var(--shadow-sm); }
.callout .label { color: var(--cat, var(--accent)); margin-bottom: .5rem; display: flex; align-items: center; gap: .45rem; }
.callout .label svg { width: 15px; height: 15px; }
.callout p { font-size: 1.06rem; color: var(--text); }
.callout.stat { display: flex; align-items: center; gap: 1.3rem; }
.callout.stat .big { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: clamp(2.6rem,6vw,3.4rem); line-height: 1; color: var(--cat, var(--accent)); letter-spacing: -.03em; }

.article-foot { max-width: 41rem; margin: 2.6rem auto 0; padding-top: 1.6rem; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.article-tags { display: flex; gap: .5rem; flex-wrap: wrap; }
.share { display: flex; align-items: center; gap: .5rem; }
.share .label { margin-right: .2rem; }
.share-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); display: grid; place-items: center; transition: all .15s; }
.share-btn:hover { border-color: var(--accent); color: var(--accent); }
.share-btn svg { width: 17px; height: 17px; }

.author-box { max-width: 41rem; margin: 2.4rem auto 0; display: flex; gap: 1.2rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem 1.6rem; box-shadow: var(--shadow-sm); }
.author-box .avatar { width: 58px; height: 58px; font-size: 1.15rem; }
.author-box .name { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.08rem; color: var(--ink); }
.author-box .role { font-family: 'JetBrains Mono', monospace; font-size: .7rem; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; }
.author-box .bio { font-size: .98rem; color: var(--muted); margin-top: .4rem; }

/* product CTA */
.product-cta { max-width: 1000px; margin: clamp(3rem,7vw,5rem) auto 0; position: relative; overflow: hidden; border-radius: 26px; padding: clamp(2.4rem,5vw,3.8rem); text-align: center; background: linear-gradient(125deg, #2C5BFF 0%, #5B3DF0 60%, #A35BFF 100%); color: #fff; }
.product-cta::before { content:''; position:absolute; inset:0; background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 1px, transparent 1px 16px); }
.product-cta > * { position: relative; }
.product-cta .eyebrow { color: rgba(255,255,255,.8); }
.product-cta h2 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; letter-spacing: -.025em; font-size: clamp(1.8rem,4vw,2.7rem); line-height: 1.06; margin-top: .8rem; max-width: 20ch; margin-inline: auto; }
.product-cta h2 em { color: #DCE4FF; }
.product-cta p { color: rgba(255,255,255,.86); margin-top: 1rem; max-width: 48ch; margin-inline: auto; font-size: 1.1rem; }
.product-cta .cta-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 1.8rem; }
.product-cta .btn-white { background: #fff; color: var(--blue); }
.product-cta .btn-white:hover { background: #0B0B12; color: #fff; }
.product-cta .btn-outline { background: rgba(255,255,255,.10); color: #fff; border: 1px solid rgba(255,255,255,.45); }
.product-cta .btn-outline:hover { background: rgba(255,255,255,.2); }

.related { border-top: 1px solid var(--line); margin-top: clamp(3rem,6vw,4.5rem); }

/* ============================================================
   ARTÍCULO VISTOSO (página enriquecida)
   ============================================================ */
/* barra de progreso de lectura */
.read-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0%; background: linear-gradient(90deg, var(--blue), var(--purple)); z-index: 200; transition: width .08s linear; }

/* portada XL casi a pantalla completa */
.cover-xl { position: relative; height: min(86vh, 780px); min-height: 460px; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.cover-xl .ph { position: absolute; inset: 0; transition: transform 6s ease; }
.cover-xl .ph::after { left: auto; right: 16px; }
.cover-xl::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(7,7,12,.9) 2%, rgba(7,7,12,.5) 34%, rgba(7,7,12,.12) 66%, rgba(7,7,12,.28) 100%); }
.cover-xl-inner { position: relative; z-index: 2; width: 100%; max-width: 980px; margin-inline: auto; padding: clamp(1.6rem,4vw,3.2rem) clamp(1.1rem,4vw,2.6rem); display: flex; flex-direction: column; gap: 1rem; }
.cover-xl-inner .badge { align-self: flex-start; }
.cover-xl h1 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; letter-spacing: -.03em; color: #fff; font-size: clamp(2.3rem, 6.4vw, 4.6rem); line-height: 1; text-wrap: balance; max-width: 17ch; }
.cover-xl h1 em { color: #9DB2FF; }
.cover-xl .deck { color: rgba(255,255,255,.9); font-size: clamp(1.1rem,2.2vw,1.4rem); max-width: 60ch; text-wrap: pretty; }
.cover-xl .article-meta { justify-content: flex-start; margin-top: .4rem; color: rgba(255,255,255,.82); }
.cover-xl .article-meta .who { color: #fff; }
.cover-xl .article-meta .sep { background: rgba(255,255,255,.4); }
.cover-xl .cover-breadcrumb { position: absolute; top: 0; left: 0; right: 0; z-index: 2; }
.cover-xl .cover-breadcrumb .breadcrumb { max-width: 980px; margin-inline: auto; padding: 1.2rem clamp(1.1rem,4vw,2.6rem) 0; color: rgba(255,255,255,.8); }
.cover-xl .cover-breadcrumb .breadcrumb a:hover { color: #fff; }

/* layout con índice flotante + contenido centrado */
.article-wrap { max-width: 720px; margin-inline: auto; padding-inline: clamp(1.1rem,4vw,2.6rem); }
.toc { position: fixed; top: 116px; left: calc(50vw - 24rem - 210px); width: 210px; z-index: 50; display: none; opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .3s ease, transform .3s ease; }
@media (min-width: 1320px) { .toc { display: block; } }
.toc.show { opacity: 1; transform: none; pointer-events: auto; }
.toc h4 { font-family: 'JetBrains Mono', monospace; font-size: .66rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: .9rem; }
.toc ul { border-left: 2px solid var(--line); display: flex; flex-direction: column; }
.toc a { display: block; font-size: .9rem; color: var(--muted); padding: .42rem 0 .42rem .9rem; border-left: 2px solid transparent; margin-left: -2px; line-height: 1.3; transition: color .15s, border-color .15s; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--accent); border-color: var(--accent); font-weight: 600; }

/* imagen a sangre / ancho completo (contenido centrado en viewport) */
.fullbleed { position: relative; left: 50%; transform: translateX(-50%); width: 100vw; margin-block: clamp(2.4rem,5vw,3.6rem); }
.fullbleed .ph { position: relative; aspect-ratio: 21/9; }
.fullbleed figcaption { max-width: 720px; margin: .8rem auto 0; padding-inline: clamp(1.1rem,4vw,2.6rem); font-family: 'JetBrains Mono', monospace; font-size: .72rem; color: var(--muted); letter-spacing: .03em; text-align: center; }
@media (max-width: 720px) { .fullbleed .ph { aspect-ratio: 4/3; } }

/* imagen amplia (mayor que el texto, sin llegar a sangre) */
.figure-wide { position: relative; left: 50%; transform: translateX(-50%); width: min(980px, 92vw); margin-block: clamp(2rem,4vw,3rem); }
.figure-wide .ph { position: relative; aspect-ratio: 16/9; border-radius: 18px; }
.figure-wide figcaption { font-family: 'JetBrains Mono', monospace; font-size: .72rem; color: var(--muted); margin-top: .7rem; text-align: center; letter-spacing: .03em; }

/* separador elegante */
.sep-mark { border: none; height: 1px; background: var(--line); max-width: 720px; margin: clamp(2.4rem,5vw,3.4rem) auto; position: relative; }
.sep-mark::after { content: ''; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; transform: translate(-50%,-50%) rotate(45deg); background: var(--accent); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--line); }

/* cajas visuales: dato / consejo / recordar */
.callout.dato { --cat: var(--green); }
.callout.consejo { --cat: var(--accent); }
.callout.recordar { --cat: var(--purple); }
.callout.tone { background: color-mix(in srgb, var(--cat) 9%, var(--surface)); }
.callout .label .ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--cat) 16%, transparent); color: var(--cat); margin-right: .15rem; }
.callout .label .ico svg { width: 15px; height: 15px; }

/* autor enriquecido */
.author-card { max-width: 720px; margin: clamp(2.4rem,5vw,3.4rem) auto 0; display: flex; gap: 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(1.4rem,3vw,2rem); box-shadow: var(--shadow-sm); align-items: flex-start; }
.author-card .avatar { width: 74px; height: 74px; font-size: 1.4rem; flex: 0 0 auto; }
.author-card .a-top { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.author-card .name { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.2rem; color: var(--ink); }
.author-card .role { font-family: 'JetBrains Mono', monospace; font-size: .66rem; color: var(--accent); letter-spacing: .08em; text-transform: uppercase; background: var(--blue-soft); padding: .25rem .55rem; border-radius: 999px; }
.author-card .bio { color: var(--muted); margin-top: .55rem; font-size: 1.02rem; }
.author-card .a-links { display: flex; gap: .5rem; margin-top: .9rem; align-items: center; }
.author-card .a-links a { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--ink); transition: all .15s; }
.author-card .a-links a:hover { border-color: var(--accent); color: var(--accent); }
.author-card .a-links svg { width: 16px; height: 16px; }
.author-card .a-more { margin-left: auto; }

/* relacionados con imagen grande */
.related-xl .grid { grid-template-columns: repeat(3, 1fr); }
.related-xl .card-media { aspect-ratio: 4/3; }
@media (max-width: 860px) { .related-xl .grid { grid-template-columns: 1fr; } }

/* prose enlazado al índice: offset de scroll para el header */
.article-body .prose h2 { scroll-margin-top: 100px; }
.article-body .prose > p:first-of-type::first-letter { font-size: 5.4rem; padding: .35rem .6rem 0 0; }


/* ============================================================
   CATEGORY PAGE
   ============================================================ */
.cat-hero { position: relative; padding-block: clamp(2.4rem,5vw,3.8rem) clamp(1.6rem,3vw,2.4rem); border-bottom: 1px solid var(--line); }
.cat-hero .kicker { display: inline-flex; align-items: center; gap: .5rem; }
.cat-hero h1 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; letter-spacing: -.03em; font-size: clamp(2.6rem,8vw,4.6rem); line-height: .98; margin-top: .7rem; color: var(--ink); }
.cat-hero h1 em { color: var(--cat, var(--accent)); }
.cat-hero p { font-size: 1.2rem; color: var(--muted); margin-top: 1.1rem; max-width: 56ch; text-wrap: pretty; }
.cat-stats { display: flex; gap: 1.6rem; margin-top: 1.6rem; font-family: 'JetBrains Mono', monospace; font-size: .74rem; color: var(--muted); letter-spacing: .04em; }
.cat-stats > span { white-space: nowrap; }
.cat-stats strong { color: var(--ink); font-weight: 700; }

.cat-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-block: clamp(1.6rem,3vw,2.2rem); flex-wrap: wrap; }
.sortby { display: flex; align-items: center; gap: .6rem; font-family: 'JetBrains Mono', monospace; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.sortby select { font-family: 'Geist', sans-serif; font-size: .9rem; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: .5rem 1rem; color: var(--text); }

.pagination { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: clamp(2.5rem,5vw,4rem); }
.pagination a, .pagination span { min-width: 42px; height: 42px; padding-inline: .6rem; border-radius: 11px; display: grid; place-items: center; font-family: 'Geist', sans-serif; font-weight: 600; font-size: .95rem; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); transition: all .15s; }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pagination .ellipsis { border: none; background: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--footer-bg); color: var(--footer-text); margin-top: clamp(3.5rem,8vw,6rem); transition: background .35s ease; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; padding-block: clamp(2.6rem,5vw,4rem); }
.footer-brand .logo-name, .footer-brand .logo-sub { color: var(--footer-text); }
.footer-brand p { color: var(--footer-muted); margin-top: 1.1rem; max-width: 34ch; }
.footer-social { display: flex; gap: .6rem; margin-top: 1.3rem; }
.footer-social a { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--footer-line); color: var(--footer-text); display: grid; place-items: center; transition: all .15s; }
.footer-social a:hover { background: var(--blue); border-color: var(--blue); }
.footer-social svg { width: 18px; height: 18px; }
.footer-col h4 { font-family: 'JetBrains Mono', monospace; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--footer-muted); margin-bottom: 1.1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: .7rem; }
.footer-col a { font-family: 'Geist', sans-serif; font-size: .96rem; color: color-mix(in srgb, var(--footer-text) 82%, transparent); transition: color .15s; }
.footer-col a:hover { color: var(--blue-hover); }
.footer-bottom { border-top: 1px solid var(--footer-line); padding-block: 1.4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-bottom p, .footer-bottom a { font-family: 'JetBrains Mono', monospace; font-size: .7rem; color: var(--footer-muted); letter-spacing: .04em; }
.footer-bottom .legal { display: flex; gap: 1.2rem; }
.footer-bottom .legal a:hover { color: var(--footer-text); }

/* ============================================================
   TOAST
   ============================================================ */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: .8rem 1.3rem; border-radius: 999px; font-weight: 500; font-size: .9rem; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all .3s ease; z-index: 300; display: flex; align-items: center; gap: .6rem; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .lflag { width: 20px; height: 14px; border-radius: 2px; overflow: hidden; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1040px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2.5rem 1.5rem; }
  .footer-brand { grid-column: 1 / -1; }
  .mosaic, .grid { grid-template-columns: repeat(2, 1fr); }
  .mosaic .card.wide { grid-column: span 2; }
}
@media (max-width: 880px) {
  .nav, form.search { display: none; }
  .mobile-only { display: grid; }
  .hero-grid { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .cover-card { min-height: 440px; }
  .hero-side { grid-template-rows: auto; grid-template-columns: 1fr 1fr; min-height: 0; }
  .side-card { min-height: 230px; }
  .cta-inner { grid-template-columns: 1fr; gap: 1.4rem; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .header-bar { height: 64px; gap: .5rem; }
  .mosaic, .grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .mosaic .card.wide { grid-column: span 1; }
  .hero-side { grid-template-columns: 1fr; }
  .feat-item { grid-template-columns: 92px 1fr; gap: 1rem; }
  .side-card { min-height: 240px; }
  .card.row { flex-direction: column; align-items: stretch; }
  .card.row .card-media { width: 100%; flex: none; aspect-ratio: 16/9; margin-bottom: 1rem; }
  .prose p, .prose li { font-size: 1.1rem; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .lang-menu { position: fixed; left: clamp(1.1rem,4vw,2.6rem); right: clamp(1.1rem,4vw,2.6rem); min-width: 0; }
}

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


/* ============================================================
   AJUSTES WORDPRESS (imagenes reales, paginacion, idioma)
   ============================================================ */
/* Imagenes reales dentro de los placeholders .ph */
.ph img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; }
.prose img { max-width:100%; height:auto; border-radius:14px; box-shadow:var(--shadow-sm); }
.prose figure img { width:100%; }

/* Logo oficial COMPLETO inline (W + wordmark "WeiBook" de la marca, igual que la landing) */
.site-logo svg { height:34px; width:auto; display:block; }
.site-logo { display:inline-flex; align-items:center; }
/* En modo oscuro el wordmark (st0) pasa de oscuro a crema; la W (st11) queda azul */
[data-theme="dark"] .site-logo .st0,
[data-theme="dark"] .site-logo .st12 { fill:#FBF9F4 !important; }

/* Paginacion nativa de WordPress (paginate_links) */
.pagination { display:flex; justify-content:center; gap:.4rem; flex-wrap:wrap; margin-top:2.8rem; }
.pagination .page-numbers { display:inline-flex; align-items:center; justify-content:center; min-width:42px; height:42px; padding:0 .7rem; border:1px solid var(--line-strong,#e2dccf); border-radius:10px; font-family:'JetBrains Mono',monospace; font-weight:600; font-size:.9rem; color:var(--ink,#0B0B12); text-decoration:none; transition:all .15s; background:var(--surface,#fff); }
.pagination a.page-numbers:hover { border-color:var(--accent,#2C5BFF); color:var(--accent,#2C5BFF); }
.pagination .page-numbers.current { background:var(--accent,#2C5BFF); border-color:var(--accent,#2C5BFF); color:#fff; }
.pagination .page-numbers.dots { border:none; min-width:auto; background:none; }

/* Comentarios / contenido nativo dentro de .prose */
.prose ol { margin:1.1rem 0 1.1rem 1.1rem; }
.prose figcaption { text-align:center; }
/* (el menu de idioma usa el control .open del diseno; lo rellena el servidor con enlaces reales de Polylang) */

/* ============================================================
   REALCES AUTOMATICOS DEL ARTICULO (para que el contenido luzca tipo magazine
   aunque sea solo texto). Las cajas/callouts vistosos se anaden por articulo.
   ============================================================ */
/* Parrafo de entrada destacado (va junto a la capitular) */
.prose > p:first-of-type { font-size: 1.34rem; line-height: 1.6; color: var(--ink); }
/* Separadores <hr> como rombo de marca */
.prose hr { border: none; height: 1px; background: var(--line); margin-block: 2.8rem; position: relative; overflow: visible; }
.prose hr::after { content: ''; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; transform: translate(-50%,-50%) rotate(45deg); background: var(--accent); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--line); }
/* Imagenes del contenido: a todo el ancho de lectura, redondeadas y con respiro */
.prose img { width: 100%; height: auto; border-radius: 16px; box-shadow: var(--shadow-sm); }
.prose figure { margin-block: 2.6rem; }
.prose figure img { margin: 0; }
.prose figcaption { font-family: 'JetBrains Mono', monospace; font-size: .72rem; color: var(--muted); margin-top: .6rem; letter-spacing: .03em; }
/* Primer h2 sin tanto margen superior si abre el cuerpo */
.prose > h2:first-child { margin-top: .4rem; }

/* ============================================================
   SOLO COLOR DE MARCA (azul): quita morados/verdes/rosas por categoría
   ============================================================ */
[data-cat] { --cat: var(--accent); --cat-g1: var(--accent); --cat-g2: var(--accent); }
/* Placeholder de artículos SIN imagen: neutro de marca con la W (nada de morado) */
.ph { background: var(--blue-soft, #E8EEFF) !important; }
.card-media .ph::before,
.feat-item .thumb .ph::before,
.cover-card .ph::before,
.side-card .ph::before,
.cover-xl .ph::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: url('assets/weibook-logo.svg') center center / 42px no-repeat;
  opacity: .15;
}

/* ============================================================
   FOOTER IGUAL A weibook.co (prensa + bloque azul). Azul #1F7DFE fijo (claro y oscuro).
   ============================================================ */
.wb-press { text-align: center; padding: clamp(2.4rem,5vw,3.4rem) 1.2rem clamp(2.6rem,5vw,3.6rem); }
.wb-press-label { font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; color: var(--muted); margin-bottom: 1.7rem; }
.wb-press-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(1.8rem,5vw,4rem); }
.wb-press-logos img { height: 26px; width: auto; object-fit: contain; filter: invert(39%) sepia(97%) saturate(5838%) hue-rotate(209deg) brightness(101%) contrast(105%); opacity: .92; transition: opacity .15s; }
.wb-press-logos img:hover { opacity: 1; }

.wb-foot { background: linear-gradient(168deg, #2A84FF 0%, #1F77F0 52%, #135FD8 100%); color: #fff; border-radius: 40px 40px 0 0; padding: clamp(2.6rem,5vw,4.2rem) 0 2rem; }
.wb-foot-inner { max-width: 1280px; margin-inline: auto; padding-inline: clamp(1.4rem,4vw,3rem); }
.wb-foot-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: clamp(1.6rem,3vw,3rem); }
.wb-foot-newstext { font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: .04em; font-size: .8rem; line-height: 1.7; color: rgba(255,255,255,.88); max-width: 34ch; }
.wb-foot-sub { display: inline-flex; margin-top: 1.3rem; background: #fff; color: #1763E6; font-family: 'Geist', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; padding: .85rem 1.9rem; border-radius: 999px; transition: transform .15s, box-shadow .15s; }
.wb-foot-sub:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(0,0,0,.4); }
.wb-foot-redes { font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; color: rgba(255,255,255,.78); margin-top: 2.1rem; }
.wb-foot-social { display: flex; gap: .7rem; margin-top: 1rem; }
.wb-foot-social a { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.15); display: grid; place-items: center; color: #fff; transition: background .15s, transform .15s; }
.wb-foot-social a:hover { background: rgba(255,255,255,.30); transform: translateY(-1px); }
.wb-foot-social svg { width: 20px; height: 20px; }
.wb-foot-col h4 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.12rem; color: #fff; margin-bottom: 1.1rem; }
.wb-foot-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .8rem; }
.wb-foot-col a { color: rgba(255,255,255,.82); font-size: .95rem; text-decoration: none; transition: color .15s; }
.wb-foot-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.wb-foot-bottom { margin-top: clamp(2.4rem,5vw,3.6rem); padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,.20); display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.wb-foot-logo img { height: 28px; width: auto; filter: brightness(0) invert(1); opacity: .92; display: block; }
.wb-foot-bottom p { font-family: 'JetBrains Mono', monospace; font-size: .78rem; color: rgba(255,255,255,.72); margin: 0; }
@media (max-width: 880px) { .wb-foot-grid { grid-template-columns: 1fr 1fr; gap: 2.2rem 1.5rem; } .wb-foot-news { grid-column: 1 / -1; } }
@media (max-width: 540px) { .wb-foot-grid { grid-template-columns: 1fr; } .wb-foot { border-radius: 28px 28px 0 0; } }

/* ============================================================
   ARTICULO mas llamativo (automatico, sin que el autor toque nada)
   ============================================================ */
/* El numero de cada seccion como badge azul de marca */
.prose h2 { line-height: 1.18; }
.prose h2 .num { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 9px; background: var(--blue-soft, #E8EEFF); color: var(--accent); font-family: 'JetBrains Mono', monospace; font-size: .78rem; font-weight: 700; vertical-align: .16em; margin-right: .55rem; }
/* Negritas con subrayado-resaltador suave de marca */
.prose strong { background-image: linear-gradient(transparent 60%, color-mix(in srgb, var(--accent) 16%, transparent) 0); padding: 0 .04em; }
/* Enlaces del texto con subrayado mas vivo */
.prose a { text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.prose a:hover { text-decoration-color: var(--accent); }
/* Primera linea de cada seccion (parrafo tras un h2) con un toque de fuerza */
.prose h2 + p { color: var(--ink); }
