/* ============================================
   Video Modal Overlay
   ============================================ */

#videoModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

#videoModal.is-open {
  display: flex;
}

/* Backdrop com blur */
.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 20, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  animation: backdropFadeIn 0.3s ease forwards;
}

@keyframes backdropFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Wrapper que segura o X + o conteúdo juntos */
.video-modal-wrapper {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 900px;
  animation: modalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(30px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Botão de fechar — fora do overflow:hidden */
.video-modal-close {
  position: absolute;
  top: -18px;
  right: -18px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--primary-color, #0CE07A);
  background: #0f172a;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(12, 224, 122, 0.35);
  outline: none;
}

.video-modal-close:hover {
  background: var(--primary-color, #0CE07A);
  color: #0f172a;
  transform: scale(1.15) rotate(90deg);
}

/* Container do vídeo com borda verde */
.video-modal-content {
  border-radius: 16px;
  border: 3px solid var(--primary-color, #0CE07A);
  box-shadow:
    0 0 0 1px rgba(12, 224, 122, 0.15),
    0 25px 60px rgba(0, 0, 0, 0.6),
    0 0 50px rgba(12, 224, 122, 0.12);
  overflow: hidden;
  background: #0f172a;
}

/* Aspect ratio 16:9 do iframe */
.video-modal-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
}

.video-modal-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Responsivo mobile */
@media (max-width: 576px) {
  .video-modal-wrapper {
    width: 95%;
  }

  .video-modal-close {
    top: -14px;
    right: -14px;
    width: 34px;
    height: 34px;
    font-size: 14px;
  }
}
