/* ============================================================================
 *  NauibGallery — estilos del carrusel público (figure.nb-gallery hidratada).
 *  Autoplay + flechas + contador + miniaturas. Self-hosted, sin dependencias.
 * ========================================================================== */

/* Imágenes sueltas insertadas desde el editor: que no desborden en móvil
   (en la web de escritorio ya lo cubre .pub-body/.evt-body img en style.css). */
.m-body img { max-width: 100%; height: auto; }

/* Fallback sin JS: la figura muestra las imágenes apiladas (siguen visibles). */
figure.nb-gallery { margin: 1rem 0; }
figure.nb-gallery img { max-width: 100%; height: auto; border-radius: .5rem; display: block; margin: 0 0 .5rem; }

.nbc {
  margin: 1.25rem 0;
}

.nbc-stage {
  position: relative;
  background: #0b0b0b;
  border-radius: .5rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.nbc-slides {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nbc-slide {
  display: none;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  margin: 0;
}
.nbc-slide.is-active {
  display: block;
  animation: nbcFade .4s ease;
}
@keyframes nbcFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.nbc-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  z-index: 2;
}
.nbc-arrow:hover { background: rgba(0, 0, 0, .75); }
.nbc-prev { left: 10px; }
.nbc-next { right: 10px; }

.nbc-counter {
  position: absolute;
  bottom: 10px;
  right: 12px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: .78rem;
  padding: 2px 9px;
  border-radius: 999px;
  z-index: 2;
}

.nbc-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 2px 4px;
  scrollbar-width: thin;
}
.nbc-thumb {
  flex: 0 0 auto;
  width: 74px;
  height: 56px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: .375rem;
  overflow: hidden;
  cursor: pointer;
  background: #e9ecef;
  opacity: .65;
  transition: opacity .15s, border-color .15s;
}
.nbc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nbc-thumb:hover { opacity: 1; }
.nbc-thumb.is-active { opacity: 1; border-color: #dc3545; }

@media (max-width: 575px) {
  .nbc-stage { min-height: 160px; }
  .nbc-arrow { width: 36px; height: 36px; font-size: 1.3rem; }
  .nbc-thumb { width: 60px; height: 46px; }
}
