/* ===== Estilos únicos de la página Gustos (complementan a common.css) ===== */

/* Contenedor principal */
.g-container {
  min-height: 100vh;
  padding: 30px;
}

/* Caja interna con fondo #222 */
.g-inner {
  background-color: #222;
  padding: 20px;
  border-radius: 8px;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Encabezados */
.g-inner h1 {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: #fff;
}

.g-inner h2 {
  font-size: 1.8em;
  margin: 20px 0 10px;
  color: #fff;
}

/* Iframe de Spotify */
.music-section iframe {
  width: 100%;
  max-width: 800px;
  border: 2px solid #fff;
  border-radius: 12px;
}

/* ===== CARRUSEL INFINITO ===== */
.carousel-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
  /* Sin borde duro */
  padding: 24px 8px;
}

/* Degradados de fondo para desvanecer los bordes laterales */
.carousel-container::before,
.carousel-container::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 5;
  pointer-events: none;
}
.carousel-container::before {
  left: 0;
  background: linear-gradient(to right, #222, transparent);
}
.carousel-container::after {
  right: 0;
  background: linear-gradient(to left, #222, transparent);
}

.carousel-track {
  display: flex;
  align-items: center;
  width: max-content;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  padding: 10px 0;
}

.carousel-item {
  position: relative;
  width: 160px;
  height: 240px;
  margin: 0 12px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
  background: #2c2c2c;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

/* Efecto al pasar el ratón: la tarjeta se eleva y agranda */
.carousel-item:hover {
  transform: scale(1.07) translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75);
  z-index: 20;
}

.carousel-item:hover img {
  transform: scale(1.08);
}

/* Recuadro de título: siempre visible con degradado */
.carousel-title {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 32px 10px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.6) 55%, transparent 100%);
  color: #fff;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  /* Limita el título a 3 líneas con puntos suspensivos */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: background 0.3s ease;
}

.carousel-item:hover .carousel-title {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.97) 0%, rgba(0, 0, 0, 0.7) 60%, transparent 100%);
}

/* Botones flecha */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(4px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 1.4em;
  cursor: pointer;
  z-index: 15;
  width: 44px;
  height: 44px;
  text-align: center;
  border-radius: 50%;
  line-height: 42px;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.prev-btn {
  left: 12px;
}

.next-btn {
  right: 12px;
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  transform: translateY(-50%) scale(1.1);
}

/* Carrusel de películas (TMDb) — el enlace ocupa toda la tarjeta */
.tmdb-item a {
  display: block;
  width: 100%;
  height: 100%;
}

.tmdb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mensaje cuando no hay elementos */
.sin-videos {
  color: #aaa;
  font-size: 1em;
  padding: 30px;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  width: 100%;
}

/* RESPONSIVIDAD */
@media (max-width: 768px) {
  .g-inner h1 {
    font-size: 2em;
  }

  .g-inner h2 {
    font-size: 1.4em;
  }

  .carousel-item {
    width: 110px;
    height: 165px;
    margin: 0 8px;
  }

  .carousel-title {
    font-size: 11.5px;
    padding: 24px 6px 8px;
  }

  .carousel-btn {
    width: 38px;
    height: 38px;
    font-size: 1.1em;
    line-height: 36px;
  }
}
