/**
 * Estilos para a seção de vídeo
 *
 * @format
 */

.video-section {
  position: relative;
  width: 90%;
  max-width: 1200px;
  height: 500px;
  margin: 2rem auto;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.video-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("https://images.unsplash.com/photo-1523961130370-803b8d419b76?q=80&w=2070&auto=format&fit=crop");
  background-size: cover;
  background-position: center;
  filter: grayscale(100%) brightness(0.3); /* Ajustado para mais escuro */
  z-index: 1;
  transition: transform 0.5s ease;
  background-attachment: fixed; /* Efeito de parallax */
}

.video-section:hover .video-background {
  transform: scale(1.03);
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.6) 100%
  );
  z-index: 2;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.video-content {
  position: relative;
  z-index: 3;
  text-align: center;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.video-placeholder {
  display: flex;
  flex-direction: column-reverse; /* Inverte a ordem dos itens */
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  gap: 3rem; /* Aumentado de 1.5rem para 3rem */
  padding: 1rem 0; /* Adiciona um pouco de padding vertical */
}

.video-placeholder h3 {
  font-size: 1.5rem;
  margin: 0; /* Remove a margem superior */
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  order: 1; /* Garante que o texto fique acima */
}

.phone-button-container {
  position: relative;
  width: 150px; /* Aumentado de 100px */
  height: 150px; /* Aumentado de 100px */
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
}

.phone-button {
  width: 120px; /* Aumentado de 90px */
  height: 120px; /* Aumentado de 90px */
  border-radius: 50%;
  background: white;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  border: 2px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 3;
  padding: 0;
  margin: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.phone-button svg {
  width: 50px; /* Aumentado de 40px */
  height: 50px; /* Aumentado de 40px */
  fill: #333;
  transition: transform 0.3s ease;
}

.phone-button:hover {
  transform: scale(1.1);
  background: white; /* Mantém branco ao passar o mouse */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.phone-button:hover svg {
  transform: scale(1.1);
}

.pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1); /* Fundo branco semi-transparente */
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.pulse-ring-2 {
  animation-delay: 1s; /* Ajustado para metade do tempo total (2s/2) */
}

@keyframes pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.6;
    background: rgba(255, 255, 255, 0.15); /* Branco mais visível no início */
    border-color: rgba(255, 255, 255, 0.4);
  }
  30% {
    background: rgba(255, 255, 255, 0.1); /* Começa a desaparecer */
    border-color: rgba(255, 255, 255, 0.3);
  }
  60% {
    background: rgba(255, 255, 255, 0.05); /* Quase transparente */
    border-color: rgba(255, 255, 255, 0.15);
  }
  80% {
    transform: scale(1.8);
    opacity: 0.1;
    background: rgba(255, 255, 255, 0); /* Totalmente transparente */
    border-color: rgba(255, 255, 255, 0.05);
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
    background: rgba(255, 255, 255, 0);
    border-color: rgba(255, 255, 255, 0);
  }
}

.video-iframe-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.video-iframe-container.active {
  opacity: 1;
  transform: translateY(0);
  display: flex;
}

.video-wrapper {
  position: relative;
  width: 90%;
  max-width: 800px;
  padding-bottom: 45%; /* 16:9 Aspect Ratio ajustado */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.close-video {
  position: absolute;
  top: -50px;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: #333;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  z-index: 15;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-video:hover {
  background: white;
  transform: scale(1.1);
}

.close-video svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.close-video:hover svg {
  transform: rotate(90deg);
}

/* Responsividade */
@media (max-width: 1399px) {
  .video-section {
    width: 90%;
    height: 500px;
  }

  .phone-button-container {
    width: 120px;
    height: 120px;
  }

  .phone-button {
    width: 90px;
    height: 90px;
  }

  .phone-button svg {
    width: 40px;
    height: 40px;
  }

  .video-placeholder h3 {
    font-size: 1.2rem;
  }

  .video-content {
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  .video-section {
    width: 95%;
    height: 400px;
  }
}
