/* cert — generado por refactor modular (verbatim de styles.css) */

.cert { background: #05080e; padding: var(--sp) 0; }
.cert__label { display: block; font-family: var(--font-sora); font-weight: 600; font-size: 14px; color: var(--gold); margin-bottom: 28px; }
.cert__row { display: flex; align-items: stretch; gap: 50px; }
.cert__panel { flex: 1 1 52%; background: #eef3f2; color: #10231f; border-radius: 20px; padding: 40px; }
.cert__title { font-family: var(--font-sora); line-height: 1.15; margin-bottom: 16px; }
.cert__title span { font-weight: 500; font-size: 20px; color: #3a4759; }
.cert__title strong { font-weight: 800; font-size: 28px; color: #10231f; }
.cert__text { font-family: var(--font-mont); font-size: 15px; line-height: 1.6; color: #202d3a; margin-bottom: 26px; }
.cert__feats { display: flex; flex-direction: column; gap: 20px; }
.cert__feat { display: flex; gap: 16px; align-items: flex-start; }
.cert__feat-ic { width: 48px; height: 48px; border-radius: 8px; background: var(--gold); flex-shrink: 0; }
.cert__feat-title { font-family: var(--font-sora); font-weight: 700; font-size: 15px; color: #10231f; }
.cert__feat-desc { font-family: var(--font-mont); font-size: 13px; color: #3a4759; line-height: 1.45; margin-top: 3px; }
/* ===== Visor del diploma: 3 estados (cerrado · hover abre · clic muestra el diploma) ===== */
.cert-viewer {
  flex: 0 0 44%; min-width: 0; position: relative;
  border-radius: 20px; overflow: hidden; min-height: 440px; max-height: 520px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 200, 0, .08), transparent 60%),
    linear-gradient(160deg, #0b2247 0%, #05080e 70%);
  border: 1px solid rgba(255, 200, 0, .16);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .42);
  transition: box-shadow .35s ease, border-color .35s ease;
}
.cert-viewer:hover { box-shadow: 0 26px 64px rgba(0, 0, 0, .55), 0 0 40px rgba(255, 200, 0, .12); border-color: rgba(255, 200, 0, .30); }
.cert-viewer__stage { position: absolute; inset: 0; }
.cert-viewer__img {
  position: absolute; inset: 0; margin: auto;
  display: block; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(.985);
  transition: opacity .5s ease, transform .6s cubic-bezier(.22, 1, .36, 1);
  will-change: opacity, transform;
}
.cert-viewer__img--closed { opacity: 1; transform: scale(1); }
.cert-viewer:hover:not(.is-revealed) .cert-viewer__img--closed { opacity: 0; transform: scale(1.015); }
.cert-viewer:hover:not(.is-revealed) .cert-viewer__img--open { opacity: 1; transform: scale(1); }
.cert-viewer.is-revealed .cert-viewer__img--closed,
.cert-viewer.is-revealed .cert-viewer__img--open { opacity: 0; }
.cert-viewer.is-revealed .cert-viewer__img--diploma { opacity: 1; transform: scale(1); }

.cert-viewer__surface { position: absolute; inset: 0; z-index: 3; border: 0; padding: 0; background: transparent; cursor: pointer; }
.cert-viewer__surface:focus-visible { outline: 2px solid var(--gold); outline-offset: -4px; border-radius: 20px; }

.cert-viewer__hint {
  position: absolute; left: 50%; bottom: 16px; z-index: 4; transform: translateX(-50%);
  padding: 9px 20px; border-radius: 100px;
  background: rgba(5, 8, 14, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 200, 0, .28);
  color: #fff; font-family: var(--font-sora); font-weight: 600; font-size: 13.5px; white-space: nowrap;
  pointer-events: none; transition: opacity .3s ease, transform .3s ease;
}
.cert-viewer__hint-rest, .cert-viewer__hint-open, .cert-viewer__hint-revealed { display: none; }
.cert-viewer:not(:hover):not(.is-revealed) .cert-viewer__hint-rest { display: inline; }
.cert-viewer:hover:not(.is-revealed) .cert-viewer__hint-open { display: inline; }
.cert-viewer.is-revealed .cert-viewer__hint-revealed { display: inline; }

.cert-viewer__zoom, .cert-viewer__reset {
  position: absolute; z-index: 5; display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid rgba(255, 200, 0, .35);
  background: rgba(5, 8, 14, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--gold); cursor: pointer; font-family: var(--font-sora); font-weight: 600; font-size: 13px;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease, background .2s ease;
}
.cert-viewer__zoom { top: 14px; right: 14px; padding: 9px 16px; border-radius: 100px; }
.cert-viewer__reset { top: 14px; left: 14px; width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 50%; }
.cert-viewer__zoom svg, .cert-viewer__reset svg { width: 16px; height: 16px; }
.cert-viewer__zoom:hover, .cert-viewer__reset:hover { background: rgba(255, 200, 0, .18); }
.cert-viewer.is-revealed .cert-viewer__zoom,
.cert-viewer.is-revealed .cert-viewer__reset { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cert-viewer__zoom:focus-visible, .cert-viewer__reset:focus-visible { opacity: 1; transform: translateY(0); pointer-events: auto; outline: 2px solid var(--gold); outline-offset: 2px; }

@media (max-width: 900px) {
  .cert__row { flex-direction: column; gap: 30px; }
  .cert-viewer { flex: 1 1 auto; width: 100%; min-height: 340px; max-height: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cert-viewer__img { transition: opacity .25s ease; transform: none !important; }
}
@media (max-width: 600px) {
  .cert__title strong { font-size: 24px; }
  .cert__panel { padding: 28px 22px; }
}
