.footer-right {
  background: var(--gray-light);
  display: flex;
  justify-content: flex-start;
}

.footer-form-container {
  background: transparent;
  width: 100%;
  max-width: 623px;
  padding: 2rem 3rem;
}

.footer-form-wrapper {
  max-width: 479px;
}

.footer-form-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 2rem;
}

.footer-form-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--blue);
  line-height: 120%;
  letter-spacing: -0.5px;
  margin: 0;
}

.footer-form-subtitle {
  font-size: 1rem;
  font-weight: 400;
  color: var(--gray-dark);
  margin: 0;
  line-height: 140%;
  letter-spacing: 0;
}

.footer-contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
  width: 100%;
  max-width: 479px;
}

.footer-form-note {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--gray-dark);
  margin: 0;
  line-height: 100%;
  letter-spacing: 0;
}

.footer-form-row {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.footer-form-row:last-of-type {
  margin-bottom: 0;
}

.footer-form-group {
  position: relative;
  flex: 1;
  min-width: 0;
}

.footer-form-group-full {
  width: 100%;
  flex: 1;
}

.footer-input {
  width: 100%;
  padding: 0.625rem 0;
  padding-top: 1.75rem;
  border: none;
  border-bottom: 1px solid var(--gray-dark);
  background: transparent;
  color: var(--gray-dark);
  font-size: 1rem;
  height: 2.75rem;
  font-weight: 400;
  line-height: 150%;
  letter-spacing: 0;
  transition: border-bottom-color 0.2s ease;
}

.footer-input::placeholder {
  color: transparent;
}

.footer-form-group label {
  position: absolute;
  left: 0;
  bottom: 0.75rem;
  color: var(--gray-dark);
  opacity: 0.7;
  font-size: 1rem;
  pointer-events: none;
  transition: all 0.2s ease-out;
  font-weight: 400;
}

.footer-input:focus + label,
.footer-input:not(:placeholder-shown) + label {
  transform: translateY(-1.75rem) scale(0.85);
  transform-origin: left top;
  opacity: 1;
  color: var(--blue);
}

.footer-input:focus {
  border-bottom-color: var(--blue);
  outline: none;
}

.footer-input:focus:invalid {
  border-bottom-color: var(--error, #dd0000);
}

.footer-input:focus:invalid + label {
  color: var(--error, #dd0000);
}

/* Estilos para validación de campos vacíos */
.footer-form-group input[data-empty="true"] {
  border-bottom-color: var(--error, #dd0000);
}

.footer-form-group input[data-empty="true"] + label {
  color: var(--error, #dd0000);
}

/* Animación suave para el label */
.footer-form-group label {
  will-change: transform, opacity, color;
}

.footer-input-full {
  width: 100%;
}

.footer-input::placeholder {
  color: var(--gray-dark);
}

.footer-recaptcha {
  width: 210px;
  height: 56px;
}

.footer-checkbox-group {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.footer-checkbox {
 max-width: 257px;
 gap: 0.5rem;
}

.footer-checkbox-label {
  font-size: 0.875rem;
  font-weight: 400;
  color: #585855;
  line-height: 100%;
  letter-spacing: 0;
  vertical-align: middle;
}

.footer-link {
  text-decoration: underline;
  text-underline-offset: 0.25rem;
  text-decoration-thickness: 5%;
  text-decoration-color: var(--gray-dark);
  text-decoration-style: solid;
  color: var(--gray-dark);
}

.footer-link:hover {
  color: var(--lilac);
}

.footer-submit-btn {
  background: var(--blue);
  color: var(--white);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 100%;
  letter-spacing: 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* Estilos de foco visible para accesibilidad */
.footer-submit-btn:focus,
.footer-input:focus {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  background-color: rgba(67, 50, 255, 0.1);
  border-radius: 4px;
  transition: all 0.2s ease;
}

/* Mensajes de validación del footer */
.footer-validation-message {
  position: absolute;
  bottom: -1.5rem;
  left: 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: #dd0000;
  opacity: 0;
  transform: translateY(-0.5rem);
  transition: all 0.2s ease;
  width: 100%;
  pointer-events: none;
}

/* Mostrar mensaje de validación cuando el campo está vacío o enfocado */
.footer-input:focus:invalid ~ .footer-validation-message,
.footer-input[data-empty="true"] ~ .footer-validation-message {
  opacity: 1;
  transform: translateY(0);
}

/* Cambiar color del borde cuando hay error */
.footer-input:focus:invalid,
.footer-input[data-empty="true"] {
  border-bottom-color: #dd0000;
}

.footer-checkbox:focus {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  background-color: rgba(67, 50, 255, 0.1);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.footer-checkbox-label a:focus {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  text-decoration: underline;
  background-color: rgba(67, 50, 255, 0.1);
  border-radius: 2px;
  padding: 2px 4px;
  transition: all 0.2s ease;
}

/* Feedback styles for footer form */
.footer-contact-form {
  position: relative;
  transition: height 0.4s ease;
}

.footer-contact-form .feedback-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  gap: 2.5rem;
  padding: 2rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background: var(--gray-light);
  z-index: 10;
}

.footer-contact-form .feedback-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--blue);
  margin: 0;
}

.footer-contact-form .feedback-text span {
  font-weight: 400;
}

.footer-contact-form .feedback-btn {
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  text-align: center;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
}

.footer-contact-form .feedback-btn:hover {
  background: var(--blue);
  color: var(--white);
}

/* Footer form submitted state */
.footer-contact-form.form-submitted .footer-form-header,
.footer-contact-form.form-submitted .footer-form-note,
.footer-contact-form.form-submitted .footer-form-row,
.footer-contact-form.form-submitted .footer-recaptcha,
.footer-contact-form.form-submitted .footer-checkbox-group {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.footer-contact-form.form-submitted .feedback-container {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 20;
}

@media (max-width: 767px) {
  .footer-form-container {
    display: flex;
    padding: 2.25rem 1.25rem;
    gap: 4rem;
  }

  .footer-form-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .footer-form-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0;
    min-width: 271px;
  }
  
  .footer-contact-form {
    gap: 2rem;
    min-width: 335px;
    width: 100%;
  }

  .footer-form-row {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }
  
  .footer-form-group {
    width: 100%;
  }
  
  .footer-input {
    font-size: 16px; /* Evita zoom en iOS */
  }
  
  .footer-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: flex-start;
  }
  
}

@media (min-width: 768px) and (max-width: 1024px) {
  .footer-form-container {
    padding: 2.25rem 2rem;
  }
  
  .footer-contact-form {
    min-width: 0;
    max-width: 100%;
  }
  
  .footer-form-row {
    flex-direction: column;
    gap: 1rem;
  }
}