.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1055;
  display: none;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
  justify-content: center;
}

.ratio-16x9 {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 9 / 16 = 56.25% */
}

.ratio-16x9 > * {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

    /* Custom backdrop for applying the blur */
    .custom-backdrop {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.8);
      backdrop-filter: blur(15px); /* Aplica um efeito de desfoque */
      z-index: 1039; /* Logo abaixo do modal */
      display: none; /* Inicialmente oculto */
  }

  .modal-dialog {
      /* max-width: 65%; */
      /* margin: auto; */
      z-index: 1040; /* Certifique-se de que o modal está acima do backdrop */
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100vh; /* Certifique-se de que o modal ocupa toda a altura da viewport */

      margin-left: 20px;
      margin-right: 20px;
  }

  .modal-content {
      max-height: 90vh; /* Garante que o conteúdo não transborde da tela */
      position: relative;
      width: 100%;
  }

  .modal-body {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    row-gap: 6px;
  }

  .modal.show .custom-backdrop {
      display: block;
  }

  .btn-close {
      background-color: white;
      border: none;
      font-size: 0.6rem;
      font-weight: bold;
      opacity: 1; /* Opacidade forte por padrão */
      border-radius: 14px; /* Cantos suavemente arredondados */
      width: 10px;
      height: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 15px;
      z-index: 1053; /* Certifique-se de que o botão de fechar está acima de todos os outros elementos */
      cursor: pointer;
  }

  .btn-close:hover {
      opacity: 0.8; /* Opacidade ligeiramente reduzida ao passar o mouse */
  }

  .video-overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1051; /* Certifique-se de que está acima do iframe */
      cursor: pointer;
  }

  .custom-play-btn {
      width: 70px;
      height: 70px;
      background-color: #fff;
      border-radius: 50%; /* Botão arredondado */
      border: none;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      position: relative;
      z-index: 1052; /* Certifique-se de que o botão de play está acima de outros elementos */
      background-image: url('../img/play-circle.svg');
      background-repeat: no-repeat;
      background-position: center;
      background-size: 100%; /* Ajuste o tamanho do ícone conforme necessário */
      transition: transform 0.3s ease, background-color 0.3s ease; /* Transição suave para hover */
  }

  .custom-play-btn:hover {
      transform: scale(1.1); /* Aumenta o botão ligeiramente no hover */
      background-color: #e0e0e0; /* Escurece ligeiramente o botão no hover */
  }

  .video-overlay.hidden {
      display: none;
  }

  .ratio.ratio-16x9 iframe {
      z-index: 1050; /* Certifique-se de que o iframe está abaixo dos botões */
      border: none;
  }

.video-modal-close-button {
  border: none;
  background: none;
  position: relative;
  z-index: 1060;
  cursor: pointer;
}

@media screen and (min-width: 950px) {
  .modal-dialog {
    max-width: 840px;
  }

  .video-modal-close-button {
    left: 30px;
  }
}