.icon-movie-title {
  background-color: var(--color-main);
  mask-image: url("../images/movie.svg");
  mask-size: contain;
  mask-repeat: no-repeat;
}

/* Ensure dropdowns appear above content */
.filters-bar {
  position: relative;
  overflow: visible; /* Allow dropdowns to exceed container */
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding-left: 0;
}
.filters-container {
  overflow: visible !important; /* Allow dropdowns to exceed container */
  margin-bottom: 1rem;
}
.filters-bar .dropdown {
  position: relative;
  background-color: rgba(255, 255, 255, 1);
}
.filters-bar .dropdown-menu {
  z-index: 1050 !important;
}

/* Primary filter button (Mais populares when active) */
.filter-btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  background-color: var(--main-blue-950, #0a376e);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.1s ease;
  cursor: pointer;
}

.filter-btn-primary:hover {
  background-color: var(--main-blue-800, #005cd0);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
}

.filter-btn-primary:active {
  transform: translateY(0);
}

/* Filter dropdown buttons */
.filter-btn-dropdown {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  background-color: rgba(255, 255, 255, 1);
  color: var(--main-blue-950);
  border: 1px solid var(--main-blue-950);
  border-radius: 40px;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.filter-btn-dropdown:hover {
  background-color: rgba(10, 55, 110, 0.1);
  color: #0a376e;
  border-color: #0a376e;
}

.filter-btn-dropdown.filter-btn-active {
  background-color: rgba(10, 55, 110, 0.15);
  color: #0a376e;
  border-color: #0a376e;
}

.filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background-color: var(--main-blue-950);
  color: white;
  border-radius: 1rem;
  font-size: 0.875rem;
}
.filter-badge-remove {
  cursor: pointer;
  opacity: 0.8;
  text-decoration: none;
}
.filter-badge-remove:hover {
  opacity: 1;
}
.no-results {
  text-align: center;
  padding: 3rem;
}
.no-results h3 {
  color: var(--main-blue-950);
  margin-bottom: 1rem;
}
.card-wrapper {
  position: absolute;
  z-index: 1;
  top: 5px;
}
.icon-white {
  filter: brightness(0) invert(1);
}
/* Override Bootstrap dropdown caret with custom one */
.filter-btn-dropdown.dropdown-toggle::after {
  z-index: 1000;
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-left: 0.5rem;
  vertical-align: middle;
  border-bottom: 0;
}

/* Clear filters button */
.clear-filters {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: none;
  border: none;
  color: #6c757d;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
  cursor: pointer;
  margin-left: auto;
}

.clear-filters:hover {
  color: #495057;
  text-decoration: none;
}

.clear-filters-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: background-color 0.2s ease;
  border: 1px solid #5d5d5d;
}

.clear-filters-icon svg {
  width: 20px;
  height: 20px;
}

.clear-filters:hover .clear-filters-icon {
  background-color: #fff;
}

/* Swiper on filters — desktop: disabled, behaves as normal flex */
.filters-swiper .swiper-wrapper {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.filters-swiper-slide {
  width: auto;
  flex-shrink: 0;
}

/* Responsive adjustments for filters bar */
@media (max-width: 768px) {
  .filters-container {
    position: relative;
    z-index: 1050;
  }

  .filters-bar.filters-swiper {
    overflow: hidden;
  }

  .filters-swiper .swiper-wrapper {
    gap: 0.5rem;
  }

  .filters-swiper-slide {
    width: auto !important;
    flex-shrink: 0;
  }

  .filter-btn-primary,
  .filter-btn-dropdown {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .clear-filters {
    margin-left: 0;
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* CAROUSEL DE FILMES EM ALTA */

.filmes-carousel .swiper-slide {
  width: auto;
}

.filmes-carousel.bg-blue {
  background-color: var(--main-blue-950);
}

/* New releases carousel - show partial item, clipped at container */
.filmes-carousel {
  overflow: hidden;
}

.filmesSwiper_new {
  overflow: hidden;
}

.filmesSwiper_streaming_cartaz {
  overflow: hidden;
}

/* Position arrows floating above first and last movie cards */
.streaming-movies-carousel-wrapper {
  position: relative;
}

.streaming-movies-carousel-wrapper > button#prevSlide_streaming_cartaz {
  position: absolute;
  left: -25px;
  top: 35%;
  transform: translateY(-50%);
  z-index: 10;
  background-color: white !important;
  border-radius: 50% !important;
  width: 50px;
  height: 50px;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.streaming-movies-carousel-wrapper > button#prevSlide_streaming_cartaz:hover {
  background-color: #f8f9fa !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.streaming-movies-carousel-wrapper > button#nextSlide_streaming_cartaz {
  position: absolute;
  right: -25px;
  top: 35%;
  transform: translateY(-50%);
  z-index: 10;
  background-color: white !important;
  border-radius: 50% !important;
  width: 50px;
  height: 50px;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.streaming-movies-carousel-wrapper > button#nextSlide_streaming_cartaz:hover {
  background-color: #f8f9fa !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Carousel movie card styling */

.filmes-carousel h4 {
  font-size: 24px !important;
}

.filmes-carousel .filme-card {
  width: 100%;
  flex-shrink: 0;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.filmes-carousel .filme-card.col {
  max-width: 100%;
  flex: 1 1 100%;
  padding-left: 0;
  padding-right: 0;
}

.filmes-carousel .filme-card .card-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.filmes-carousel .filme-card .card-img-top {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.filmes-carousel .filme-card .card-title {
  margin-top: 0.5rem;
  margin-bottom: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: #1a1a2e;
}

.filmes-carousel .filme-card .card-title:first-of-type {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-start;
  margin-top: 0;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.filmes-carousel .filme-card .card-title:first-of-type > div {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0 !important;
}

.filmes-carousel .filme-card .rating-criticos,
.filmes-carousel .filme-card .rating-publico {
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.filmes-carousel .filme-card .icon-movie,
.filmes-carousel .filme-card .icon-popcorn {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
  .filmes-carousel .swiper-slide {
    width: auto;
  }

  .filmes-carousel .swiper-slide .card-img-top {
    width: 100%;
    object-fit: cover;
  }

  .filmes-carousel .swiper-wrapper {
    padding-left: 0;
    padding-right: 0;
  }
}

/* trending section */
.trending-section .card-title {
  color: #fff;
  font-weight: 600;
}

.trending-section .badge {
  color: #fff;
  margin-bottom: 4rem;
}

.trending-section .rating-criticos .img,
.trending-section .rating-publico .img {
  color: #fff;
}

.streaming-icon {
  opacity: 0.9;
  transition: opacity 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

/*--------------------------------------------------------------
  # Filters Sidebar
  --------------------------------------------------------------*/
.filters-header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--main-gray-200, #e9ecef);
}

.btn-clear-filters {
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  font-size: 16px;
  padding: 0.5rem;
  transition: color 0.2s;
}

.btn-clear-filters:hover {
  color: var(--main-blue-950, #0a376e);
}

.btn-clear-filters:hover .clear-filters-icon {
  background-color: var(--main-blue-950, #0a376e);
}

.results-count {
  font-weight: 500;
  color: var(--main-gray-700, #495057);
}

.filters-container-sidebar {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 20px;
}

.filter-section {
  border-bottom: 1px solid var(--main-gray-200, #e9ecef);
  padding-bottom: 1rem;
}

.filter-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.filter-section-title {
  font-size: 1rem;
  font-weight: 600;
  /* color: var(--main-blue-950, #0A376E); */
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  margin-bottom: 0.75rem;
}

.filter-section-title:hover {
  color: var(--main-blue-700, #0d4a8f);
}

.filter-toggle-icon {
  font-size: 0.75rem;
  transition: transform 0.3s;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
}

.filter-option-item {
  display: flex;
  align-items: center;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  padding: 0.25rem 0;
  width: 100%;
}

.filter-checkbox-input {
  width: 18px;
  height: 18px;
  margin-right: 0.75rem;
  cursor: pointer;
  accent-color: var(--main-blue-950, #0a376e);
  color: var(--main-blue-950, #0a376e);
}

.filter-checkbox:hover .filter-checkbox-label {
  color: var(--main-blue-950, #0a376e);
}

.filme-card {
  transition: opacity 0.3s, transform 0.3s;
}

.rating-criticos,
.rating-publico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  padding: 0;
}

.rating-criticos {
  min-width: 28px;
  height: 24px;
  border-radius: 6px;
  padding: 0 6px;
}

.rating-publico {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.movie-list .filme-card {
  margin-top: 32px;
}

.movie-list .filme-card .card-img-top {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.filme-card.hidden {
  display: none !important;
}

@media (max-width: 991px) {
  .filters-container-sidebar {
    position: relative;
    top: 0;
    margin-bottom: 2rem;
  }
}

@media (max-width: 768px) {
  .filters-header {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .filters-header > div {
    width: 100%;
    justify-content: space-between;
  }

  .results-count {
    font-size: 16px;
  }

  .filters-container-sidebar {
    padding: 1rem;
  }

  .movie-list {
    margin-top: -40px;
  }
}

@media (max-width: 768px) {
  .streaming-icon img {
    width: 20px;
    height: 20px;
  }

  #prevSlide,
  #nextSlide,
  #prevSlide_streaming,
  #nextSlide_streaming {
    padding: 0.25rem;
  }

  #prevSlide_streaming img,
  #nextSlide_streaming img {
    width: 300px;
    height: 30px;
  }
}

.card-rank-number {
  position: absolute;
  top: 10px;
  left: -90px;
  font-size: 13rem;
  font-weight: bold;
  color: #fff;
  z-index: -10;
  padding: 0.5rem;
  line-height: 1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}
.card-rank-number.rank-double-digit {
  top: 30px;
  letter-spacing: -25px; /* Ajusta o espaçamento entre os dígitos */
  left: -140px; /* Move mais para a esquerda para acomodar dois dígitos */
  font-size: 11rem; /* Reduz levemente para compensar a largura dos dois dígitos */
}

@media (max-width: 767px) {
  .card-rank-number {
    position: absolute;
    top: 10px;
    left: -90px;
    font-size: 13rem;
    font-weight: bold;
    color: #fff;
    z-index: -10;
    padding: 0.5rem;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  }

  .card-rank-number.rank-double-digit {
    letter-spacing: -12px;
    left: -20px; /* Ajusta posição para dois dígitos no mobile */
  }

}
@media (max-width: 575px) {
  .card-rank-number {
    position: absolute;
    top: 10px;
    left: -90px;
    font-weight: bold;
    color: #fff;
    z-index: -10;
    padding: 0.5rem;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
  }
  .card-rank-number.rank-double-digit {
    letter-spacing: -12px;
    left: -110px; /* Ajusta posição para dois dígitos */
  }
}

.card-wrapper {
  position: absolute;
  z-index: 1;
  top: 5px;
}

.icon-white {
  filter: brightness(0) invert(1);
}

.movie-header h1 {
  font-size: 34px;
}

/* Related Posts Section Styling */
.blog-archive-featured-side {
  background-color: transparent !important;
  padding: 0 !important;
}

.blog-archive-side-post {
  padding: 0 !important;
  border-bottom: 1px solid #e0e0e0 !important;
}

.blog-archive-side-post.border-bottom {
  border-bottom: 1px solid #e0e0e0 !important;
  padding-bottom: 1rem !important;
  margin-bottom: 1rem !important;
}

.blog-archive-side-post:last-child {
  border-bottom: none !important;
}

/* Carousel lazy-load skeletons */
.carousel-skeleton {
  padding: 0 12px;
}

.carousel-skeleton .skeleton-title {
  width: 220px;
  height: 28px;
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 6px;
}

.carousel-skeleton .skeleton-card {
  flex-shrink: 0;
  width: 180px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 16px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

