/* ============================================================
   Nolbert Slider — Frontend Styles
   Version: 1.0.3 | Author: Nolbert
   ============================================================ */

/* ── Wrapper base ─────────────────────────────────────────── */
.nolbert-slider-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #111;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  /* Evita salto de layout antes de que cargue JS */
  min-height: 80px;
}

/* ── Modo FIJO: altura exacta en todas las pantallas ─────── */
.nolbert-slider-wrapper.ns-fixed-mode {
  height: var(--ns-height, 600px);
}

/* ── Modo PROPORCIÓN: aspect-ratio en todas las pantallas ── */
/*    El slider se encoge con la pantalla sin recortar nada   */
.nolbert-slider-wrapper.ns-ratio-mode {
  height: auto;
  aspect-ratio: var(--ns-aspect-ratio, 16/9);
}

/* Fallback para navegadores sin aspect-ratio (IE, old Safari) */
@supports not (aspect-ratio: 1) {
  .nolbert-slider-wrapper.ns-ratio-mode {
    /* padding-bottom trick: 56.25% = 9/16 * 100 */
    height: 0;
    padding-bottom: calc(100% / (var(--ns-aspect-ratio, 16/9)));
  }
  .nolbert-slider-wrapper.ns-ratio-mode .nolbert-slider-track {
    position: absolute !important;
    inset: 0 !important;
  }
}

/* ── Modo fijo en desktop, proporción en tablet/móvil ───────
   (para sliders sin clase — herencia de versiones anteriores) */
.nolbert-slider-wrapper:not(.ns-ratio-mode):not(.ns-fixed-mode) {
  height: var(--ns-height, 600px);
}
@media (max-width: 1024px) {
  .nolbert-slider-wrapper:not(.ns-ratio-mode):not(.ns-fixed-mode) {
    height: auto;
    aspect-ratio: var(--ns-aspect-ratio, 16/9);
  }
}

/* ── Track ────────────────────────────────────────────────── */
.nolbert-slider-track {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ── Slides ───────────────────────────────────────────────── */
.nolbert-slide {
  position: absolute !important;
  top: 0 !important; left: 0 !important;
  right: 0 !important; bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0;
  transition: opacity var(--ns-fade, 800ms) ease-in-out;
  z-index: 1;
  display: block !important;
  visibility: visible !important;
}

/* ── Imagen ───────────────────────────────────────────────── */
.nolbert-slide-img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: var(--ns-object-fit, cover);
  /* object-position controla qué parte queda visible al recortar */
  object-position: var(--ns-object-position, center center);
}

.nolbert-slide-link {
  display: block;
  width: 100%;
  height: 100%;
}

/* ── Video ────────────────────────────────────────────────── */
.nolbert-video-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.nolbert-slide-iframe {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 177.78vh; min-width: 100%;
  height: 56.25vw; min-height: 100%;
  border: 0;
  pointer-events: none;
}

.nolbert-slide-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ── Overlay ──────────────────────────────────────────────── */
.nolbert-slide-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.45;
  pointer-events: none;
  z-index: 3;
}

/* ── Contenido ────────────────────────────────────────────── */
.nolbert-slide-content {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 48px;
  pointer-events: none;
}

.nolbert-slide-title {
  color: #fff;
  font-size: clamp(1.4rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 12px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.45);
}

.nolbert-slide-subtitle {
  color: rgba(255,255,255,0.9);
  font-size: clamp(0.85rem, 1.8vw, 1.3rem);
  margin: 0 0 20px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
  max-width: 680px;
}

.nolbert-slide-btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--ns-btn-bg, #fff);
  color: var(--ns-btn-color, #111);
  font-size: var(--ns-btn-font-size, 16px);
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  letter-spacing: 0.04em;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  pointer-events: auto;
}

.nolbert-slide-btn:hover {
  background: var(--ns-btn-bg-hover, #111);
  color: var(--ns-btn-color-hover, #fff);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════
   FLECHAS
   ═══════════════════════════════════════════════════════════ */
.nolbert-arrow {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 100 !important;
  width: var(--ns-arrow-size, 46px) !important;
  height: var(--ns-arrow-size, 46px) !important;
  background: var(--ns-arrow-bg, rgba(0,0,0,0.38)) !important;
  color: var(--ns-arrow-color, #fff) !important;
  border: none !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transition: background 0.2s, transform 0.2s, opacity 0.3s !important;
  outline: none !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}

.nolbert-arrow:hover {
  background: var(--ns-arrow-bg-hover, rgba(0,0,0,0.65)) !important;
}

.nolbert-arrow:active {
  transform: translateY(-50%) scale(0.92) !important;
}

.nolbert-arrow svg {
  width: calc(var(--ns-arrow-size, 46px) * 0.44) !important;
  height: calc(var(--ns-arrow-size, 46px) * 0.44) !important;
  display: block !important;
  pointer-events: none !important;
  fill: none !important;
  stroke: currentColor !important;
}

.nolbert-arrow-prev { left: 16px !important; }
.nolbert-arrow-next { right: 16px !important; }

/* Tipos de flecha */
.nolbert-arrows-arrow  .nolbert-arrow { border-radius: 4px !important; }
.nolbert-arrows-circle .nolbert-arrow { background: transparent !important; border: 2px solid var(--ns-arrow-color, #fff) !important; }
.nolbert-arrows-circle .nolbert-arrow:hover { background: var(--ns-arrow-color, #fff) !important; color: #000 !important; }
.nolbert-arrows-minimal .nolbert-arrow { background: transparent !important; box-shadow: none !important; }

/* ── Dots ─────────────────────────────────────────────────── */
.nolbert-dots {
  position: absolute;
  bottom: 14px; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}

.nolbert-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  border: none;
  cursor: pointer;
  padding: 0;
  pointer-events: auto;
  transition: background 0.3s, transform 0.3s;
}

.nolbert-dot.is-active { background: #fff; transform: scale(1.3); }
.nolbert-dot:hover:not(.is-active) { background: rgba(255,255,255,0.75); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .nolbert-slide-content { padding: 16px 24px; }

  .nolbert-arrow {
    width: 36px !important;
    height: 36px !important;
  }
  .nolbert-arrow-prev { left: 8px !important; }
  .nolbert-arrow-next { right: 8px !important; }

  .nolbert-dots { bottom: 8px; gap: 6px; }
  .nolbert-dot  { width: 8px; height: 8px; }

  .nolbert-slide-btn { padding: 10px 22px; font-size: 0.85rem; }
}
