/* SPA + layout inspirado en page-5 */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

body {
  font-family: "League Spartan", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--bg);
  color: var(--text);
  padding: 8px 12px;
  z-index: 100;
}

.skip-link:focus {
  left: 12px;
  background: var(--bg);
  color: var(--text);
}

.main-view {
  min-height: 48vh;
}

/* Header: tema + hamburguesa */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(20, 18, 26, 0.12);
  border-radius: 12px;
  background: transparent;
  color: #14121a;
  cursor: pointer;
  position: relative;
}

.theme-toggle:hover {
  border-color: rgba(228, 74, 115, 0.35);
}

.theme-toggle__icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: block;
}

html[data-theme="dark"] .theme-toggle {
  border-color: rgba(244, 242, 249, 0.16);
  color: var(--text);
}

html[data-theme="dark"] .theme-toggle:hover {
  border-color: rgba(240, 98, 138, 0.45);
}

html:not([data-theme="dark"]) .theme-toggle__icon--sun,
html[data-theme="dark"] .theme-toggle__icon--moon {
  display: none;
}

/* Header: hamburguesa */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(20, 18, 26, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #14121a;
  margin: 5px 0;
  border-radius: 2px;
}

.nav .header-cta.header-cta--plain {
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-link--portal {
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  padding: 8px 4px;
  border-radius: 0;
  color: rgba(20, 18, 26, 0.76);
  text-align: left;
}

.nav-link--portal:hover {
  color: #14121a;
}

@media (min-width: 921px) {
  .nav-link--portal {
    width: auto;
  }
}

.nav-drawer-backdrop {
  display: none;
}

@media (max-width: 920px) {
  /**
   * Sin blur en el header en móvil: si el <nav> fijo queda dentro de .site-header,
   * backdrop-filter crea bloque de posicionamiento y el drawer queda recortado
   * al alto del header (~64px) en lugar de ocupar toda la pantalla.
   */
  .site-header {
    z-index: 120;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .header-actions {
    margin-left: auto;
    gap: 8px;
  }

  .nav-toggle {
    display: inline-block;
    position: relative;
    z-index: 130;
  }

  /* Drawer: entra de izquierda a derecha */
  .nav-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(20, 18, 26, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
  }

  body.nav-drawer-open .nav-drawer-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.nav-drawer-open {
    overflow: hidden;
  }

  .nav .header-cta.header-cta--plain {
    margin-left: 0;
    margin-top: 0;
    width: auto;
    align-self: stretch;
    text-align: left;
    justify-content: flex-start;
    padding: 8px 4px;
    border-radius: 0;
    border: 0;
    background: transparent;
    font-weight: 500;
    font-size: 14px;
    color: rgba(20, 18, 26, 0.76);
    white-space: normal;
  }

  .nav .header-cta.header-cta--plain:hover {
    color: #14121a;
  }

  .nav {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(90vw, 320px);
    min-height: 100vh;
    min-height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    box-sizing: border-box;
    padding-top: max(72px, calc(18px + env(safe-area-inset-top, 0px)));
    padding-right: 18px;
    padding-left: 18px;
    padding-bottom: max(22px, calc(18px + env(safe-area-inset-bottom, 0px)));
    background: #fff;
    border-right: 1px solid rgba(20, 18, 26, 0.1);
    box-shadow: 12px 0 40px rgba(20, 18, 26, 0.12);
    z-index: 115;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    transform: translate3d(-105%, 0, 0);
    transition: transform 0.26s ease;
    display: flex;
    visibility: hidden;
    pointer-events: none;
  }

  .nav.is-open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
  }

  .header-inner {
    position: relative;
    flex-wrap: wrap;
  }

  .nav-dropdown-panel {
    position: static;
    margin: 4px 0 8px;
    min-width: auto;
    box-shadow: none;
    border: 1px solid rgba(20, 18, 26, 0.08);
  }

  .nav-item--dropdown {
    width: 100%;
  }

  .nav-link--trigger {
    width: 100%;
    justify-content: space-between;
    text-align: left;
  }

  .nav-link--portal {
    width: 100%;
    margin-top: 4px;
  }
}

/* Modal portal empresarial */
.portal-dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: 420px;
  width: calc(100vw - 32px);
  box-shadow: 0 24px 70px rgba(20, 18, 26, 0.22);
  background: #ffffff;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

.portal-dialog::backdrop {
  background: rgba(20, 18, 26, 0.5);
}

.portal-dialog-inner {
  position: relative;
  padding: 18px 18px 16px;
}

.portal-dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: rgba(20, 18, 26, 0.55);
}

.portal-dialog-close:hover {
  background: rgba(20, 18, 26, 0.06);
  color: #14121a;
}

.portal-dialog h2 {
  margin: 0 36px 10px 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.portal-dialog-intro {
  margin: 0 0 16px;
  font-size: 13px;
  color: rgba(20, 18, 26, 0.64);
  line-height: 1.35;
}

.portal-dialog-form {
  display: grid;
  gap: 10px;
}

.portal-field {
  display: grid;
  gap: 6px;
}

.portal-field-label {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.1px;
  color: rgba(20, 18, 26, 0.72);
}

.portal-field-input {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(20, 18, 26, 0.18);
  font-size: 13px;
  line-height: 1.25;
  font-family: inherit;
  background: #ffffff;
}

.portal-field-input:focus {
  outline: none;
  border-color: rgba(15, 98, 254, 0.75); /* Carbon blue */
  box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.16);
}

.portal-password-wrap {
  position: relative;
  display: block;
}

.portal-field-input--password {
  width: 100%;
  box-sizing: border-box;
  padding-right: 44px;
}

.portal-password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(20, 18, 26, 0.45);
  cursor: pointer;
}

.portal-password-toggle:hover {
  background: rgba(20, 18, 26, 0.06);
  color: rgba(20, 18, 26, 0.75);
}

.portal-password-toggle:focus-visible {
  outline: 2px solid rgba(228, 74, 115, 0.55);
  outline-offset: 2px;
}

.portal-password-toggle__icon {
  position: absolute;
  display: block;
}

.portal-password-toggle__icon--hide {
  display: none;
}

.portal-password-toggle.is-revealed .portal-password-toggle__icon--show {
  display: none;
}

.portal-password-toggle.is-revealed .portal-password-toggle__icon--hide {
  display: block;
}

.portal-dialog-note {
  margin: 0;
  font-size: 12px;
  color: rgba(20, 18, 26, 0.62);
}

.portal-dialog-note a {
  font-weight: 600;
}

.portal-dialog-submit {
  margin-top: 4px;
  width: 100%;
  justify-content: center;
}

/* Marca (SVG identidad) */
.brand--logo {
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand--footer {
  justify-content: flex-start;
}

.brand-icon {
  display: block;
  flex-shrink: 0;
}

.brand-wordmark {
  display: block;
  width: auto;
  max-width: min(200px, 42vw);
  height: auto;
}

.brand-icon--sm {
  width: 32px;
  height: 32px;
}

.brand-wordmark--sm {
  max-width: 160px;
}

.brand--solo-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

/**
 * Marco fijo 180×40 (reescala con viewport) para SVG y raster: misma «caja» siempre.
 * object-fit evita deformar; si uno se ve más chico dentro de la caja, es hueco dentro del archivo.
 */
.brand-logo-main {
  display: block;
  box-sizing: border-box;
  width: min(180px, 52vw);
  height: calc(min(180px, 52vw) * (40 / 180));
  object-fit: contain;
  object-position: left center;
}

/* Productos — desplegable */
.nav-item--dropdown {
  position: relative;
}

.nav-link--trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  color: rgba(20, 18, 26, 0.76);
  font-weight: 500;
  font-size: 14px;
  padding: 8px 4px;
  border-radius: 0;
}

.nav-link--trigger:hover {
  color: #14121a;
}

/* Sin subrayado ni resaltado al abrir "Productos": el header no debe "cambiar de aspecto". */
.nav-item--dropdown.is-open .nav-link--trigger {
  color: rgba(20, 18, 26, 0.76);
}

.nav-caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid rgba(20, 18, 26, 0.55);
  margin-top: 2px;
  transition: transform 0.15s ease;
}

.nav-item--dropdown.is-open .nav-caret {
  transform: rotate(180deg);
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 280px;
  background: #fff;
  border: 1px solid rgba(20, 18, 26, 0.1);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(20, 18, 26, 0.12);
  padding: 8px;
  z-index: 40;
}

.nav-dropdown-panel[hidden] {
  display: none !important;
}

.nav-dropdown-link {
  display: block;
  padding: 10px 12px 10px 14px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #14121a;
  border-radius: 8px;
  border-left: 4px solid transparent;
}

.nav-dropdown-link:hover {
  background: rgba(20, 18, 26, 0.04);
}

.nav-dropdown-link--sublimacion {
  border-left-color: #0a0a0a;
}

.nav-dropdown-link--promo {
  border-left-color: #1b4f9c;
}

.nav-dropdown-link--gran-formato {
  border-left-color: #e44a73;
}

.nav-dropdown-link--laser {
  border-left-color: #e8c54a;
}

.nav-dropdown-link--etiquetas {
  border-left-color: #4a9ee6;
}

/* Home — page-5 (hero con vídeo opcional) */
.home-hero-banner {
  margin: 18px 0 8px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #2f5fb8, #1c3f86);
  min-height: 180px;
  position: relative;
}

/*
 * Portada con vídeo: sin borde; esquinas redondeadas. Altura natural del archivo (sin marco recortado).
 */
.home-hero-banner.home-hero-banner--video {
  border-radius: 18px;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: hidden;
  background: #0a0e14;
}

.home-hero-banner--video .home-hero-video {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center center;
}

.home-hero-video-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 12, 28, 0.15) 0%, rgba(5, 12, 28, 0.55) 55%, rgba(5, 12, 28, 0.82) 100%);
}

.home-hero-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, #2f5fb8, #1c3f86);
}

.home-hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42px;
  z-index: 2;
  background: radial-gradient(circle at 20% 0, rgba(255, 255, 255, 0.25), transparent 55%),
    linear-gradient(180deg, transparent, rgba(12, 20, 40, 0.55));
  pointer-events: none;
}

/* Vídeo de portada: sin velo inferior ni “ola” que apaguen la animación */
.home-hero-banner--video .home-hero-video-shade {
  display: none;
}

.home-hero-banner--video .home-hero-wave {
  display: none;
}

.home-hero-titlewrap {
  position: relative;
  z-index: 3;
  padding: 28px 18px 36px;
  text-align: center;
}

.home-hero-title {
  margin: 0;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: clamp(26px, 4vw, 40px);
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.home-hero-sub {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  max-width: 52ch;
  margin-left: auto;
  margin-right: auto;
}

/* Carrusel colaboradores — marquee infinito (transform, no scrollLeft: funciona aunque quepan pocos logos) */
.collab-carousel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.collab-carousel.collab-carousel--marquee {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.collab-carousel--marquee .collab-carousel-viewport {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 8px 0 14px;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.collab-carousel-track {
  display: flex;
  width: max-content;
  gap: 28px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0 8px;
  will-change: transform;
  /* El desplazamiento lo controla initCollabMarquee() en app.js (más fiable que @keyframes en todos los navegadores) */
  transform: translate3d(0, 0, 0);
}

.collab-slide {
  flex: 0 0 auto;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.collab-slide img {
  max-height: 44px;
  max-width: 140px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.88;
}

.collab-carousel-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(20, 18, 26, 0.12);
  background: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #14121a;
}

.collab-carousel-btn:hover {
  border-color: rgba(228, 74, 115, 0.35);
}

@media (max-width: 520px) {
  .collab-carousel-btn {
    display: none;
  }
}

/* Modelo: 3 columnas en PC → fila 1 (3 líneas) + fila 2 (2 líneas + blog) */
.home-grid-lineas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
  align-items: stretch;
}

.home-grid-lineas > * {
  min-width: 0;
}

@media (max-width: 720px) {
  .home-grid-lineas {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .home-grid-lineas {
    grid-template-columns: 1fr;
  }
}

.home-col-card {
  border-radius: 18px;
  border: 1px solid rgba(20, 18, 26, 0.08);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 280px;
}

a.home-col-card.home-col-card--linea {
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

a.home-col-card.home-col-card--linea:hover {
  box-shadow: 0 10px 28px rgba(20, 18, 26, 0.1);
  transform: translateY(-1px);
}

.home-col-media--img {
  padding: 0;
  overflow: hidden;
  border-style: solid;
}

.home-col-media--img img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.home-col-card.teal {
  background: #e8f7f3;
}

.home-col-card.blue {
  background: #e9f0ff;
}

.home-col-card.yellow {
  background: #fff7df;
}

.home-col-media {
  height: auto;
  min-height: 0;
  aspect-ratio: 640 / 405;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(47, 95, 184, 0.18), rgba(228, 74, 115, 0.12));
  border: 1px dashed rgba(20, 18, 26, 0.1);
  overflow: hidden;
}

.home-col-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.trust-row {
  margin: 18px 0;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(20, 18, 26, 0.08);
  background: #fff;
}

.trust-row h2 {
  margin: 0 0 12px;
  font-size: 15px;
  text-align: center;
  color: rgba(20, 18, 26, 0.72);
}

.trust-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: center;
  filter: grayscale(1);
  opacity: 0.85;
}

.trust-logo {
  max-height: 34px;
  max-width: 120px;
  object-fit: contain;
}

.blog-row h2 {
  margin: 0 0 14px;
  font-size: 22px;
  text-align: center;
}

/* Misma tarjeta que en Inicio: `blog-card-spa` (grid 3 columnas) */
.blog-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 1100px) {
  .blog-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .blog-grid-3 {
    grid-template-columns: 1fr;
  }
}

.blog-card-spa {
  border-radius: 18px;
  border: 1px solid rgba(20, 18, 26, 0.08);
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 10px 30px rgba(20, 18, 26, 0.06);
}

html[data-theme="dark"] .blog-card-spa {
  background: var(--surface-elevated);
  border-color: var(--line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.blog-card-top {
  height: 6px;
  flex-shrink: 0;
}

.blog-card-top.purple {
  background: linear-gradient(90deg, rgba(110, 73, 255, 0.9), rgba(228, 74, 115, 0.75));
}

.blog-card-top.pink {
  background: linear-gradient(90deg, rgba(228, 74, 115, 0.9), rgba(255, 90, 136, 0.75));
}

.blog-card-top.orange {
  background: linear-gradient(90deg, rgba(240, 152, 25, 0.95), rgba(228, 74, 115, 0.7));
}

.blog-card-spa__media {
  padding: 10px 14px 0;
  box-sizing: border-box;
}

.blog-card-spa__media img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.blog-card-spa__media--placeholder {
  height: 120px;
  margin: 10px 14px 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(110, 73, 255, 0.15), rgba(228, 74, 115, 0.1));
  border: 1px dashed rgba(20, 18, 26, 0.1);
  box-sizing: border-box;
}

html[data-theme="dark"] .blog-card-spa__media--placeholder {
  border-color: rgba(148, 163, 184, 0.22);
}

.blog-card-spa .blog-card-body {
  padding: 0 14px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.blog-card-spa__title {
  margin: 6px 0 8px;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.blog-card-spa__readwrap {
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 600;
}

.blog-card-spa__readwrap a {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: rgba(20, 18, 26, 0.85);
}

html[data-theme="dark"] .blog-card-spa__readwrap a {
  color: rgba(244, 242, 249, 0.92);
}

/* Blog — editor: hub + acciones por artículo */
.blog-editor-hub {
  margin: 0 0 22px;
}

.blog-editor-hub__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.blog-editor-hub__title {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.blog-editor-hub__hint {
  margin: 6px 0 0;
  max-width: 70ch;
}

.blog-editor-hub__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.blog-editor-hub__new {
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: rgba(20, 18, 26, 0.82);
  padding: 8px 2px;
  border-radius: 10px;
}

.blog-editor-hub__new:hover {
  color: rgba(20, 18, 26, 1);
}

html[data-theme="dark"] .blog-editor-hub__new {
  color: rgba(244, 242, 249, 0.9);
}

html[data-theme="dark"] .blog-editor-hub__new:hover {
  color: rgba(244, 242, 249, 1);
}

.blog-editor-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(20, 18, 26, 0.08);
}

html[data-theme="dark"] .blog-editor-card-actions {
  border-top-color: var(--line);
}

.blog-editor-link {
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: rgba(20, 18, 26, 0.82);
  padding: 4px 2px;
  border-radius: 8px;
  white-space: nowrap;
}

.blog-editor-link:hover {
  color: rgba(20, 18, 26, 1);
}

html[data-theme="dark"] .blog-editor-link {
  color: rgba(244, 242, 249, 0.9);
}

html[data-theme="dark"] .blog-editor-link:hover {
  color: rgba(244, 242, 249, 1);
}

.blog-editor-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(20, 18, 26, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: rgba(20, 18, 26, 0.72);
}

.blog-editor-card-badge--draft {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.12);
}

.blog-editor-card-badge--pending {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.12);
}

.blog-editor-card-badge--ok {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.1);
}

html[data-theme="dark"] .blog-editor-card-badge {
  background: rgba(15, 18, 32, 0.55);
  color: rgba(241, 245, 249, 0.88);
  border-color: var(--line);
}

.blog-page-settings {
  margin: 0 0 18px;
  padding: 0 0 6px;
}

.blog-page-settings__lead {
  margin: 0 0 14px;
  max-width: 75ch;
}

.blog-header--settings {
  border: 1px solid rgba(20, 18, 26, 0.1);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.85);
}

html[data-theme="dark"] .blog-header--settings {
  border-color: var(--line);
  background: rgba(22, 24, 34, 0.55);
}

.blog-header--settings.blog-header--editable {
  border-style: solid;
}

/* Blog (listado/detalle) — look editorial (SPA) */
.blog-page .blog-header {
  margin: 0 0 14px;
}

.blog-header--editable {
  border-radius: 18px;
  border: 1px dashed rgba(20, 18, 26, 0.18);
  padding: 12px;
}

html[data-theme="dark"] .blog-header--editable {
  border-color: rgba(148, 163, 184, 0.28);
}

.blog-h1 {
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.blog-intro {
  margin: 0;
  max-width: 62ch;
}

/* Editor WYSIWYG (Blog admin) */
.rte {
  margin-top: 8px;
  border: 1px solid rgba(20, 18, 26, 0.12);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] .rte {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(22, 24, 34, 0.6);
}

.rte-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid rgba(20, 18, 26, 0.1);
  background: linear-gradient(135deg, rgba(228, 74, 115, 0.06), rgba(110, 73, 255, 0.04));
}

.rte-toolbar-hint {
  flex: 1 1 100%;
  margin: 0;
  padding: 4px 0 0;
  font-size: 12px;
  line-height: 1.35;
  opacity: 0.88;
}

html[data-theme="dark"] .rte-toolbar {
  border-bottom-color: rgba(148, 163, 184, 0.18);
  background: linear-gradient(135deg, rgba(228, 74, 115, 0.1), rgba(110, 73, 255, 0.06));
}

.rte-btn {
  appearance: none;
  border: 1px solid rgba(20, 18, 26, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: rgba(20, 18, 26, 0.84);
  border-radius: 10px;
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.rte-btn:hover {
  border-color: rgba(228, 74, 115, 0.35);
  color: rgba(20, 18, 26, 1);
}

html[data-theme="dark"] .rte-btn {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 18, 32, 0.55);
  color: rgba(241, 245, 249, 0.86);
}

html[data-theme="dark"] .rte-btn:hover {
  border-color: rgba(240, 98, 138, 0.45);
  color: rgba(241, 245, 249, 1);
}

.rte-sep {
  width: 1px;
  background: rgba(20, 18, 26, 0.12);
  margin: 2px 2px;
  align-self: stretch;
}

html[data-theme="dark"] .rte-sep {
  background: rgba(148, 163, 184, 0.22);
}

.rte-editor {
  min-height: 260px;
  padding: 14px 14px 18px;
  outline: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  white-space: normal;
}

.rte-editor:focus {
  box-shadow: inset 0 0 0 2px rgba(228, 74, 115, 0.22);
}

.rte-editor h2 { margin: 0.6em 0 0.35em; font-size: 22px; letter-spacing: -0.02em; }
.rte-editor h3 { margin: 0.6em 0 0.35em; font-size: 18px; letter-spacing: -0.01em; }
.rte-editor p { margin: 0.55em 0; }
.rte-editor ul, .rte-editor ol { margin: 0.55em 0 0.55em 1.1em; padding: 0; }
.rte-editor a { color: rgba(228, 74, 115, 0.95); text-decoration: underline; text-underline-offset: 3px; }
html[data-theme="dark"] .rte-editor a { color: rgba(240, 98, 138, 0.95); }
.rte-editor hr { border: 0; border-top: 1px solid rgba(20, 18, 26, 0.14); margin: 14px 0; }
html[data-theme="dark"] .rte-editor hr { border-top-color: rgba(148, 163, 184, 0.22); }
.rte-editor img { max-width: 100%; height: auto; border-radius: 14px; display: block; margin: 10px 0; }
.rte-editor img.rte-img-selected { outline: 2px solid rgba(228, 74, 115, 0.35); outline-offset: 2px; }
html[data-theme="dark"] .rte-editor img.rte-img-selected { outline-color: rgba(240, 98, 138, 0.45); }

.rte-figure { margin: 14px 0; }
.rte-figure figcaption { margin-top: 8px; font-size: 13px; color: rgba(20, 18, 26, 0.68); }
html[data-theme="dark"] .rte-figure figcaption { color: rgba(241, 245, 249, 0.76); }

.rte-figure--center { max-width: 760px; margin-left: auto; margin-right: auto; }
.rte-figure--wide { max-width: 100%; }
.rte-figure--left, .rte-figure--right { max-width: min(420px, 48%); }
.rte-figure--left { float: left; margin-right: 16px; }
.rte-figure--right { float: right; margin-left: 16px; }

.rte-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.rte-gallery .rte-figure { margin: 0; max-width: 100%; float: none; }

@media (max-width: 720px) {
  .rte-figure--left, .rte-figure--right { float: none; max-width: 100%; margin-left: 0; margin-right: 0; }
  .rte-gallery { grid-template-columns: 1fr; }
}
.rte-preview {
  padding: 14px 14px 18px;
  min-height: 260px;
}
.rte-preview h2 { margin: 0.6em 0 0.35em; font-size: 22px; letter-spacing: -0.02em; }
.rte-preview h3 { margin: 0.6em 0 0.35em; font-size: 18px; letter-spacing: -0.01em; }
.rte-preview p { margin: 0.55em 0; }
.rte-preview ul, .rte-preview ol { margin: 0.55em 0 0.55em 1.1em; padding: 0; }
.rte-preview a { color: rgba(228, 74, 115, 0.95); text-decoration: underline; text-underline-offset: 3px; }
html[data-theme="dark"] .rte-preview a { color: rgba(240, 98, 138, 0.95); }
.rte-preview hr { border: 0; border-top: 1px solid rgba(20, 18, 26, 0.14); margin: 14px 0; }
html[data-theme="dark"] .rte-preview hr { border-top-color: rgba(148, 163, 184, 0.22); }
.rte-preview img { max-width: 100%; height: auto; border-radius: 14px; display: block; margin: 10px 0; }
.rte-preview .rte-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.rte-preview .rte-gallery .rte-figure { margin: 0; max-width: 100%; float: none; }
.rte-preview .rte-figure figcaption { margin-top: 8px; font-size: 13px; color: rgba(20, 18, 26, 0.68); }
html[data-theme="dark"] .rte-preview .rte-figure figcaption { color: rgba(241, 245, 249, 0.76); }
@media (max-width: 720px) {
  .rte-preview .rte-gallery { grid-template-columns: 1fr; }
}

.blog-cta {
  margin: 14px 0 18px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(20, 18, 26, 0.1);
  background: linear-gradient(135deg, rgba(228, 74, 115, 0.08), rgba(110, 73, 255, 0.06));
}

html[data-theme="dark"] .blog-cta {
  border-color: rgba(148, 163, 184, 0.22);
  background: linear-gradient(135deg, rgba(228, 74, 115, 0.12), rgba(110, 73, 255, 0.08));
}

.blog-cta__title {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.blog-cta__text {
  margin: 0;
  color: rgba(20, 18, 26, 0.72);
  max-width: 70ch;
}

html[data-theme="dark"] .blog-cta__text {
  color: rgba(241, 245, 249, 0.88);
}

.blog-cta__actions {
  margin: 12px 0 0;
}

.blog-cta--placeholder {
  border-style: dashed;
}

.blog-section--placeholder {
  border-radius: 18px;
  border: 1px dashed rgba(20, 18, 26, 0.18);
  padding: 12px;
}

html[data-theme="dark"] .blog-section--placeholder {
  border-color: rgba(148, 163, 184, 0.28);
}

.blog-config {
  margin: 0 0 10px;
  font-size: 12px;
}

.blog-section {
  margin-top: 18px;
}

.blog-section__title {
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.blog-cards--featured {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .blog-cards--featured {
    grid-template-columns: 1fr;
  }
}

.blog-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 980px) {
  .blog-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .blog-cards {
    grid-template-columns: 1fr;
  }
}

.blog-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(20, 18, 26, 0.1);
  background: rgba(255, 255, 255, 0.96);
}

html[data-theme="dark"] .blog-card {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(22, 24, 34, 0.74);
}

.blog-card__link {
  display: grid;
  grid-template-rows: auto 1fr;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.blog-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(110, 73, 255, 0.18), rgba(228, 74, 115, 0.14));
}

.blog-card__media.purple {
  background: linear-gradient(135deg, rgba(110, 73, 255, 0.22), rgba(110, 73, 255, 0.04));
}

.blog-card__media.pink {
  background: linear-gradient(135deg, rgba(228, 74, 115, 0.22), rgba(228, 74, 115, 0.04));
}

.blog-card__media.orange {
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.22), rgba(245, 166, 35, 0.04));
}

.blog-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-card__body {
  padding: 14px 14px 16px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.blog-meta {
  margin: 0;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(100, 116, 139, 0.95);
}

html[data-theme="dark"] .blog-meta {
  color: rgba(203, 213, 225, 0.92);
}

.blog-card__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.blog-card__excerpt {
  margin: 0;
  color: rgba(20, 18, 26, 0.72);
  line-height: 1.55;
}

html[data-theme="dark"] .blog-card__excerpt {
  color: rgba(241, 245, 249, 0.86);
}

.blog-card__cta {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  background: rgba(99, 102, 241, 0.1);
  color: rgba(30, 41, 59, 0.95);
  width: fit-content;
}

html[data-theme="dark"] .blog-card__cta {
  border-color: rgba(99, 102, 241, 0.34);
  background: rgba(99, 102, 241, 0.16);
  color: rgba(241, 245, 249, 0.95);
}

.blog-card__link:hover .blog-card__cta {
  background: rgba(228, 74, 115, 0.12);
  border-color: rgba(228, 74, 115, 0.3);
}

.blog-post-header {
  margin: 6px 0 14px;
}

.blog-post-title {
  margin: 0 0 10px;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.blog-post--article {
  padding: 28px 18px 56px;
  max-width: 1080px;
  margin: 0 auto;
}

@media (max-width: 720px) {
  .blog-post-title {
    font-size: 32px;
  }
}

.blog-breadcrumb {
  margin: 0 0 10px;
}

.blog-back {
  text-decoration: none;
  font-weight: 750;
  color: rgba(30, 41, 59, 0.9);
}

html[data-theme="dark"] .blog-back {
  color: rgba(241, 245, 249, 0.9);
}

.blog-back:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-post-hero {
  margin: 14px 0 18px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(20, 18, 26, 0.08);
  background: rgba(255, 255, 255, 0.8);
}

html[data-theme="dark"] .blog-post-hero {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(22, 24, 34, 0.6);
}

.blog-post-hero img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
}

.blog-prose {
  max-width: 72ch;
}

.blog-prose--with-sidebar {
  max-width: none;
}

.blog-post-articlecol .blog-prose {
  max-width: 72ch;
  margin: 0 auto;
}

.blog-post-bodywrap {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 32px 44px;
  align-items: start;
  margin-top: 8px;
}

@media (max-width: 920px) {
  .blog-post-bodywrap {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

.blog-toc {
  position: sticky;
  top: 88px;
  padding: 20px 20px 18px;
  border-radius: 18px;
  border: 1px solid rgba(20, 18, 26, 0.08);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.9));
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
}

html[data-theme="dark"] .blog-toc {
  border-color: rgba(148, 163, 184, 0.22);
  background: linear-gradient(165deg, rgba(30, 32, 42, 0.96), rgba(22, 24, 34, 0.9));
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

.blog-toc__kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(99, 102, 241, 0.92);
}

html[data-theme="dark"] .blog-toc__kicker {
  color: rgba(165, 180, 252, 0.95);
}

.blog-toc__title {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: rgba(15, 23, 42, 0.96);
}

html[data-theme="dark"] .blog-toc__title {
  color: rgba(241, 245, 249, 0.96);
}

.blog-toc__nav {
  margin: 0;
}

.blog-toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.blog-toc__list li {
  margin: 0 0 10px;
  padding: 0;
  line-height: 1.35;
}

.blog-toc__list li:last-child {
  margin-bottom: 0;
}

.blog-toc__link {
  display: inline;
  font-size: 14px;
  font-weight: 650;
  color: rgba(30, 41, 59, 0.9);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

html[data-theme="dark"] .blog-toc__link {
  color: rgba(241, 245, 249, 0.92);
}

.blog-toc__link:hover {
  color: rgba(79, 70, 229, 0.98);
  border-bottom-color: rgba(99, 102, 241, 0.5);
}

.blog-prose .blog-lead {
  font-size: 1.12rem;
  line-height: 1.55;
  color: rgba(20, 18, 26, 0.88);
  margin: 0 0 1.25rem;
}

html[data-theme="dark"] .blog-prose .blog-lead {
  color: rgba(241, 245, 249, 0.92);
}

.blog-prose p {
  margin: 0 0 1.05rem;
  line-height: 1.68;
  color: rgba(20, 18, 26, 0.88);
}

html[data-theme="dark"] .blog-prose p {
  color: rgba(241, 245, 249, 0.9);
}

.blog-prose h2 {
  font-size: 1.28rem;
  font-weight: 750;
  margin: 1.65rem 0 0.75rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: rgba(15, 23, 42, 0.96);
  scroll-margin-top: 96px;
}

html[data-theme="dark"] .blog-prose h2 {
  color: rgba(241, 245, 249, 0.96);
}

.blog-prose h2:first-of-type {
  margin-top: 0.35rem;
}

.blog-prose a {
  color: rgba(79, 70, 229, 0.95);
  font-weight: 650;
  text-underline-offset: 3px;
}

.blog-prose a:hover {
  color: rgba(228, 74, 115, 0.98);
}

.blog-meta--post {
  margin: 0;
}

.tool-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: center;
  margin: 18px 0 40px;
}

@media (max-width: 920px) {
  .tool-split {
    grid-template-columns: 1fr;
  }
}

.tool-visual {
  height: 180px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(47, 95, 184, 0.25), rgba(47, 95, 184, 0.05));
  border: 1px solid rgba(20, 18, 26, 0.08);
}

.muted-note {
  color: rgba(20, 18, 26, 0.65);
  font-size: 14px;
}

.error-banner {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(176, 0, 32, 0.25);
  background: rgba(176, 0, 32, 0.06);
  color: #6e0818;
}

.prose {
  line-height: 1.65;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

/* Demo Perfiles (temporal) */
.demo-profiles-grid {
  margin-top: 14px;
}

.demo-profile-card .card-media {
  background: linear-gradient(135deg, rgba(228, 74, 115, 0.18), rgba(110, 73, 255, 0.14));
}

.demo-profile-card--editor {
  border-style: dashed;
  border-color: rgba(110, 73, 255, 0.35);
  background: rgba(110, 73, 255, 0.06);
}

/* CMS (MODO-EDITOR / MODO-CONTROL) */
.cms-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 14px;
}

.cms-form {
  margin-top: 10px;
}

.cms-field {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(20, 18, 26, 0.1);
  background: rgba(255, 255, 255, 0.96);
  position: relative;
}

.cms-field.is-modified {
  border-color: rgba(228, 74, 115, 0.35);
  background: rgba(228, 74, 115, 0.06);
}

.cms-pencil {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 1px solid rgba(20, 18, 26, 0.12);
  background: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  margin-right: 6px;
  color: rgba(20, 18, 26, 0.75);
}

.cms-field-head {
  cursor: pointer;
}

.cms-field-head:hover .cms-pencil {
  border-color: rgba(228, 74, 115, 0.35);
}

/* Modal edición (CMS) — propuesta 03: SaaS dense, acciones arriba (logo + título + Cancelar/Guardar) */
.cms-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
}

.cms-modal[aria-hidden="false"] {
  display: flex;
}

.cms-modal,
.cms-modal * {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.cms-modal-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.22);
}

.cms-modal-dialog--saas {
  width: min(600px, calc(100vw - 32px));
}

.cms-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
  flex-shrink: 0;
}

.cms-modal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.cms-modal-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #5d5fef;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.cms-modal-titles {
  min-width: 0;
}

.cms-modal-title {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #0f172a;
  margin: 0;
}

.cms-modal-sub {
  display: block;
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  line-height: 1.3;
}

.cms-modal-sub[hidden] {
  display: none !important;
}

.cms-modal-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cms-modal .btn-saas {
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  width: auto;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  line-height: 1;
}

.cms-modal .btn-saas.btn-ghost {
  background: #fff;
}

.cms-modal .btn-saas.btn-ghost:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.cms-modal .btn-saas.btn-primary {
  background: #5d5fef;
  border-color: #5d5fef;
  color: #fff;
  box-shadow: none;
}

.cms-modal .btn-saas.btn-primary:hover {
  filter: brightness(1.04);
}

.cms-modal-body {
  padding: 16px;
  overflow: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 160px);
  flex: 1;
  min-height: 0;
}

/* Modal: logos colaboradores — vista previa + lista */
.cms-collab-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 10px 12px;
  align-items: center;
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fafbfc;
}

.cms-collab-thumb-wrap {
  width: 56px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cms-collab-thumb {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.cms-collab-fields {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cms-collab-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cms-collab-pick {
  margin-bottom: 14px;
}

.cms-collab-pick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cms-collab-select {
  flex: 1;
  min-width: 180px;
}

@media (max-width: 520px) {
  .cms-collab-row {
    grid-template-columns: 48px 1fr;
  }

  .cms-collab-row .btn {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

/* Minimal: inputs más limpios y compactos dentro del modal */
.cms-modal .cms-row {
  gap: 10px;
}

.cms-modal .cms-mini {
  gap: 6px;
}

.cms-form-contenido .cms-field-block {
  margin-bottom: 14px;
}
.cms-form-contenido .cms-field-block:last-of-type {
  margin-bottom: 0;
}
.cms-field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin: 0 0 6px;
  line-height: 1.3;
  letter-spacing: 0.01em;
}
.cms-modal .cms-field-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  align-items: start;
  margin-bottom: 14px;
}
@media (max-width: 520px) {
  .cms-modal .cms-field-row-2 {
    grid-template-columns: 1fr;
  }
}

.cms-mini .muted-note {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.1px;
  color: rgba(55, 65, 81, 0.82);
}

.cms-modal .cms-input,
.cms-modal .cms-textarea {
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  max-width: 100%;
  box-sizing: border-box;
  color: #0f172a;
}

.cms-modal .cms-input {
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.cms-modal .cms-textarea {
  min-height: 80px;
  padding: 10px 12px;
  font-size: 13px;
}

/* Evita scrolls raros por inputs tipo file */
.cms-modal input[type="file"] {
  max-width: 100%;
}

/* File uploader (reemplaza input crudo cuando se aplica) */
.cms-file {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.cms-upload {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.cms-upload--stack {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  width: 100%;
}
.cms-upload-hint {
  display: block;
  width: 100%;
  flex-basis: 100%;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}
/* “Camino de hormiguitas” — borde punteado + animación sutil (zona de carga) */
.cms-upload-zone {
  border-radius: 14px;
  padding: 14px 14px 12px;
  background: rgba(248, 250, 252, 0.85);
  box-sizing: border-box;
}
.cms-upload-zone--ants {
  border: 2px dashed #cbd5e1;
  animation: cms-ants 2.2s ease-in-out infinite;
}
@keyframes cms-ants {
  0%,
  100% {
    border-color: #cbd5e1;
  }
  50% {
    border-color: #94a3b8;
  }
}
.cms-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  color: #0f172a;
}
.cms-upload-btn:hover {
  background: rgba(17, 24, 39, 0.03);
}
.cms-upload-meta {
  font-size: 12px;
  color: rgba(17, 24, 39, 0.62);
}

.cms-modal .cms-input:focus,
.cms-modal .cms-textarea:focus {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 3px rgba(93, 95, 239, 0.2);
  outline: none;
}

/* Cerrar (esquina superior derecha, estilo 03) */
.cms-modal #cms-modal-close.cms-modal-x {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.cms-modal #cms-modal-close.cms-modal-x:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

@media (max-width: 520px) {
  .cms-modal-head {
    flex-direction: column;
    align-items: stretch;
  }
  .cms-modal-top-actions {
    justify-content: flex-end;
  }
  .cms-modal .btn-saas {
    flex: 0 0 auto;
  }
}

/* Inline editor (MODO-EDITOR sobre sitio público) */
.cms-inline-bar {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px 6px 10px;
  min-height: 0;
  border: 1px solid rgba(20, 18, 26, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(10px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  font-size: 12px;
}
.cms-inline-left {
  min-width: 0;
  line-height: 1.25;
}
.cms-inline-left .muted-note {
  font-size: 11px;
}
.cms-inline-left strong {
  font-size: 11px;
  letter-spacing: 0.04em;
}
.cms-inline-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
  justify-content: flex-end;
}
.cms-inline-actions .btn-cms-inline {
  padding: 6px 10px;
  min-height: 0;
  height: 30px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 8px;
  line-height: 1;
  white-space: nowrap;
}
.cms-inline-actions .btn-cms-inline.btn-primary {
  background: #5d5fef;
  border-color: #5d5fef;
  color: #fff;
}
.cms-inline-actions .btn-cms-inline.btn-ghost {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #334155;
}
.cms-inline-actions .btn-cms-inline.btn-ghost:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.cms-inline-tip {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 500;
  color: rgba(51, 65, 85, 0.85);
  line-height: 1.35;
  max-width: 52ch;
}
.cms-inline-status {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-right: 4px;
}

.cms-inline-actions #cms-inline-reset:disabled,
.cms-inline-actions #cms-inline-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 720px) {
  .cms-inline-bar {
    left: 10px;
    right: 10px;
    bottom: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .cms-inline-tip {
    max-width: none;
  }
}

/* Sin malla/overlay: solo el lápiz indica edición (contrato). */
.cms-inline-editable {
  position: relative;
  border-radius: 14px;
  cursor: pointer;
}

.cms-inline-pencil {
  position: absolute;
  top: 50%;
  left: 50%;
  right: auto;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-weight: 800;
  z-index: 20;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
  transform: translate(-50%, -50%);
}

.cms-inline-pencil:hover {
  border-color: rgba(228, 74, 115, 0.35);
}

/* Controles por bloque zig-zag (Editor inline) */
.cms-inline-itemtools {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 30;
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(20, 18, 26, 0.12);
  backdrop-filter: saturate(180%) blur(10px);
}

html[data-theme="dark"] .cms-inline-itemtools {
  background: rgba(22, 24, 34, 0.92);
  border-color: rgba(148, 163, 184, 0.22);
}

.cms-inline-tool {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(20, 18, 26, 0.14);
  background: rgba(255, 255, 255, 0.95);
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

html[data-theme="dark"] .cms-inline-tool {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(30, 34, 44, 0.92);
  color: #e2e8f0;
}

.cms-inline-tool:hover {
  border-color: rgba(228, 74, 115, 0.35);
}

.cms-inline-tool--danger:hover {
  border-color: rgba(239, 68, 68, 0.55);
}

.cms-textarea {
  width: 100%;
  min-height: 84px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(20, 18, 26, 0.14);
  font: inherit;
  line-height: 1.32;
  box-sizing: border-box;
  background: #fff;
}

.cms-textarea:focus {
  outline: none;
  border-color: rgba(228, 74, 115, 0.55);
  box-shadow: 0 0 0 3px rgba(228, 74, 115, 0.12);
}

.cms-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 720px) {
  .cms-row {
    grid-template-columns: 1fr;
  }
}

.cms-mini {
  display: grid;
  gap: 6px;
}

.cms-mini .muted-note {
  font-size: 12px;
  letter-spacing: 0.1px;
}

.cms-input {
  height: 36px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid rgba(20, 18, 26, 0.14);
  background: #fff;
  font: inherit;
}

.cms-input:focus {
  outline: none;
  border-color: rgba(228, 74, 115, 0.55);
  box-shadow: 0 0 0 3px rgba(228, 74, 115, 0.12);
}

.cms-items {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.cms-item {
  border: 1px solid rgba(20, 18, 26, 0.1);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  padding: 12px;
}

.cms-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.cms-x {
  appearance: none;
  border: 1px solid rgba(20, 18, 26, 0.12);
  background: #fff;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: rgba(20, 18, 26, 0.75);
}

.cms-x:hover {
  border-color: rgba(228, 74, 115, 0.35);
}

.cms-file {
  max-width: 100%;
}

.cms-queue {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.cms-preview {
  min-height: 100vh;
  background: var(--bg);
}

.cms-preview-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(12px);
}

.cms-preview-body {
  padding: 18px;
}

.cms-pre {
  margin: 0;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(20, 18, 26, 0.1);
  background: rgba(255, 255, 255, 0.9);
  overflow: auto;
  max-height: calc(100vh - 86px);
  font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Líneas de negocio (modelo page-6 … page-9) */
.linea-page {
  padding-bottom: 48px;
}

.linea-back {
  display: inline-block;
  margin: 14px 0 0;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  color: rgba(20, 18, 26, 0.72);
}

.linea-back:hover {
  color: #14121a;
}

.linea-hero {
  margin: 18px 0 28px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(20, 18, 26, 0.08);
  padding: 32px 26px 36px;
  text-align: left;
}

/* Franja de título a ancho completo (modelo page-6-1: recuadro negro del título) */
.linea-hero--band {
  margin: 0 0 28px;
  padding: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
  width: 100%;
}

.linea-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 18px 40px;
  text-align: left;
  box-sizing: border-box;
}

.linea-hero h1,
.linea-hero-inner h1 {
  margin: 0 0 10px;
  font-size: clamp(22px, 3.4vw, 34px);
  letter-spacing: 0.06em;
  font-weight: 800;
  text-transform: uppercase;
}

.linea-hero p,
.linea-hero-inner p {
  margin: 0 0 18px;
  max-width: 48ch;
  font-size: 15px;
  opacity: 0.92;
}

.linea-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

/* Rejilla en zigzag: foto + bloque de texto (modelo page-6 … page-9) */
.linea-zigzag {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin: 4px 0 44px;
}

.linea-zigzag-row {
  position: relative;
}

/* Solo PC: marcos fijos (más pequeños) sin deformar.
   Nota: usamos !important porque más abajo hay reglas base que asignan `flex: 1.15`
   y hacen que el marco se estire a lo ancho aunque se defina `width`. */
@media (min-width: 921px) {
  /* En PC: sin separación vertical entre bloques (como el modelo) */
  .linea-zigzag {
    /* Volvemos a una separación moderada (cliente la prefiere). */
    gap: 26px !important;
    margin: 0 0 44px;
  }
  .linea-zigzag-row {
    margin: 0 !important;
    padding: 0 !important;
  }

  .linea-zigzag-media {
    flex: 0 0 320px !important;
    width: 320px !important;
    max-width: 320px !important;
    height: 203px !important;
    min-height: 203px !important;
    max-height: 203px !important;
    align-self: center;
    /* En grid: pegar la foto al lado del texto (no al borde derecho de la celda) */
    justify-self: start;
  }

  /* Cuando la foto está a la derecha (flip), alinear su borde derecho con el “margen” del texto */
  .linea-zigzag-row--flip .linea-zigzag-media {
    /* Pegar la foto hacia el texto (izquierda dentro de su celda) */
    justify-self: start;
  }
  .linea-zigzag-media--has-img img {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    object-fit: cover;
  }

  /* Evita que reglas por línea (ej. 220px) aplasten el marco en PC */
  .linea-page--sublimacion .linea-zigzag-media,
  .linea-page--articulos-promocionales .linea-zigzag-media,
  .linea-page--gran-formato .linea-zigzag-media,
  .linea-page--impresion-laser .linea-zigzag-media,
  .linea-page--etiquetas .linea-zigzag-media {
    flex: 0 0 320px !important;
    width: 320px !important;
    max-width: 320px !important;
    height: 203px !important;
    min-height: 203px !important;
    max-height: 203px !important;
  }
}

.linea-zigzag-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 22px;
}

.linea-zigzag-row--flip {
  flex-direction: row-reverse;
}

/* PC: 2 columnas reales SIN “columna vacía”.
   En vez de usar `1fr` (que deja un hueco gigante), limitamos el ancho del texto
   y centramos el par foto+texto dentro del contenedor. */
@media (min-width: 921px) {
  .linea-zigzag-row {
    display: grid;
    /* El “vacío” en filas con foto a la derecha venía de reservar demasiado ancho para texto.
       Reducimos el ancho máximo del texto para que la columna de la foto se acerque. */
    grid-template-columns: 320px minmax(0, 440px);
    grid-template-areas: "media text";
    column-gap: 22px;
    align-items: center;
    justify-content: center;
  }

  .linea-zigzag-media {
    grid-area: media;
  }

  .linea-zigzag-text {
    grid-area: text;
  }

  .linea-zigzag-row--flip {
    grid-template-columns: minmax(0, 440px) 320px;
    grid-template-areas: "text media";
    /* Más pegado cuando la foto va a la derecha */
    column-gap: 6px;
  }

  /* En PC dejamos que el párrafo use todo el ancho del bloque de texto,
     evitando el “vacío” a la derecha que se ve como una tercera columna. */
  .linea-zigzag-desc {
    max-width: none;
  }
}

/* Área visual: placeholder (sin foto aún) o imagen real — cada fila = dos columnas (media + texto). */
.linea-zigzag-media {
  flex: 1.15;
  min-height: 210px;
  border-radius: 14px;
  border: 1px solid rgba(20, 18, 26, 0.08);
  flex-shrink: 0;
}

.linea-zigzag-media--placeholder {
  background: #111;
}

.linea-zigzag-media--has-img {
  padding: 0;
  overflow: hidden;
  background: #0a0a0a;
}

.linea-zigzag-media--has-img img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
}

.linea-zigzag-text {
  flex: 1;
  min-width: 0;
}

.linea-zigzag-title {
  margin: 0 0 10px;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #14121a;
}

.linea-zigzag-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(20, 18, 26, 0.78);
  max-width: 52ch;
}

@media (max-width: 920px) {
  .linea-zigzag-row,
  .linea-zigzag-row--flip {
    flex-direction: column;
    align-items: stretch;
  }

  .linea-zigzag-media {
    min-height: 180px;
    width: 100%;
  }

  .linea-zigzag-media--has-img img {
    min-height: 180px;
  }
}

/* Sublimación — negro (como el modelo) */
.linea-page--sublimacion .linea-hero {
  background: #000000;
  color: #fff;
}

.linea-page--sublimacion .linea-cta {
  background: #fff;
  color: #0a0a0a;
  border-color: rgba(255, 255, 255, 0.65);
}

.linea-page--sublimacion .linea-zigzag-media--placeholder {
  background: #111;
  border-color: rgba(255, 255, 255, 0.1);
}

/* Recuadros (imagen/placeholder) en negro y mismo tamaño (móvil / tablet) */
.linea-page--sublimacion .linea-zigzag-media {
  background: #0a0a0a;
}

@media (max-width: 920px) {
  .linea-page--sublimacion .linea-zigzag-media {
    /* Altura uniforme: fija para que ninguna imagen alargue el recuadro */
    height: 180px;
    min-height: 180px;
    max-height: 180px;
    overflow: hidden;
    align-self: center;
  }
}

.linea-page--sublimacion .linea-zigzag-media--has-img img {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* (Ya definido arriba) */

/* Artículos promocionales — azul */
.linea-page--articulos-promocionales .linea-hero {
  background: #111389;
  color: #fff;
}

.linea-page--articulos-promocionales .linea-cta {
  background: #fff;
  color: #0f2f63;
}

.linea-page--articulos-promocionales .linea-zigzag-media--placeholder {
  background: linear-gradient(145deg, #143d78 0%, #0f2f63 100%);
  border-color: rgba(15, 47, 99, 0.35);
}

/* Gran formato — magenta */
.linea-page--gran-formato .linea-hero {
  background: #ed0070;
  color: #fff;
}

.linea-page--gran-formato .linea-cta {
  background: #fff;
  color: #a61e4c;
}

.linea-page--gran-formato .linea-zigzag-media--placeholder {
  background: linear-gradient(145deg, #e44a73 0%, #c2185b 100%);
  border-color: rgba(166, 30, 76, 0.25);
}

/* Impresión láser — amarillo */
.linea-page--impresion-laser .linea-hero {
  background: #ffe51b;
  color: #1a1408;
}

.linea-page--impresion-laser .linea-cta {
  background: #14121a;
  color: #fff;
  border-color: rgba(20, 18, 26, 0.35);
}

.linea-page--impresion-laser .linea-zigzag-media--placeholder {
  background: linear-gradient(145deg, #ffe9a8 0%, #ffd24a 100%);
  border-color: rgba(212, 175, 55, 0.35);
}

/* Etiquetas — franja azul: texto claro */
.linea-page--etiquetas .linea-hero {
  background: #0097ff;
  color: #fff;
}

.linea-page--etiquetas .linea-hero h1,
.linea-page--etiquetas .linea-hero-inner h1 {
  color: #fff;
}

.linea-page--etiquetas .linea-hero p,
.linea-page--etiquetas .linea-hero-inner p {
  color: rgba(255, 255, 255, 0.92);
  opacity: 1;
}

.linea-page--etiquetas .linea-cta {
  background: #fff;
  color: #0097ff;
  border-color: rgba(255, 255, 255, 0.75);
}

.linea-page--etiquetas .linea-cta:hover {
  background: #f0f8ff;
  color: #0097ff;
}

.linea-page--etiquetas .linea-zigzag-media--placeholder {
  background: linear-gradient(145deg, #5aaee8 0%, #2e7ec4 100%);
  border-color: rgba(15, 61, 99, 0.2);
}

/* Newsletter + formulario (mismo bloque en home y líneas) */
.linea-newsletter {
  margin: 44px 0 0;
  padding-top: 36px;
  border-top: 1px solid rgba(20, 18, 26, 0.08);
}

.newsletter-model {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.newsletter-model-title {
  margin: 0 0 14px;
  font-size: clamp(22px, 2.8vw, 30px);
  color: #e44a73;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.newsletter-model-cta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 999px;
  background: #e44a73;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  margin-bottom: 14px;
}

.newsletter-model-cta-pill:hover {
  filter: brightness(1.04);
}

.newsletter-model-copy__hint {
  margin: 0 0 10px;
  font-size: 14px;
  max-width: 44ch;
}

.newsletter-model-disclaimer {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: rgba(20, 18, 26, 0.52);
  margin: 0;
  max-width: 44ch;
}

.newsletter-model-msg {
  margin: 12px 0 0;
  min-height: 1.35em;
}

.newsletter-model-form {
  background: #e8eaef;
  border-radius: 18px;
  padding: 20px 20px 18px;
  border: 1px solid rgba(20, 18, 26, 0.06);
}

.newsletter-model-fields {
  display: grid;
  gap: 14px;
}

.nm-field {
  display: grid;
  gap: 5px;
  margin: 0;
}

.nm-label {
  font-size: 14px;
  font-weight: 700;
  color: rgba(20, 18, 26, 0.58);
}

.nm-input {
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(20, 18, 26, 0.12);
  padding: 0 12px;
  font: inherit;
  background: #fff;
  outline: none;
}

.nm-input:focus {
  border-color: rgba(26, 35, 126, 0.45);
  box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.12);
}

.newsletter-model-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.nm-submit {
  padding: 10px 22px;
  border-radius: 999px;
  border: 0;
  background: #1a237e;
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
  font-family: inherit;
}

.nm-submit:hover {
  filter: brightness(1.06);
}

@media (max-width: 920px) {
  .newsletter-model {
    grid-template-columns: 1fr;
  }
}

/* --- Modo oscuro (preferencia en localStorage) --- */
html[data-theme="dark"] .nav-toggle {
  border-color: rgba(244, 242, 249, 0.16);
}

html[data-theme="dark"] .nav-toggle-bar {
  background: var(--text);
}

html[data-theme="dark"] .nav-link,
html[data-theme="dark"] .nav-link--trigger {
  color: rgba(244, 242, 249, 0.82);
}

html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .nav-link--trigger:hover,
html[data-theme="dark"] .nav-link.is-active {
  color: var(--text);
}

html[data-theme="dark"] .nav-link--portal {
  color: rgba(244, 242, 249, 0.82);
}

html[data-theme="dark"] .nav-link--portal:hover {
  color: var(--text);
}

html[data-theme="dark"] .nav-caret {
  border-top-color: rgba(244, 242, 249, 0.55);
}

@media (max-width: 920px) {
  html[data-theme="dark"] .nav {
    background: var(--surface-elevated);
    border-right-color: var(--line);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45);
  }

  html[data-theme="dark"] .nav .header-cta.header-cta--plain {
    color: rgba(244, 242, 249, 0.88);
  }

  html[data-theme="dark"] .nav .header-cta.header-cta--plain:hover {
    color: var(--text);
  }
}

html[data-theme="dark"] .nav-dropdown-panel {
  background: var(--surface-elevated);
  border-color: var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .nav-dropdown-link {
  color: var(--text);
}

html[data-theme="dark"] .nav-dropdown-link:hover {
  background: rgba(244, 242, 249, 0.06);
}

html[data-theme="dark"] .portal-dialog-close {
  color: rgba(244, 242, 249, 0.6);
}

html[data-theme="dark"] .portal-dialog-close:hover {
  background: rgba(244, 242, 249, 0.08);
  color: var(--text);
}

html[data-theme="dark"] .portal-dialog-intro,
html[data-theme="dark"] .portal-dialog-note {
  color: var(--muted);
}

html[data-theme="dark"] .portal-field-label {
  color: rgba(244, 242, 249, 0.85);
}

html[data-theme="dark"] .portal-field-input {
  background: var(--card);
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="dark"] .portal-password-toggle {
  color: rgba(244, 242, 249, 0.5);
}

html[data-theme="dark"] .portal-password-toggle:hover {
  background: rgba(244, 242, 249, 0.08);
  color: rgba(244, 242, 249, 0.9);
}

html[data-theme="dark"] .home-col-card {
  border-color: var(--line);
}

html[data-theme="dark"] .home-col-card.teal {
  background: rgba(80, 180, 160, 0.14);
}

html[data-theme="dark"] .home-col-card.blue {
  background: rgba(80, 130, 220, 0.16);
}

html[data-theme="dark"] .home-col-card.yellow {
  background: rgba(220, 180, 60, 0.12);
}

html[data-theme="dark"] .trust-row {
  background: var(--surface-elevated);
  border-color: var(--line);
}

html[data-theme="dark"] .trust-row h2 {
  color: var(--muted);
}

html[data-theme="dark"] .collab-carousel-btn {
  background: var(--surface-elevated);
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="dark"] .linea-back {
  color: var(--muted);
}

html[data-theme="dark"] .linea-back:hover {
  color: var(--text);
}

html[data-theme="dark"] .linea-hero {
  border-color: var(--line);
}

html[data-theme="dark"] .linea-zigzag-media {
  border-color: var(--line);
}

html[data-theme="dark"] .linea-zigzag-title {
  color: var(--text);
}

html[data-theme="dark"] .linea-zigzag-desc {
  color: var(--muted);
}

html[data-theme="dark"] .linea-newsletter {
  border-top-color: var(--line);
}

html[data-theme="dark"] .newsletter-model-disclaimer,
html[data-theme="dark"] .nm-label {
  color: var(--muted);
}

html[data-theme="dark"] .newsletter-model-form {
  background: var(--card);
  border-color: var(--line);
}

html[data-theme="dark"] .nm-input {
  background: var(--surface-elevated);
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="dark"] .muted-note {
  color: var(--muted);
}

html[data-theme="dark"] .tool-visual {
  border-color: var(--line);
}

html[data-theme="dark"] .home-col-media {
  border-color: var(--line);
}

html[data-theme="dark"] .header-cta--plain {
  color: rgba(244, 242, 249, 0.85);
}

html[data-theme="dark"] .header-cta--plain:hover {
  color: var(--text);
}

/* CONTROL (#/control): barra fija tipo panel + contenido principal sin menú/pie públicos */
html[data-spa-mode="control"] .skip-link {
  display: none;
}

.cms-control-chrome {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 2000;
  border-bottom: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: saturate(140%) blur(10px);
}

html[data-theme="dark"] .cms-control-chrome {
  border-bottom-color: rgba(148, 163, 184, 0.22);
  background: rgba(22, 24, 34, 0.96);
}

.cms-control-chrome__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 18px;
}

.cms-control-chrome__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.cms-control-chrome__title {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.05;
}

.cms-control-chrome__title span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(100, 116, 139, 0.95);
}

html[data-theme="dark"] .cms-control-chrome__title span {
  color: rgba(203, 213, 225, 0.92);
}

.cms-control-chrome__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cms-control-chrome__link {
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 10px;
  color: rgba(30, 41, 59, 0.95);
}

.cms-control-chrome__link:hover {
  background: rgba(99, 102, 241, 0.12);
}

.cms-control-chrome__link--danger {
  color: rgba(225, 29, 72, 0.95);
}

html[data-theme="dark"] .cms-control-chrome__link {
  color: rgba(241, 245, 249, 0.95);
}

html[data-theme="dark"] .cms-control-chrome__link:hover {
  background: rgba(99, 102, 241, 0.2);
}

html[data-spa-mode="control"] .site-header,
html[data-spa-mode="control"] .site-footer,
html[data-spa-mode="control"] .nav-drawer-backdrop {
  display: none !important;
}

html[data-spa-mode="control"] main.main-view {
  min-height: calc(100vh - 24px);
}

/* Panel lista de páginas · Control */
.cms-dash-table-wrap {
  overflow-x: auto;
  margin-top: 14px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
}

html[data-theme="dark"] .cms-dash-table-wrap {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(22, 24, 34, 0.92);
}

.cms-dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.cms-dash-table th,
.cms-dash-table td {
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

html[data-theme="dark"] .cms-dash-table th,
html[data-theme="dark"] .cms-dash-table td {
  border-bottom-color: rgba(148, 163, 184, 0.14);
}

.cms-dash-table th {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 800;
  color: #64748b;
}

.cms-dash-row--pending td {
  background: rgba(93, 95, 239, 0.06);
}

html[data-theme="dark"] .cms-dash-row--pending td {
  background: rgba(93, 95, 239, 0.14);
}

.cms-dash-page-link {
  font-weight: 700;
  color: #334155;
  text-decoration: none;
}

html[data-theme="dark"] .cms-dash-page-link {
  color: #f1f5f9;
}

.cms-dash-page-link:hover {
  text-decoration: underline;
}

.cms-dash-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
}

.cms-dash-badge--pending {
  background: rgba(93, 95, 239, 0.14);
  color: #4338ca;
}

.cms-dash-badge--approved {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.cms-dash-badge--rejected {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.cms-dash-badge--draft {
  background: rgba(251, 191, 36, 0.18);
  color: #b45309;
}

.cms-dash-badge--ok {
  background: rgba(100, 116, 139, 0.14);
  color: #475569;
}

html[data-theme="dark"] .cms-dash-badge--pending {
  background: rgba(165, 180, 252, 0.18);
  color: #e0e7ff;
}

html[data-theme="dark"] .cms-dash-badge--approved {
  background: rgba(134, 239, 172, 0.12);
  color: #bbf7d0;
}

html[data-theme="dark"] .cms-dash-badge--rejected {
  background: rgba(252, 165, 165, 0.12);
  color: #fecaca;
}

html[data-theme="dark"] .cms-dash-badge--draft {
  background: rgba(253, 224, 71, 0.12);
  color: #fef08a;
}

html[data-theme="dark"] .cms-dash-badge--ok {
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}

.cms-dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.btn.btn-sm {
  padding: 5px 10px;
  min-height: 28px;
  font-size: 11px;
  border-radius: 8px;
}
