/* ===================================
   Carrossel de Vídeos do YouTube
   ===================================
   Estilos similares ao banner-carousel, adaptados para vídeos
*/

.youtube-videos-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.youtube-videos-carousel:focus {
  outline: 2px solid #ff6b35;
  outline-offset: 2px;
}

/* ===================================
   Loading State
   ================================== */
.carousel-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10;
}

.carousel-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ff6b35;
  border-radius: 50%;
  animation: spinner-rotate 0.8s linear infinite;
}

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

.carousel-loading-text {
  margin-top: 16px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

/* ===================================
   Slides Container
   ================================== */
.carousel-slides {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
  z-index: 1;
}

.carousel-slide--active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

/* ===================================
   Video Wrapper & Player
   ================================== */
.carousel-slide__video-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* Aspect ratio 16:9 */
  overflow: hidden;
  border-radius: 8px;
  background: #1a1a1a;
}

.carousel-slide__video-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
}

/* Overlay com título */
.carousel-slide__video-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.carousel-slide__video-link:hover .carousel-slide__video-overlay {
  opacity: 1;
}

.carousel-slide__video-title {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  display: block;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* ===================================
   Empty State
   ================================== */
.carousel-empty {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  padding: 40px 20px;
}

.carousel-empty__message {
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  text-align: center;
}

/* ===================================
   Navigation Controls (Arrows)
   ================================== */
.carousel-controls {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 5;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: all;
  z-index: 10;
}

.carousel-control:hover {
  background: rgba(255, 107, 53, 0.9);
  border-color: #ff6b35;
  transform: translateY(-50%) scale(1.1);
}

.carousel-control:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-control:focus {
  outline: 2px solid #ff6b35;
  outline-offset: 2px;
}

.carousel-control--prev {
  left: 20px;
}

.carousel-control--next {
  right: 20px;
}

.carousel-control__icon {
  width: 24px;
  height: 24px;
}

/* ===================================
   Indicators (Dots)
   ================================== */
.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
}

.carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.carousel-indicator:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: scale(1.2);
}

.carousel-indicator--active {
  background: #ff6b35;
  width: 32px;
  border-radius: 6px;
}

.carousel-indicator:focus {
  outline: 2px solid #ff6b35;
  outline-offset: 2px;
}

/* ===================================
   Responsive
   ================================== */
@media (max-width: 768px) {
  .youtube-videos-carousel {
    border-radius: 8px;
  }

  .carousel-control {
    width: 40px;
    height: 40px;
  }

  .carousel-control--prev {
    left: 10px;
  }

  .carousel-control--next {
    right: 10px;
  }

  .carousel-control__icon {
    width: 20px;
    height: 20px;
  }

  .carousel-indicators {
    bottom: 10px;
  }

  .carousel-indicator {
    width: 10px;
    height: 10px;
  }

  .carousel-indicator--active {
    width: 24px;
  }
}

@media (max-width: 480px) {
  .carousel-control {
    width: 36px;
    height: 36px;
    border-width: 1px;
  }

  .carousel-control__icon {
    width: 18px;
    height: 18px;
  }

  .carousel-indicator {
    width: 8px;
    height: 8px;
    gap: 8px;
  }

  .carousel-indicator--active {
    width: 20px;
  }

  .youtube-videos-carousel {
    min-height: 250px !important;
  }
}
