/**
 * Nexus Events Slider — CSS v2.3
 * FIX: Eliminado clip-path (rompe preserve-3d).
 * Posición absoluta explícita con top/left/width/height.
 * Sin overflow:hidden en las caras.
 */

/* ── Wrapper ─────────────────────────────────────────── */
.nev-wrapper {
  position: relative;
  width: 100%;
  --nev-gap: 24px;
  --nev-spv: 3;
}

/* ── Track ───────────────────────────────────────────── */
.nev-track-wrap { overflow: hidden; width: 100%; }

.nev-track {
  display: flex;
  gap: var(--nev-gap);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  align-items: stretch;
}

/* ── Slide ───────────────────────────────────────────── */
.nev-slide {
  /* Width set in px by JavaScript (offsetWidth based — fills container correctly) */
  flex: 0 0 auto;
  min-width: 0;
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════
   FLIP CARD — patrón probado y funcional
   ═══════════════════════════════════════════════════════ */

/* 1. Contenedor: perspectiva + tamaño EXPLÍCITO */
.nev-card {
  position: relative;          /* necesario para que los hijos absolute funcionen */
  width: 100%;
  height: 280px;
  border-radius: 12px;
  perspective: 1200px;
  box-sizing: border-box;
  cursor: pointer;
  /* SIN overflow:hidden — permitir visibilidad del reverso */
}

/* 2. Inner: el que rota */
.nev-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;               /* hereda 380px del .nev-card */
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform 0.7s ease;
}

/* 3. Giro al hover */
.nev-card:hover .nev-flip-inner {
  transform: rotateY(180deg);
}

/* 4. REGLAS BASE de las dos caras
      - position absolute + dimensiones EXPLÍCITAS (no % heredado solo)
      - SIN overflow:hidden (rompe backface-visibility)
      - SIN clip-path    (rompe preserve-3d)
      - border-radius directamente en cada cara
*/
.nev-card-front,
.nev-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-sizing: border-box;
}

/* 5. FRENTE — imagen de fondo */
.nev-card-front {
  background-color: #1A3F7A;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  /* sin transform — la cara delantera empieza en posición 0 */
}

/* Gradiente oscuro suave sobre la imagen del frente */
.nev-card-front::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.55));
  pointer-events: none;
  border-radius: 0 0 12px 12px;
}

/* Título mini en la parte baja del frente */
.nev-front-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 18px 18px;
  z-index: 2;
}

.nev-front-title {
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.3;
  font-family: sans-serif;
  text-shadow: 0 1px 6px rgba(0,0,0,.6);
}

/* 6. REVERSO — empieza girado 180deg */
.nev-card-back {
  transform: rotateY(180deg);   /* CLAVE: empieza girado para quedar oculto */
  background: rgba(13, 39, 84, 0.97);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 22px;
  gap: 10px;
  overflow: hidden;             /* aquí sí podemos usar overflow porque no hay 3D anidado */
}

/* ═══════════════════════════════════════════════════════
   BADGE
   ═══════════════════════════════════════════════════════ */
.nev-badge {
  position: absolute;
  top: 12px;
  z-index: 20;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: #D9581A;
  color: #fff;
  padding: 3px 11px;
  border-radius: 20px;
  white-space: nowrap;
  font-family: sans-serif;
}
.nev-badge--right { right: 12px; }
.nev-badge--left  { left:  12px; }

/* ═══════════════════════════════════════════════════════
   TEXTOS DEL REVERSO
   ═══════════════════════════════════════════════════════ */
.nev-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.35;
  font-family: sans-serif;
}

.nev-text {
  font-size: .8rem;
  color: rgba(255,255,255,.80);
  margin: 0;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: sans-serif;
}

/* ═══════════════════════════════════════════════════════
   META ROWS — iconos SVG + texto
   ═══════════════════════════════════════════════════════ */
.nev-meta-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 2px 0;
}

.nev-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.75);
  font-size: .8rem;
  font-family: sans-serif;
  line-height: 1.3;
}

/* Iconos SVG tamaño fijo */
svg.nev-meta-icon {
  width: 15px !important;
  height: 15px !important;
  min-width: 15px;
  max-width: 15px;
  min-height: 15px;
  max-height: 15px;
  fill: #D9581A;
  flex-shrink: 0;
  display: inline-block;
}

/* ═══════════════════════════════════════════════════════
   BOTÓN READ MORE
   ═══════════════════════════════════════════════════════ */
.nev-btn {
  display: inline-flex;
  align-items: center;
  padding: 9px 22px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none !important;
  border-radius: 50px;
  border: 2px solid;
  cursor: pointer;
  transition: all .22s ease;
  font-family: sans-serif;
  white-space: nowrap;
  margin-top: 6px;
  align-self: flex-start;
}
.nev-btn--outline { background: transparent; color: #fff; border-color: #fff; }
.nev-btn--outline:hover { background: #fff; color: #000; }
.nev-btn--solid   { background: #fff; color: #000; border-color: #fff; }
.nev-btn--solid:hover { opacity: .85; }
.nev-btn--ghost   {
  background: transparent; color: #fff;
  border-color: transparent;
  text-decoration: underline !important;
  padding-left: 0; padding-right: 0;
}

/* ═══════════════════════════════════════════════════════
   MODO SIN FLIP (overlay clásico, flip=no)
   ═══════════════════════════════════════════════════════ */
.nev-card-nf {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  overflow: hidden;
  background-color: #1A3F7A;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

.nev-card-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 12px 16px 16px;
  background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 5;
  transition: opacity .3s;
  box-sizing: border-box;
}
.nev-card-nf:hover .nev-card-bottom { opacity: 0; pointer-events: none; }

.nev-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 20px;
  gap: 10px;
  opacity: 0;
  transition: opacity .3s;
  z-index: 6;
  box-sizing: border-box;
}
.nev-card-nf:hover .nev-overlay { opacity: 1; }

/* ═══════════════════════════════════════════════════════
   FLECHAS
   ═══════════════════════════════════════════════════════ */
.nev-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
  transition: background .2s, transform .2s, box-shadow .2s;
  padding: 0;
}
.nev-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.nev-arrow svg { width: 22px !important; height: 22px !important; fill: #333; display: block; }
.nev-arrow-prev { left: -16px; }
.nev-arrow-next { right: -16px; }
.nev-arrow.nev-disabled { opacity: .3; pointer-events: none; }

/* ═══════════════════════════════════════════════════════
   DOTS
   ═══════════════════════════════════════════════════════ */
.nev-dots { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
.nev-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(0,0,0,.25); border: none; cursor: pointer; padding: 0; transition: background .2s, transform .2s; }
.nev-dot.active { background: #333; transform: scale(1.35); }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nev-arrow { width: 36px; height: 36px; }
  .nev-arrow svg { width: 18px !important; height: 18px !important; }
  .nev-arrow-prev { left: 2px; }
  .nev-arrow-next { right: 2px; }
}

/* ═══════════════════════════════════════════════════════
   ELEMENTOR EDITOR — mostrar reverso para editar
   ═══════════════════════════════════════════════════════ */
.elementor-editor-active .nev-flip-inner {
  transform: rotateY(180deg) !important;
}
