/* ═══════════════════════════════════════════════════════
 * Forenses.net — main.css v1.3
 * Tipografía: Inter + JetBrains Mono (sin serif)
 * dosm.es
 * ═══════════════════════════════════════════════════════ */

:root {
  --blue:       #2f65b9;
  --blue-dark:  #1e4a8a;
  --blue-light: #e8f0fb;
  --blue-mid:   #3d77d4;
  --ink:        #0f1117;
  --ink-2:      #2a2d36;
  --muted:      #55596a;
  --muted-2:    #8890a4;
  --surface:    #ffffff;
  --surface-1:  #f6f7fb;
  --surface-2:  #edf0f8;
  --border:     #e1e5f0;
  --border-2:   #c8cfe0;
  --green:      #16a34a;
  --radius:     6px;
  --radius-lg:  12px;
  --sans:       'Space Mono', 'JetBrains Mono', monospace;
  --reading:    'Inter', system-ui, -apple-system, sans-serif;
  --mono:       'JetBrains Mono', 'Fira Mono', monospace;
  --max:        1200px;
  --pad:        clamp(1.25rem, 5vw, 3.5rem);
  --nav-h:      64px;
  --fs-base:    16px;
  --fs-lg:      17px;
  --fs-sm:      14px;
  --fs-xs:      13px;
  --fs-mono:    12px;
}

/* ── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: var(--fs-base);
  background: var(--surface);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }
p { margin-bottom: 1rem; }
ul, ol { padding-left: 1.5rem; }

/* ── TIPOGRAFÍA ─────────────────────────────────────── */
h1 { font-size: clamp(1.75rem, 3.5vw, 2.6rem); font-weight: 700; line-height: 1.15; letter-spacing: -.03em; color: var(--ink); margin-bottom: .9rem; }
h2 { font-size: clamp(1.4rem, 2.5vw, 2rem);    font-weight: 700; line-height: 1.2;  letter-spacing: -.025em; color: var(--ink); margin-bottom: .75rem; }
h3 { font-size: clamp(1.05rem, 1.8vw, 1.25rem); font-weight: 600; line-height: 1.3; letter-spacing: -.01em; color: var(--ink); margin-bottom: .5rem; }
h4 { font-size: 1rem; font-weight: 600; color: var(--ink); margin-bottom: .4rem; }

/* ── LAYOUT ─────────────────────────────────────────── */
.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-content { flex: 1; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { position: fixed; left: 1rem; top: 1rem; z-index: 9999; background: var(--blue); color: #fff; padding: .5rem 1rem; border-radius: var(--radius); left: auto; }

/* ═══════════════════════════════════════════════════════
 * NAV
 * ═══════════════════════════════════════════════════════ */
#site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
/* El backdrop-filter crea un nuevo contexto de posicionamiento para
   cualquier elemento position:fixed anidado dentro (spec CSS). El
   menú móvil es fixed y vive dentro de #site-header, así que en
   móvil desactivamos el blur para que el menú se posicione respecto
   a toda la pantalla, no respecto a la cabecera. */
@media (max-width: 900px) {
  #site-header {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #fff !important;
  }
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--pad);
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h); gap: 1rem;
}
.site-branding { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.site-branding:hover { text-decoration: none; }
.site-logo { height: 36px; width: auto; }

#site-navigation { flex: 1; display: flex; justify-content: center; }
#primary-menu { display: flex; align-items: center; list-style: none; padding: 0; margin: 0; }
#primary-menu > li { position: relative; }
#primary-menu > li > a {
  font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2);
  padding: 7px 12px; border-radius: var(--radius);
  display: block; white-space: nowrap; transition: all .18s; text-decoration: none;
}
#primary-menu > li > a:hover,
#primary-menu > li:hover > a,
#primary-menu > li > a[aria-current] { color: var(--blue); background: var(--blue-light); text-decoration: none; }
#primary-menu > li.menu-item-has-children > a::after { content: '▾'; font-size: 9px; margin-left: 3px; opacity: .4; }

/* Nav CTA */
.nav-cta { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.btn-nav-login { padding: 7px 16px; border-radius: var(--radius); border: 1px solid var(--border-2); color: var(--ink-2) !important; font-size: var(--fs-sm); font-weight: 500; text-decoration: none !important; transition: all .18s; }
.btn-nav-login:hover { border-color: var(--blue); color: var(--blue) !important; text-decoration: none; }
.btn-nav-register { padding: 7px 16px; border-radius: var(--radius); background: var(--blue); color: #fff !important; font-size: var(--fs-sm); font-weight: 500; text-decoration: none !important; transition: background .18s; }
.btn-nav-register:hover { background: var(--blue-dark); text-decoration: none; }
.btn-nav-account { padding: 7px 16px; border-radius: var(--radius); border: 1px solid var(--border-2); color: var(--ink-2) !important; font-size: var(--fs-sm); text-decoration: none !important; transition: all .18s; }
.btn-nav-account:hover { border-color: var(--blue); color: var(--blue) !important; }

.menu-toggle { display: none; background: none; border: 1px solid var(--border-2); border-radius: var(--radius); padding: 6px 10px; cursor: pointer; color: var(--ink-2); }
.menu-toggle .bar { display: block; width: 18px; height: 2px; background: currentColor; margin: 4px 0; transition: all .22s; }
.menu-toggle.is-active .bar:nth-child(1) { transform: rotate(45deg) translate(4px,4px); }
.menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .bar:nth-child(3) { transform: rotate(-45deg) translate(4px,-4px); }

/* ── BOTONES ─────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--radius); font-family: var(--sans); cursor: pointer; text-decoration: none; transition: all .18s; border: none; font-size: var(--fs-sm); font-weight: 500; }
.btn-primary { padding: 10px 20px; background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; text-decoration: none; }
.btn-ghost { padding: 10px 20px; border: 1px solid var(--border-2); color: var(--ink-2); background: transparent; }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.btn-hero { padding: 12px 26px; background: var(--blue); color: #fff; font-size: 15px; font-weight: 600; }
.btn-hero:hover { background: var(--blue-dark); color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn-hero-ghost { padding: 12px 26px; background: transparent; color: var(--ink-2); font-size: 15px; border: 1px solid var(--border-2); }
.btn-hero-ghost:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.btn-white { padding: 12px 26px; background: #fff; color: var(--blue); font-size: 15px; font-weight: 600; }
.btn-white:hover { background: var(--blue-light); color: var(--blue-dark); text-decoration: none; }
.btn-outline-white { padding: 12px 26px; background: transparent; color: #fff; font-size: 15px; border: 1px solid rgba(255,255,255,.35); }
.btn-outline-white:hover { background: rgba(255,255,255,.1); text-decoration: none; color: #fff; }

/* ═══════════════════════════════════════════════════════
 * SECCIONES
 * ═══════════════════════════════════════════════════════ */
.section { padding: clamp(3rem, 6vw, 5.5rem) var(--pad); }
.section-inner { max-width: var(--max); margin: 0 auto; }
.section-label { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--blue); text-transform: uppercase; margin-bottom: .5rem; }
.section-divider { width: 36px; height: 3px; background: var(--blue); margin-bottom: 1.1rem; border-radius: 2px; }
.section-lead { font-size: 16px; color: var(--muted); max-width: 540px; line-height: 1.7; font-weight: 400; margin-bottom: 2.25rem; }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }

.view-all { font-size: var(--fs-sm); font-weight: 500; color: var(--blue); display: inline-flex; align-items: center; gap: 4px; padding: 7px 14px; border: 1px solid rgba(47,101,185,.3); border-radius: var(--radius); transition: all .18s; white-space: nowrap; text-decoration: none; }
.view-all:hover { background: var(--blue-light); text-decoration: none; }

/* ═══════════════════════════════════════════════════════
 * HERO
 * ═══════════════════════════════════════════════════════ */
.hero { background: var(--surface-1); border-bottom: 1px solid var(--border); padding: clamp(3.5rem, 9vw, 6.5rem) var(--pad); position: relative; overflow: hidden; }
.hero-bg-logo { position: absolute; left: -50px; top: 50%; transform: translateY(-50%); width: 440px; height: auto; opacity: 0.04; pointer-events: none; filter: grayscale(1); }
.hero-inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; position: relative; }
.hero-logo-display { margin-bottom: 1.1rem; }
.hero-logo-display img { height: 80px; width: auto; }
.hero h1 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 700; letter-spacing: -.03em; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero-sub { font-size: 16px; line-height: 1.7; color: var(--muted); max-width: 430px; margin-bottom: 1.75rem; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-eslogan { margin-bottom: 1.1rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--border); }
.hero-eslogan-text { font-size: clamp(1.05rem, 1.8vw, 1.3rem); font-weight: 600; color: var(--ink-2); line-height: 1.3; margin-bottom: .4rem; letter-spacing: -.01em; }
.hero-eslogan-text em { font-style: normal; color: var(--blue); }
.hero-eslogan-sub { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--muted-2); text-transform: uppercase; }

/* Hero card */
.hero-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 4px 20px rgba(47,101,185,.08); }
.hc-header { background: var(--blue); padding: .9rem 1.25rem; display: flex; align-items: center; justify-content: space-between; }
.hc-header-title { font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,.75); letter-spacing: .06em; text-transform: uppercase; }
.hc-live { display: flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,.6); }
.hc-live::before { content:''; width:6px; height:6px; border-radius:50%; background:#7de8a0; animation: pulse 2s infinite; }
.hc-body { padding: 1.1rem; display: flex; flex-direction: column; gap: .65rem; }
.hc-row { display: flex; gap: .65rem; align-items: flex-start; }
.hc-icon { width: 30px; height: 30px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.hc-label { font-family: var(--mono); font-size: 10px; color: var(--muted-2); margin-bottom: 2px; }
.hc-value { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.4; }
.hc-value strong { color: var(--ink); font-weight: 600; }
.hc-stats { display: grid; grid-template-columns: repeat(3,1fr); padding: .9rem 1.1rem; border-top: 1px solid var(--border); background: var(--surface-1); gap: .5rem; }
.hc-stat-n { font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.hc-stat-n span { color: var(--blue); }
.hc-stat-l { font-family: var(--mono); font-size: 9px; color: var(--muted-2); text-transform: uppercase; margin-top: 1px; }

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* Proof bar */
.proof-bar { background: var(--blue); padding: .8rem var(--pad); }
.proof-bar-inner { max-width: var(--max); margin: 0 auto; display: flex; align-items: center; gap: 1.75rem; flex-wrap: wrap; }
.proof-item { font-size: var(--fs-sm); color: rgba(255,255,255,.7); white-space: nowrap; }
.proof-item strong { color: #fff; font-weight: 600; }
.proof-sep { color: rgba(255,255,255,.25); }

/* ═══════════════════════════════════════════════════════
 * GRUPOS
 * ═══════════════════════════════════════════════════════ */
.grupos-section { background: var(--surface-1); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.grupos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 1rem; }
.grupo-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.35rem; transition: all .2s; text-decoration: none; display: block; }
.grupo-card:hover { box-shadow: 0 4px 20px rgba(47,101,185,.1); transform: translateY(-2px); border-color: rgba(47,101,185,.25); text-decoration: none; }
.grupo-header { display: flex; align-items: center; gap: .65rem; margin-bottom: .85rem; }
.grupo-avatar { width: 40px; height: 40px; border-radius: var(--radius); background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.grupo-avatar.color-2{background:#1e6b4a}.grupo-avatar.color-3{background:#7b3fa0}.grupo-avatar.color-4{background:#c47b1a}.grupo-avatar.color-5{background:#1e4a8a}.grupo-avatar.color-6{background:#8a1e2e}
.grupo-name { font-size: .95rem; font-weight: 600; color: var(--ink); line-height: 1.25; }
.grupo-desc { font-size: var(--fs-sm); color: var(--muted); line-height: 1.55; margin-bottom: .85rem; }
.grupo-meta { display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: 10px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .06em; border-top: 1px solid var(--border); padding-top: .65rem; }
.grupo-members { color: var(--blue); font-weight: 600; }
.grupo-featured { grid-column: span 2; background: var(--blue); border-color: var(--blue); display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; align-items: center; }
.grupo-featured:hover { border-color: var(--blue-dark); }
.grupo-featured .grupo-name { color: #fff; font-size: 1.1rem; }
.grupo-featured .grupo-desc { color: rgba(255,255,255,.75); }
.grupo-featured .grupo-avatar { background: rgba(255,255,255,.15); font-size: 22px; width: 48px; height: 48px; }
.grupo-featured .grupo-meta { border-color: rgba(255,255,255,.2); color: rgba(255,255,255,.5); }
.grupo-featured .grupo-members { color: #7de8a0; }
.grupo-featured-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; padding: 1.1rem; background: rgba(255,255,255,.08); border-radius: var(--radius); border: 1px solid rgba(255,255,255,.1); }
.gfs-n { font-size: 1.7rem; font-weight: 700; color: #fff; letter-spacing: -.03em; }
.gfs-n span { color: rgba(255,255,255,.4); font-size: 1.1rem; }
.gfs-l { font-family: var(--mono); font-size: 10px; color: rgba(255,255,255,.4); text-transform: uppercase; }

/* ═══════════════════════════════════════════════════════
 * ACTIVITY STREAM — horizontal scroll
 * ═══════════════════════════════════════════════════════ */
.activity-section { background: #fff; border-top: 1px solid var(--border); }
.activity-scroll-wrap { overflow-x: auto; padding-bottom: 1rem; scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
.activity-scroll-wrap::-webkit-scrollbar { height: 4px; }
.activity-scroll-wrap::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }
.activity-track { display: flex; gap: 1rem; width: max-content; padding: .25rem .1rem 0; }
.activity-card {
  width: 300px; flex-shrink: 0;
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.1rem;
  transition: all .2s;
}
.activity-card:hover { box-shadow: 0 4px 16px rgba(47,101,185,.09); border-color: rgba(47,101,185,.2); }
.activity-card-header { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.activity-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; overflow: hidden; }
.activity-avatar img { width: 100%; height: 100%; object-fit: cover; }
.activity-user { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); line-height: 1.2; }
.activity-time { font-family: var(--mono); font-size: 10px; color: var(--muted-2); }
.activity-type { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--blue); background: var(--blue-light); padding: 3px 8px; border-radius: 2px; margin-bottom: .55rem; }
.activity-content { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.55; }
.activity-content a { color: var(--blue); font-weight: 500; }
.activity-group-tag { font-family: var(--mono); font-size: 10px; color: var(--muted-2); margin-top: .65rem; padding-top: .65rem; border-top: 1px solid var(--border); display: flex; align-items: center; gap: .35rem; }

/* Fallback estático si BP no tiene actividad */
.activity-empty { font-size: var(--fs-sm); color: var(--muted); padding: 1.5rem 0; }

/* ═══════════════════════════════════════════════════════
 * TRABAJOS FORENSES — pestañas
 * ═══════════════════════════════════════════════════════ */
.trabajos-section { background: var(--surface-1); border-top: 1px solid var(--border); }
.tabs-nav { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.tab-btn {
  padding: 8px 18px; border-radius: var(--radius); font-size: var(--fs-sm); font-weight: 500;
  border: 1px solid var(--border); background: #fff; color: var(--muted); cursor: pointer;
  transition: all .18s; font-family: var(--sans);
}
.tab-btn:hover { border-color: var(--blue); color: var(--blue); }
.tab-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.trabajos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 1rem; }
.trabajo-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; transition: all .2s; text-decoration: none; display: block; }
.trabajo-card:hover { box-shadow: 0 4px 16px rgba(47,101,185,.1); border-color: rgba(47,101,185,.2); text-decoration: none; }
.trabajo-badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; padding: 3px 9px; border-radius: 2px; margin-bottom: .65rem; }
.trabajo-badge.tipo-trabajo  { background: var(--blue-light); color: var(--blue); }
.trabajo-badge.tipo-oferta   { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.trabajo-badge.tipo-demanda  { background: #fef3c7; color: #d97706; border: 1px solid #fde68a; }
.trabajo-card h3 { font-size: .95rem; font-weight: 600; color: var(--ink); margin-bottom: .35rem; }
.trabajo-card p  { font-size: var(--fs-sm); color: var(--muted); line-height: 1.55; margin-bottom: .75rem; }
.trabajo-meta { display: flex; gap: 1rem; flex-wrap: wrap; font-family: var(--mono); font-size: 10px; color: var(--muted-2); text-transform: uppercase; }
.trabajo-meta span { display: flex; align-items: center; gap: 4px; }

/* ═══════════════════════════════════════════════════════
 * DIRECTORIO DE PROFESIONALES
 * ═══════════════════════════════════════════════════════ */
.directorio-section { background: #fff; border-top: 1px solid var(--border); }
.directorio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 1rem; }
.profesional-card { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; text-align: center; transition: all .2s; text-decoration: none; display: block; }
.profesional-card:hover { box-shadow: 0 4px 16px rgba(47,101,185,.1); transform: translateY(-2px); text-decoration: none; }
.profesional-avatar { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto .75rem; background: var(--blue-light); border: 2px solid var(--border); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: var(--blue); }
.profesional-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profesional-name { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); margin-bottom: .2rem; }
.profesional-role { font-family: var(--mono); font-size: 10px; color: var(--blue); text-transform: uppercase; letter-spacing: .07em; margin-bottom: .4rem; }
.profesional-location { font-size: 12px; color: var(--muted-2); }

/* ═══════════════════════════════════════════════════════
 * ¿QUÉ PUEDO HACER HOY? — accesos rápidos
 * ═══════════════════════════════════════════════════════ */
.quickaccess-section { background: var(--ink); }
.quickaccess-section h2 { color: #fff; }
.quickaccess-section .section-label { color: #5a8de8; }
.quickaccess-section .section-lead { color: #6a7080; }
.quickaccess-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: .85rem; }
.qa-card { background: #1a1d28; border: 1px solid #2a2e3a; border-radius: var(--radius-lg); padding: 1.25rem; text-align: center; text-decoration: none; transition: all .2s; display: block; }
.qa-card:hover { background: #20243a; border-color: rgba(47,101,185,.4); transform: translateY(-2px); text-decoration: none; }
.qa-icon { font-size: 1.75rem; margin-bottom: .6rem; display: block; }
.qa-title { font-size: var(--fs-sm); font-weight: 600; color: #d8dce8; margin-bottom: .25rem; line-height: 1.3; }
.qa-desc { font-size: 12px; color: #5a6070; line-height: 1.4; }
/* Variante destacada */
.qa-card.qa-featured { background: var(--blue); border-color: var(--blue); }
.qa-card.qa-featured:hover { background: var(--blue-dark); }
.qa-card.qa-featured .qa-title { color: #fff; }
.qa-card.qa-featured .qa-desc { color: rgba(255,255,255,.65); }

/* ═══════════════════════════════════════════════════════
 * BANNERS PMP
 * ═══════════════════════════════════════════════════════ */
.pmp-banner { padding: 2rem var(--pad); position: relative; background: var(--surface); }
.pmp-banner-inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 190px 1fr auto; align-items: center; gap: 2rem; border: 2px solid var(--blue); border-radius: var(--radius-lg); background: #fff; padding: 1.5rem 2rem; box-shadow: 0 4px 20px rgba(47,101,185,.1); }
.pmp-badge { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); background: var(--blue); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 16px; border-radius: 20px; white-space: nowrap; z-index: 1; }
.pmp-plan-name { font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: .2rem; }
.pmp-plan-price { font-size: 2.4rem; font-weight: 800; color: var(--blue); line-height: 1; margin-bottom: .3rem; letter-spacing: -.04em; }
.pmp-plan-price span { font-size: 1.3rem; }
.pmp-plan-price em { font-style: normal; font-size: .9rem; color: var(--muted); font-weight: 400; }
.pmp-plan-note { font-size: var(--fs-sm); color: var(--green); font-weight: 500; }
.pmp-features { list-style: none; padding: 0; display: flex; flex-direction: column; }
.pmp-features li { font-size: var(--fs-sm); color: var(--ink-2); padding: .5rem 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .55rem; }
.pmp-features li:last-child { border-bottom: none; }
.pmp-features li::before { content: '✓'; color: var(--blue); font-weight: 700; flex-shrink: 0; }
.pmp-banner-cta { display: flex; flex-direction: column; align-items: center; gap: .45rem; }
.pmp-btn { display: inline-block; padding: 12px 28px; border-radius: var(--radius); font-size: 15px; font-weight: 700; text-decoration: none; transition: all .18s; text-align: center; }
.pmp-btn--free,.pmp-btn--premium { background: var(--green); color: #fff; }
.pmp-btn--free:hover,.pmp-btn--premium:hover { background: #15803d; color: #fff; text-decoration: none; }
.pmp-banner-vat { font-size: 11px; color: var(--muted-2); font-family: var(--mono); }

/* ═══════════════════════════════════════════════════════
 * IA JUSTICIA
 * ═══════════════════════════════════════════════════════ */
.ia-section { background: var(--ink); }
.ia-section h2,.ia-section h3 { color: #fff; }
.ia-section .section-label { color: #5a8de8; }
.ia-section .section-lead { color: #6a7080; }
.ia-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }
.ia-features { display: flex; flex-direction: column; gap: 1.1rem; margin-top: 1.5rem; }
.ia-feature { display: flex; gap: .8rem; align-items: flex-start; }
.ia-feat-icon { width: 34px; height: 34px; border-radius: var(--radius); background: rgba(47,101,185,.15); border: 1px solid rgba(47,101,185,.2); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.ia-feat-title { font-weight: 600; font-size: var(--fs-base); color: #d8dce8; margin-bottom: 3px; }
.ia-feat-text { font-size: var(--fs-sm); color: #5a6070; line-height: 1.55; }
.ia-mockup { background: #191c24; border: 1px solid #2a2e3a; border-radius: var(--radius-lg); overflow: hidden; }
.ia-mock-header { background: #111318; border-bottom: 1px solid #2a2e3a; padding: .7rem 1.1rem; display: flex; align-items: center; }
.mock-dots { display: flex; gap: 5px; }
.mock-dot { width: 9px; height: 9px; border-radius: 50%; }
.ia-mock-title { font-family: var(--mono); font-size: 10px; color: #40455a; margin: 0 auto; }
.ia-mock-body { padding: 1.1rem; display: flex; flex-direction: column; gap: .6rem; }
.chat-user { background: #23263a; border: 1px solid #2e3248; border-radius: var(--radius); padding: .65rem .9rem; font-size: var(--fs-sm); color: #9098b0; line-height: 1.5; align-self: flex-end; max-width: 88%; }
.chat-ai { background: rgba(47,101,185,.1); border: 1px solid rgba(47,101,185,.2); border-radius: var(--radius); padding: .65rem .9rem; font-size: var(--fs-sm); color: #b0b8cc; line-height: 1.55; }
.chat-ai-label { font-family: var(--mono); font-size: 9px; color: #5a8de8; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .06em; }
.chat-cite { display: flex; gap: .35rem; flex-wrap: wrap; border-top: 1px solid rgba(47,101,185,.15); padding-top: .45rem; margin-top: .45rem; }
.cite-pill { font-family: var(--mono); font-size: 9px; background: #1a1d28; border: 1px solid #2a2e3a; padding: 2px 6px; border-radius: 2px; color: #40455a; }

/* ═══════════════════════════════════════════════════════
 * BLOG
 * ═══════════════════════════════════════════════════════ */
.blog-section { background: var(--surface-1); border-top: 1px solid var(--border); }
.blog-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 1.1rem; }
.blog-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: all .2s; }
.blog-card:hover { box-shadow: 0 4px 20px rgba(47,101,185,.1); transform: translateY(-2px); }
.blog-img { height: 160px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; border-bottom: 1px solid var(--border); overflow: hidden; }
.blog-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-img.big { height: 200px; }
.blog-body { padding: 1.15rem; }
.blog-cat { font-family: var(--mono); font-size: 10px; color: var(--blue); text-transform: uppercase; letter-spacing: .07em; }
.blog-card h3 { font-size: .95rem; font-weight: 600; line-height: 1.3; margin: .45rem 0; }
.blog-card h3 a { color: var(--ink); }
.blog-card h3 a:hover { color: var(--blue); text-decoration: none; }
.blog-card p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.6; }
.blog-meta { font-size: 11px; color: var(--muted-2); margin-top: .6rem; font-family: var(--mono); }

/* ═══════════════════════════════════════════════════════
 * CTA FINAL
 * ═══════════════════════════════════════════════════════ */
.cta-section { background: var(--blue); color: #fff; text-align: center; padding: clamp(3.5rem, 7vw, 6rem) var(--pad); }
.cta-section h2 { color: #fff; max-width: 600px; margin: 0 auto .85rem; }
.cta-section p { color: rgba(255,255,255,.75); font-size: 16px; max-width: 460px; margin: 0 auto 1.75rem; }
.cta-actions { display: flex; gap: .85rem; justify-content: center; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════
 * FOOTER
 * ═══════════════════════════════════════════════════════ */
#site-footer { background: var(--ink); border-top: 1px solid #1e2230; padding: 3rem var(--pad) 2rem; }
.footer-inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; }
.footer-logo { height: 40px; width: auto; filter: brightness(0) invert(1); opacity: .8; margin-bottom: .7rem; display: block; }
.footer-brand-text { font-size: var(--fs-sm); color: #a8afc8; line-height: 1.65; max-width: 240px; }
.footer-col h4 { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: #7a82a0; text-transform: uppercase; margin-bottom: .85rem; font-weight: 400; }
.footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.footer-col a { color: #c5cbe0; font-size: var(--fs-sm); transition: color .18s; text-decoration: none; }
.footer-col a:hover { color: #ffffff; }
.footer-bottom { max-width: var(--max); margin: 1.75rem auto 0; padding-top: 1.1rem; border-top: 1px solid #1a1d28; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; }
.footer-copy { font-size: 12px; color: #8890a8; }
.footer-copy a { color: #b0b8d0; }
.footer-copy a:hover { color: #ffffff; }

/* ═══════════════════════════════════════════════════════
 * CONTENIDO GENERAL
 * ═══════════════════════════════════════════════════════ */
.page-wrap { width: 90%; max-width: var(--max-wide); margin: 0 auto; padding: 2rem 0 4rem; display: grid; grid-template-columns: 1fr 300px; gap: 3rem; align-items: start; }
.page-wrap.no-sidebar { grid-template-columns: 1fr; max-width: 760px; }
.entry-title { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; letter-spacing: -.03em; margin-bottom: 1.4rem; line-height: 1.2; }
.entry-content { max-width: 720px; }
.entry-content { font-family: var(--reading); }
.entry-content p { font-size: var(--fs-base); line-height: 1.75; color: var(--ink-2); margin-bottom: 1.25rem; }
.entry-content h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.015em; margin-top: 2.25rem; margin-bottom: .85rem; color: var(--ink); }
.entry-content h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; margin-top: 1.85rem; margin-bottom: .65rem; color: var(--ink); }
.entry-content h4 { font-size: 1.05rem; font-weight: 700; margin-top: 1.5rem; margin-bottom: .5rem; color: var(--ink); }
.entry-content ul, .entry-content ol { font-size: var(--fs-base); line-height: 1.7; color: var(--ink-2); margin: 0 0 1.25rem 1.4rem; }
.entry-content li { margin-bottom: .45rem; }
.entry-content li > ul, .entry-content li > ol { margin-top: .45rem; margin-bottom: 0; }
.entry-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.entry-content a:hover { color: var(--blue-dark); }
.entry-content strong { color: var(--ink); font-weight: 700; }

/* Citas */
.entry-content blockquote {
  border-left: 3px solid var(--blue); padding: .25rem 0 .25rem 1.35rem; margin: 1.75rem 0;
  color: var(--ink-2); font-style: italic; font-size: 1.05rem; line-height: 1.6;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite { display: block; margin-top: .5rem; font-style: normal; font-size: var(--fs-sm); color: var(--muted-2); }

/* Código */
.entry-content code {
  font-family: var(--mono); background: var(--surface-2); padding: 2px 7px; border-radius: 4px; font-size: .88em; color: var(--ink);
}
.entry-content pre {
  background: var(--ink); color: #e2e6f0; padding: 1.25rem 1.5rem; border-radius: 12px;
  overflow-x: auto; margin: 1.5rem 0; font-size: .875rem; line-height: 1.6;
}
.entry-content pre code { background: none; padding: 0; color: inherit; }

/* Imágenes y figuras */
.entry-content img { max-width: 100%; height: auto; border-radius: 12px; display: block; margin: 1.75rem 0; }
.entry-content figure { margin: 1.75rem 0; }
.entry-content figure img { margin: 0; }
.entry-content figcaption {
  font-size: var(--fs-sm); color: var(--muted-2); text-align: center; margin-top: .6rem; font-style: italic;
}

/* Tablas */
.entry-content table {
  width: 100%; border-collapse: collapse; margin: 1.75rem 0; font-size: var(--fs-sm);
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.entry-content th {
  background: var(--surface-1); text-align: left; padding: 10px 14px; font-weight: 700;
  color: var(--ink); border-bottom: 1px solid var(--border);
}
.entry-content td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--ink-2); }
.entry-content tr:last-child td { border-bottom: none; }

/* Separador */
.entry-content hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* Vídeo / embeds responsive */
.entry-content iframe, .entry-content .wp-block-embed__wrapper { max-width: 100%; border-radius: 12px; }
.entry-content .wp-block-embed__wrapper {
  position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; margin: 1.75rem 0;
}
.entry-content .wp-block-embed__wrapper iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

/* Definición de términos (glosario) */
.entry-content dl { margin: 0 0 1.25rem; }
.entry-content dt { font-weight: 700; color: var(--ink); margin-top: 1rem; }
.entry-content dd { margin: .3rem 0 0; color: var(--muted); }

/* Etiquetas del post */
.entry-tags { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.entry-tags a {
  font-family: var(--mono); font-size: 11px; color: var(--muted); background: var(--surface-1);
  border: 1px solid var(--border); padding: 4px 12px; border-radius: 999px; text-decoration: none;
}
.entry-tags a:hover { color: var(--blue); border-color: var(--blue); }

.forenses-breadcrumb { font-size: var(--fs-sm); color: var(--muted-2); margin-bottom: 1.35rem; display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; }
.forenses-breadcrumb a { color: var(--muted); }
.forenses-breadcrumb a:hover { color: var(--blue); }
.forenses-breadcrumb .sep { color: var(--border-2); }

.page-numbers { display: flex; align-items: center; gap: .45rem; justify-content: center; margin-top: 2.25rem; list-style: none; padding: 0; }
.page-numbers a,.page-numbers span { padding: 8px 13px; border: 1px solid var(--border); border-radius: var(--radius); font-size: var(--fs-sm); text-decoration: none; color: var(--ink-2); transition: all .18s; }
.page-numbers .current { background: var(--blue); color: #fff; border-color: var(--blue); }
.page-numbers a:hover { border-color: var(--blue); color: var(--blue); }

.archive-list { display: flex; flex-direction: column; gap: 1rem; }
.archive-item { display: grid; grid-template-columns: 120px 1fr; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: all .18s; text-decoration: none; color: inherit; }
.archive-item:hover { box-shadow: 0 4px 14px rgba(47,101,185,.1); text-decoration: none; }
.archive-thumb { background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 1.75rem; min-height: 90px; }
.archive-thumb img { width: 100%; height: 100%; object-fit: cover; }
.archive-body { padding: 1rem 1.1rem 1rem 0; }

/* ── ACCESIBILIDAD ──────────────────────────────────── */
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
.screen-reader-text { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ═══════════════════════════════════════════════════════
 * RESPONSIVE
 * ═══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .blog-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  #primary-menu {
    display: none !important;
    position: fixed !important;
    top: var(--nav-h) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: calc(100vh - var(--nav-h)) !important;
    width: 100% !important;
    background: #fff !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 1rem !important;
    overflow-y: auto !important;
    z-index: 999 !important;
    border-top: 1px solid var(--border);
    margin: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  #primary-menu.is-open { display: flex !important; }
  #primary-menu > li > a { padding: 12px 14px; font-size: var(--fs-base); border-bottom: 1px solid var(--border); border-radius: 0; }
  .menu-toggle { display: block; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-right { display: none; }
  .ia-inner { grid-template-columns: 1fr; }
  .grupo-featured { grid-column: span 1; grid-template-columns: 1fr; }
  .grupo-featured-stats { display: none; }
  .pmp-banner-inner { grid-template-columns: 1fr; text-align: center; }
  .page-wrap { grid-template-columns: 1fr; }
  .quickaccess-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 700px) {
  .blog-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-bg-logo { display: none; }
  .cta-actions { flex-direction: column; align-items: center; }
  .quickaccess-grid { grid-template-columns: repeat(2,1fr); }
  .trabajos-grid { grid-template-columns: 1fr; }
  .directorio-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 480px) {
  .btn-nav-login { display: none; }
}

/* ═══════════════════════════════════════════════════════
 * CORRECCIONES v1.5.1
 * ═══════════════════════════════════════════════════════ */

/* 1. Ancho completo — eliminar márgenes del wrapper de WordPress */
html, body { margin: 0 !important; padding: 0 !important; }
body { width: 100% !important; max-width: 100% !important; }
#page, .site { width: 100% !important; max-width: 100% !important; }

/* Eliminar cualquier wrapper que añada márgenes grises */
.site-content, #content { width: 100% !important; max-width: 100% !important; padding: 0 !important; margin: 0 !important; }

/* Si el theme anterior dejó un .entry-content o .wp-site-blocks con max-width */
.wp-site-blocks { padding: 0 !important; }
.is-layout-constrained > * { max-width: 100% !important; }

/* 2. Forzar Inter en TODO — eliminar cualquier serif residual */
*, *::before, *::after {
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}
/* Excepciones monospace */
code, pre, .mono, .section-label, .hc-label, .hc-stat-l,
.blog-cat, .blog-meta, .trabajo-meta, .grupo-meta,
.footer-col h4, .footer-copy, .ia-mock-title,
.chat-ai-label, .cite-pill, .activity-time, .activity-type,
.profesional-role, .proof-bar-inner, .hero-eslogan-sub,
.pmp-banner-vat, .mega-section-title, .tab-btn,
.hc-header-title, .qa-title { 
  font-family: 'Inter', system-ui, sans-serif !important; 
}
.section-label, .hc-label, .hc-stat-l, .blog-cat, .blog-meta,
.trabajo-meta span, .grupo-meta, .footer-col h4, .footer-copy,
.ia-mock-title, .chat-ai-label, .cite-pill, .activity-time,
.activity-type, .profesional-role, .hero-eslogan-sub,
.pmp-banner-vat, .mega-section-title { 
  font-family: 'JetBrains Mono', monospace !important; 
}

/* 3. Hero h1 — asegurar Inter sin serifa */
.hero h1, .hero h1 em,
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}
.hero h1 em { font-style: normal !important; color: var(--blue); }

/* 4. Eslogan sin cursiva */
.hero-eslogan-text { font-style: normal !important; font-weight: 600 !important; }
.hero-eslogan-text em { font-style: normal !important; }

/* 5. Nav — evitar que "Mi cuenta" se parta */
#primary-menu > li > a { white-space: nowrap !important; }

/* 6. Logo en el nav — tamaño correcto */
.site-logo { height: 40px !important; width: auto !important; max-width: 160px !important; }

/* 7. Eliminar fondos grises del body que puede añadir WP */
body { background-color: #ffffff !important; }

/* 8. Admin bar — compensar el sticky nav */
.admin-bar #site-header { top: 32px !important; }
@media (max-width: 782px) {
  .admin-bar #site-header { top: 46px !important; }
}

/* ═══════════════════════════════════════════════════════
 * BUSCADOR NAV + AVATAR + MENÚ MÁS — v1.6
 * ═══════════════════════════════════════════════════════ */
.nav-search { position: relative; display: flex; align-items: center; }
.nav-search-toggle {
  background: none; border: 1px solid var(--border-2); border-radius: var(--radius);
  padding: 7px 10px; cursor: pointer; font-size: 14px; color: var(--ink-2);
  transition: all .18s;
}
.nav-search-toggle:hover { border-color: var(--blue); color: var(--blue); }
.nav-search-form {
  position: absolute; right: 0; top: calc(100% + 8px);
  display: none; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: 0 8px 28px rgba(47,101,185,.12);
  padding: .6rem; z-index: 300; width: 260px;
}
.nav-search-form.is-open { display: block; }
.nav-search-form input[type="search"] {
  width: 100%; border: 1px solid var(--border-2); border-radius: var(--radius);
  padding: 8px 12px; font-size: var(--fs-sm); font-family: var(--sans);
}
.nav-search-form input:focus { border-color: var(--blue); outline: none; }

.nav-avatar { display: flex; align-items: center; flex-shrink: 0; }
.nav-avatar img { border-radius: 50%; width: 36px; height: 36px; object-fit: cover; border: 2px solid var(--border); transition: border-color .18s; }
.nav-avatar:hover img { border-color: var(--blue); }

@media (max-width: 900px) {
  .nav-search-form { position: fixed; top: var(--nav-h); left: 1rem; right: 1rem; width: auto; }
}

/* Ancho completo para plantillas BP/bbPress */
/* Contenedor dedicado para BuddyPress/bbPress — casi pantalla completa,
   totalmente independiente de .page-wrap para evitar cualquier colisión
   de especificidad CSS. */
:root { --max-wide: 1500px; }
.bp-page-wrap {
  width: 90%;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2rem 0 4rem;
}
@media (max-width: 900px) {
  .bp-page-wrap { width: 92%; padding: 1.5rem 0 3rem; }
}


/* ═══════════════════════════════════════════════════════
 * MEGA MENÚ DE COLUMNAS — generado desde el menú real de WP
 * Estructura: .mega-menu > ul.mega-cols > li.mega-col
 *             (título de sección) > ul.mega-col-links > li > a
 * ═══════════════════════════════════════════════════════ */
#primary-menu > li { position: relative; }
#primary-menu .dd-arrow { font-size: 9px; margin-left: 4px; opacity: .5; display: inline-block; }

/* Zona de seguridad invisible: extiende el área "hover" del <li>
   hacia abajo sin cambiar el layout visual (padding + margin negativo
   se cancelan). Así el ratón nunca pierde el hover al bajar hacia
   el desplegable, aunque se mueva despacio. */
#primary-menu > li.menu-item-has-children {
  padding-bottom: 14px;
  margin-bottom: -14px;
}

#primary-menu .mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(47,101,185,.13);
  padding: 1.25rem;
  margin: 0;
  z-index: 300;
  min-width: 460px;
}
#primary-menu > li.menu-item-has-children:hover > .mega-menu,
#primary-menu > li.menu-item-has-children:focus-within > .mega-menu {
  display: block;
}

/* Fila de columnas */
#primary-menu ul.mega-cols {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
#primary-menu li.mega-col {
  list-style: none;
  min-width: 170px;
  flex: 1;
}
#primary-menu li.mega-col-flat {
  flex: 0 0 auto;
  min-width: 0;
}

/* Título de columna (Social / Grupos / Foros...) */
#primary-menu a.mega-col-title {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--blue);
  text-decoration: none;
  padding-bottom: .55rem;
  margin-bottom: .5rem;
  border-bottom: 2px solid var(--blue-light);
  transition: color .15s;
}
#primary-menu a.mega-col-title:hover { color: var(--blue-dark); }

/* Enlaces reales dentro de cada columna */
#primary-menu ul.mega-col-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
#primary-menu ul.mega-col-links li { list-style: none; }
#primary-menu ul.mega-col-links li a {
  display: block;
  padding: 7px 8px;
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  transition: all .15s;
}
#primary-menu ul.mega-col-links li a:hover {
  background: var(--surface-2);
  color: var(--blue);
  text-decoration: none;
}

/* Columna sin hijos (enlace suelto al mismo nivel que las cabeceras) */
#primary-menu li.mega-col-flat a.mega-col-title {
  border-bottom-color: transparent;
  color: var(--ink-2);
  text-transform: none;
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0;
}
#primary-menu li.mega-col-flat a.mega-col-title:hover { color: var(--blue); }

/* Móvil — el mega menú se integra en el acordeón, en columna única */
@media (max-width: 900px) {
  #primary-menu .mega-menu {
    display: block !important;
    position: static;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--border);
    border-radius: 0;
    margin-left: 1rem;
    padding: .5rem 0 .5rem 1rem;
    min-width: 0;
  }
  #primary-menu ul.mega-cols {
    flex-direction: column;
    gap: 1rem;
  }
  #primary-menu .dd-arrow { display: none; }
}
