/* ============================================================
   demokratian — ESPACIO subdominio
   Estilos para las páginas públicas del subdominio del usuario.
   Pensado como sistema modular: cabecera + hero + N módulos + pie.
   Variables ya definidas en components.css (--green, --ink, fuentes, etc.)
   Adaptado: background-image → <picture>/<img> con object-fit: cover
   ============================================================ */


.esp-wrap {
  max-width: var(--esp-wrap);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

/* ============================================================
   NAV (cabecera fija del subdominio)
   ============================================================ */
.esp-nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.esp-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 32px;
}
.esp-nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.esp-nav-brand .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--esp-accent-mist);
  color: var(--esp-accent-deep);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 22px;
  font-style: italic;
  letter-spacing: -0.02em;
}
.esp-nav-brand .brand-logo {
  max-height: 40px;
  width: auto;
}
.esp-nav-brand .brand-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  line-height: 1;
}
.esp-nav-brand .brand-sub {
  font-size: 11px;
  color: var(--slate);
  margin-top: 3px;
  letter-spacing: 0.02em;
  display: block;
}
.esp-nav-menu {
  display: flex;
  list-style: none;
  gap: 32px;
  margin: 0 0 0 auto;
  padding: 0;
}
.esp-nav-menu a {
  font-size: 15.5px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 450;
  position: relative;
  padding: 6px 0;
  transition: color .15s;
}
.esp-nav-menu a:hover, .esp-nav-menu a.active { color: var(--esp-accent-deep); }
.esp-nav-menu a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--esp-accent);
}
.esp-nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.esp-nav-lang {
  font-size: 13px;
  color: var(--slate);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  position: relative;
}
.esp-nav-lang svg:first-child { color: #3060be; }
.esp-nav-lang:hover { color: var(--ink); }
.esp-nav .esp-nav-cta,
a.esp-nav-cta {
  font-size: 13.5px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: #fff !important;
  text-decoration: none;
  transition: all .15s;
}
.esp-nav .esp-nav-cta:hover,
a.esp-nav-cta:hover { background: var(--esp-accent-deep); border-color: var(--esp-accent-deep); color: #fff !important; }

/* Nav — user dropdown */
.esp-nav-user {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: #fff;
  transition: all .15s;
}
.esp-nav-user:hover { background: var(--esp-accent-deep); border-color: var(--esp-accent-deep); color: #fff; }
.esp-nav-user svg { color: #fff; }
.esp-nav-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px -8px rgba(20,30,18,0.18);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all .15s;
  z-index: 70;
  list-style: none;
}
.esp-nav-user:hover .esp-nav-user-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.esp-nav-user-menu a {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--ink-soft);
  border-radius: 8px;
  transition: background .1s, color .1s;
}
.esp-nav-user-menu a:hover {
  background: var(--paper-warm);
  color: var(--ink);
}

/* Nav — language dropdown */
.esp-nav-lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 120px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px -8px rgba(20,30,18,0.18);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all .15s;
  z-index: 70;
  list-style: none;
}
.esp-nav-lang:hover .esp-nav-lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.esp-nav-lang-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--ink-soft);
  border-radius: 6px;
  transition: background .1s;
}
.esp-nav-lang-menu a:hover {
  background: var(--paper-warm);
  color: var(--ink);
}

/* Nav — mobile */
.esp-nav-toggle {
  display: none;
  font-size: 24px;
  color: var(--ink);
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.esp-nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,29,26,0.5);
  z-index: 59;
}
.esp-nav.nav-open .esp-nav-mobile-overlay { display: block; }
.esp-nav.nav-open .esp-nav-menu {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; right: 0;
  width: 280px;
  height: 100vh;
  background: #fff;
  padding: 80px 24px 24px;
  gap: 8px;
  z-index: 61;
  box-shadow: -8px 0 32px rgba(0,0,0,0.1);
}
.esp-nav.nav-open .esp-nav-menu a {
  font-size: 16px;
  padding: 12px 0;
}
.esp-nav.nav-open .esp-nav-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 62;
}

@media (max-width: 980px) {
  .esp-nav-toggle { display: block; }
  .esp-nav-menu { display: none; }
}

/* Barra en móvil: el logo no cede ancho; «Iniciar sesión» pasa al menú
   hamburguesa, igual que los idiomas. */
.esp-nav-brand { flex-shrink: 0; }
/* backdrop-filter convierte la barra en el contenedor de los position:fixed: con
   banners encima, el panel y el velo empezaban a media pantalla y se salían por abajo */
.esp-nav.nav-open {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: #fff;
}
.esp-nav.nav-open .esp-nav-menu {
  overflow-y: auto;
  overscroll-behavior: contain;
}
.esp-nav .esp-nav-menu > .esp-nav-solo-movil { display: none; }
@media (max-width: 560px) {
  .esp-nav-inner { gap: 12px; }
  .esp-nav-actions { gap: 10px; }
  .esp-nav .esp-nav-actions .esp-nav-cta,
  .esp-nav-actions .esp-nav-lang { display: none; }
  .esp-nav-brand .brand-logo { max-height: 26px; }
  .esp-nav-toggle { flex-shrink: 0; }
  .esp-nav .esp-nav-menu > .esp-nav-solo-movil { display: list-item; }
}
@media (max-width: 380px) {
  .esp-nav-brand .brand-logo { max-height: 22px; }
  /* A 320 px el logo + CTA + hamburguesa no cabían (desborde horizontal, WCAG 1.4.10) */
  .esp-nav { --gutter: 16px; }
  .esp-nav .esp-nav-cta-primary { padding: 8px 12px; font-size: 13px; }
}
.esp-nav-langs-movil {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.esp-nav-langs-movil .esp-nav-dd-title {
  display: block;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--slate-soft);
}
.esp-nav.nav-open .esp-nav-menu .esp-nav-langs-movil a {
  display: inline-block;
  margin-right: 14px;
  padding: 8px 0;
  font-size: 15px;
}

/* ============================================================
   HERO — soporta fija (1 imagen) o carrusel (N imágenes)
   Adaptado para <picture>/<img> en vez de background-image
   ============================================================ */
.esp-hero {
  position: relative;
  height: clamp(400px, 50vh, 520px);
  overflow: hidden;
  background: var(--ink);
}
.esp-hero-slides {
  position: absolute;
  inset: 0;
}
.esp-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
.esp-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.esp-hero-slide.active { opacity: 1; }
.esp-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,18,15,0.25) 0%, rgba(15,18,15,0.55) 60%, rgba(15,18,15,0.7) 100%);
  pointer-events: none;
}
.esp-hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  max-width: var(--esp-wrap);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}
.esp-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--esp-accent);
  margin-bottom: 22px;
}
.esp-hero-eyebrow::before {
  content: "";
  width: 28px;
  height: 1.5px;
  background: var(--esp-accent);
}
.esp-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 84px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.04;
  max-width: 18ch;
  margin: 0 0 18px;
}
.esp-hero h1 em {
  font-style: italic;
  color: var(--esp-accent);
}
.esp-hero p {
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.5;
  max-width: 52ch;
  color: rgba(255,255,255,0.88);
  margin: 0 0 28px;
}
.esp-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.esp-hero-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}
.esp-hero-dots button {
  width: 30px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.35);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .25s, width .25s;
}
.esp-hero-dots button.active {
  background: var(--esp-accent);
  width: 50px;
}

/* ============================================================
   MÓDULO BASE
   ============================================================ */
.esp-module {
  padding: var(--esp-mod-pad) 0;
}
.esp-module.compact { padding: clamp(48px, 6vw, 80px) 0; }
.esp-module-tinted {
  background: var(--paper-warm);
}
.esp-module-ink {
  background: var(--ink);
  color: var(--paper);
}

.esp-mod-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.esp-mod-head h2 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  max-width: 22ch;
}
.esp-mod-head h2 em {
  font-style: italic;
  color: var(--green-display);
}
.esp-mod-head .eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.esp-mod-head .eyebrow::before {
  content: "";
  width: 24px;
  height: 1.5px;
  background: var(--esp-accent);
}
.esp-module-ink .esp-mod-head h2 { color: var(--paper); }
.esp-module-ink .esp-mod-head h2 em { color: var(--esp-accent); }
.esp-module-ink .esp-mod-head .eyebrow { color: rgba(255,255,255,0.6); }
.esp-mod-link {
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  padding: 10px 20px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  transition: all .15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.esp-mod-link:hover {
  background: var(--ink);
  color: var(--paper);
}
.esp-module-ink .esp-mod-link {
  color: var(--paper);
  border-color: var(--paper);
}
.esp-module-ink .esp-mod-link:hover {
  background: var(--esp-accent);
  border-color: var(--esp-accent);
  color: var(--ink);
}

/* ============================================================
   MÓDULO: LOGIN
   ============================================================ */
.esp-mod-login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.esp-mod-login .lg-text h1,
.esp-mod-login .lg-text h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 18px 0 22px;
  max-width: 16ch;
}
.esp-mod-login .lg-text h1 em,
.esp-mod-login .lg-text h2 em {
  font-style: italic;
  color: var(--green-display);
}
.esp-mod-login .lg-text p {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--slate);
  max-width: 42ch;
  margin: 0 0 28px;
}
.esp-mod-login .lg-text .lg-recover {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  padding: 12px 22px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  transition: all .15s;
}
.esp-mod-login .lg-text .lg-recover:hover {
  border-color: var(--ink);
}

.esp-mod-login .lg-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(32px, 4vw, 44px);
  box-shadow: 0 24px 50px -28px rgba(20, 30, 18, 0.18);
  position: relative;
}
.esp-mod-login .lg-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 26px;
}
.esp-mod-login .lg-card-head .ico {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--esp-accent-mist);
  color: var(--esp-accent-deep);
  display: grid;
  place-items: center;
}
.esp-mod-login .lg-card-head h2,
.esp-mod-login .lg-card-head h3 {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 3px;
  font-weight: 600;
}
.esp-mod-login .lg-card-head .h-big {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1;
}
.esp-mod-login .lg-card form { display: grid; gap: 18px; }
.esp-mod-login .lg-card form label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate);
  display: block;
  margin-bottom: 6px;
}
.esp-mod-login .lg-card form input[type="email"],
.esp-mod-login .lg-card form input[type="password"],
.esp-mod-login .lg-card form input[type="text"]:not([tabindex="-1"]) {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--paper);
  transition: border-color .15s, box-shadow .15s;
}
.esp-mod-login .lg-card form input:focus {
  outline: none;
  border-color: var(--esp-accent);
  background: #fff;
  box-shadow: 0 0 0 4px var(--esp-accent-mist);
}
/* El width:100% de arriba gana por especificidad al .form-control de
   Bootstrap dentro de un .input-group y hace que el botón de mostrar/ocultar
   contraseña caiga a la línea siguiente. Se le devuelve el ancho flexible
   que espera el input-group. El botón del ojo cambia el input a type="text"
   para revelar la contraseña, así que hace falta cubrir también ese tipo,
   o el layout se rompe otra vez justo al mostrarla. */
.esp-mod-login .lg-card form .input-group input[type="password"],
.esp-mod-login .lg-card form .input-group input[type="text"] {
  width: 1%;
  flex: 1 1 auto;
  min-width: 0;
}
.esp-mod-login .lg-card form .lg-forgot {
  font-size: 13.5px;
  color: var(--esp-accent-deep);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.esp-mod-login .lg-card form .lg-forgot:hover { text-decoration: underline; }

/* Login — acceso con Google / Microsoft (Template/Partials/login_social.php).
   Botón según las guías de marca de los dos: fondo blanco, borde gris, logo a
   la izquierda. Va fuera del <form>, por eso no hereda el grid del formulario. */
.esp-mod-login .lg-social { margin-top: 22px; display: grid; gap: 10px; }
.esp-mod-login .lg-social-sep {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
}
.esp-mod-login .lg-social-sep::before,
.esp-mod-login .lg-social-sep::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.esp-mod-login .lg-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px 20px;
  background: #fff;
  color: #1f1f1f;
  border: 1px solid #747775;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, box-shadow .15s;
}
.esp-mod-login .lg-social-btn:hover {
  background: #f5f5f5;
  color: #1f1f1f;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.esp-mod-login .lg-social-btn img { width: 20px; height: 20px; flex: 0 0 20px; }
.esp-mod-login .lg-social-note {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--slate);
}
.esp-mod-login .lg-social-note a { color: var(--esp-accent-deep); text-decoration: underline; }
.esp-mod-login .lg-card form button[type="submit"] {
  background: var(--ink);
  color: var(--paper);
  padding: 14px 24px;
  border: none;
  border-radius: 10px;
  font: inherit;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .15s;
  margin-top: 4px;
}
.esp-mod-login .lg-card form button[type="submit"]:hover { background: var(--esp-accent-deep); }

/* Login — flip animation with 3D rotation */
.esp-mod-login .login-box {
  position: relative;
  perspective: 1000px;
  overflow: hidden;
}
.esp-mod-login .login-box .login-form,
.esp-mod-login .login-box .forget-form {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
}
/* login-form: siempre en flujo normal → define la altura de la caja */
.esp-mod-login .login-box .login-form {
  transform: rotateY(0deg);
}
/* forget-form: superpuesto, empieza girado */
.esp-mod-login .login-box .forget-form {
  position: absolute;
  top: 0; left: 0; right: 0;
  transform: rotateY(180deg);
  opacity: 0;
  pointer-events: none;
}
/* Estado flipped */
.esp-mod-login .login-box.flipped .login-form {
  transform: rotateY(-180deg);
  opacity: 0;
  pointer-events: none;
}
.esp-mod-login .login-box.flipped .forget-form {
  transform: rotateY(0deg);
  opacity: 1;
  pointer-events: auto;
}
.esp-mod-login .login-box .login-form form,
.esp-mod-login .login-box .forget-form form {
  display: grid;
  gap: 18px;
}

/* 2FA — selección de método (setup_2fa.php). Bootstrap pinta
   .list-group-item.active en azul solido con texto blanco por defecto: no
   solo desentona con la paleta del sitio, sino que el icono con clase
   text-primary (azul) queda literalmente invisible sobre un fondo del mismo
   azul. Se sustituye por el patrón de tarjeta seleccionada ya usado en el
   sitio: tinte claro de marca + borde de acento, con el texto oscuro habitual. */
.method-btn.active,
.method-btn.active:hover,
.method-btn.active:focus {
  background: var(--esp-accent-mist);
  border-color: var(--esp-accent);
  color: var(--ink);
}

/* Login page (standalone /es/login) — vertical centering + alert */
.esp-login-page {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
}
.esp-login-page > .esp-wrap {
  width: 100%;
}
.esp-login-alert {
  margin-bottom: 20px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 10px;
}
.esp-login-alert svg { flex-shrink: 0; }
.esp-login-alert.esp-alert-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
.esp-login-alert.esp-alert-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}
/* confirmUser — phone display + field layout */
.lg-phone-display {
  padding: 12px 16px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
  letter-spacing: .04em;
}
.lg-phone-field {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.lg-phone-field .country-select { flex: 0 0 auto; }
.lg-phone-field input[type="tel"] { flex: 1 1 auto; }

.esp-field-hint {
  display: block;
  font-size: 12.5px;
  color: var(--slate);
  margin-top: 4px;
}
/* Documento legal leído dentro de una tarjeta (compromiso del interventor) */
.esp-terms-doc {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 8px 0 14px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
}
.esp-terms-doc h2 { font-size: 15px; margin: 14px 0 6px; }
.esp-terms-doc h2:first-child { margin-top: 0; }
.esp-login-bottom-action {
  text-align: center;
  margin-top: 32px;
}

/* ============================================================
   MÓDULO: NOTICIAS HORIZONTAL
   Adaptado para <picture>/<img> en vez de background-image
   ============================================================ */
.news-h-list {
  display: grid;
  gap: 24px;
}
.news-h-card {
  display: grid;
  grid-template-columns: 5fr 7fr;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.news-h-card.flip { grid-template-columns: 7fr 5fr; }
.news-h-card.flip .news-h-img { order: 2; }
.news-h-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 22px 40px -22px rgba(20,30,18,0.18);
}
.news-h-img {
  min-height: 280px;
  overflow: hidden;
}
.news-h-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.news-h-body {
  padding: clamp(28px, 3.5vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.news-h-meta {
  display: flex;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--slate);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.news-h-meta .tag {
  color: var(--esp-accent-deep);
}
.news-h-body h3 {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 14px;
  color: var(--ink);
}
.news-h-body p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--slate);
  margin: 0 0 22px;
  max-width: 60ch;
}
.news-h-body .read-more {
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding-bottom: 4px;
  border-bottom: 1.5px solid var(--esp-accent);
  transition: color .15s, gap .2s;
}
.news-h-card:hover .read-more { gap: 12px; color: var(--esp-accent-deep); }

/* ============================================================
   MÓDULO: NOTICIAS VERTICAL
   ============================================================ */
.news-v-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.news-v-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.news-v-card:hover {
  border-color: var(--ink);
  transform: translateY(-3px);
  box-shadow: 0 22px 40px -22px rgba(20,30,18,0.18);
}
.news-v-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background-color: var(--paper-warm);
}
.news-v-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.news-v-body {
  padding: 24px 26px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.news-v-body .news-h-meta { margin-bottom: 12px; }
.news-v-body h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.news-v-body p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--slate);
  margin: 0 0 18px;
  flex: 1;
}
.news-v-body .read-more {
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding-bottom: 3px;
  border-bottom: 1.5px solid var(--esp-accent);
  transition: gap .2s;
}
.news-v-card:hover .read-more { gap: 12px; }

/* ============================================================
   MÓDULO: MARKETING 1 (horizontal)
   ============================================================ */
.mk1-list { display: grid; gap: 20px; }
.mk1-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  transition: border-color .2s;
}
.mk1-card:hover { border-color: var(--ink); }
.mk1-card.no-image,
.mk1-card.no-image.flip { grid-template-columns: 1fr; }
.mk1-card.flip { grid-template-columns: 1fr 280px; }
.mk1-card.flip .mk1-img { order: 2; }
.mk1-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background-color: var(--paper-warm);
  border-radius: 10px;
}
.mk1-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.mk1-body { padding: 8px; }
.mk1-body h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 10px;
}
.mk1-body p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--slate);
  margin: 0;
}

/* ============================================================
   MÓDULO: MARKETING 2 (grid 3 columnas — imagen circular)
   ============================================================ */
.mk2-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.mk2-card {
  text-align: center;
  padding: 32px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  transition: border-color .2s, transform .2s;
}
.mk2-card:hover { border-color: var(--ink); transform: translateY(-3px); }
.mk2-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 24px;
  border: 4px solid #fff;
  box-shadow: 0 0 0 1px var(--line), 0 18px 32px -18px rgba(20,30,18,0.25);
}
.mk2-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.mk2-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.mk2-card p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--slate);
  margin: 0;
}

/* ============================================================
   MÓDULO: TEXTO (blanco o sobre verde sutil)
   ============================================================ */
.esp-mod-text-block {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: center;
  padding: clamp(32px, 4vw, 56px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}
.esp-mod-text-block.no-image {
  grid-template-columns: 1fr;
  max-width: 100%;
}
.esp-mod-text-block.no-image .text-body p {
  max-width: 100%;
}
.esp-mod-text-block .text-img {
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: 14px;
}
.esp-mod-text-block .text-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.esp-mod-text-block .text-body h3 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0 0 18px;
  color: var(--esp-accent-deep);
}
.esp-mod-text-block .text-body p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 1em;
  max-width: 64ch;
}
.esp-mod-text-block .text-body p:last-child { margin-bottom: 0; }

.esp-module-green {
  background: var(--esp-accent-mist);
  position: relative;
}
.esp-module-green .esp-mod-text-block {
  background: transparent;
  border: none;
  padding: 0;
}
.esp-module-green .esp-mod-text-block .text-body h3 {
  color: var(--esp-accent-deep);
}
.esp-module-green .esp-mod-text-block .text-body p {
  color: var(--ink-soft);
}

/* ============================================================
   FOOTER del subdominio (3 columnas, personalizable)
   ============================================================ */
.esp-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.78);
  padding: 80px 0 36px;
}
.esp-footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.6fr 1.2fr;
  gap: 56px;
  margin-bottom: 56px;
}
.esp-footer-col h2,
.esp-footer-col h4 {
  font-family: var(--font-body);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255,255,255,0.72);
  font-weight: 600;
  margin: 0 0 22px;
}
.esp-footer-col h2 .accent,
.esp-footer-col h4 .accent {
  color: var(--esp-accent);
  font-weight: 600;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  letter-spacing: -0.01em;
  text-transform: none;
  display: block;
  margin-bottom: 4px;
}
.esp-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.esp-footer-col a {
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  font-size: 14.5px;
  transition: color .15s;
}
.esp-footer-col a:hover { color: var(--esp-accent); }

.esp-footer-center p {
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(255,255,255,0.75);
  margin: 0 0 18px;
}
.esp-footer-center .footer-image {
  margin-top: 18px;
  aspect-ratio: 16/9;
  max-width: 320px;
  overflow: hidden;
  border-radius: 8px;
}
.esp-footer-center .footer-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.esp-footer-bottom {
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: rgba(255,255,255,0.62);
  flex-wrap: wrap;
  gap: 12px;
}
.esp-footer-bottom .powered {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.esp-footer-bottom .powered img {
  height: 18px;
  filter: brightness(0) invert(1) opacity(0.7);
}

/* ============================================================
   PÁGINAS INTERIORES DEL SUBDOMINIO
   ============================================================ */
.esp-page-banner {
  background: var(--esp-accent-mist);
  border-bottom: 1px solid var(--esp-accent-soft);
  padding: clamp(40px, 5vw, 64px) 0;
}
.esp-page-banner h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  color: var(--esp-accent-deep);
  max-width: 22ch;
}
.esp-page-banner .crumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--slate);
  margin-bottom: 14px;
}
.esp-page-banner .crumbs a { color: inherit; text-decoration: none; }
.esp-page-banner .crumbs a:hover { color: var(--esp-accent-deep); }
.esp-page-banner .crumbs .sep { opacity: 0.5; }

.esp-page-hero {
  position: relative;
  max-height: 220px;
  background: var(--ink);
  overflow: hidden;
}
.esp-page-hero-img {
  position: absolute;
  inset: 0;
  opacity: 0.55;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.esp-page-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* News layout with sidebar */
.esp-news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 56px;
  padding: 64px 0;
}
.esp-news-intro {
  font-size: 16px;
  line-height: 1.65;
  color: var(--slate);
  margin: 0 0 36px;
  max-width: 64ch;
}
.esp-news-list { display: grid; gap: 24px; }

.esp-news-sidebar h4 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}
.esp-sidebar-card {
  padding: 22px 22px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 20px;
}
.esp-sidebar-card .cat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-soft);
  padding: 6px 0;
}
.esp-sidebar-card .cat svg { color: var(--esp-accent); }
.esp-recent-post {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  color: inherit;
}
.esp-recent-post:last-child { border-bottom: none; }
.esp-recent-post .thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
}
.esp-recent-post .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.esp-recent-post .title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 3px;
}
.esp-recent-post .date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--slate);
}
.esp-recent-post:hover .title { color: var(--esp-accent-deep); }

/* Pagination */
.esp-pagination {
  margin-top: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--slate);
}
.esp-pagination .esp-mod-link[disabled] {
  opacity: .4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Post detail */
.esp-post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 56px;
  padding: 64px 0;
}
.esp-post-hero {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
}
.esp-post-hero img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.esp-post-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 32px;
}
.esp-post-gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity .2s, transform .2s;
}
.esp-post-gallery img:hover { opacity: 1; transform: translateY(-2px); }
.esp-post-gallery img.active { opacity: 1; outline: 2px solid var(--esp-accent); outline-offset: 2px; }

.esp-post-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 22px;
}
.esp-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding: 14px 0 28px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--slate);
}
.esp-post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.esp-post-meta svg { color: var(--esp-accent); }
.esp-post-tags {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.esp-post-tags a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--slate);
  text-decoration: none;
  transition: all .15s;
}
.esp-post-tags a:hover {
  border-color: var(--esp-accent);
  color: var(--esp-accent-deep);
}

.esp-page-content {
  padding: 64px 0;
}
.esp-page-content .esp-wrap {
  max-width: 880px;
}

.prose {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.prose p { margin: 0 0 1.2em; }
.prose h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 1.8em 0 0.5em;
  color: var(--ink);
}
.prose h3 {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 1.5em 0 0.4em;
  color: var(--ink);
}
.prose blockquote {
  border-left: 3px solid var(--esp-accent);
  margin: 1.6em 0;
  padding: 12px 24px;
  font-family: var(--font-display);
  font-size: 1.1em;
  color: var(--slate);
  font-style: italic;
}
.prose figure { margin: 1.8em 0; }
.prose figure img {
  width: 100%;
  border-radius: 10px;
  display: block;
}
.prose figcaption {
  font-size: 13px;
  color: var(--slate);
  margin-top: 8px;
  text-align: center;
}
.prose ul, .prose ol {
  padding-left: 1.5em;
  margin: 0 0 1.2em;
}
.prose li { margin-bottom: 0.4em; }
.prose a {
  color: var(--esp-accent-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.doc-accept {
  margin-top: 2em;
  padding-top: 1.5em;
  border-top: 1px solid var(--line);
}
.lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 1.5em;
}

/* ============================================================
   LOADING OVERLAY
   ============================================================ */
#divLoading {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(3px);
  z-index: 9999;
  display: none;
}
#divLoading > div { text-align: center; }
#divLoading img {
  width: 200px;
  height: 200px;
}
#loadingText {
  margin: 14px auto 0;
  padding: 8px 20px;
  max-width: 320px;
  color: var(--green-deep, #7BA82E);
  font-size: 14px;
  background: var(--green-mist, #F4F8EA);
  border: 1.5px solid var(--green-soft, #E8F2D2);
  border-radius: 24px;
}
#loadingText:empty { display: none; }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.top-button {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 24px;
  bottom: 24px;
  z-index: 996;
  background: var(--ink);
  color: var(--green);       /* flecha lima sobre tinta: 8,8:1 (antes blanco sobre lima, 1,9:1) */
  width: 44px;
  height: 44px;
  border-radius: 999px;      /* píldora, como el resto de botones */
  transition: all 0.4s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.top-button i {
  font-size: 20px;
  line-height: 0;
}
.top-button:hover {
  background: var(--green-deep);
  color: #fff;
}
.top-button:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.top-button.active {
  visibility: visible;
  opacity: 1;
}

/* ============================================================
   SKIP TO CONTENT
   ============================================================ */
a.button.skip {
  position: absolute;
  top: -400px;
  left: 50%;
  z-index: 100;
  outline: 2px solid #fff;
  color: white;
  background: var(--green-deep);
  border-radius: 6px;
  text-transform: uppercase;
  padding: 20px 40px;
  margin-left: -130px;
}
a.button.skip:focus {
  top: 25vh;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .esp-mod-login,
  .esp-news-layout,
  .esp-post-layout {
    grid-template-columns: 1fr;
  }
  .news-v-grid { grid-template-columns: 1fr 1fr; }
  .mk2-grid { grid-template-columns: 1fr 1fr; }
  .news-h-card,
  .news-h-card.flip { grid-template-columns: 1fr; }
  .news-h-card.flip .news-h-img { order: 0; }
  .news-h-img { min-height: 220px; }
  .mk1-card,
  .mk1-card.flip { grid-template-columns: 1fr; gap: 18px; }
  .mk1-card.flip .mk1-img { order: 0; }
  .esp-mod-text-block { grid-template-columns: 1fr; gap: 24px; }
  .esp-mod-text-block .text-img { max-width: 260px; }
  .esp-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .esp-footer-center { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .news-v-grid,
  .mk2-grid,
  .esp-footer-grid { grid-template-columns: 1fr; }
  .esp-mod-head { align-items: start; }
}

/* ── Votaciones blocks (V1 grid + V2 list) ──────────────── */
.blk-votes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.vot-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  overflow: hidden;
}
.vot-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--line);
  transition: background .2s;
}
.vot-card.is-open::before { background: var(--green); }
.vot-card.is-soon::before { background: #E2B441; }
.vot-card.is-closed::before { background: var(--slate); }
.vot-card:hover {
  border-color: var(--ink);
  transform: translateY(-3px);
  box-shadow: 0 22px 40px -22px rgba(20,30,18,0.16);
}
.vot-card .vot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.vot-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--slate);
  background: #fff;
  white-space: nowrap;
}
.vot-pill .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.vot-pill.open {
  color: var(--green-deep);
  border-color: var(--green);
  background: var(--green-mist);
}
.vot-pill.open .pill-dot {
  background: var(--green);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 70%, transparent);
  animation: votPulse 1.8s infinite;
}
.vot-pill.soon {
  color: #8a6b1c;
  border-color: #E2B441;
  background: #FAF3DC;
}
.vot-pill.closed {
  color: var(--ink-soft);
  background: var(--paper-warm);
}
@keyframes votPulse {
  0%   { box-shadow: 0 0 0 0   color-mix(in srgb, var(--green) 55%, transparent); }
  70%  { box-shadow: 0 0 0 7px color-mix(in srgb, var(--green) 0%, transparent); }
  100% { box-shadow: 0 0 0 0   color-mix(in srgb, var(--green) 0%, transparent); }
}
.vot-card .vot-type {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
}
.vot-card h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 1.8vw, 26px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--ink);
}
.vot-card .vot-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--slate);
  margin: 0 0 22px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* El resumen trae HTML del editor (<p>, <img>): sin margenes propios, y la imagen a todo el ancho,
   sin flotar y con las esquinas redondeadas como en la ficha de la votacion */
.vot-card .vot-desc p { margin: 0; font-size: inherit; color: inherit; }
.vot-card .vot-desc img {
  float: none !important;
  display: block;
  max-width: 100%;
  height: auto !important;
  border-radius: 8px;
  margin: 0 0 10px;
}
.vot-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px dashed var(--line);
  margin-bottom: 16px;
}
.vot-meta .m-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vot-meta .m-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
}
.vot-meta .m-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.vot-meta .m-value.mono { font-family: var(--font-mono); }
.vot-card .vot-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.vot-card .vot-go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  padding-bottom: 3px;
  border-bottom: 1.5px solid var(--green);
  transition: gap .2s, color .15s;
}
.vot-card:hover .vot-go { gap: 12px; color: var(--green-deep); }
.vot-card.is-closed:hover .vot-go { color: var(--ink); border-color: var(--slate); }

.blk-votes-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--ink);
}
.vot-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 24px 16px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background .2s, padding .25s ease;
}
.vot-row:hover {
  background: var(--green-mist);
  padding-left: 24px;
}
.vot-row .vr-date {
  display: flex;
  flex-direction: column;
}
.vot-row .vr-date .day {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 38px;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.02em;
}
.vot-row .vr-date .mon {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--slate);
  text-transform: uppercase;
  margin-top: 4px;
}
.vot-row .vr-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 6px;
}
.vot-row .vr-meta .sep { color: var(--line); }
.vot-row .vr-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ink);
  margin: 0;
}
.vot-row:hover .vr-title { color: var(--green-deep); }
.vot-row .vr-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  transition: all .2s;
  flex-shrink: 0;
}
.vot-row:hover .vr-arrow {
  border-color: var(--green);
  background: var(--green);
  color: var(--ink);
  transform: rotate(-25deg);
}
.vot-row.is-closed .vr-date .day { color: var(--slate); }

@media (max-width: 980px) {
  .blk-votes-grid { grid-template-columns: 1fr; }
  .vot-row { grid-template-columns: 80px 1fr auto; gap: 18px; }
  .vot-row .vr-date .day { font-size: 28px; }
}
@media (max-width: 640px) {
  .vot-row { grid-template-columns: 1fr; gap: 12px; padding: 18px 12px; }
  .vot-row .vr-date { flex-direction: row; align-items: baseline; gap: 8px; }
  .vot-row .vr-arrow { display: none; }
}

/* ── Prelaunch banner — TEMPORAL: borrar cuando se lance ── */
.prelaunch {
  position: relative;
  z-index: 60;
  background:
    radial-gradient(120% 180% at 0% 0%, var(--green) 0%, var(--green-deep) 55%, #6A9626 100%);
  color: var(--ink);
  font-family: var(--font-body);
  border-bottom: 1.5px solid rgba(26, 29, 26, 0.12);
  overflow: hidden;
}
.prelaunch::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(26, 29, 26, 0.10) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: .5;
  pointer-events: none;
}
.prelaunch-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 11px var(--gutter);
  display: flex;
  align-items: center;
  gap: 18px;
}
.prelaunch-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--white);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 6px 13px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.prelaunch-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .prelaunch-dot { animation: prePulse 1.7s ease-in-out infinite; }
  @keyframes prePulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent); }
    50%      { opacity: .55; transform: scale(.7); box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 0%, transparent); }
  }
}
.prelaunch-text {
  flex: 1;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink);
  text-wrap: pretty;
  min-width: 0;
  margin: 0;
}
.prelaunch-text strong { font-weight: 600; }
.prelaunch-hl {
  font-weight: 600;
  white-space: nowrap;
  background: var(--ink);
  color: var(--white);
  padding: 1px 9px;
  border-radius: 999px;
  margin: 0 1px;
}
.prelaunch-wave { white-space: nowrap; font-weight: 600; }
.prelaunch-link { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.prelaunch-link:hover { text-decoration-thickness: 2px; }
.prelaunch .btn-close {
  flex-shrink: 0;
  filter: none;
  opacity: .6;
}
.prelaunch .btn-close:hover { opacity: 1; }
@media (max-width: 760px) {
  .prelaunch-inner { gap: 12px; padding: 10px var(--gutter); }
  .prelaunch-text  { font-size: 13px; }
  .prelaunch-badge { display: none; }
}

/* ============================================================
   HOME — variantes hero y módulos (fusionado desde espacio-home.css)
   ============================================================ */

/* Hero · enlace secundario "fantasma" sobre la imagen */
.esp-hero-actions .hero-link-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Hero · textos que cambian con cada imagen del carrusel */
.esp-hero-texts {
  position: relative;
}
.esp-hero-text {
  display: none;
}
.esp-hero-text.active {
  display: block;
  animation: espHeroTextIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes espHeroTextIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .esp-hero-text.active { animation: none; }
}

/* Cabecera de módulo · variante centrada (módulo Marketing 2) */
.esp-mod-head--center {
  justify-content: center;
  text-align: center;
}
.esp-mod-head--center .eyebrow {
  justify-content: center;
}
.esp-mod-head--center h2 {
  margin: 0 auto;
}

/* Cabecera de módulo · variante simple sin flex (módulo Login) */
.esp-mod-head--plain {
  display: block;
  margin: 0;
}

/* ── Admin Preview Mode banner ─────────────────────────────── */
.preview-mode-banner {
  background: #fff3cd;
  border-bottom: 2px solid #ffc107;
  color: #664d03;
  padding: 10px 20px;
  font-size: 0.875rem;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1100;
}
.preview-mode-banner .preview-exit-link {
  color: #664d03;
  font-weight: 600;
  margin-left: 8px;
  text-decoration: underline;
}

/* ── Admin Preview toolbar ─────────────────────────────────── */
.preview-toolbar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1a2a4a;
  color: #fff;
  padding: 10px 18px;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0,0,0,.35);
  font-size: 0.82rem;
  white-space: nowrap;
}
.preview-toolbar-info { opacity: .85; }
.preview-toolbar-actions { display: flex; gap: 8px; }
.preview-btn {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s;
}
.preview-btn:hover { background: rgba(255,255,255,.22); color: #fff; }
.preview-btn-exit { background: rgba(220,53,69,.5); border-color: rgba(220,53,69,.6); }
.preview-btn-exit:hover { background: rgba(220,53,69,.75); }
.preview-btn.is-loading { opacity: .6; pointer-events: none; }

/* ============================================================
   FRANJA LEGAL (textos legales de la plataforma, siempre visible)
   ============================================================ */
.franja-legal {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.62); /* 0.45 daba 4,4:1 */
}
.franja-legal a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.25);
}
.franja-legal a:hover { color: rgba(255,255,255,0.85); }
.vt-footer .franja-legal { margin-top: 8px; }

/* Accesibilidad: los textos legales traen marcadores en rojo puro (#ff0000, 3,8:1) y el <code> rosa de
   Bootstrap (#d63384, 4,3:1). Se oscurecen hasta 7:1 sin tocar el contenido guardado. */
.prose [style*="color:#ff0000"],
.prose [style*="color: #ff0000"],
.prose [style*="color:red"] { color: #a30000 !important; }
.prose code { color: #8a1f55; }
/* Enlaces azules pegados desde Google Docs (#1155cc, 6,6:1): se llevan a 7:1 */
.prose [style*="color:#1155cc"],
.prose [style*="color: #1155cc"] { color: #0b3a8f !important; }

/* Reflow (WCAG 1.4.10) y contraste en las páginas de texto del espacio */
.prose table { width: 100% !important; table-layout: auto; }
.prose col { width: auto !important; }
.prose td, .prose th { overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .esp-btn { white-space: normal; text-align: center; }
}
.text-muted { color: #555555 !important; }
/* AAA 1.4.8: líneas de texto de hasta 80 caracteres */
.prose p, .prose li { max-width: 80ch; }
