/* ===============================================================
   css/carrusel_avisos_m1000.css
   Carrusel autocontenido (MIDO 1000 días)
   - NO toca section, NO usa globales
   - Se adapta al ancho/alto del contenedor padre
   - Imagen SIEMPRE visible completa (contain), sin desbordes
=============================================================== */

.m1000-avisos,
.m1000-avisos * ,
.m1000-avisos *::before,
.m1000-avisos *::after {
  box-sizing: border-box;
}

.m1000-avisos{
  width: 100%;
  height: 100%;
  position: relative;
  margin: 0;
  padding: 0;
}

/* Viewport visible */
.m1000-avisos__viewport{
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden; /* importante */
  margin: 0;
  padding: 0;
}

/* Track deslizante */
.m1000-avisos__track{
  display: flex;
  width: 100%;
  height: 100%;
  transform: translateX(0%);
  transition: transform .6s ease;
}

/* Slide ocupa todo el alto y centra contenido */
.m1000-avisos__slide{
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;

  /* evita que la imagen toque bordes */
  padding: 1rem;

  /* si hay fondos raros en la imagen, esto evita “saltos” */
  background: #fff;
}

/* Botón slide ocupa todo */
.m1000-avisos__slideBtn{
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===========================================================
   IMAGEN (REGLA CLAVE)
   - Nunca se recorta
   - Nunca se desborda
   - Se agranda lo más posible sin salirse
   - Mantiene proporción original
   - Se centra
=========================================================== */
.m1000-avisos__img{
  display: block;

  /* Crece lo más posible SIN salirse */
  max-width: 100%;
  max-height: 100%;

  /* Conserva proporción */
  width: auto;
  height: auto;

  object-fit: contain;
  object-position: center;

  /* Quita selecciones raras */
  user-select: none;

  /* Suaviza cuando hay cambios */
  transition: transform .2s ease, opacity .2s ease;
}

/* En pantallas donde el contenedor es MUY alto,
   limita para mantener “sensación 16:9” sin recortar:
   (la imagen no se estira; solo capamos la altura útil) */
.m1000-avisos__slideBtn{
  /* máximo alto visible equivalente a 16:9 según el ancho */
  max-height: calc((100vw) * 9 / 16);
}


/* Animación “loop” cuando solo hay 1 elemento */
.m1000-avisos__img.is-pulse{
  animation: m1000AvisosPulse .6s ease;
}

@keyframes m1000AvisosPulse{
  from{ opacity: .85; transform: scale(0.995); }
  to  { opacity: 1;   transform: scale(1); }
}

/* Flechas */
.m1000-avisos__nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(2.4rem, 4.4vw, 3rem);
  height: clamp(2.4rem, 4.4vw, 3rem);
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, .4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
}

.m1000-avisos__nav--prev{ left: .6rem; }
.m1000-avisos__nav--next{ right: .6rem; }

.m1000-avisos__nav:hover{
  background: rgba(0, 0, 0, .6);
}

/* Indicadores centrados */
.m1000-avisos__indicators{
  position: absolute;
  bottom: .6rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  display: flex;
  justify-content: center;
  gap: .6rem;
  z-index: 6;
}

.m1000-avisos__dot{
  width: .8rem;
  height: .8rem;
  border-radius: 50%;
  background: #00a99d;
  opacity: .35;
  cursor: pointer;
  transition: opacity .3s ease;
}

.m1000-avisos__dot.is-active{
  opacity: 1;
}

/* Fallback */
.m1000-avisos__fallback{
  width: 100%;
  height: auto;
  padding: 1.2rem 1rem;
  background: #fff;
  border: .125rem dashed rgba(0,0,0,.25);
  border-radius: .6rem;
  color: #222;
  text-align: center;
}

.m1000-avisos__fallback p{
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.m1000-avisos__fallback a{
  font-weight: 700;
  text-decoration: underline;
  color: inherit;
}
