/* ============================================================
   EN: Styles for the embeddable Codices strip. Deliberately neutral:
       it inherits the host page's typography and colours through the
       variables below, which fall back to sane values when the host
       does not define them. Nothing here leaks outside .cdx-*.
   ES: Estilos de la tira empotrable de Codices. Deliberadamente
       neutros: hereda la tipografia y los colores de la pagina
       anfitriona por las variables de abajo, que caen a valores
       razonables si el anfitrion no las define. Nada se escapa
       fuera de .cdx-*.
   ============================================================ */

.cdx-embed {
  --cdx-oro: var(--ocre, var(--accent, #c8a35a));
  --cdx-minio: var(--minio, #b0503c);
  --cdx-texto: var(--txt, var(--text, currentColor));
  --cdx-apagado: var(--muted, var(--text-2, #8b8b8b));
  --cdx-borde: var(--line, var(--border, rgba(128, 128, 128, .32)));
  --cdx-panel: var(--panel, var(--card, rgba(128, 128, 128, .08)));
  color: var(--cdx-texto);
}

.cdx-lead { color: var(--cdx-apagado); max-width: 70ch; margin: 0 0 20px; }

.cdx-cifras { display: flex; gap: 34px; flex-wrap: wrap; margin-bottom: 24px; }
.cdx-cifras b { display: block; font-size: 28px; line-height: 1.1; color: var(--cdx-oro); }
.cdx-cifras span { font-size: 12.5px; color: var(--cdx-apagado); }

.cdx-tira {
  display: grid; grid-auto-flow: column; grid-auto-columns: 132px;
  gap: 14px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity;
}
.cdx-item {
  scroll-snap-align: start; text-decoration: none; color: inherit;
  display: block; min-width: 0;
}
.cdx-item:hover { text-decoration: none; }
.cdx-img {
  display: block; aspect-ratio: 3 / 4; border-radius: 9px; overflow: hidden;
  border: 1px solid var(--cdx-borde); background: var(--cdx-panel);
  transition: transform .18s, border-color .18s;
}
.cdx-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cdx-item:hover .cdx-img { transform: translateY(-3px); border-color: var(--cdx-oro); }
.cdx-item b { display: block; font-size: 13.5px; margin-top: 9px; line-height: 1.25; }
.cdx-item i { font-style: normal; font-size: 11.5px; color: var(--cdx-apagado); }
.cdx-item em {
  display: inline-block; margin-top: 5px; font-style: normal; font-size: 10px;
  font-weight: 600; color: #fff; background: var(--cdx-minio);
  border-radius: 5px; padding: 2px 6px;
}
.cdx-item:hover b { color: var(--cdx-oro); }

.cdx-btn {
  display: inline-block; margin-top: 18px; padding: 10px 19px; border-radius: 11px;
  border: 1px solid var(--cdx-borde); color: var(--cdx-texto);
  text-decoration: none; font-weight: 600; font-size: 14.5px;
}
.cdx-btn:hover { border-color: var(--cdx-oro); color: var(--cdx-oro); text-decoration: none; }

@media (max-width: 600px) {
  .cdx-tira { grid-auto-columns: 112px; }
  .cdx-cifras { gap: 22px; }
  .cdx-cifras b { font-size: 23px; }
}
