:root { --azul: #004fb0; --rosa: #f10075; --azul-oscuro: #0a2a5e; }

body { display: flex; flex-direction: column; min-height: 100vh; }
footer { margin-top: auto; }

/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
.cert-hero {
  background: linear-gradient(135deg, #003d8a 0%, #004fb0 45%, #0a2a5e 100%);
  color: #fff;
  padding: 80px 20px 0;
  position: relative;
  overflow: hidden;
}

/* Formas de fondo */
.hero-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.07;
  background: #fff;
  pointer-events: none;
}
.hero-shape--1 { width: 500px; height: 500px; top: -200px; right: -100px; }
.hero-shape--2 { width: 300px; height: 300px; bottom: 60px; left: -80px; background: var(--rosa); opacity: 0.08; }
.hero-shape--3 { width: 180px; height: 180px; top: 40px; left: 30%; }

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding-bottom: 60px;
}

/* Columna texto */
.hero-text { position: relative; z-index: 2; }

.cert-hero .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.28);
  padding: 7px 18px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
  animation: fadeUp .6s cubic-bezier(.22,.61,.36,1) both .05s;
}

.cert-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 18px;
  animation: fadeUp .7s cubic-bezier(.22,.61,.36,1) both .15s;
}
.hero-accent {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  color: #7eb8ff;
}

.cert-hero p {
  font-size: 16px;
  opacity: .88;
  line-height: 1.7;
  max-width: 440px;
  margin-bottom: 28px;
  animation: fadeUp .7s cubic-bezier(.22,.61,.36,1) both .25s;
}
.cert-hero p strong { color: #fff; opacity: 1; }

/* Badges */
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  animation: fadeUp .7s cubic-bezier(.22,.61,.36,1) both .35s;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
}
.hero-badge svg { opacity: .8; }

/* ── Certificado decorativo ── */
.hero-visual {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeUp .8s cubic-bezier(.22,.61,.36,1) both .2s;
}

.cert-mockup {
  background:
    linear-gradient(160deg, rgba(129, 129, 129, 0.089) 0%, rgba(240,245,255,.32) 100%),
    url('certificados/icon/certificate.avif') center top/contain no-repeat;
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 340px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.2);
  position: relative;
  transform: rotate(2deg);
  transition: transform .4s;
}
.cert-mockup:hover { transform: rotate(0deg) translateY(-4px); }

.cert-mockup__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.cert-mockup__logo {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.cert-mockup__seal { width: 52px; height: 52px; }
.cert-mockup__seal svg { width: 100%; height: 100%; }

.cert-mockup__footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.5);
  margin-top: auto;
}

.cert-mockup__footer-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.cert-mockup__label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--rosa);
  text-shadow: 0 1px 3px rgba(0,0,0,.25);
}

/* QR simulado */
.cert-mockup__qr {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,.92);
  padding: 3px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.qr-grid {
  display: grid;
  grid-template-columns: repeat(5,1fr);
  gap: 1.5px;
  width: 100%;
  height: 100%;
}
.qr-grid div {
  background: #e2e8f0;
  border-radius: 1px;
}
.qr-grid .qr-on { background: var(--azul-oscuro); }

.cert-mockup__sign-line {
  width: 70px;
  height: 1px;
  background: rgba(255,255,255,.6);
  margin-bottom: 3px;
  margin-left: auto;
}
.cert-mockup__sign-txt {
  font-size: 9px;
  color: rgba(255,255,255,.85);
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
}

/* Badges flotantes */
.cert-float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 5px;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.cert-float--verified {
  background: #dcfce7;
  color: #15803d;
  top: -14px;
  right: -14px;
  animation: floatBadge 3s ease-in-out infinite;
}
.cert-float--qr {
  background: var(--rosa);
  color: #fff;
  bottom: -12px;
  left: -14px;
  animation: floatBadge 3s ease-in-out infinite .8s;
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Ola */
.hero-wave {
  position: relative;
  margin-bottom: -2px;
  line-height: 0;
}
.hero-wave svg {
  width: 100%;
  height: 60px;
  display: block;
}

/* ══════════════════════════════════════════
   SECCIÓN TUTORIAL (CÓMO FUNCIONA)
══════════════════════════════════════════ */
/* ══════════════════════════════════════════
   SECCIÓN GLOBOS / TUTORIAL
══════════════════════════════════════════ */
/* ══════════════════════════════════════════
   LAYOUT DOS COLUMNAS: BUSCADOR + GUÍA
══════════════════════════════════════════ */
.cert-layout {
  display: grid;
  grid-template-columns: 1fr 252px;
  gap: 24px;
  align-items: start;
}
.cert-content { min-width: 0; }

/* ── Panel lateral flotante ── */
.cert-guide {
  position: sticky;
  top: 90px;
  background: #fff;
  border-radius: 20px;
  padding: 20px 18px 24px;
  border: 1px solid #e8edf5;
  box-shadow: 0 4px 24px rgba(0,40,100,.07);
  animation: fadeUp .7s cubic-bezier(.22,.61,.36,1) both .3s;
}

.guide-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: #94a3b8;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

/* Línea vertical conectora */
.guide-line {
  position: absolute;
  left: 36px;
  top: 82px;
  bottom: 32px;
  width: 1px;
  background: #e2e8f0;
  border-radius: 1px;
}

/* Cada fila */
.guide-bubble {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
  padding: 10px;
  border-radius: 12px;
  transition: background .2s;
  cursor: default;
}
.guide-bubble:last-child { margin-bottom: 0; }
.guide-bubble:hover { background: #f8faff; }

/* Icono cuadrado tipo "app icon" — limpio, sin gradientes */
.guide-orb {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform .25s ease;
}
.guide-orb svg { position: relative; z-index: 1; }
.guide-bubble:hover .guide-orb { transform: translateY(-2px); }

/* El halo ya no se usa — eliminado del HTML pero se deja vacío por si acaso */
.guide-halo { display: none; }

/* Badge de número integrado en el icono */
.guide-num {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}

/* Texto */
.guide-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 2px;
}
.guide-text strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--azul-oscuro);
  line-height: 1.35;
}
.guide-text span {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.5;
}

/* ── Colores por paso (app icon style) ── */
.guide-bubble--1 .guide-orb {
  background: #eff6ff;
}
.guide-bubble--1 .guide-orb svg { stroke: #2563eb; }
.guide-bubble--1 .guide-num { background: #2563eb; color: #fff; }

.guide-bubble--2 .guide-orb {
  background: #fff0f7;
}
.guide-bubble--2 .guide-orb svg { stroke: var(--rosa); }
.guide-bubble--2 .guide-num { background: var(--rosa); color: #fff; }

.guide-bubble--3 .guide-orb {
  background: #f5f0ff;
}
.guide-bubble--3 .guide-orb svg { stroke: #7c3aed; }
.guide-bubble--3 .guide-num { background: #7c3aed; color: #fff; }

/* ══════════════════════════════════════════
   BÚSQUEDA
══════════════════════════════════════════ */
.cert-main {
  max-width: 1060px;
  margin: 0 auto;
  padding: 48px 20px 70px;
}

.search-card {
  background: #fff;
  border-radius: 24px;
  padding: 36px;
  box-shadow: 0 20px 60px rgba(0,40,100,.1), 0 0 0 1px rgba(0,40,100,.04);
  text-align: center;
  animation: fadeUp .7s cubic-bezier(.22,.61,.36,1) both .1s;
}

.search-card__icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: linear-gradient(135deg, #e8f0fb, #ccddf9);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.search-card__icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--azul);
}

.search-card h2 {
  font-size: 22px;
  color: var(--azul-oscuro);
  margin-bottom: 6px;
  font-weight: 800;
}
.search-card .lead {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 22px;
}

.search-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.input-wrapper {
  flex: 1;
  min-width: 220px;
  position: relative;
}
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  display: flex;
}
.search-row input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border: 2px solid #e3e8f0;
  border-radius: 14px;
  font-size: 16px;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s;
}
.search-row input:focus {
  outline: none;
  border-color: var(--azul);
  box-shadow: 0 0 0 4px rgba(0,79,176,.1);
}

#btn-buscar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #004fb0, #003d8a);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
  box-shadow: 0 6px 20px rgba(0,79,176,.35);
}
#btn-buscar:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,79,176,.4); }
#btn-buscar:disabled { cursor: not-allowed; opacity: .85; transform: none; }

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 14px;
}

/* ══════════════════════════════════════════
   AUTOCOMPLETE
══════════════════════════════════════════ */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0,79,176,.12);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0,40,100,.08), 0 4px 12px rgba(0,40,100,.04);
  z-index: 100;
  max-height: 280px;
  overflow-y: auto;
  margin-top: 8px;
  transform-origin: top center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scaleY(.95);
  transition: opacity .3s ease, visibility .3s ease, transform .4s cubic-bezier(.34,1.56,.64,1);
  text-align: left;
}
.autocomplete-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scaleY(1);
}
.autocomplete-dropdown::-webkit-scrollbar { width: 6px; }
.autocomplete-dropdown::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }

.autocomplete-item {
  padding: 14px 18px;
  cursor: pointer;
  font-size: 14.5px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all .25s;
  border-left: 3px solid transparent;
  position: relative;
  opacity: 0;
  transform: translateX(-10px);
  animation: acSlideRight .3s forwards ease-out;
}
.autocomplete-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 48px;
  right: 18px;
  height: 1px;
  background: #f1f5f9;
}
.autocomplete-item:last-child::after { display: none; }
.autocomplete-item:hover {
  background: linear-gradient(90deg, rgba(238,242,255,.6) 0%, rgba(255,255,255,0) 100%);
  color: var(--azul);
  border-left-color: var(--rosa);
  padding-left: 24px;
}
.autocomplete-item:hover .ac-icon { color: var(--rosa); transform: scale(1.15); }
.ac-icon { color: #94a3b8; transition: all .3s; flex-shrink: 0; }
.ac-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ══════════════════════════════════════════
   BANNER
══════════════════════════════════════════ */
.banner {
  display: none;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 22px;
  font-weight: 600;
  font-size: 15px;
}
.banner.show { display: flex; }
.banner.ok { background: #dcfce7; color: #15803d; }
.banner.err { background: #fee2e2; color: #b91c1c; }
.banner .ico { font-size: 22px; }

/* ══════════════════════════════════════════
   RESULTADOS
══════════════════════════════════════════ */
#resultados { display: none; margin-top: 28px; }

.auto-aviso {
  font-size: 13px;
  color: #94a3b8;
  text-align: center;
  margin-bottom: 14px;
}
.auto-aviso b { color: var(--rosa); }

.cliente-nombre {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 26px;
  color: var(--azul-oscuro);
  margin-bottom: 2px;
}
.cliente-sub { font-size: 13px; color: #666; margin-bottom: 20px; }

#viewer { display: none; }
#viewer canvas {
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 14px 44px rgba(0,40,100,.18);
  background: #fff;
}

.viewer-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.viewer-actions button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 22px;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}
.b-pdf {
  background: linear-gradient(135deg, #004fb0, #003d8a);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,79,176,.3);
}
.b-pdf:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,79,176,.4); }
.b-png {
  background: #e8edf5;
  color: var(--azul-oscuro);
}
.b-png:hover { background: #d8e1f0; transform: translateY(-2px); }

.lista-ttl {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin: 6px 0 14px;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Card ── */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 14px 14px 18px;
  border: 1.5px solid #edf1f7;
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s, background .18s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: #e2e8f0;
  transition: background .18s;
}
.card:hover { border-color: #c7d5ee; box-shadow: 0 3px 14px rgba(0,40,100,.09); }

/* Título */
.card .tit {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Fila inferior */
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-info {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Colores por tipo */
.card--curso::before        { background: #93c5fd; }
.card--taller::before       { background: var(--rosa); }
.card--especializacion::before { background: #a78bfa; }
.card--constancia::before   { background: #34d399; }


/* Estado activo */
.card.activo { border-color: transparent; }
.card--curso.activo         { background: #f0f7ff; }
.card--taller.activo        { background: #fff5f9; }
.card--especializacion.activo { background: #f8f5ff; }
.card--constancia.activo    { background: #f0fdf8; }
.card--default.activo       { background: #f8faff; }

.card--curso.activo::before         { background: #2563eb; }
.card--taller.activo::before        { background: var(--rosa); }
.card--especializacion.activo::before { background: #7c3aed; }
.card--constancia.activo::before    { background: #059669; }

.card.activo .tit { font-weight: 700; color: #0f172a; }

.picker { margin-top: 14px; }
.picker .opt {
  padding: 12px 15px;
  border: 1px solid #e3e8f0;
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: .2s;
}
.picker .opt:hover { background: #f5f8fd; border-color: var(--azul); }

/* ══════════════════════════════════════════
   ADMIN
══════════════════════════════════════════ */
.admin-access {
  text-align: center;
  margin-top: 34px;
  font-size: 13px;
  color: #94a3b8;
}
.admin-access a { color: var(--azul); font-weight: 600; text-decoration: none; }
.admin-access a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════
   SPINNER
══════════════════════════════════════════ */
.spinner {
  animation: rotate 2s linear infinite;
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
}
.spinner .path {
  stroke: #fff;
  stroke-linecap: round;
  animation: dash 1.5s ease-in-out infinite;
}
@keyframes rotate { 100% { transform: rotate(360deg); } }
@keyframes dash {
  0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
  50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
  100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* ══════════════════════════════════════════
   ANIMACIONES
══════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes acSlideRight {
  to { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .cert-hero .pill, .cert-hero h1, .cert-hero p, .hero-badges,
  .hero-visual, .search-card, .cert-float { animation: none; }
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */

/* Tablet: oculta el certificado decorativo del hero */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 0;
    padding-bottom: 40px;
  }
  .cert-hero p { max-width: 100%; }
  .hero-badges { justify-content: center; }
  .hero-visual { display: none; }
}

/* Tablet: layout de 1 columna, guía debajo del buscador */
@media (max-width: 820px) {
  .cert-main { padding: 36px 16px 56px; }

  .cert-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Guía: de sticky vertical → fila horizontal de 3 pasos */
  .cert-guide {
    position: static;
    padding: 18px 16px;
  }
  .guide-line { display: none; }
  .guide-label { margin-bottom: 14px; }

  .guide-bubbles-row {
    display: flex;
    gap: 8px;
  }
  .guide-bubble {
    flex: 1;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    margin-bottom: 0;
    padding: 10px 6px;
  }
  .guide-orb { width: 40px; height: 40px; border-radius: 10px; }
  .guide-text strong { font-size: 12px; }
  .guide-text span { display: none; } /* oculta descripción en fila compacta */
}

/* Móvil pequeño */
@media (max-width: 480px) {
  .cert-hero { padding-top: 56px; }
  .cert-hero h1 { font-size: 28px; }

  .search-card { padding: 22px 16px; border-radius: 18px; }
  .search-card h2 { font-size: 18px; }
  .search-card__icon { width: 50px; height: 50px; border-radius: 14px; }

  .search-row { flex-direction: column; gap: 10px; }
  .search-row input { font-size: 16px; }
  #btn-buscar { width: 100%; justify-content: center; padding: 13px 20px; }

  .viewer-actions { flex-direction: column; }
  .viewer-actions button { width: 100%; justify-content: center; }

  .cards { grid-template-columns: 1fr; }

  .guide-bubble { padding: 8px 4px; }
  .guide-orb { width: 36px; height: 36px; border-radius: 9px; }
  .guide-text strong { font-size: 11px; }
}

/* ══════════════════════════════════════════
   MODAL DE CERTIFICADOS
══════════════════════════════════════════ */
#cert-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(2, 8, 28, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 16px;
  transition: opacity .22s;
}
#cert-modal.open { display: flex; }

.modal-box {
  background: #e9edf4;
  border-radius: 24px;
  width: min(1180px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  box-shadow: 0 50px 120px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06);
  animation: modalIn .3s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.94) translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* Botón cerrar flotante */
.modal-close {
  position: absolute;
  top: 11px;
  right: 16px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: #667085;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(13, 38, 76, 0.12);
  transition: background .18s, color .18s;
}
.modal-close:hover { background: #f10075; color: #fff; }

/* si la barra de sesión no está visible, el botón baja a su posición clásica */
.modal-box:has(.auto-aviso:empty) .modal-close { top: 22px; right: 22px; }

/* sello de autenticidad junto a los botones de descarga */
.viewer-verified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  font-size: 12px;
  font-weight: 700;
  color: #059669;
}
.viewer-verified svg { flex-shrink: 0; }

/* scrollbar horizontal del visor, discreto */
.viewer-scroll::-webkit-scrollbar { height: 6px; width: 6px; }
.viewer-scroll::-webkit-scrollbar-track { background: transparent; }
.viewer-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }

/* Aviso auto-ocultar dentro del modal */
#cert-modal .auto-aviso {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 11px 72px 11px 18px;
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 7px),
    linear-gradient(135deg, #0b2a5c 0%, #08386f 45%, #004fb0 100%);
  color: #fff;
  border: none;
  border-radius: 0;
  font-size: 12.5px;
  flex-shrink: 0;
  text-align: left;
  overflow: hidden;
}

/* filo inferior de acento institucional */
#cert-modal .auto-aviso::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #f10075 0%, #ff4da6 40%, #0a63d4 100%);
}

#cert-modal .auto-aviso:empty { display: none; margin: 0; }

.aa-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.aa-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.aa-text strong {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.9px;
}
.aa-text em {
  font-style: normal;
  font-size: 11px;
  color: #b9cbe8;
}

.aa-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 5px 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* últimos segundos: el contador se enciende en rosa */
.aa-timer--fin {
  background: rgba(241, 0, 117, 0.35);
  border-color: rgba(255, 120, 180, 0.55);
  animation: aaFin 1s ease-in-out infinite;
}
@keyframes aaFin {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}

/* Cuerpo: perfil izquierda + contenido derecha (estilo dashboard) */
.modal-body {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 14px;
  padding: 14px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ── Panel izquierdo: perfil del egresado ── */
.modal-profile {
  background: #fff;
  border-radius: 18px;
  padding: 30px 16px 20px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.mp-avatar-wrap {
  position: relative;
  width: 86px;
  margin: 0 auto 14px;
}
.mp-avatar {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, #004fb0 0%, #7c3aed 55%, #f10075 100%);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 26px rgba(0, 79, 176, 0.28);
}
.mp-avatar-badge {
  position: absolute;
  right: -2px;
  bottom: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #f10075;
  color: #fff;
  border: 3px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mp-avatar-badge svg { width: 12px; height: 12px; }

.modal-profile #cliente-info { text-align: center; }
.modal-profile .cliente-nombre {
  font-family: 'Poppins', sans-serif;
  font-style: normal;
  font-size: 16.5px;
  font-weight: 800;
  color: #101828;
  line-height: 1.3;
  margin-bottom: 3px;
}
.modal-profile .cliente-sub {
  font-size: 12px;
  color: #7a8494;
  margin-bottom: 0;
}

.mp-divider { height: 1px; background: #eef1f6; margin: 18px 0 14px; }
.mp-list-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #98a2b3;
  margin-bottom: 10px;
}

.modal-profile .card {
  padding: 12px 13px 12px 16px;
  border-radius: 12px;
  animation: cardIn .2s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.modal-profile .card .tit { font-size: 13px; margin-bottom: 8px; }

/* ── Panel derecho: bienvenida + visor ── */
.modal-content-panel {
  background: #fff;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.mc-welcome {
  padding: 24px 64px 0 30px;
  flex-shrink: 0;
}
.mc-welcome h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 21px;
  font-weight: 800;
  color: #101828;
}
#mc-nombre { color: #f10075; }
.mc-wave { display: inline-block; }
.mc-welcome p {
  font-size: 13.5px;
  color: #7a8494;
  margin-top: 4px;
}

.modal-viewer-col {
  flex: 1;
  overflow-y: auto;
  padding: 18px 30px 26px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.modal-viewer-col canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 40, 100, 0.16);
  background: #fff;
  border: 1px solid #eef1f6;
}
.modal-viewer-col .viewer-actions {
  margin-top: 18px;
  justify-content: flex-end;
}

/* Botones de descarga estilo píldora */
#cert-modal .viewer-actions button { border-radius: 999px; padding: 12px 26px; }
#cert-modal .b-png {
  background: #fff;
  border: 1.5px solid #f10075;
  color: #f10075;
}
#cert-modal .b-png:hover { background: #fff0f7; transform: translateY(-2px); }
#cert-modal .b-pdf {
  background: linear-gradient(135deg, #f10075, #c3005f);
  color: #fff;
  box-shadow: 0 6px 18px rgba(241, 0, 117, 0.35);
}
#cert-modal .b-pdf:hover { box-shadow: 0 10px 26px rgba(241, 0, 117, 0.45); }

.modal-profile::-webkit-scrollbar,
.modal-viewer-col::-webkit-scrollbar { width: 5px; }
.modal-profile::-webkit-scrollbar-track,
.modal-viewer-col::-webkit-scrollbar-track { background: transparent; }
.modal-profile::-webkit-scrollbar-thumb,
.modal-viewer-col::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

/* Barra de filtros */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1.5px solid #e2e8f0;
  background: transparent;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
}
.filter-btn:hover { border-color: var(--azul); color: var(--azul); background: #eff6ff; }
.filter-btn.active {
  background: var(--azul);
  border-color: var(--azul);
  color: #fff;
}
.filter-count {
  background: rgba(255,255,255,.25);
  border-radius: 10px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  text-align: center;
}
.filter-btn:not(.active) .filter-count {
  background: #f1f5f9;
  color: #94a3b8;
}
/* ══════════════════════════════════════════
   RESPONSIVE MODAL — MOBILE
══════════════════════════════════════════ */
@media (max-width: 700px) {
  /* Bottom sheet */
  #cert-modal {
    padding: 0;
    align-items: flex-end;
  }
  .modal-box {
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-height: 94svh;
    display: flex;
    flex-direction: column;
    animation: modalInMobile .3s cubic-bezier(.22,.61,.36,1) both;
  }
  @keyframes modalInMobile {
    from { opacity: 0; transform: translateY(60px); }
    to   { opacity: 1; transform: none; }
  }

  /* Handle visual (línea de arrastre) */
  .modal-box::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: rgba(13, 38, 76, 0.18);
    border-radius: 2px;
    margin: 10px auto 0;
    flex-shrink: 0;
  }

  .modal-close { top: 20px; right: 12px; width: 32px; height: 32px; }

  /* El aviso no debe quedar debajo del botón cerrar */
  #cert-modal .auto-aviso { padding-right: 60px; }
  .aa-text em { display: none; }
  .viewer-verified { width: 100%; justify-content: center; margin: 0 0 4px; }

  /* Cuerpo: UNA sola columna con scroll único */
  .modal-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    scrollbar-width: none;
  }
  .modal-body::-webkit-scrollbar { display: none; }

  /* Paneles: sin scroll propio, fluyen en el scroll del cuerpo.
     El contenido (bienvenida + certificado) va PRIMERO; el perfil con
     la lista queda debajo */
  .modal-content-panel {
    order: -1;
    overflow: visible;
    flex-shrink: 0;
  }
  .mc-welcome { padding: 20px 16px 0; }
  .mc-welcome h3 { font-size: 18px; }
  .mc-welcome p { font-size: 12.5px; }

  /* Perfil compacto: avatar + nombre en fila, lista debajo */
  .modal-profile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 14px;
    padding: 16px 14px;
    overflow: visible;
    flex-shrink: 0;
  }
  .mp-avatar-wrap { width: 54px; margin: 0; }
  .mp-avatar { width: 54px; height: 54px; font-size: 18px; }
  .mp-avatar-badge { width: 21px; height: 21px; border-width: 2px; }
  .mp-avatar-badge svg { width: 9px; height: 9px; }
  .modal-profile #cliente-info { flex: 1; min-width: 0; text-align: left; }
  .modal-profile .cliente-nombre { font-size: 15px; }
  .mp-divider { flex-basis: 100%; margin: 12px 0 10px; }
  .mp-list-label { flex-basis: 100%; }
  .modal-profile #lista { flex-basis: 100%; min-width: 0; }

  .modal-viewer-col {
    padding: 14px 14px 18px;
    overflow: visible;
  }

  /* Certificado legible: se amplía y se desliza horizontalmente */
  .modal-viewer-col::before {
    content: 'Desliza sobre el certificado para verlo completo ↔';
    display: block;
    font-size: 11.5px;
    color: #98a2b3;
    text-align: center;
    margin-bottom: 8px;
  }
  .viewer-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-radius: 12px;
  }
  .viewer-scroll::-webkit-scrollbar { display: none; }
  .modal-viewer-col .viewer-scroll canvas { width: 620px; max-width: none; }

  /* Botones de descarga: fila */
  .modal-viewer-col .viewer-actions {
    flex-direction: row;
    gap: 8px;
    margin-top: 12px;
  }
  .modal-viewer-col .viewer-actions button {
    flex: 1;
    justify-content: center;
    padding: 11px 8px;
    font-size: 12px;
  }

  /* Filtros: scroll horizontal sin barra */
  .filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 12px;
  }
  .filter-bar::-webkit-scrollbar { display: none; }
}

/* ============================================================
   HERO CLARO REDISEÑADO — círculo con foto + tarjetas flotantes
   ============================================================ */

/* El hero pasa de azul oscuro a lienzo claro rosado que termina en
   un tono lavanda suave: la ola blanca dibuja la transición encima */
.cert-hero--light {
  background:
    radial-gradient(900px 460px at 85% 18%, rgba(241, 0, 117, 0.07) 0%, transparent 60%),
    radial-gradient(700px 420px at 0% 45%, rgba(0, 79, 176, 0.05) 0%, transparent 60%),
    linear-gradient(180deg, #fdf5f8 0%, #f8f7fc 55%, #eef2fa 100%);
  color: #101828;
  padding-top: 120px;
  padding-bottom: 0;
}

/* Divisor con forma: ola blanca difuminada sobre el tono lavanda del
   hero — el blur funde ambas secciones; la escala compensa los bordes
   del filtro (el overflow:hidden del hero recorta el exceso) */
.cert-hero--light .hero-wave {
  position: relative;
  z-index: 1;
  margin: 8px 0 -2px;
  line-height: 0;
}

/* Franja blanca sólida DETRÁS del borde inferior de la ola: el blur
   vuelve semitransparente esa zona del svg y sin esto se asoma el
   lavanda del hero como una línea horizontal */
.cert-hero--light .hero-wave::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 45%);
  z-index: -1;
}

/* La franja blanca sólida bajo la curva (40 unidades del viewBox) evita
   que el blur tiña el límite inferior de la sección y marque una línea */
.cert-hero--light .hero-wave > svg {
  display: block;
  width: 100%;
  height: 104px;
  filter: blur(14px);
  transform: scale(1.15);
}

.cert-hero--light .hero-wave > svg path {
  fill: #ffffff;
}

/* Navbar sobre hero claro: enlaces en azul */
.nav-desktop-only .nav-links-center li a {
  color: var(--primary-blue, #004fb0);
}

.nav-desktop-only .nav-links-center li a:hover,
.nav-desktop-only .nav-links-center li a.active {
  color: var(--primary-pink, #f10075);
}

/* Formas de fondo adaptadas al lienzo claro */
.cert-hero--light .hero-shape {
  background: var(--rosa, #f10075);
  opacity: 0.05;
}

.cert-hero--light .hero-shape--2 {
  background: var(--primary-blue, #004fb0);
  opacity: 0.05;
}

.cert-hero--light .pill {
  background: rgba(241, 0, 117, 0.08);
  border: 1px solid rgba(241, 0, 117, 0.2);
  color: #f10075;
}

.cert-hero--light h1 {
  color: #101828;
  font-size: clamp(32px, 4.6vw, 50px);
}

.cert-hero--light .hero-accent {
  color: #f10075;
}

.cert-hero--light p {
  color: #5b6472;
  opacity: 1;
}

.cert-hero--light p strong {
  color: #101828;
}

/* Botones de acción */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  animation: fadeUp .7s cubic-bezier(.22,.61,.36,1) both .35s;
}

.hero-btn-solid {
  display: inline-flex;
  align-items: center;
  background: #f10075;
  color: #fff !important;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 14px 28px;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(241, 0, 117, 0.28);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hero-btn-solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(241, 0, 117, 0.38);
}

.hero-btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 13px 26px;
  border-radius: 9999px;
  border: 1.5px solid rgba(241, 0, 117, 0.45);
  color: #f10075 !important;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
}

.hero-btn-outline:hover {
  background: #f10075;
  border-color: #f10075;
  color: #fff !important;
}

/* ── Egresado con certificado (la imagen trae su círculo azul) ── */
/* Sin animación ni z-index en el contenedor: crearían un stacking
   context y el mix-blend-mode de la foto no podría fundirse con el
   fondo del hero */
.cert-hero--light .hero-visual {
  animation: none;
  z-index: auto;
}

.hero-person {
  width: min(470px, 90vw);
  height: auto;
  display: block;
  /* Funde el fondo blanco de la foto con el lienzo claro del hero.
     Nota: no añadir filter aquí — rompería el blending en Chromium */
  mix-blend-mode: multiply;
  /* El torso se desvanece en vez de cortarse en seco */
  -webkit-mask-image: linear-gradient(to bottom, #000 76%, transparent 98%);
  mask-image: linear-gradient(to bottom, #000 76%, transparent 98%);
}

/* Insignia de icono flotante (arriba-izquierda del círculo) */
.hero-icon-badge {
  position: absolute;
  top: 4%;
  left: 6%;
  width: 62px;
  height: 62px;
  border-radius: 20px;
  background: linear-gradient(140deg, #ff5fa8, #f10075);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-8deg);
  box-shadow: 0 14px 28px rgba(241, 0, 117, 0.35);
  animation: certFloat 8s ease-in-out infinite;
}

.hero-icon-badge svg {
  width: 28px;
  height: 28px;
}

/* Tarjeta de estadística (derecha) */
.hero-stat-card {
  position: absolute;
  top: 18%;
  right: -2%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 12px 18px;
  box-shadow: 0 16px 34px rgba(13, 38, 76, 0.14);
  animation: certFloat 9s ease-in-out infinite reverse;
}

.hs-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fdf2f8;
  color: #f10075;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hs-icon svg {
  width: 20px;
  height: 20px;
}

.hero-stat-card strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: #101828;
  line-height: 1.15;
}

.hero-stat-card div > span {
  font-size: 0.72rem;
  font-weight: 600;
  color: #7a8494;
}

/* Tarjeta de egresados (izquierda-abajo) */
.hero-experts-card {
  position: absolute;
  bottom: 16%;
  left: -4%;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: 0 16px 34px rgba(13, 38, 76, 0.14);
  animation: certFloat 10s ease-in-out infinite;
  animation-delay: -3s;
}

.hx-label {
  display: inline-block;
  background: rgba(241, 0, 117, 0.09);
  color: #f10075;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 9999px;
  margin-bottom: 9px;
}

.hx-avatars {
  display: flex;
  align-items: center;
}

.hx-avatars img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  margin-right: -9px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.hx-more {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f10075;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 3px 8px rgba(241, 0, 117, 0.3);
}

/* Puntos decorativos */
.hero-mini-dot {
  position: absolute;
  border-radius: 50%;
  background: #f10075;
  pointer-events: none;
}

.hero-mini-dot--a { width: 14px; height: 14px; top: 12%; right: 16%; opacity: 0.5; }
.hero-mini-dot--b { width: 9px; height: 9px; bottom: 8%; right: 8%; opacity: 0.35; }
.hero-mini-dot--c { width: 11px; height: 11px; top: 40%; left: 0; opacity: 0.3; background: var(--primary-blue, #004fb0); }

@keyframes certFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-icon-badge {
  animation-name: certFloatBadge;
}

@keyframes certFloatBadge {
  0%, 100% { transform: rotate(-8deg) translateY(0); }
  50% { transform: rotate(-8deg) translateY(-12px); }
}

/* Responsive del hero claro */
@media (max-width: 880px) {
  .cert-hero--light {
    padding-top: 96px;
  }

  /* Despeja el dashboard: sin píldora, el título sube */
  .cert-hero--light .pill {
    display: none;
  }

  /* La regla antigua ocultaba el visual (mockup); el círculo sí se muestra.
     Las tarjetas dejan de flotar sobre la foto: pasan a una fila debajo */
  .cert-hero--light .hero-visual {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 0 auto;
  }

  .cert-hero--light .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }

  .cert-hero--light .hero-text p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-person {
    width: min(330px, 84vw);
  }

  /* Tarjetas en fila debajo de la foto: ni el rostro ni el
     certificado quedan tapados */
  .hero-stat-card {
    position: static;
    padding: 8px 12px;
    gap: 8px;
    animation: none;
  }

  .hero-stat-card strong {
    font-size: 0.88rem;
  }

  .hero-stat-card div > span {
    font-size: 0.64rem;
  }

  .hs-icon {
    width: 32px;
    height: 32px;
  }

  .hs-icon svg {
    width: 16px;
    height: 16px;
  }

  .hero-experts-card {
    position: static;
    padding: 8px 11px;
    animation: none;
  }

  .hero-icon-badge {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    top: 0;
    left: 10%;
  }

  .hero-icon-badge svg {
    width: 22px;
    height: 22px;
  }

  .cert-hero--light .hero-wave {
    margin-top: 6px;
  }

  .cert-hero--light .hero-wave > svg {
    height: 64px;
  }
}

/* ============================================================
   SHOWCASE — COLLAGE DE CERTIFICADOS + BUSCADOR REDISEÑADO
   ============================================================ */

.cert-main {
  max-width: 1160px;
  padding-top: 0;
}

.cert-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 40px;
}

/* ── Collage escalonado de certificados ── */
.cs-collage {
  position: relative;
  height: 480px;
}

.cs-img {
  position: absolute;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 48px rgba(13, 38, 76, 0.16), 0 4px 12px rgba(13, 38, 76, 0.08);
  border: 5px solid #fff;
}

.cs-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cs-img--1 {
  width: 62%;
  aspect-ratio: 1.414;
  top: 0;
  left: 0;
  z-index: 1;
}

.cs-img--2 {
  width: 48%;
  aspect-ratio: 1.414;
  top: 14%;
  right: 0;
  z-index: 2;
  animation: certFloat 10s ease-in-out infinite;
}

.cs-img--3 {
  width: 58%;
  aspect-ratio: 1.414;
  bottom: 0;
  left: 16%;
  z-index: 3;
  animation: certFloat 12s ease-in-out infinite reverse;
}

/* ── Columna derecha: buscador ── */
.cs-eyebrow {
  display: inline-block;
  color: #f10075;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-bottom: 12px;
}

.cs-right h2 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.2;
  color: #101828;
  margin-bottom: 12px;
}

.cs-accent {
  color: #004fb0;
}

.cs-right .lead {
  font-size: 15px;
  color: #5b6472;
  margin-bottom: 22px;
}

/* ── Pasos como mini-tarjetas (estilo stats de referencia) ── */
.cs-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.cs-step {
  background: #fff;
  border: 1px solid rgba(13, 38, 76, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  transition: all 0.3s ease;
}

.cs-step:hover {
  border-color: rgba(241, 0, 117, 0.25);
  box-shadow: 0 10px 24px rgba(13, 38, 76, 0.08);
  transform: translateY(-2px);
}

.cs-step strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #101828;
  margin-bottom: 4px;
}

.cs-step strong em {
  font-style: normal;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(241, 0, 117, 0.1);
  color: #f10075;
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cs-step span {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  color: #7a8494;
  line-height: 1.35;
}

/* Responsive del showcase */
@media (max-width: 940px) {
  .cert-showcase {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .cs-collage {
    height: min(72vw, 420px);
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
  }

  .cs-right {
    text-align: center;
  }

  .cs-right .search-row {
    text-align: left;
  }

  .cs-steps {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .cs-steps {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .cs-step {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 14px;
  }

  .cs-step strong {
    margin-bottom: 0;
  }

  .cs-img {
    border-radius: 14px;
    border-width: 3px;
  }
}

/* ══════════════════════════════════════════
   CONSOLA DE VERIFICACIÓN OFICIAL
══════════════════════════════════════════ */
.verify-console {
  background: #fff;
  border: 1px solid rgba(13, 38, 76, 0.1);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(13, 38, 76, 0.1), 0 2px 8px rgba(13, 38, 76, 0.05);
  animation: vcEnter .6s cubic-bezier(.22,.61,.36,1) both .15s;
}

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

/* ── Cabecera institucional (azul profundo, textura de papel de seguridad) ── */
.vc-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: #fff;
  background:
    radial-gradient(120% 190% at 100% 0%, rgba(10, 99, 212, 0.5), transparent 55%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 7px),
    linear-gradient(135deg, #0b2a5c 0%, #08386f 45%, #004fb0 100%);
  overflow: hidden;
}

/* filo superior institucional */
.vc-head::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f10075 0%, #ff4da6 40%, #0a63d4 100%);
}

/* escaneo suave que recorre la cabecera */
.vc-head::after {
  content: '';
  position: absolute;
  top: 0;
  left: -35%;
  width: 35%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: vcScan 4.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes vcScan {
  0%       { left: -35%; }
  55%, 100% { left: 110%; }
}

/* marca de agua de escudo, como sello impreso del documento */
.vc-watermark {
  position: absolute;
  right: -14px;
  bottom: -26px;
  width: 112px;
  height: 112px;
  color: #fff;
  opacity: 0.07;
  transform: rotate(-12deg);
  pointer-events: none;
}

/* sello circular tipo insignia, en relieve sobre el azul */
.vc-seal {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  outline: 1px solid rgba(255, 255, 255, 0.22);
  outline-offset: 3px;
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.25), 0 3px 8px rgba(0, 0, 0, 0.18);
}
.vc-seal svg { width: 20px; height: 20px; }

.vc-headtext {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.vc-title {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  line-height: 1.3;
  color: #fff;
}

.vc-sub {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #b9cbe8;
}

.vc-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 4px 11px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.vc-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, .7);
  animation: vcPulse 1.8s ease-out infinite;
}

@keyframes vcPulse {
  0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, .65); }
  70%  { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.vc-body {
  padding: 18px 18px 16px;
}

/* ── Pestañas Nombre / DNI ── */
.vc-tabs {
  display: inline-flex;
  gap: 4px;
  background: #eef2f8;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 14px;
}

.vc-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
  background: transparent;
  padding: 8px 15px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #5b6472;
  cursor: pointer;
  transition: all .25s ease;
}

.vc-tab:hover { color: #004fb0; }

.vc-tab.active {
  background: #fff;
  color: #004fb0;
  box-shadow: 0 2px 8px rgba(13, 38, 76, 0.12);
}

/* ── Sellos de confianza ── */
.vc-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px dashed rgba(13, 38, 76, 0.12);
}

.vc-trust span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
}

.vc-trust svg { color: #059669; flex-shrink: 0; }

/* dentro de la consola el buscador ya no necesita su propio margen */
.verify-console .search-row input {
  border-color: #dbe3ee;
  background: #fbfcfe;
}
.verify-console .search-row input:focus {
  background: #fff;
  animation: vcFocusRing .45s ease-out;
}

@keyframes vcFocusRing {
  0%   { box-shadow: 0 0 0 0 rgba(0,79,176,.28); }
  100% { box-shadow: 0 0 0 4px rgba(0,79,176,.1); }
}

/* brillo que barre el botón Verificar */
#btn-buscar {
  position: relative;
  overflow: hidden;
}
#btn-buscar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.28), transparent);
  animation: vcScan 3.2s ease-in-out infinite 1.2s;
  pointer-events: none;
}

@media (max-width: 480px) {
  .vc-title { font-size: 11px; letter-spacing: 0.6px; }
  .vc-sub { font-size: 9.5px; }
  .vc-seal { width: 32px; height: 32px; }
  .vc-seal svg { width: 16px; height: 16px; }
  .vc-live { font-size: 10px; padding: 3px 9px; }
  .vc-body { padding: 14px 12px 13px; }
  .vc-tabs { width: 100%; }
  .vc-tab { flex: 1; justify-content: center; padding: 8px 8px; font-size: 12px; }
  .vc-trust { gap: 6px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .verify-console,
  .vc-head::after,
  .vc-live i,
  #btn-buscar::after { animation: none; }
}
