/* ==============================
   CARRUSEL PRÓXIMOS ESTRENOS
   ============================== */
.titulo-upcoming {
  font-size: 2rem;
  margin: 0 0 20px 0;
  text-align: center;
  color: #DAAD5C;
  letter-spacing: 1px;
}

#upcoming-list {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 40px auto;
  border-radius: 15px;
  box-sizing: border-box;
  overflow: hidden;
}

.fila-upcoming {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  justify-content: center;
}

.upcoming-wrapper {
  width: 100%;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  scroll-snap-type: x mandatory;
}

.proximo-item {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: flex;
  justify-content: center;
}

.proximo-wrapper {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.13);
  height: 500px;
  width: 100%;
  max-width: 1100px;
}

.poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.info {
  position: absolute;
  left: 0;
  width: 50%;
  height: 50%;
  padding: 20px 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  z-index: 2;
  box-sizing: border-box;
  align-items: center;
}

.info h3 {
  text-align: center;
  font-size: 2rem;
  color: #DAAD5C;
  font-weight: 700;
  text-align: left;
}

.info p {
  color: #fff;
  font-size: 1.08rem;
  margin-bottom: 28px;
  line-height: 1.5;
  text-align: left;
}

.btn-container {
  display: flex;
  justify-content: flex-start;
}

.btn-container button {
  padding: 12px 32px;
  color: #fff;
  background-color: #1f6feb;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-container button:hover {
  background: #DAAD5C;
  color: #1f6feb;
}

/* Botones scroll desktop */
.btn-scroll-upcoming {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 60px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: background 0.3s, color 0.3s;
}

#btn-upcoming-prev { left: 0; }
#btn-upcoming-next { right: 0; }

.btn-scroll-upcoming:hover {
  background-color: #DAAD5C;
  color: #1f6feb;
}

@media (max-width: 768px) {
  .titulo-upcoming {
    font-size: 1.5rem;
    margin-bottom: 15px;
  }

  .fila-upcoming {
    flex-direction: column;
    align-items: center;
  }

  .upcoming-wrapper {
    display: flex;
    overflow: hidden;       /* elimina scroll horizontal */
    width: 100%;
  }

  .proximo-item {
    flex: 0 0 100%;         /* ocupa todo el viewport */
    margin: 0;
  }

  .proximo-wrapper {
    flex-direction: column;
    width: 100%;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  .poster {
    width: 100%;
    height: auto;
    object-fit: cover;
    position: relative;
  }

  .info {
    width: 100%;
    height: auto;
    padding: 15px 20px;
    text-align: center;
    justify-content: flex-start;
    position: relative;
  }

  .info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
  }

  .info p {
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.4;
  }

  .btn-container {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
  }

  .btn-container button {
    padding: 10px 24px;
    font-size: 1rem;
  }

  .btn-scroll-upcoming {
    display: none;
  }
}
