/* Estilos para el banner publicitario */
.ads-container {
  position: fixed;
  z-index: 1500;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  background-color: #f8f8f8;
  overflow: hidden;
}

/* Panel lateral para PC */
@media screen and (min-width: 769px) {
  .ads-container {
    top: 80px;
    right: 0;
    width: 200px;
    height: calc(100vh - 100px);
    border-radius: 8px 0 0 8px;
  }
}

/* Banner horizontal para móviles y tablets */
@media screen and (max-width: 768px) {
  .ads-container {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    border-radius: 8px 8px 0 0;
  }
}

.ads-slide {
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
}

.ads-slide.active {
  display: flex;
}

.ads-slide img {
  max-width: 100%;
  max-height: 70%;
  object-fit: contain;
}

.ads-slide p {
  margin-top: 10px;
  font-weight: bold;
  color: #333;
}

.ads-title {
  background-color: #2196f3;
  color: white;
  padding: 5px;
  text-align: center;
  font-weight: bold;
  width: 100%;
}

.ads-close {
  position: absolute;
  top: 5px;
  right: 5px;
  cursor: pointer;
  font-size: 18px;
  color: #666;
  z-index: 1600;
}

.ads-close:hover {
  color: #f44336;
}

/* Reglas para mostrar imágenes diferentes según el dispositivo */
@media screen and (min-width: 769px) {
  .ad-img-desktop { display: block; }
  .ad-img-mobile { display: none; }
}

@media screen and (max-width: 768px) {
  /* Layout móvil: imagen a un lado y texto al otro */
  .ads-slide {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 10px;
  }

  .ad-img-desktop { display: none; }
  .ad-img-mobile {
    display: block;
    width: 40%;
    max-height: 80px;
    object-fit: contain;
  }

  .ads-slide p {
    margin: 0;
    font-size: 14px;
    color: #333;
    flex: 1;
  }
}