/* ================================================
   AMMORIA SLIDER v2 — CSS
   Variables en :root para mantenimiento rápido
   ================================================ */

:root {
  --amm-h-desktop: 450px;
  --amm-h-mobile: 280px;
  --amm-accent: #ff2d6b;
  --amm-accent2: #ff8c00;
  --amm-duration: 600ms;
  --amm-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --amm-autoplay: 3000ms;
}

/* Wrapper principal */
.amm-wrap {
  position: relative;
  width: 100%;
  height: var(--amm-h-desktop);
  overflow: hidden;
  background: #0a0a0a;
  font-family: inherit;
  border-radius: 25px;
}

/* Pista */
.amm-track {
  display: flex;
  height: 100%;
  transition: transform var(--amm-duration) var(--amm-ease);
  will-change: transform;
}

/* Cada slide */
.amm-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* ── VISIBILIDAD POR TIPO DE MEDIA ──
   Desktop: solo horizontales visibles
   Móvil:   solo verticales visibles
   Los slides ocultos se colapsan a width:0
   para que no ocupen espacio en el track ── */

/* Desktop: ocultar verticales */
@media (min-width: 768px) {
  .amm-slide[data-media="vertical"] {
    display: none;
    flex: 0 0 0;
    width: 0;
    overflow: hidden;
  }
}

/* Móvil: ocultar horizontales */
@media (max-width: 767px) {
  .amm-slide[data-media="horizontal"] {
    display: none;
    flex: 0 0 0;
    width: 0;
    overflow: hidden;
  }
}

/* Media — imagen y video */
.amm-slide img,
.amm-slide video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Posición de objeto según orientación */
.amm-slide[data-media="vertical"] img,
.amm-slide[data-media="vertical"] video {
  object-position: center top;
}

.amm-slide[data-media="horizontal"] img,
.amm-slide[data-media="horizontal"] video {
  object-position: center center;
}

/* Overlay degradado centrado */
.amm-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 70%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  z-index: 2;
}

/* Texto centrado con animación de entrada */
.amm-text {
  max-width: 580px;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.6s 0.15s var(--amm-ease), opacity 0.6s 0.15s var(--amm-ease);
}

.amm-slide.is-active .amm-text {
  transform: translateY(0);
  opacity: 1;
}

/* Badge de categoría */
.amm-tag {
  display: inline-block;
  background: linear-gradient(90deg, var(--amm-accent), var(--amm-accent2));
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 100px;
  margin: 0 0 12px;
}

/* Título principal */
.amm-title {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 10px;
  line-height: 1.15;
  text-shadow: 0 2px 20px rgba(0,0,0,0.6);
  letter-spacing: -0.01em;
}

.amm-title em {
  font-style: italic;
  background: linear-gradient(90deg, var(--amm-accent), var(--amm-accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Texto descriptivo */
.amm-body {
  font-size: clamp(0.78rem, 1.8vw, 0.92rem);
  color: rgba(255,255,255,0.88);
  margin: 0;
  line-height: 1.6;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
  max-width: 460px;
  margin-inline: auto;
}

/* ── FLECHAS ── */
.amm-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.3);
  color: #fff;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  padding: 0;
}

.amm-arrow:hover {
  background: rgba(255,45,107,0.7);
  border-color: transparent;
  transform: translateY(-50%) scale(1.08);
}

.amm-arrow--prev { left: 16px; }
.amm-arrow--next { right: 16px; }

/* ── DOTS ── */
.amm-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.amm-dot {
  width: 6px;
  height: 6px;
  border-radius: 100px;
  background: rgba(255,255,255,0.4);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s, width 0.3s;
}

.amm-dot.is-active {
  background: linear-gradient(90deg, var(--amm-accent), var(--amm-accent2));
  width: 24px;
}

/* ── BARRA DE PROGRESO ── */
.amm-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--amm-accent), var(--amm-accent2));
  width: 0%;
  z-index: 10;
  transition: width linear;
}

/* ── ACCESIBILIDAD ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── RESPONSIVE MÓVIL ── */
@media (max-width: 767px) {
  .amm-wrap {
    height: var(--amm-h-mobile);
  }

  .amm-overlay {
    padding: 16px;
    align-items: flex-end;
    padding-bottom: 36px;
    background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.2) 55%, transparent 100%);
  }

  .amm-text {
    text-align: left;
  }

  .amm-arrow {
    width: 34px;
    height: 34px;
  }

  .amm-arrow--prev { left: 10px; }
  .amm-arrow--next { right: 10px; }

  .amm-body {
    display: none;
  }
}