/* Contenedor de anuncios */

.ads-container {
  display: flex;
  /* Cambia a flex para centrar el contenido */
  justify-content: center;
  align-items: center;
  margin: 1rem auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
  max-width: 500px;
  /* Ajusta según tu diseño */
}

/* Imagen dentro del contenedor */
.ads-container img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 5px;
  margin: 0 auto;
}

/* Responsividad: la imagen nunca será más grande que el viewport */
@media (max-width: 768px) {
  .ads-container img {
    max-width: 100vw;
  }
}

/* Estilos para el modal de favoritos */
.favorite-modal {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 50vw;
  max-width: 50vw;
  min-width: 320px;
  background: var(--white);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
  border-radius: 18px 18px 0 0;
  z-index: 1000;
  transition: transform 0.35s cubic-bezier(.4, 0, .2, 1);
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Estado minimizado: solo muestra la cabecera */
.favorite-modal.minimized {
  transform: translate(-50%, 90%);
  height: 4.2rem;
  /* Solo la cabecera visible */
  overflow: hidden;
}

/* Estado expandido: muestra todo */
.favorite-modal.expanded {
  transform: translate(-50%, 0);
  height: auto;
}

.favorite-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem 0.5rem 1.5rem;
  border-bottom: 1px solid var(--gray-light);
  background: var(--white);
  cursor: pointer;
}

.favorite-modal-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.favorite-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray);
  cursor: pointer;
  transition: color 0.2s;
}

.favorite-modal-close:hover {
  color: var(--danger);
}

.favorite-routes-list {
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 45vh;
  overflow-y: auto;
  width: 100%;
  box-sizing: border-box;
}

/* Responsive */
@media (max-width: 600px) {
  .favorite-modal {
    width: 100vw;
    max-width: 100vw;
    left: 0;
    min-width: 0;
    border-radius: 18px 18px 0 0;
  }
}

/* Estilos para el carrusel de anuncios */
.ads-carousel {
  position: relative;
  width: 100%;
  max-width: 400px;
  overflow: hidden;
}

.ads-carousel img {
  width: 100%;
  display: block;
  border-radius: 10px;
}

.ads-carousel .carousel-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
}

.ads-carousel button {
  background: rgba(0, 0, 0, 0.3);
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 0 0.5rem;
  border-radius: 50%;
}

.ads-carousel-img {
  display: block;
  width: 100%;
  max-width: 400px;
  transition: transform 0.5s cubic-bezier(.77, 0, .18, 1);
  will-change: transform;
}

.ads-carousel-img.slide-left {
  transform: translateX(-100%);
}

.ads-carousel-img.slide-right {
  transform: translateX(100%);
}

.ads-carousel-img.slide-in {
  transform: translateX(0);
}

/* Estilos para el slider de anuncios */
.ads-slider {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.ads-slider-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(.77, 0, .18, 1);
  will-change: transform;
}

.ads-slider-track a {
  flex: 0 0 100%;
}

.ads-slider-track img {
  width: 100%;
  max-width: 400px;
  display: block;
}