/**
 * Estilos para a galeria de conteúdo IMDB
 * Versão responsiva e moderna para o site Couto Connect
 */

/* Estilos da seção de conteúdo */
.content-gallery {
  padding: 60px 0;
  background-color: #0a0e17;
  position: relative;
}

.content-gallery .section-title {
  margin-bottom: 40px;
  text-align: center;
  color: #fff;
}

/* Estilos da galeria */
.gallery-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 20px 0;
}

.gallery-items {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
  padding: 10px 5px;
}

.gallery-items::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Estilos dos cards de filmes/séries */
.gallery-item {
  flex: 0 0 auto;
  width: 220px;
  transition: transform 0.3s ease;
}

.movie-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  height: 330px;
  background-color: #141b29;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.movie-card-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: #fff;
}

.movie-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease;
}

/* Overlay com informações */
.movie-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 60%, transparent 100%);
  padding: 20px 15px;
  transform: translateY(70%);
  transition: transform 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.movie-card:hover .movie-card-overlay {
  transform: translateY(0);
}

.movie-card:hover .movie-poster {
  filter: brightness(0.7);
}

.movie-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 5px;
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.movie-year {
  font-size: 14px;
  margin: 0 0 10px;
  color: #ccc;
}

.movie-rating {
  display: inline-block;
  background-color: #f5c518; /* Cor do IMDB */
  color: #000;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  margin-right: 10px;
  margin-bottom: 10px;
}

.movie-type {
  display: inline-block;
  background-color: #e50914; /* Cor Netflix-like */
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  text-transform: uppercase;
}

.movie-description {
  font-size: 13px;
  line-height: 1.4;
  color: #ddd;
  margin-top: 10px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.movie-card:hover .movie-description {
  opacity: 1;
}

/* Botões de navegação */
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.3s ease;
}

.gallery-nav:hover {
  background-color: rgba(0, 0, 0, 0.9);
}

.gallery-prev {
  left: 10px;
}

.gallery-next {
  right: 10px;
}

/* Indicador de carregamento */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 300px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #f5c518; /* Cor do IMDB */
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-indicator p {
  color: #fff;
  font-size: 16px;
}

/* Responsividade */
@media (max-width: 1200px) {
  .gallery-item {
    width: 200px;
  }
  
  .movie-card {
    height: 300px;
  }
}

@media (max-width: 768px) {
  .gallery-item {
    width: 180px;
  }
  
  .movie-card {
    height: 270px;
  }
  
  .movie-title {
    font-size: 14px;
  }
  
  .movie-year {
    font-size: 12px;
  }
  
  .movie-description {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 576px) {
  .gallery-item {
    width: 150px;
  }
  
  .movie-card {
    height: 225px;
  }
  
  .movie-card-overlay {
    padding: 15px 10px;
  }
  
  .movie-title {
    font-size: 13px;
  }
  
  .movie-rating, .movie-type {
    padding: 2px 6px;
    font-size: 11px;
  }
  
  .gallery-nav {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }
}
