/* ============================================
   HERO VIDEO YOUTUBE - VIVA BRASIL
   Prefixo: .hv-youtube__ (para evitar conflitos)
   ============================================
   
   ═══════════════════════════════════════════
   🎮 CONTROLES DE ESTILO (AJUSTE AQUI!)
   ═══════════════════════════════════════════
*/

:root {
  /* ===== 1. CORES ===== */
  --hv-youtube-color-primary: #0C2D3F;
  --hv-youtube-color-accent: #B58B3B;
  --hv-youtube-color-accent-light: #D9B25C;
  
  /* ===== 2. BLUR DO VÍDEO ===== */
  --hv-youtube-video-blur: 4px;
  
  /* ===== 3. OVERLAY ===== */
  --hv-youtube-overlay-opacity: 0.7;
  --hv-youtube-overlay-color-start: rgba(12,45,63,0.4);
  --hv-youtube-overlay-color-end: rgba(12,45,63,0.85);
  
  /* ===== 4. TAMANHO DO VÍDEO ===== */
  --hv-youtube-video-width: 200%;
  --hv-youtube-video-height: 200%;
  
  /* ===== 5. ANIMAÇÃO ===== */
  --hv-youtube-animation-duration: 1.2s;
  --hv-youtube-animation-blur: 12px;
  --hv-youtube-animation-distance: 40px;
  
  /* ===== 6. TEXTO ===== */
  --hv-youtube-text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  --hv-youtube-title-gradient-start: #fff;
  --hv-youtube-title-gradient-mid: #D9B25C;
  --hv-youtube-title-gradient-end: #F0D38A;
  
  /* ===== 7. BOTÃO ===== */
  --hv-youtube-btn-padding: 0.9rem 2.8rem;
  --hv-youtube-btn-font-size: 1rem;
  --hv-youtube-btn-border-radius: 60px;
}

/* ===== FIM DOS CONTROLES ===== */
/* ═══════════════════════════════════════════ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* BODY - sem conflito, apenas reset base */
.hv-youtube-body {
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* HERO PRINCIPAL */
.hv-youtube-hero {
  height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

/* WRAPPER - CORTA O EXCESSO DO VÍDEO E APLICA BLUR */
.hv-youtube-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -2;
  filter: blur(var(--hv-youtube-video-blur));
  transform: scale(1.05);
}

/* YOUTUBE CONTAINER */
.hv-youtube-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: var(--hv-youtube-video-width);
  height: var(--hv-youtube-video-height);
}

/* IFRAME */
.hv-youtube-container iframe {
  width: 100%;
  height: 100%;
  pointer-events: none;
  border: none;
}

/* OVERLAY */
.hv-youtube-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    circle at 30% 35%,
    var(--hv-youtube-overlay-color-start),
    var(--hv-youtube-overlay-color-end)
  );
  opacity: var(--hv-youtube-overlay-opacity);
}

/* CONTEÚDO */
.hv-youtube-content {
  z-index: 2;
  max-width: 1100px;
  padding: 0 20px;
  animation: hvYoutubeEntrance var(--hv-youtube-animation-duration) cubic-bezier(0.16,1,0.3,1) forwards;
}

@keyframes hvYoutubeEntrance {
  0% {
    opacity: 0;
    transform: translateY(var(--hv-youtube-animation-distance)) scale(0.96);
    filter: blur(var(--hv-youtube-animation-blur));
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* TÍTULO */
.hv-youtube-content h1 {
  font-size: clamp(3rem, 9vw, 6rem);
  font-weight: 700;
  background: linear-gradient(
    125deg,
    var(--hv-youtube-title-gradient-start),
    var(--hv-youtube-title-gradient-mid),
    var(--hv-youtube-title-gradient-end)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}

.hv-youtube-content h1 span {
  background: linear-gradient(
    125deg,
    var(--hv-youtube-color-accent),
    var(--hv-youtube-color-accent-light),
    var(--hv-youtube-title-gradient-end)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* PARÁGRAFO */
.hv-youtube-content p {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  margin: 1.8rem 0;
  color: rgba(255, 255, 245, 0.95);
  font-weight: 500;
  text-shadow: var(--hv-youtube-text-shadow);
}

/* BOTÃO CTA */
.hv-youtube-btn {
  background: var(--hv-youtube-color-accent);
  border: none;
  padding: var(--hv-youtube-btn-padding);
  font-size: var(--hv-youtube-btn-font-size);
  font-weight: 600;
  color: var(--hv-youtube-color-primary);
  border-radius: var(--hv-youtube-btn-border-radius);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  font-family: inherit;
}

.hv-youtube-btn:hover {
  transform: scale(1.02);
  background: var(--hv-youtube-color-accent-light);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

/* FALLBACK */
.hv-youtube-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
  display: none;
}

.hv-youtube-fallback.active {
  display: block;
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
  .hv-youtube-content p {
    font-size: 1rem;
    margin: 1.2rem 0;
  }
  
  .hv-youtube-btn {
    padding: 0.7rem 2rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .hv-youtube-content h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  
  .hv-youtube-content p {
    font-size: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hv-youtube-content {
    animation: none;
  }
  .hv-youtube-wrapper {
    filter: blur(var(--hv-youtube-video-blur));
  }
}
