/* Seção de Propagandas Premium - Versão Melhorada */
#premium-ads {
  background-color: #f8f9fa;
  padding: 2rem 0;
  margin-bottom: 2rem;
}

#premium-ads h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  font-size: 1.8rem;
}

.premium-ads-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  padding: 0 2rem; /* Adiciona padding para os controles */
}

.premium-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  gap: 1.5rem;
  padding: 1rem 0; /* Remove padding lateral */
  scroll-padding: 0 2rem; /* Alinha com o container */
}

.premium-carousel::-webkit-scrollbar {
  display: none;
}

.premium-ad-item {
  flex: 0 0 auto;
  width: 300px;
  scroll-snap-align: start;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 450px; /* Altura mínima consistente */
}

.premium-ad-item:hover {
  transform: translateY(-5px);
}

/* Media content - altura fixa */
.premium-ad-item img,
.premium-ad-item video,
.premium-ad-item .youtube-video-container {
  width: 100%;
  height: 180px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Conteúdo da propaganda com layout flexível */
.premium-ad-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.premium-ad-content h3 {
  margin: 0 0 0.75rem 0;
  color: var(--primary-color);
  font-size: 1.1rem;
  line-height: 1.3;
}

.premium-ad-content p {
  color: #666;
  margin: 0 0 1.25rem 0;
  flex-grow: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Limita a 3 linhas */
  line-clamp: 3; /* Propriedade padrão */
  -webkit-box-orient: vertical;
  line-height: 1.4;
  font-size: 0.9rem;
}

.premium-ad-link {
  display: inline-block;
  background-color: var(--secondary-color);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.3s ease;
  text-align: center;
  margin-top: auto; /* Empurra para baixo */
  flex-shrink: 0;
}

.premium-ad-link:hover {
  background-color: var(--primary-color);
}

/* Controles do carrossel melhorados */
.carousel-controls {
  display: flex;
  justify-content: space-between;
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  pointer-events: none;
}

.carousel-control {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: all;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.carousel-control:hover {
  background-color: var(--primary-color);
  transform: scale(1.1);
}

.carousel-control.prev {
  margin-left: -1rem;
}

.carousel-control.next {
  margin-right: -1rem;
}

/* Indicadores de scroll */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.carousel-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ccc;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.carousel-indicator.active {
  background-color: var(--primary-color);
}

/* Responsividade */
@media (max-width: 768px) {
  .premium-ad-item {
    width: 280px;
    min-height: 420px;
  }

  .premium-ads-container {
    padding: 0 1rem;
  }

  .carousel-control {
    width: 36px;
    height: 36px;
  }

  .carousel-control.prev {
    margin-left: -0.5rem;
  }

  .carousel-control.next {
    margin-right: -0.5rem;
  }
}

@media (max-width: 480px) {
  .premium-ad-item {
    width: 260px;
    min-height: 400px;
  }

  #premium-ads h2 {
    font-size: 1.5rem;
  }
}

.youtube-video-container,
div[data-video-url] {
  position: relative;
}

/* === Premium Ad Experience === */
.premium-ad-experience {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 340px;
  padding: 2rem 0;
  background: transparent;
}

.ad-frame {
  background: var(--background, #fff);
  border-radius: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  max-width: 480px;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s;
}

.ad-media-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-media-container video,
.ad-media-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  background: #111;
  transition: opacity 0.4s;
}

.ad-btn {
  position: absolute;
  top: 1rem;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s, transform 0.2s;
  font-size: 1.2rem;
}

.ad-btn:hover {
  background: rgba(37, 99, 235, 0.8);
  transform: scale(1.08);
}

.ad-sound-btn {
  left: 1rem;
}

.ad-next-btn {
  right: 1rem;
}

.ad-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.7) 60%,
    rgba(0, 0, 0, 0.3) 100%
  );
  color: #fff;
  padding: 1.1rem 1.5rem;
  position: relative;
  min-height: 64px;
}

.ad-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ad-title {
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

.ad-slogan {
  font-size: 0.95rem;
  color: #e0e0e0;
}

.ad-cta-btn {
  background: var(--primary-600, #2563eb);
  color: #fff;
  border-radius: 1.2rem;
  padding: 0.5rem 1.2rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
  font-size: 1rem;
  margin-left: auto;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.ad-cta-btn:hover {
  background: var(--primary-700, #1d4ed8);
  color: #fff;
}

@media (max-width: 600px) {
  .ad-frame {
    border-radius: 1rem;
    max-width: 98vw;
  }
  .ad-info-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    min-height: 56px;
  }
  .ad-cta-btn {
    margin-left: 0;
    margin-top: 0.5rem;
    width: 100%;
    text-align: center;
  }
}

[data-theme="dark"] .ad-frame {
  background: #181c24;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.38);
}

[data-theme="dark"] .ad-info-bar {
  background: linear-gradient(
    90deg,
    rgba(24, 28, 36, 0.95) 60%,
    rgba(24, 28, 36, 0.7) 100%
  );
  color: #fff;
}

[data-theme="dark"] .ad-title,
[data-theme="dark"] .ad-slogan {
  color: #fff;
}
