/* --- FONDO GENERAL --- */
body {
  margin: 0;
  padding: 40px 20px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-image: url("LANDING.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: white;
  box-sizing: border-box;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(20px);
  z-index: -1;
}

/* --- CONTENEDOR PRINCIPAL --- */
.mobile-wrapper {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 9 / 16;
  min-height: 700px;
  background-image: url("LANDING.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 22% 25px 18% 25px;
  box-sizing: border-box;
  gap: 12px;
}

/* --- Caja del CONTADOR --- */
.contador-box {
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  width: 100%;
  border-radius: 15px;
  padding: 15px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* --- Caja del FORMULARIO --- */
.form-box {
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  width: 100%;
  border-radius: 15px;
  padding: 20px 25px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* --- Estilos internos del contador --- */
.countdown-title {
  color: #ffaa00;
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 3px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.timer-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 170, 0, 0.05);
  border: 1px solid rgba(255, 170, 0, 0.3);
  border-radius: 10px;
  padding: 8px 5px;
  min-width: 58px;
  box-shadow: inset 0 0 15px rgba(255, 170, 0, 0.05);
}

.timer-block .number {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  text-shadow: 0 0 15px rgba(255, 170, 0, 0.5);
}

.timer-block .label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffaa00;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.target-date {
  color: #ffaa00;
  font-weight: bold;
  font-size: 0.9rem;
  margin-top: 15px;
  letter-spacing: 1.5px;
  padding-top: 10px;
}

/* --- Estilos internos del formulario --- */
form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-group {
  display: flex;
  gap: 10px;
}

.input-group > * {
  flex: 1;
}

input,
select {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background-color: rgba(255, 255, 255, 0.05);
  color: white;
  border-radius: 5px;
  font-size: 0.9rem;
  box-sizing: border-box;
  outline: none;
  transition: all 0.3s ease;
}

input::placeholder {
  color: #bbb;
}
input:focus,
select:focus {
  border-color: #ffaa00;
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 8px rgba(255, 170, 0, 0.3);
}
select option {
  background-color: #222;
  color: white;
}

button {
  background-color: #ffaa00;
  color: #000;
  border: none;
  padding: 12px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 5px;
  transition:
    background-color 0.3s,
    transform 0.1s,
    box-shadow 0.3s;
  text-transform: uppercase;
  box-shadow: 0 5px 15px rgba(255, 170, 0, 0.3);
}

button:hover {
  background-color: #ffbb33;
  box-shadow: 0 5px 20px rgba(255, 170, 0, 0.5);
}
button:active {
  transform: scale(0.98);
}

#message {
  margin-top: 10px;
  font-size: 0.85rem;
  display: none;
  text-align: center;
  padding: 8px;
  border-radius: 5px;
}
.success {
  background-color: rgba(76, 175, 80, 0.2);
  color: #4caf50;
  border: 1px solid #4caf50;
}
.error {
  background-color: rgba(244, 67, 54, 0.2);
  color: #f44336;
  border: 1px solid #f44336;
}

/* --- BOTÓN FLOTANTE WHATSAPP --- */
.whatsapp-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
}

.whatsapp-container a {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
}

/* El globo de texto blanco (AHORA SE OCULTA SOLO) */
.wa-text-pill {
  position: relative;
  background-color: #ffffff;
  padding: 12px 18px; /* Un poco más de espacio interior */
  border-radius: 12px;
  text-align: right;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  white-space: nowrap;

  /* Estado inicial oculto */
  opacity: 0;
  transform: translateX(30px);
  pointer-events: none;

  /* Animación que entra, espera y sale (dura 10s en total, empieza a los 2s) */
  animation: popInOutMessage 10s ease-in-out 2s forwards;
}

/* El pequeño triángulo o "colita" del globo de chat */
.wa-text-pill::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 6px solid #ffffff;
}

/* Animación de entrada y salida */
@keyframes popInOutMessage {
  0% {
    opacity: 0;
    transform: translateX(30px);
    pointer-events: none;
  }
  5% {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  } /* Aparece rápido */
  85% {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  } /* Se mantiene visible por 8 segundos */
  95% {
    opacity: 0;
    transform: translateX(30px);
    pointer-events: none;
  } /* Desaparece suavemente */
  100% {
    opacity: 0;
    transform: translateX(30px);
    pointer-events: none;
  } /* Se queda oculto */
}

/* --- NUEVA TIPOGRAFÍA PARA EL GLOBO --- */
.wa-line1 {
  display: block;
  font-size: 0.75rem;
  font-weight: 800; /* Letra gruesa */
  color: #ffaa00; /* Naranja de la marca */
  text-transform: uppercase; /* Mayúsculas para mantener el estilo */
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.wa-line2 {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: #111111;
}

/* El círculo verde */
.wa-icon-container {
  background-color: #25d366;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
  z-index: 2;
}

.whatsapp-container a:hover .wa-icon-container {
  transform: scale(1.1);
}

/* --- Ajuste para celulares --- */
@media (max-width: 480px) {
  body {
    padding: 0;
  }
  .mobile-wrapper {
    aspect-ratio: auto;
    min-height: 100vh;
    border-radius: 0;
    padding: 120px 20px 100px 20px;
  }

  .whatsapp-container {
    bottom: 20px;
    right: 15px;
  }
  .whatsapp-container a {
    gap: 10px;
  }
  .wa-icon-container {
    width: 55px;
    height: 55px;
  }
  .wa-icon-container svg {
    width: 30px;
    height: 30px;
  }
  .wa-text-pill {
    padding: 8px 12px;
  }
  .wa-line1 {
    font-size: 0.65rem;
  }
  .wa-line2 {
    font-size: 0.85rem;
  }
}
