/* ================================================
   ENTRECOLEGAS — SLOTS DE ANUNCIOS (Solo placements)
   =================================================
   ✅ SOLO AFECTA: [data-zona="ec_*"]
   ✅ NO AFECTA: ningún otro elemento de la página
   ================================================= */


/* Wrapper único para cada slot de anuncio */
.ec-remuneracion-slot {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}


/* Card de anuncio individual */
.ec-remuneracion {
  position: relative;
  background: var(--white, #ffffff);
  border: 1px solid rgba(209, 213, 219, 0.88);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  /* ✅ Separación entre cards */
  margin-bottom: 1rem;
}


.ec-remuneracion:last-child {
  margin-bottom: 0;
}


.ec-remuneracion:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  border-color: rgba(231, 166, 65, 0.32);
}


.ec-remuneracion__img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  display: block;
  background: #f3f4f6;
}


.ec-remuneracion__contenido {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem;
}


.ec-remuneracion__aviso {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.06);
  color: #4b5563;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}


.ec-remuneracion__etiqueta {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.26rem 0.58rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #e7a641 0%, #c9861a 100%);
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(231, 166, 65, 0.25);
}


.ec-remuneracion__titulo {
  margin: 0;
  color: #111827;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.28;
}


.ec-remuneracion__subtitulo {
  margin: 0;
  color: #4b5563;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
}


.ec-remuneracion__cuerpo {
  margin: 0;
  color: #6b7280;
  font-size: 0.8rem;
  line-height: 1.5;
}


.ec-remuneracion__patrocinador {
  margin: 0;
  color: #9ca3af;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
}


.ec-remuneracion__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 44px;
  margin-top: 0.5rem;
  padding: 0.68rem 0.95rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}


.ec-remuneracion__btn:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}


.ec-remuneracion__btn i {
  font-size: 0.72rem;
  line-height: 1;
  position: relative;
  top: 1px;
  transition: transform 0.2s ease;
}


.ec-remuneracion__btn:hover i {
  transform: translateX(3px);
}


/* Skeleton (loading) */
.ec-remuneracion-skeleton {
  background: var(--white, #ffffff);
  border: 1px solid rgba(209, 213, 219, 0.88);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}


.ec-remuneracion-skeleton__img,
.ec-remuneracion-skeleton__line,
.ec-remuneracion-skeleton__btn {
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
  background-size: 200% 100%;
  animation: ecRemuneracionSkeleton 1.5s infinite;
  border-radius: 12px;
}


.ec-remuneracion-skeleton__img {
  height: 110px;
  margin: 0;
  border-radius: 0;
}


.ec-remuneracion-skeleton__line {
  height: 14px;
  margin: 1rem 1rem 0;
}


.ec-remuneracion-skeleton__line--short {
  width: 60%;
  margin-bottom: 0.75rem;
}


.ec-remuneracion-skeleton__btn {
  height: 42px;
  margin: 1rem;
  border-radius: 999px;
}


@keyframes ecRemuneracionSkeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ─────────────────────────────
   Mobile (solo 1 slot)
   ───────────────────────────── */


@media (max-width: 1023px) {
  [data-zona*="_mob_"] .ec-remuneracion {
    border-radius: 18px;
  }


  [data-zona*="_mob_"] .ec-remuneracion__img {
    height: 108px;
  }


  [data-zona*="_mob_"] .ec-remuneracion__contenido {
    padding: 0.875rem;
  }


  [data-zona*="_mob_"] .ec-remuneracion__titulo {
    font-size: 0.95rem;
  }


  [data-zona*="_mob_"] .ec-remuneracion__subtitulo {
    font-size: 0.84rem;
  }


  [data-zona*="_mob_"] .ec-remuneracion__cuerpo {
    font-size: 0.78rem;
  }


  [data-zona*="_mob_"] .ec-remuneracion__btn {
    min-height: 42px;
    padding: 0.62rem 0.9rem;
    font-size: 0.82rem;
  }
}


/* ─────────────────────────────
   Desktop (sidebar flotante solo para ec_niv_sim_des_*)
   ───────────────────────────── */


@media (min-width: 1024px) {
  /* ✅ SOLO para el sidebar de simulacros (no afecta otras páginas) */
  .ec-remuneracion-sidebar[data-zona*="niv_sim_des"] {
    position: relative;
    width: 100%;
  }


  .ec-remuneracion-sidebar.is-fixed {
    position: fixed;
    top: 118px;
    right: 20px;
    width: 320px;
    z-index: 100;
  }


  .ec-remuneracion-sidebar.is-fixed .ec-remuneracion-slot {
    position: static;
    width: 320px;
    gap: 1rem;
  }


  .ec-remuneracion-sidebar.is-bottom .ec-remuneracion-slot {
    position: static;
    width: 100%;
  }
}


/* ─────────────────────────────
   Reducción de movimiento
   ───────────────────────────── */


@media (prefers-reduced-motion: reduce) {
  .ec-remuneracion,
  .ec-remuneracion__btn,
  .ec-remuneracion-skeleton__img,
  .ec-remuneracion-skeleton__line,
  .ec-remuneracion-skeleton__btn {
    transition: none !important;
    animation: none !important;
  }
}

/* ─── Sidebar wrapper: separar los slots entre sí ─── */
.ec-remuneracion-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

/* Quitar !important del height automático — se controla solo desde JS */
@media (min-width: 1024px) {
  .ec-remuneracion-sidebar[data-zona*="niv_sim_des"],
  .ec-remuneracion-sidebar {
    position: relative;
    width: 100%;
  }

  .ec-remuneracion-sidebar.is-fixed {
    position: fixed;
    top: 118px;
    z-index: 100;
    /* width y left los pone JS — NO hardcodear aquí */
  }

  .ec-remuneracion-sidebar.is-fixed .ec-remuneracion-slot {
    width: 100%; /* hereda el width del sidebar fixed */
  }

  .ec-remuneracion-sidebar.is-bottom .ec-remuneracion-slot {
    width: 100%;
  }
}

/* ─── Mobile slot: separación con el contenido siguiente ─── */
@media (max-width: 1023px) {
  .ec-remuneracion-mobile {
    margin-bottom: 1.25rem; /* ✅ separa la tarjeta del div que viene abajo */
  }
}

/* ─────────────────────────────
   Countdown / cronómetro
   ───────────────────────────── */

.ec-remuneracion__countdown {
  margin-top: 0.35rem;
  margin-bottom: 0.35rem;
  padding: 0.85rem 0.9rem 0.95rem;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.03) 100%);
  border: 1px solid rgba(59, 130, 246, 0.14);
}

.ec-remuneracion__countdown-label {
  margin: 0 0 0.7rem;
  color: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.ec-remuneracion__countdown-grid {
  display: grid;
  grid-template-columns: minmax(54px, 1fr) auto minmax(54px, 1fr) auto minmax(54px, 1fr) auto minmax(54px, 1fr);
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.ec-remuneracion__countdown-box {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  padding: 0.6rem 0.3rem 0.5rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #4da2e8 0%, #2f7fc4 100%);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(47, 127, 196, 0.18);
}

.ec-remuneracion__countdown-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.ec-remuneracion__countdown-text {
  display: block;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.05em;
  opacity: 0.96;
}

.ec-remuneracion__countdown-sep {
  align-self: center;
  color: #3b82f6;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-2px);
}

.ec-remuneracion__countdown-expired {
  text-align: center;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.06);
  color: #374151;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.ec-remuneracion[data-countdown-enabled="1"] .ec-remuneracion__btn {
  margin-top: 0.65rem;
}

/* ─────────────────────────────
   Countdown en mobile
   ───────────────────────────── */

@media (max-width: 1023px) {
  [data-zona*="_mob_"] .ec-remuneracion__countdown {
    padding: 0.8rem 0.7rem 0.85rem;
    border-radius: 16px;
  }

  [data-zona*="_mob_"] .ec-remuneracion__countdown-label {
    font-size: 0.76rem;
    margin-bottom: 0.62rem;
  }

  [data-zona*="_mob_"] .ec-remuneracion__countdown-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.42rem;
  }

  [data-zona*="_mob_"] .ec-remuneracion__countdown-sep {
    display: none;
  }

  [data-zona*="_mob_"] .ec-remuneracion__countdown-box {
    padding: 0.55rem 0.2rem 0.45rem;
    border-radius: 11px;
  }

  [data-zona*="_mob_"] .ec-remuneracion__countdown-num {
    font-size: 1.28rem;
  }

  [data-zona*="_mob_"] .ec-remuneracion__countdown-text {
    font-size: 0.54rem;
  }

  [data-zona*="_mob_"] .ec-remuneracion__countdown-expired {
    font-size: 0.78rem;
    padding: 0.68rem 0.75rem;
  }
}

/* ─────────────────────────────
   Countdown en desktop angosto
   ───────────────────────────── */

@media (min-width: 1024px) and (max-width: 1240px) {
  .ec-remuneracion__countdown-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .ec-remuneracion__countdown-sep {
    display: none;
  }
}

/* ─────────────────────────────
   Reduced motion
   ───────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .ec-remuneracion__countdown-box,
  .ec-remuneracion__countdown-sep {
    transition: none !important;
    animation: none !important;
  }
}