:root{
  --nm-bg: #6a72a8;
  --nm-accent: #7a2b6f;
  --nm-teal: #21b7b6;
  --nm-radius: 28px;
  --nm-shadow: 0 24px 70px rgba(0,0,0,.22);
}

/* Reveal */
.reveal{ opacity:0; transform: translateY(12px); transition: .6s ease; }
.reveal.is-in{ opacity:1; transform:none; }

/* Page */
.nm-team{
  background: var(--nm-bg);
  padding: 58px 0 78px;
}

.nm-team-wrap{
  max-width: 1200px;
}

.nm-team-head{
  text-align: center;
  margin-bottom: 34px;
}

.nm-team-title{
  margin: 0;
  font-size: clamp(44px, 6vw, 96px);
  line-height: .92;
  font-weight: 900;
  color: #fff;
  letter-spacing: -2px;
  text-shadow: 0 18px 50px rgba(0,0,0,.25);
}

.nm-team-quote{
  margin: 14px auto 0;
  max-width: 860px;
  color: rgba(255,255,255,.9);
  line-height: 1.6;
  font-size: 16px;
}
.nm-team-quote span{
  display:block;
  margin-top: 6px;
  opacity: .85;
  font-weight: 800;
}

/* Grid */
.nm-team-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}

/* Card wrapper (flip on hover) */
.nm-card{
  position: relative;
  border-radius: var(--nm-radius);
  overflow: hidden;
  box-shadow: var(--nm-shadow);
  aspect-ratio: 1 / 1;          /* ✅ cuadradas como tu referencia */
  transform: translateZ(0);
}

/* Hover movement */
.nm-member:hover .nm-card{
  transform: translateY(-4px);
  transition: transform .18s ease;
}

/* Front / Back layers */
.nm-face,
.nm-back{
  position: absolute;
  inset: 0;
}

/* FRONT (foto) */
.nm-face{ z-index: 2; }

.nm-photo{
  width: 100%;
  height: 100%;
  display: block;
  filter: saturate(1.05) contrast(1.05);
}

.nm-overlay{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.68));
}

.nm-name{
  font-size: 38px;
  font-weight: 900;
  color: #fff;
  line-height: 1.03;
  text-shadow: 0 16px 44px rgba(0,0,0,.45);
}

.nm-role{
  margin-top: 10px;
  color: rgba(255,255,255,.88);
  font-weight: 800;
  letter-spacing: .02em;
}

/* BACK (teal info) */
.nm-back{
  z-index: 1;
  background: var(--nm-teal);
}

.nm-back-inner{
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  color: #fff;
  text-align: left;
}

.nm-back-name{
  margin: 0;
  font-size: 42px;
  font-weight: 1000;
  line-height: .95;
  letter-spacing: -1px;
}

.nm-back-role{
  margin-top: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: 13px;
}

.nm-back-desc{
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255,255,255,.92);
  max-width: 92%;
}

.nm-back-links{
  margin-top: 14px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.nm-back-links a{
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  border-bottom: 2px solid rgba(255,255,255,.35);
  padding-bottom: 2px;
}
.nm-back-links a:hover{
  border-bottom-color: rgba(255,255,255,.85);
}

/* watermark suave */
.nm-watermark{
  position: absolute;
  right: -38px;
  bottom: -38px;
  width: 78%;
  height: 78%;
  opacity: .16;
  filter: grayscale(100%) contrast(1.1);
  border-radius: 999px;
}

/* ✅ EFECTO: hover muestra back y oculta front */
.nm-face{
  opacity: 1;
  transform: translateY(0);
  transition: opacity .18s ease, transform .18s ease;
}
.nm-back{
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease;
}

.nm-member:hover .nm-face{
  opacity: 0;
  transform: translateY(-10px);
}
.nm-member:hover .nm-back{
  opacity: 1;
  transform: translateY(0);
}

/* Empty */
.nm-team-empty{
  grid-column: 1 / -1;
  color: #fff;
  opacity: .9;
  text-align: center;
  font-weight: 800;
}

/* Responsive */
@media (max-width: 980px){
  .nm-team-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nm-name{ font-size: 34px; }
  .nm-back-name{ font-size: 38px; }
}

@media (max-width: 640px){
  .nm-team{ padding: 42px 0 60px; }
  .nm-team-grid{ grid-template-columns: 1fr; }
  .nm-name{ font-size: 34px; }
  .nm-back-name{ font-size: 40px; }
}

/* =========================
   FIX DEFINITIVO: LINKS CLICKEABLES EN HOVER
   (sin romper el efecto)
========================= */

/* 1) El back es el fondo teal */
.nm-back{
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* 2) El contenido del back SIEMPRE arriba */
.nm-back-inner{
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  pointer-events: auto;
}

/* 3) El watermark y cualquier overlay NO deben capturar clic */
.nm-watermark{
  pointer-events: none !important;
  z-index: 2;
}

/* Si usas gradientes/pseudo-elementos en el back, tampoco bloqueen */
.nm-back::before,
.nm-back::after,
.nm-face::before,
.nm-face::after{
  pointer-events: none !important;
}

/* 4) Links arriba de todo y clickeables */
.nm-back-links{
  position: relative;
  z-index: 60;
  pointer-events: auto;
}

.nm-back-links a{
  position: relative;
  z-index: 70;
  pointer-events: auto !important;
}

/* 5) Asegura que el front no quede por encima cuando está oculto */
.nm-face{
  z-index: 5;
}
.nm-member:hover .nm-face{
  pointer-events: none; /* cuando está “apagado”, que no bloquee el click */
}

