/**
 * single-uide-deck.css
 * Phase 5: polish, responsive, accessible.
 *
 * ALL styles encapsulated under #uide-deck-experience.
 * No global classes that could affect /noticias/.
 */

/* ─────────────────────────────────────────────
   VARIABLES
   ───────────────────────────────────────────── */
#uide-deck-experience {
  --uide-vino: #910048;
  --uide-navy: #002D72;
  --uide-gold: #EAAA00;
  --uide-white: #ffffff;
  --uide-bg: #f4f1ed;
  --uide-shadow: 0 4px 20px rgba(0,0,0,0.25);
  --uide-card-w: 190px;
  --uide-card-h: 280px;
}

/* ─────────────────────────────────────────────
   UTILITY
   ───────────────────────────────────────────── */
.is-hidden {
  display: none !important;
}

/* ─────────────────────────────────────────────
   RESET / BASE
   ───────────────────────────────────────────── */
#uide-deck-experience *,
#uide-deck-experience *::before,
#uide-deck-experience *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#uide-deck-experience {
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--uide-bg);
  padding: 30px 0 60px;
}

/* ─────────────────────────────────────────────
   PAGE WRAPPER — max-width on large screens
   ───────────────────────────────────────────── */
.uide-deck-page-wrapper {
  max-width: 1440px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

/* ─────────────────────────────────────────────
   HERO — two rows (desktop)
   Fila 1: introducción a todo el ancho.
   Fila 2: interacción (escenario + ¿Cómo funciona?).
   ───────────────────────────────────────────── */
#uide-deck-experience .uide-deck-hero {
  display: flex;
  flex-direction: column;
  max-width: 1280px;
  min-height: 0;
  margin: 0 auto;
  padding: 48px 40px 56px;
}

/* ─── FILA 1 — Introducción (ancho completo) ─── */
#uide-deck-experience .uide-deck-intro-row {
  width: 100%;
  display: flex;
  justify-content: flex-start;
}

/* Intro sin caja: se integra al fondo general */
#uide-deck-experience .uide-deck-info {
  width: 100%;
  max-width: 700px;
  padding: 35px 0 25px;
  box-sizing: border-box;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  text-align: left;
}

/* Intro block is fully independent: cards can never invade it */
#uide-deck-experience .uide-deck-intro {
  position: relative;
  z-index: 2;
}

#uide-deck-experience .deck-header {
  display: block;
}

#uide-deck-experience .deck-eyebrow {
  display: inline-block;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--uide-gold);
  margin-bottom: 8px;
}

#uide-deck-experience .uide-deck-title {
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 800;
  line-height: 0.98;
  color: var(--uide-navy);
  margin: 8px 0 12px;
}

.uide-deck-title-uide {
  color: var(--uide-vino);
}

.uide-deck-title-year {
  color: var(--uide-navy);
}

#uide-deck-experience .uide-deck-text {
  font-size: clamp(14px, 1.2vw, 15px);
  line-height: 1.45;
  color: #555;
  max-width: 340px;
  margin: 10px 0 0;
}

/* ─────────────────────────────────────────────
   FILA 2 — Interacción: escenario + cómo funciona
   ───────────────────────────────────────────── */
#uide-deck-experience .uide-deck-interaction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 50px;
  align-items: start;
  margin-top: 25px;
}

/* ─────────────────────────────────────────────
   CENTER — closed stage (hand → puzzle)
   The stage reserves a constant area: cards can move inside it,
   but none of their animations may leave .uide-deck-stage.
   ───────────────────────────────────────────── */
#uide-deck-experience .uide-deck-stage {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 520px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.uide-deck-hand {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 360px;
  margin: 0 auto;
  border-radius: 16px;
  transition: background 0.4s ease;
}

/* Shuffling background glow */
.uide-deck-hand.is-shuffling {
  background: rgba(145,0,72,0.06);
}

/* ─── Stage states: hand ↔ puzzle ───
   The hand IS the puzzle board. In puzzle state it becomes a real
   CSS grid (3 filas × 3 columnas, 3 columnas en mobile); the same 9
   cards travel to their cells via FLIP (no re-creation, no absolute fan).
   The stage reserves its height, so flights stay inside the scene. */
#uide-deck-experience .uide-deck-stage.deck-puzzle .uide-deck-hand {
  width: 100%;
  height: auto;
  transition: background 0.4s ease;
}

#uide-deck-experience .uide-deck-stage.deck-puzzle .uide-deck-puzzle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, auto);
  gap: 14px;
  width: 100%;
  max-width: 560px;
  margin: 20px auto 0;
  align-items: center;
}

/* Cards become static grid items (no absolute fan positioning) */
#uide-deck-experience .uide-deck-stage.deck-puzzle .uide-deck-card {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  max-width: 150px;
  height: auto;
  aspect-ratio: 190 / 280;
  transform: none;
  justify-self: center;
  opacity: 1;
}

/* ponytail: 8 cartas en 3-3-2; los slots 7-8 se desplazan media pista + medio gap (7px = 14px/2) → última fila centrada sin tocar columnas/tamaños */
@media screen and (min-width: 769px) {
  #uide-deck-experience .uide-deck-stage.deck-puzzle .uide-deck-puzzle-grid > .uide-deck-card:nth-child(7),
  #uide-deck-experience .uide-deck-stage.deck-puzzle .uide-deck-puzzle-grid > .uide-deck-card:nth-child(8) {
    position: relative;
    left: calc(50% + 7px);
  }
}

#uide-deck-experience .uide-deck-stage.deck-puzzle .uide-deck-card:active {
  transform: scale(0.97);
}

/* Board furniture: piece label inside each tile */

#uide-deck-experience .uide-deck-stage.deck-puzzle .uide-deck-card::after {
  content: attr(data-piece);
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--uide-navy);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 45, 114, 0.15);
  border-radius: 12px;
  padding: 3px 10px;
  white-space: nowrap;
  pointer-events: none;
}

/* ─── Card element (button reset) ─── */
.uide-deck-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--uide-card-w);
  height: var(--uide-card-h);
  border-radius: 12px;
  background: var(--uide-vino);
  border: 0;
  box-shadow: var(--uide-shadow);
  overflow: visible;
  cursor: pointer;
  padding: 0;
  font: inherit;
  color: inherit;
  outline: none;
  perspective: 1200px;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.55s ease,
              border-color 0.2s ease;
  transform: translate(-50%, -50%);
  z-index: 1;
  opacity: 0;
}

/* Card hover */
.uide-deck-card:not(.is-locked):not(.is-revealed):hover {
  border-color: var(--uide-white);
  box-shadow: 0 8px 28px rgba(145,0,72,0.35);
  z-index: 10;
}

.uide-deck-card:not(.is-locked):not(.is-revealed):hover .uide-deck-card-front,
.uide-deck-card:not(.is-locked):not(.is-revealed):hover .uide-deck-card-back {
  border-color: var(--uide-white);
}

/* Card active (press) */
.uide-deck-card:not(.is-locked):not(.is-revealed):active {
  transform: translate(-50%, -50%) scale(0.96);
}

/* Card focus — suppress default outline on click/tap.
   !important: only needed to overpower the WPA plugin's global
   `:focus { outline: 2px solid #233c7f !important }` (scoped to the deck). */
#uide-deck-experience .uide-deck-card:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Card focus-visible — keyboard navigation only */
#uide-deck-experience .uide-deck-card:focus-visible {
  outline: 3px solid var(--uide-navy) !important;
  outline-offset: 3px !important;
}

/* Locked card cursor */
.uide-deck-card.is-locked {
  cursor: not-allowed;
}

/* ─── Inner wrapper (flip target) ─── */
#uide-deck-experience .uide-deck-card-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

.uide-deck-card.is-flipped .uide-deck-card-inner {
  transform: rotateY(180deg);
}

/* ─── Front / Back ─── */
.uide-deck-card-front,
.uide-deck-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 9px;
  overflow: hidden;
}

.uide-deck-card-front {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--uide-vino);
  border: 2px solid var(--uide-gold);
}

.uide-deck-card-front img {
  width: 40%;
  max-width: 85px;
  height: auto;
  object-fit: contain;
}

.uide-deck-card-logo {
  width: 52px;
  height: auto;
  opacity: 0.85;
  pointer-events: none;
  user-select: none;
}

/* ─── Back (revealed content) ─── */
.uide-deck-card-back {
  transform: rotateY(180deg);
  background: var(--uide-white);
  color: #111;
  border: 2px solid var(--uide-gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.uide-deck-card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.uide-deck-card-back iframe {
  width: 100%;
  height: 100%;
  border: 0;
  aspect-ratio: 9 / 16;
}

.uide-deck-card-back.is-text {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 16px;
  background: var(--uide-white);
}

.uide-deck-card-back.is-text .card-content {
  display: block;
}

.uide-deck-card-back.is-text .card-title {
  display: block;
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--uide-navy);
}

.uide-deck-card-back.is-text .card-description {
  display: block;
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--uide-navy);
}

.uide-deck-card-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--uide-vino);
  border: 2px solid var(--uide-vino);
  border-radius: 8px;
  padding: 8px 14px;
}

/* Locked back */
.uide-deck-card-back.is-locked-back {
  flex-direction: column;
  gap: 8px;
  background: #f0eded;
}

.uide-deck-card-back.is-locked-back .uide-deck-lock-icon {
  font-size: 28px;
}

.uide-deck-locked-msg {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #888;
  text-align: center;
  line-height: 1.5;
}

.uide-deck-locked-msg small {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #aaa;
}

/* ─── Revealed state (carta descubierta: sello ✓, sin mostrar contenido) ─── */
.uide-deck-card.is-revealed {
  filter: drop-shadow(0 12px 20px rgba(0,0,0,0.16));
}

/* ─── Locked card overlay (front) ─── */
.uide-deck-card.is-locked .uide-deck-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 9px;
}

.uide-deck-lock-icon {
  font-size: 28px;
  line-height: 1;
}

.uide-deck-lock-text {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--uide-gold);
  text-align: center;
  padding: 0 8px;
  line-height: 1.3;
}

.uide-deck-lock-date {
  font-size: 11px;
  font-weight: 600;
  color: var(--uide-white);
  opacity: 0.85;
}

/* Shake animation */
@keyframes uide-deck-shake {
  0%, 100% { transform: var(--card-transform); }
  20%      { transform: var(--card-transform) translateX(-4px); }
  40%      { transform: var(--card-transform) translateX(4px); }
  60%      { transform: var(--card-transform) translateX(-3px); }
  80%      { transform: var(--card-transform) translateX(3px); }
}

.uide-deck-card.is-shaking {
  animation: uide-deck-shake 0.35s ease;
}

/* ─── Progress ─── */
#uide-deck-experience .uide-deck-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  text-align: center;
}

.uide-deck-progress-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--uide-navy);
  min-width: 28px;
  text-align: right;
}

.uide-deck-progress-unit {
  font-size: 12px;
  color: #777;
  white-space: nowrap;
}

.uide-deck-progress-dots {
  display: flex;
  gap: 6px;
}

.uide-deck-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  line-height: 1;
}

.uide-deck-dot.is-filled {
  background: var(--uide-gold);
}

.uide-deck-dot.is-locked-dot {
  background: #ccc;
  font-size: 8px;
  width: 14px;
  height: 14px;
}

/* ─── Pending message ─── */
.uide-deck-pending {
  text-align: center;
  margin-bottom: 14px;
  animation: uideDeckFadeIn 0.4s ease;
}

.uide-deck-pending p {
  font-size: 13px;
  color: #777;
  line-height: 1.5;
}

.uide-deck-pending p:first-child {
  font-weight: 700;
  color: var(--uide-vino);
}

/* ─── BARAJAR button ─── */
#uide-deck-experience .uide-deck-actions {
  text-align: center;
  margin-top: 14px;
}

/* ─── Instruction under the button ─── */
#uide-deck-experience .uide-deck-instruction {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  color: #777;
}

.uide-deck-shuffle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--uide-vino);
  color: var(--uide-gold);
  border: 2px solid var(--uide-gold);
  border-radius: 30px;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, opacity 0.2s;
}

.uide-deck-shuffle-btn:hover {
  background: #7a003e;
  transform: scale(1.04);
}

.uide-deck-shuffle-btn:active {
  transform: scale(0.97);
}

.uide-deck-shuffle-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.uide-deck-shuffle-btn:disabled:hover {
  background: var(--uide-vino);
  transform: none;
}

.uide-deck-shuffle-btn:focus-visible {
  outline: 3px solid var(--uide-gold);
  outline-offset: 3px;
}

/* ─────────────────────────────────────────────
   RIGHT — ¿Cómo funciona? (fila 2, columna 330px)
   ───────────────────────────────────────────── */
#uide-deck-experience .uide-deck-how {
  width: 100%;
  max-width: 330px;
  background: var(--uide-white);
  border-radius: 18px;
  padding: 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  box-sizing: border-box;
  align-self: start;
  margin-top: 0;
}

.uide-deck-info-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--uide-navy);
  margin-bottom: 20px;
  text-align: center;
}

/* Descripción dentro de ¿CÓMO FUNCIONA? — solo visible en mobile
   (desktop mantiene la descripción en el bloque introductorio) */
#uide-deck-experience .uide-deck-how-description {
  display: block;
  font-size: 15px;
  line-height: 1.5;
  max-width: 300px;
  margin: 10px auto 22px;
  color: #555;
  text-align: center;
}

.step-text {
  white-space: normal;
  overflow-wrap: break-word;
}

#uide-deck-experience .uide-deck-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

#uide-deck-experience .uide-deck-steps li {
  position: relative;
  display: flex;
  gap: 15px;
  align-items: flex-start;
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.5;
  color: #444;
  list-style: none;
}

#uide-deck-experience .uide-deck-steps li:last-child {
  margin-bottom: 0;
}

#uide-deck-experience .uide-deck-steps li > span {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  background: var(--uide-navy);
  color: var(--uide-white);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

#uide-deck-experience .uide-deck-steps li p {
  margin: 3px 0 0;
}

/* ═════════════════════════════════════════════
   PHASE 4/5: Revealed section + Full news panel
   ═════════════════════════════════════════════ */

/* ─── Shared button styles ─── */
.uide-deck-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 30px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, opacity 0.2s, color 0.2s;
  border: 2px solid transparent;
}

.uide-deck-btn:active {
  transform: scale(0.97);
}

.uide-deck-btn:focus-visible {
  outline: 3px solid var(--uide-gold);
  outline-offset: 3px;
}

.uide-deck-btn-primary {
  background: var(--uide-vino);
  color: var(--uide-gold);
  border-color: var(--uide-gold);
}

.uide-deck-btn-primary:hover {
  background: #7a003e;
  transform: scale(1.03);
}

.uide-deck-btn-primary:active {
  transform: scale(0.97);
}

.uide-deck-btn-primary:focus-visible {
  outline: 3px solid var(--uide-gold);
  outline-offset: 3px;
}

.uide-deck-btn-secondary {
  background: transparent;
  color: var(--uide-navy);
  border-color: var(--uide-navy);
}

.uide-deck-btn-secondary:hover {
  background: var(--uide-navy);
  color: var(--uide-white);
  transform: scale(1.03);
}

.uide-deck-btn-secondary:active {
  transform: scale(0.97);
}

.uide-deck-btn-secondary:focus-visible {
  outline: 3px solid var(--uide-gold);
  outline-offset: 3px;
}

.uide-deck-btn-ghost {
  background: transparent;
  color: #888;
  border-color: #ccc;
}

.uide-deck-btn-ghost:hover {
  background: #f0f0f0;
  color: #555;
}

.uide-deck-btn-ghost:active {
  transform: scale(0.97);
}

.uide-deck-btn-ghost:focus-visible {
  outline: 3px solid var(--uide-gold);
  outline-offset: 3px;
}

/* ─── Revealed section ─── */
#uide-deck-experience .uide-deck-revealed {
  max-width: 600px;
  margin: 40px auto 0;
  padding: 0 20px;
}

@keyframes uideDeckFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.uide-deck-revealed-card {
  background: var(--uide-white);
  border-radius: 18px;
  padding: 36px 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  text-align: center;
  animation: uideDeckFadeIn 0.5s ease;
}

.uide-deck-revealed-kicker {
  display: block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--uide-gold);
  margin-bottom: 20px;
}

.uide-deck-revealed-img {
  width: 100%;
  max-width: 480px;
  height: auto;
  border-radius: 12px;
  margin-bottom: 20px;
}

.uide-deck-revealed-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--uide-vino);
  background: rgba(145,0,72,0.08);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.uide-deck-revealed-title {
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 800;
  color: var(--uide-navy);
  line-height: 1.3;
  margin-bottom: 12px;
}

.uide-deck-revealed-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: #555;
  margin-bottom: 24px;
}

.uide-deck-revealed-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Full news article (inline, scroll target) ─── */
#uide-deck-experience .uide-deck-full-article {
  width: 100%;
  padding: 60px 32px 80px;
  background: #fff;
  scroll-margin-top: 120px;
}

#uide-deck-experience .uide-deck-full-article__inner {
  max-width: 980px;
  margin: 0 auto;
}

#uide-deck-experience .uide-deck-full-article__category {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--uide-vino);
  background: rgba(145,0,72,0.08);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}

#uide-deck-experience .uide-deck-full-article__title {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  color: var(--uide-navy);
  line-height: 1.25;
  margin-bottom: 24px;
}

/* Editorial typography inside the article */
#uide-deck-experience .uide-deck-full-article__content {
  font-size: 17px;
  line-height: 1.75;
  color: #333;
}

.uide-deck-full-article__content h1,
.uide-deck-full-article__content h2,
.uide-deck-full-article__content h3 {
  color: var(--uide-navy);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

.uide-deck-full-article__content h1 { font-size: 32px; }
.uide-deck-full-article__content h2 { font-size: 26px; }
.uide-deck-full-article__content h3 { font-size: 20px; }

.uide-deck-full-article__content p {
  margin-bottom: 1em;
}

.uide-deck-full-article__content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1em 0;
}

.uide-deck-full-article__content iframe {
  max-width: 100%;
  aspect-ratio: 16 / 9;
  width: 100%;
  border: 0;
  border-radius: 8px;
  margin: 1em 0;
}

.uide-deck-full-article__content a {
  color: var(--uide-vino);
  text-decoration: underline;
}

.uide-deck-full-article__content blockquote {
  border-left: 4px solid var(--uide-gold);
  padding-left: 20px;
  margin: 1.5em 0;
  font-style: italic;
  color: #666;
}

.uide-deck-full-article__content ul,
.uide-deck-full-article__content ol {
  margin: 1em 0;
  padding-left: 1.5em;
}

.uide-deck-full-article__content li {
  margin-bottom: 0.4em;
}

.uide-deck-full-article__footer {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}

/* ═════════════════════════════════════════════
   REDUCED MOTION
   ═════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  #uide-deck-experience *,
  #uide-deck-experience *::before,
  #uide-deck-experience *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═════════════════════════════════════════════
   RESPONSIVE — Tablet (≤1192px)
   El hero mantiene las 2 filas; solo se ajustan cajas
   ───────────────────────────────────────────── */
@media (max-width: 1192px) {
  #uide-deck-experience .uide-deck-hero {
    padding: 40px 16px;
  }

  #uide-deck-experience .uide-deck-card {
    width: 115px;
    height: 170px;
  }

  .uide-deck-card-logo {
    width: 44px;
  }

  .uide-deck-revealed-card {
    padding: 28px 24px;
  }
}


/* ═══════════════════════════════════════════════════════════════
/* ═══════════════════════════════════════════════════════════════
   UIDE DECK - FINAL MOBILE LAYOUT
   Única definición del responsive mobile. No se escribe nada más
   después de este bloque. Neutraliza los valores desktop/tablet que
   afectaban al mobile (min-height del stage/hand, grid 3×2, cajas
   del intro/how) y reconstruye el orden: header → barra → breadcrumb
   → UIDE DECK → DESCUBRE. ARMA. CONECTA. → UIDE CONNECT 2026 →
   ARMA LA NOTICIA → mazo/puzzle → 0/9 → BARAJAR → ¿CÓMO FUNCIONA?.
   FASE 15: reemplaza el bloque FASE 14. Sin position:absolute,
   sin margins/offsets negativos, sin translateY para subir contenido.
   ═══════════════════════════════════════════════════════════════ */
@media screen and (max-width: 768px) {

  /* ── Contenedor principal (§5): comienza tras header real ──
     El header del tema es absolute (0–197px, z 199) con una barra
     Elementor blanca/opaca; el contenido del intro quedaría debajo.
     Padding-top positivo empuja el hero bajo el header, sin overrides. */
  #uide-deck-experience {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 120px 16px 50px;
    box-sizing: border-box;
  }

  /* ── Hero (§6): una sola columna, sin grid/paddings heredados ── */
  #uide-deck-experience .uide-deck-hero {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: 0;
    height: auto;
    padding: 0;
    margin: 0;
  }

  /* ── Fila 1 — Introducción (§7): todo el ancho ── */
  #uide-deck-experience .uide-deck-intro-row {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0 0 10px;
  }

  /* Intro sin caja, texto centrado */
  #uide-deck-experience .uide-deck-info {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0 auto;
    box-sizing: border-box;
    text-align: center;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  /* ── DESCUBRE (eyebrow) mobile ── */
  #uide-deck-experience .deck-eyebrow {
    display: block;
    font-size: 16px;
    letter-spacing: 5px;
    font-weight: 800;
    margin: 0 0 10px;
  }

  /* ── UIDE CONNECT / 2026 (§10): completo, sin romper palabras ── */
  #uide-deck-experience .uide-deck-title {
    display: block;
    position: static;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    font-size: clamp(30px, 8.5vw, 38px);
    line-height: 1;
    text-align: center;
    overflow-wrap: normal;
    word-break: normal;
  }

  /* ── Fila 2 — Interacción (una columna) ── */
  #uide-deck-experience .uide-deck-interaction-row {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 0;
    gap: 0;
    align-items: stretch;
    grid-template-columns: none;
  }

  /* ── Escenario (§13): altura = contenido (sin min-height desktop) ── */
  #uide-deck-experience .uide-deck-stage {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: hidden;
  }

  /* ── Mano inicial (§14): cartas centradas, compacta ── */
  #uide-deck-experience .uide-deck-stage.deck-hand .uide-deck-hand {
    width: 100%;
    max-width: 320px;
    height: 220px;
    min-height: 0;
    margin: 0 auto;
  }

  #uide-deck-experience .uide-deck-stage.deck-hand .uide-deck-card {
    width: 100px;
    height: 148px;
  }

  /* ── Puzzle mobile (§15-16): OBLIGATORIO 3 columnas × 3 filas ── */
  #uide-deck-experience .uide-deck-stage.deck-puzzle .uide-deck-hand {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    margin: 0 auto;
  }

  #uide-deck-experience .uide-deck-stage.deck-puzzle .uide-deck-puzzle-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(3, auto);
    gap: 8px;
    width: 100%;
    max-width: 330px;
    margin: 0 auto;
    align-items: stretch;
  }

  #uide-deck-experience .uide-deck-stage.deck-puzzle .uide-deck-card {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: auto;
    aspect-ratio: 3 / 4;
    transform: none;
    justify-self: stretch;
  }

  /* ── Pantallas muy pequeñas (§17): sigue 3×3, solo más compacto ── */
  @media screen and (max-width: 400px) {
    #uide-deck-experience .uide-deck-stage.deck-puzzle .uide-deck-puzzle-grid {
      max-width: 310px;
      gap: 7px;
    }
  }

  /* ── Contador (§17) ── */
  #uide-deck-experience .uide-deck-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 12px auto 0;
    text-align: center;
  }

  /* ── BARAJAR (§18) ── */
  #uide-deck-experience .uide-deck-actions {
    display: inline-flex;
    margin: 10px auto 0;
  }

  #uide-deck-experience .uide-deck-shuffle-btn {
    padding: 10px 26px;
    font-size: 13px;
  }

  #uide-deck-experience .uide-deck-instruction {
    margin: 12px auto 0;
    padding: 0;
    text-align: center;
    font-size: 13px;
  }

  /* ── ¿CÓMO FUNCIONA? (§19): al final, ancho completo ── */
  #uide-deck-experience .uide-deck-how {
    width: 100%;
    max-width: 100%;
    margin: 12px 0 0;
    padding: 24px 16px 40px;
    box-sizing: border-box;
    align-self: stretch;
  }

  #uide-deck-experience .uide-deck-info-title {
    font-size: 15px;
    margin-bottom: 10px;
  }

  #uide-deck-experience .uide-deck-how-description {
    font-size: 13px;
    line-height: 1.5;
  }

  #uide-deck-experience .uide-deck-steps li {
    font-size: 13px;
  }

  /* ── Tipografía compacta del mazo ── */
  .uide-deck-card-logo {
    width: 36px;
  }

  .uide-deck-card-back.is-text .card-title,
  .uide-deck-card-back.is-text .card-description {
    font-size: 10px;
  }

.uide-deck-card-back.is-text .card-dates {
  display: block;
}

.uide-deck-card-back.is-text .card-date-row {
  display: block;
}

.uide-deck-card-back.is-text .card-date-row + .card-date-row {
  margin-top: 8px;
}

.uide-deck-card-back.is-text .card-date-row .card-title {
  margin-bottom: 2px;
}

.uide-deck-card-badge {
    font-size: 11px;
    padding: 6px 10px;
  }

  .uide-deck-lock-icon {
    font-size: 22px;
  }

  .uide-deck-lock-text {
    font-size: 8px;
  }

  .uide-deck-lock-date {
    font-size: 10px;
  }

  /* ── Revelado final + artículo completo (mobile) ── */
  #uide-deck-experience .uide-deck-revealed {
    margin-top: 28px;
    padding: 0 12px;
  }

  .uide-deck-revealed-card {
    padding: 24px 18px;
  }

  .uide-deck-revealed-kicker {
    font-size: 12px;
    letter-spacing: 2px;
  }

  .uide-deck-revealed-title {
    font-size: 18px;
  }

  .uide-deck-revealed-excerpt {
    font-size: 14px;
  }

  .uide-deck-revealed-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .uide-deck-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 13px;
  }

  #uide-deck-experience .uide-deck-full-article {
    padding: 40px 20px 60px;
    scroll-margin-top: 90px;
  }

  .uide-deck-full-article__title {
    font-size: 24px;
  }

  .uide-deck-full-article__content {
    font-size: 16px;
  }

  .uide-deck-full-article__content h1 { font-size: 24px; }
  .uide-deck-full-article__content h2 { font-size: 20px; }
  .uide-deck-full-article__content h3 { font-size: 18px; }

  .uide-deck-full-article__footer {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ═══════════════════════════════════════════════════════════════
   MODAL DE VISUALIZACIÓN DE CARTA
   Anexo posterior al bloque FINAL MOBILE LAYOUT. Único bloque que se
   añade después; scope total en #uide-deck-modal (no afecta al mazo).
   Click → carta ampliada centrada, overlay oscuro, X para cerrar.
   ── ─────────────────────────────────────────────────────────── */
body.deck-modal-open {
  overflow: hidden;
}

#uide-deck-modal {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

#uide-deck-modal.is-hidden {
  display: none;
}

#uide-deck-modal .uide-deck-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 18, 46, 0.68);
}

#uide-deck-modal .uide-deck-modal-panel {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: 88vh;
  overflow: auto;
  background: var(--uide-white);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
  padding: 28px;
  box-sizing: border-box;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#uide-deck-modal.is-open .uide-deck-modal-panel {
  opacity: 1;
  transform: scale(1);
}

#uide-deck-modal.is-closing .uide-deck-modal-panel {
  opacity: 0;
  transform: scale(0.95);
}

#uide-deck-modal .uide-deck-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--uide-navy);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
}

#uide-deck-modal .uide-deck-modal-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

/* Carta especial (portada): portada completa + botón AGENDA debajo */
#uide-deck-modal .uide-deck-modal-body.is-agenda-modal {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Carta con imagen Flickr: texto + imagen + botón en columna */
#uide-deck-modal .uide-deck-modal-body.is-flickr-img-modal {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding-top: 8px;
  padding-bottom: 8px;
  min-height: 0 !important;
}

/* Panel modal Flickr: altura auto, sin espacio extra */
#uide-deck-modal.is-flickr-img-modal .uide-deck-modal-panel {
  height: auto !important;
  min-height: 0 !important;
  max-height: 88vh !important;
}

#uide-deck-modal .uide-deck-modal-body.is-flickr-img-modal .card-title {
  font-size: 18px !important;
  line-height: 1.2 !important;
  margin-bottom: 2px !important;
}

#uide-deck-modal .uide-deck-modal-body.is-flickr-img-modal .card-description {
  font-size: 14px !important;
  line-height: 1.3 !important;
  margin-bottom: 0 !important;
}

#uide-deck-modal .uide-deck-modal-body.is-flickr-img-modal .card-content {
  margin-bottom: 2px !important;
}

/* Texto modal Flickr: centrado simétrico, evita botón cerrar */
.uide-flickr-modal-text {
  max-width: 85% !important;
  margin: 0 auto !important;
  text-align: center !important;
}

/* Forzar sin centrado vertical en el contenido clonado */
#uide-deck-modal .uide-deck-modal-body.is-flickr-img-modal .uide-deck-card-back.is-text {
  margin: 0 !important;
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
}

#uide-deck-modal .uide-deck-modal-body.is-flickr-img-modal .uide-deck-card-back.is-text .card-content {
  margin: 0 !important;
  padding: 0 !important;
  flex: none !important;
  justify-content: flex-start !important;
  min-height: 0 !important;
  height: auto !important;
  display: block !important;
}

#uide-deck-modal .uide-deck-modal-body.is-flickr-img-modal .uide-deck-card-back.is-text .card-title,
#uide-deck-modal .uide-deck-modal-body.is-flickr-img-modal .uide-deck-card-back.is-text .card-description {
  margin: 0 auto 2px !important;
  max-width: 100% !important;
  line-height: 1.2 !important;
}

#uide-deck-modal .uide-deck-modal-body.is-flickr-img-modal .uide-deck-card-back.is-text .card-description {
  margin-bottom: 0 !important;
}

/* Sin scroll: la portada se ajusta para que imagen + botón AGENDA queden visibles */
#uide-deck-modal .uide-deck-modal-body.is-agenda-modal .uide-deck-card-back {
  display: flex;
  align-items: center;
  justify-content: center;
}

#uide-deck-modal .uide-deck-modal-body.is-agenda-modal .uide-deck-card-back img {
  width: auto;
  max-width: 100%;
  max-height: calc(88vh - 140px);
  margin: 0 auto;
}

#uide-deck-modal .uide-deck-modal-body .uide-deck-agenda-cta {
  flex: 0 0 auto;
  display: inline-block;
  background: #EAAA00;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 13px 38px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, background 0.2s ease;
}

#uide-deck-modal .uide-deck-modal-body .uide-deck-agenda-cta:hover {
  background: #d19500;
  transform: scale(1.03);
}

#uide-deck-modal .uide-deck-modal-body .uide-deck-agenda-cta:active {
  transform: scale(0.97);
}

#uide-deck-modal .uide-deck-modal-body .uide-deck-agenda-cta:focus-visible {
  outline: 3px solid var(--uide-navy);
  outline-offset: 3px;
}

/* Contenido clonado de la carta, ampliado (fuera del 3D del mazo) */
#uide-deck-modal .uide-deck-modal-body .uide-deck-card-back,
#uide-deck-modal .uide-deck-modal-body .uide-deck-card-front {
  position: static;
  inset: auto;
  transform: none;
  backface-visibility: visible;
  -webkit-backface-visibility: visible;
  width: 100%;
  height: auto;
  min-height: 0;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: none;
  background: transparent;
}

#uide-deck-modal .uide-deck-modal-body .uide-deck-card-back img,
#uide-deck-modal .uide-deck-modal-body .uide-deck-card-front img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
}

#uide-deck-modal .uide-deck-modal-body .uide-deck-card-back iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 10px;
}

#uide-deck-modal .uide-deck-modal-body .uide-deck-card-back.is-text {
  display: block;
  text-align: center;
  padding: 0;
  color: #111;
}

#uide-deck-modal .uide-deck-modal-body .uide-deck-card-back.is-text .card-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--uide-navy);
}

#uide-deck-modal .uide-deck-modal-body .uide-deck-card-back.is-text .card-description {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--uide-navy);
}

#uide-deck-modal .uide-deck-modal-body .uide-deck-card-back.is-text .uide-deck-card-badge {
  font-size: 16px;
  margin-bottom: 10px;
}

#uide-deck-modal .uide-deck-modal-body .is-locked-back {
  display: none;
}

/* Mobile del modal: máximo 90% del ancho */
@media screen and (max-width: 768px) {
  #uide-deck-modal {
    padding: 5vw;
  }

  #uide-deck-modal .uide-deck-modal-panel {
    max-width: none;
    padding: 18px;
    border-radius: 14px;
  }

  #uide-deck-modal .uide-deck-modal-close {
    top: 10px;
    right: 10px;
  }

  #uide-deck-modal .uide-deck-modal-body .uide-deck-card-back.is-text .card-title,
  #uide-deck-modal .uide-deck-modal-body .uide-deck-card-back.is-text .card-description {
    font-size: 16px;
  }

  #uide-deck-modal .uide-deck-modal-body .uide-deck-card-back.is-text .uide-deck-card-badge {
    font-size: 14px;
  }

  #uide-deck-modal .uide-deck-modal-body.is-agenda-modal .uide-deck-card-back img {
    max-height: calc(88vh - 130px);
  }
}



/* ────────────────────────────────────────────────────────────────
   PONYTAIL FIX (override, última palabra): ocultar etiquetas de
   pieza (data-piece) visualmente y fijar la carta del modal.
   - El atributo data-piece / data-card-type se CONSERVA en el botón
     (el JS lo usa para lógica, flip, contador, desbloqueo, agenda).
   - Solo se elimina el render visual de la etiqueta/badge.
   ──────────────────────────────────────────────────────────────── */
#uide-deck-experience .uide-deck-stage.deck-puzzle .uide-deck-card::after {
  content: none;
}

#uide-deck-experience .uide-deck-stage.deck-puzzle .uide-deck-card-badge,
#uide-deck-experience .uide-deck-card-badge {
  display: none;
}

#uide-deck-modal .uide-deck-modal-body .uide-deck-card-badge {
  display: none !important;
}

/* ─── Carta del modal: tamaño fijo, sin que el contenido la agrande ─── */
#uide-deck-modal .uide-deck-modal-panel {
  width: 420px;
  height: 560px;
  max-width: 420px;
  max-height: 560px;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
}

#uide-deck-modal .uide-deck-modal-body {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  align-items: center;
  justify-content: center;
}

/* El clon de la carta ocupa el panel, el contenido se adapta */
#uide-deck-modal .uide-deck-modal-body .uide-deck-card-back,
#uide-deck-modal .uide-deck-modal-body .uide-deck-card-front {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 30px 26px;
  box-sizing: border-box;
}

/* Imagen: completa dentro, sin recorte ni scroll */
#uide-deck-modal .uide-deck-modal-body .uide-deck-card-back img,
#uide-deck-modal .uide-deck-modal-body .uide-deck-card-front img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 66%;
  flex: 0 1 auto;
  object-fit: contain;
}

/* Agenda: imagen completa + botón AGENDA SIEMPRE visibles, sin scroll */
#uide-deck-modal .uide-deck-modal-body.is-agenda-modal {
  justify-content: center;
  gap: 16px;
  overflow: hidden;
}

#uide-deck-modal .uide-deck-modal-body.is-agenda-modal .uide-deck-card-back img {
  max-height: 68%;
}

#uide-deck-modal .uide-deck-modal-body .uide-deck-agenda-cta {
  flex: 0 0 auto;
  margin: 0;
}

/* Botón X fijo fuera del flujo (no se empuja al cambiar el contenido) */
#uide-deck-modal .uide-deck-modal-close {
  position: absolute;
  z-index: 5;
}

/* ─── Texto de carta en modal: centrado VERTICAL real + sin recorte ─── */
#uide-deck-modal .uide-deck-modal-body .uide-deck-card-back.is-text {
  margin: auto 0;
}

#uide-deck-modal .uide-deck-modal-body .uide-deck-card-back.is-text .card-content {
  width: 100%;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

#uide-deck-modal .uide-deck-modal-body .uide-deck-card-back.is-text .card-title,
#uide-deck-modal .uide-deck-modal-body .uide-deck-card-back.is-text .card-description {
  max-width: 88%;
  overflow-wrap: break-word;
  margin: 0 auto 7px;
}

/* Vista inicial (front) de cartas con imagen → también centrado */
#uide-deck-modal .uide-deck-modal-body .uide-deck-card-back img,
#uide-deck-modal .uide-deck-modal-body .uide-deck-card-front img {
  margin: auto;
}

/* Mobile: carta min(88vw, 360px) con proporción 3:4 */
@media screen and (max-width: 768px) {
  #uide-deck-modal .uide-deck-modal-panel {
    width: min(88vw, 360px);
    height: auto;
    max-width: min(88vw, 360px);
    max-height: none;
    aspect-ratio: 3 / 4;
    padding: 0;
  }

  #uide-deck-modal .uide-deck-modal-body .uide-deck-card-back,
  #uide-deck-modal .uide-deck-modal-body .uide-deck-card-front {
    padding: 20px 16px;
  }

  #uide-deck-modal .uide-deck-modal-body .uide-deck-card-back img,
  #uide-deck-modal .uide-deck-modal-body .uide-deck-card-front img,
  #uide-deck-modal .uide-deck-modal-body.is-agenda-modal .uide-deck-card-back img {
    max-height: 64%;
  }
}


/* ─── Override texto en modal: flex-columna centrada vertical Y horizontal ─── 
   El .is-text base (display:block, text-align:center) empuja el texto al top
   y overflow:hidden recorta. Aquí restauramos el centrado real dentro de la
   carta fija 420×560 sin recortar letras. */
#uide-deck-experience #uide-deck-modal .uide-deck-modal-body .uide-deck-card-back.is-text,
#uide-deck-experience #uide-deck-modal .uide-deck-modal-body .uide-deck-card-front.is-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 34px 30px;
  overflow: visible;
}

#uide-deck-experience #uide-deck-modal .uide-deck-modal-body .uide-deck-card-back.is-text .card-content,
#uide-deck-experience #uide-deck-modal .uide-deck-modal-body .uide-deck-card-front.is-text .card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
}

/* ─── is-text modal: flex COLUMNA centrada vertical Y horizontal (última
   palabra: la base .is-text display:block/text-align:center + overflow:hidden
   empuja el texto arriba; el override heredado del card-back flex lo perdía
   por especificidad). ─────────────────────────────────────────────── */
#uide-deck-modal .uide-deck-modal-body .uide-deck-card-back.is-text,
#uide-deck-modal .uide-deck-modal-body .uide-deck-card-front.is-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 26px;
}

#uide-deck-modal .uide-deck-modal-body .uide-deck-card-back.is-text .card-title,
#uide-deck-modal .uide-deck-modal-body .uide-deck-card-back.is-text .card-description {
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

#uide-deck-modal .uide-deck-modal-body .uide-deck-card-back.is-text .uide-deck-card-badge {
  margin-bottom: 10px;
  order: -1;
}

/* ─── Centrado vertical bajo el header del sitio ───
   El header (rt-header-inner / #header) queda visible por encima del overlay,
   así que centrar en el viewport completo deja la carta "muy arriba".
   El JS mide la altura visible del header al abrir y la escribe aquí; el
   padding superior la reserva, desplazando el centrado a la zona visible. */
#uide-deck-modal {
  --deck-header-height: 0px;
  padding-top: calc(24px + var(--deck-header-height));
  padding-bottom: 24px;
}

#uide-deck-modal .uide-deck-modal-overlay {
  position: fixed;
  inset: 0;
}
