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

.cert { background: #05080E; padding: 70px 0 90px; }
.cert__label { display: block; font-weight: 600; font-size: 14px; color: var(--accent); margin-bottom: 30px; }
.cert__row { display: flex; align-items: flex-start; gap: 50px; }
/* ===== Visor del diploma: alterna folder cerrado/abierto y clic muestra el diploma ===== */
.cert-viewer {
  flex: 1 1 45%;
  min-width: 0;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(243, 162, 8, .08), transparent 60%),
    linear-gradient(160deg, #1a1408 0%, #05080e 70%);
  border: 1px solid rgba(243, 162, 8, .16);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .42);
  animation: certViewerInvite 4s ease-in-out infinite;
  transition: box-shadow .35s ease, border-color .35s ease, transform .35s ease;
  aspect-ratio: 968 / 938;
}
.cert-viewer:hover { transform: translateY(-3px); box-shadow: 0 26px 64px rgba(0, 0, 0, .55), 0 0 40px rgba(243, 162, 8, .12); border-color: rgba(243, 162, 8, .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(1.035);
  will-change: opacity, transform;
}
.cert-viewer__img--closed { animation: certClosedCycle 4s ease-in-out infinite; }
.cert-viewer__img--open { animation: certOpenCycle 4s ease-in-out infinite; }
.cert-viewer__img--diploma { transform: scale(.965) translateY(12px); filter: saturate(.95) brightness(.92); }
/* superficie clickeable: abre el diploma en grande */
.cert-viewer__surface { position: absolute; inset: 0; z-index: 3; border: 0; padding: 0; background: transparent; cursor: pointer; }
.cert-viewer:focus-within { outline: none; }
.cert-viewer__surface:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 16px; }
/* hint flotante abajo */
.cert-viewer__hint {
  position: absolute; left: 50%; bottom: 16px; z-index: 4;
  transform: translateX(-50%);
  padding: 9px 20px; border-radius: 100px;
  background: rgba(20, 15, 5, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid rgba(243, 162, 8, .28);
  color: #eaf2ff; font-family: var(--font-sora); font-weight: 600; font-size: 13.5px; white-space: nowrap;
  pointer-events: none;
  animation: certHintPulse 2s ease-in-out infinite;
  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) .cert-viewer__hint-rest { display: inline; }
.cert-viewer:hover .cert-viewer__hint-open { display: inline; }
/* controles heredados ocultos: el click del recuadro abre directamente el modal */
.cert-viewer__zoom, .cert-viewer__reset {
  display: none;
  position: absolute; z-index: 5;
}
@media (prefers-reduced-motion: reduce) {
  .cert-viewer, .cert-viewer__hint, .cert-viewer__img { animation: none; }
  .cert-viewer__img { transform: none !important; }
  .cert-viewer__img--closed { opacity: 1; }
}
.cert__panel { flex: 1 1 52%; background: #eef2f7; color: var(--ink); 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: #3a4a5c; }
.cert__title strong { font-weight: 800; font-size: 28px; color: var(--ink); }
.cert__text { font-family: var(--font-mont); font-size: 15px; line-height: 1.6; color: #1c2b3a; 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; flex-shrink: 0; display: block; }
.cert__feat-title { font-family: var(--font-sora); font-weight: 700; font-size: 15px; color: var(--ink); }
.cert__feat-desc { font-family: var(--font-mont); font-size: 13px; color: #3a4a5c; line-height: 1.45; margin-top: 3px; }
@media (min-width: 901px) {
  .cert__title strong {
    display: inline-block;
    margin-top: 6px;
  }
}
@media (max-width: 900px) {
  .cert__label { text-align: center; }
  .cert__row { flex-direction: column; align-items: center; gap: 30px; }
  .cert-viewer { width: min(100%, 520px); min-height: 340px; flex: 0 0 auto; }
  .cert__panel { width: min(100%, 560px); }
}
@media (max-width: 600px) {
  .cert__panel { padding: 28px 24px 30px; border-radius: 16px; }
  .cert__title { line-height: 1.18; margin-bottom: 14px; }
  .cert__title span { font-size: 22px; }
  .cert__title strong { font-size: 24px; }
  .cert__text { font-size: 15px; line-height: 1.55; margin-bottom: 24px; }
  .cert__feats { gap: 18px; }
  .cert__feat { gap: 14px; }
  .cert__feat-title { font-size: 13px; letter-spacing: 0; }
  .cert__feat-desc { font-size: 13.5px; line-height: 1.5; }
}
@keyframes certViewerInvite {
  0%, 100% {
    box-shadow: 0 18px 44px rgba(0, 0, 0, .42), 0 0 0 rgba(243, 162, 8, 0);
  }
  50% {
    box-shadow: 0 22px 58px rgba(0, 0, 0, .52), 0 0 30px rgba(243, 162, 8, .14);
  }
}
@keyframes certClosedCycle {
  0%, 43% {
    opacity: 1;
    transform: scale(1);
    filter: none;
  }
  50%, 93% {
    opacity: 0;
    transform: scale(1.045) translateY(-6px);
    filter: blur(.6px) brightness(.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: none;
  }
}
@keyframes certOpenCycle {
  0%, 43% {
    opacity: 0;
    transform: scale(.965) translateY(10px);
    filter: saturate(.92) brightness(.9);
  }
  50%, 93% {
    opacity: 1;
    transform: scale(1);
    filter: none;
  }
  100% {
    opacity: 0;
    transform: scale(.965) translateY(10px);
    filter: saturate(.92) brightness(.9);
  }
}
@keyframes certHintPulse {
  0%, 100% { transform: translateX(-50%) scale(1); border-color: rgba(243, 162, 8, .28); }
  50% { transform: translateX(-50%) scale(1.035); border-color: rgba(243, 162, 8, .62); }
}
