/* 1. SECCIÓN PARALLAX FULL WIDTH */
.nexal-newsletter-section {
  /* LA MAGIA DEL PARALLAX (Imagen fija ante el scroll) */
  /*     background-position: center center; */
  /*     background-repeat: no-repeat; */
  /*     background-size: cover; */
  background-attachment: scroll !important;
  background-image: none !important;

  /* Romper el contenedor para ancho completo */
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;

  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
  /* Contiene el pseudo-elemento */
  background: none !important;
  /* Elimina el background inline del HTML */
}

/* 2. OVERLAY (¡AHORA TRANSPARENTE!) */
.nexal-newsletter-overlay {
  width: 100%;
  height: 100%;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;

  /* ¡ELIMINADO EL FONDO DEL OVERLAY para que se vea la imagen vibrante! */
  /* background: linear-gradient(...) removido */
  background: rgba(0, 0, 0, 0.15);
  /* Un sutil oscurecimiento para legibilidad, si lo necesitas */
  transition: background 0.4s ease;
  padding: 20px;
}

/* Nuevo: Pseudo-elemento con animación */
.nexal-newsletter-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../../images/DPTech-Innovation-Park.webp') no-repeat center center / cover;
  z-index: -1;
  animation: slowZoom 25s linear infinite;
}

/* 3. CONTENIDO */
.nexal-newsletter-content {
  max-width: 700px;
  text-align: center;
  position: relative;
  z-index: 2;
  /* Ajustamos el color del texto para que se vea mejor sobre la imagen clara */
  color: #020c18;
  /* Texto oscuro para contraste */
}

.newsletter-title {
  font-family: 'Inter', sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  /* Cambiado a un color oscuro para contraste sobre la imagen clara */
  color: #ffffff;
  margin-bottom: 15px;
  text-shadow: 0 4px 15px rgba(0, 255, 255, 0.7);
  /* Sombra clara */
}

.newsletter-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  /* Cambiado a un color oscuro para contraste */
  color: #ffffff;
  line-height: 1.6;
  margin-bottom: 40px;
  text-shadow: 0 4px 8px rgba(0, 255, 255, 0.8);
}

/* 4. FORMULARIO */
.newsletter-form {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
}

.input-group {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 500px;
  /* Fondo del input más opaco para que se lea mejor sobre la imagen */
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  /* Borde más visible */
  border-radius: 50px;
  padding: 5px;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

.input-group:focus-within {
  border-color: #00e0ff;
  box-shadow: 0 0 20px rgba(0, 224, 255, 0.2);
  /* Fondo oscuro al hacer focus para mejorar legibilidad */
  background: rgba(5, 10, 20, 0.8);
}

.input-group input {
  flex: 1;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 10px 20px !important;
  height: auto !important;
  /* Color del texto del input oscuro al hacer focus */
  color: #fff;
  /* Blanco cuando está activo (con fondo oscuro) */
  font-size: 1rem;
  outline: none;
}

.input-group:focus-within input {
  color: #fff;
  /* Asegura que el texto sea blanco cuando tiene el fondo oscuro del focus */
}

.input-group input::placeholder {
  /* Cambiado a un gris más oscuro para contraste sobre el input semi-transparente */
  color: #4a5e75;
}

.input-group button {
  background: #00e0ff;
  color: #020c18;
  border: none;
  border-radius: 40px;
  padding: 12px 30px;
  height: 48px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
  flex-shrink: 0;
  margin: 0;
}

.input-group button svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.input-group button:hover {
  background: #fff;
  color: #00e0ff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.input-group button:hover svg {
  transform: translateX(3px);
}

.newsletter-disclaimer {
  font-size: 0.9rem;
  /* Cambiado a un gris oscuro para contraste */
  color: #ADFFFF;
  margin-top: 15px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .newsletter-title {
    font-size: 2rem;
  }

  .input-group {
    flex-direction: column;
    border-radius: 15px;
    background: transparent;
    border: none;
    backdrop-filter: none;
    align-items: stretch;
  }

  .input-group input {
    background: rgba(5, 10, 20, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px;
    margin-bottom: 10px !important;
    text-align: center;
  }

  .input-group button {
    width: 100%;
    border-radius: 10px;
  }

  /* IMPORTANTE: Desactivar Parallax en móviles, porque 'fixed' suele dar problemas */
  .nexal-newsletter-section {
    background-attachment: scroll;
  }
}

/* Newsletter messages */
.newsletter-message {
  margin-top: 12px;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
}

.newsletter-message.success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.newsletter-message.error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

@keyframes slowZoom {
  0% {
    transform: scale(1) translateY(0);
  }

  50% {
    transform: scale(1.03) translateY(-5px);
    /* Ligero movimiento vertical */
  }

  100% {
    transform: scale(1.05) translateY(-10px);
  }
}

/* Efecto al pasar el mouse */
.nexal-newsletter-section:hover .nexal-newsletter-overlay {
  background: rgba(0, 0, 0, 0.3);
  /* Oscurecimiento suave */
}

/* Bonus: Efecto en el formulario al hover (mejora UX) */
.input-group:focus-within,
.nexal-newsletter-section:hover .input-group {
  background: rgba(5, 10, 20, 0.9);
  border-color: #00e0ff;
  box-shadow: 0 0 20px rgba(0, 224, 255, 0.3);
}
