/* =============================================
   FOOTER — WEPY.AI
   Zona superior: grid 4 columnas
   Zona inferior: barra de copyright
   ============================================= */


/* ─────────────────────────────────────────────
   CONTENEDOR BASE
   ───────────────────────────────────────────── */
.footer {
  background: #0F172A;
  padding-top: 80px;
}

.footer__container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}


/* ─────────────────────────────────────────────
   GRID SUPERIOR — 4 COLUMNAS
   ───────────────────────────────────────────── */
.footer__grid {
  display: grid;
  grid-template-columns: 21fr 21fr 21fr 37fr;
  gap: 44px;
  padding-bottom: 48px;
}


/* ─────────────────────────────────────────────
   COLUMNA 1 — MARCA
   ───────────────────────────────────────────── */
.footer__logo-link {
  display: inline-block;
  margin-bottom: 16px;
}

.footer__logo {
  height: 28px;
  width: auto;
  display: block;
}

.footer__tagline {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
}

.footer__ig-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.50);
  opacity: 1;
  transition: color var(--transition-fast);
  line-height: 0;
}

.footer__ig-link:hover {
  color: rgba(255, 255, 255, 1);
}


/* ─────────────────────────────────────────────
   COLUMNAS 2 Y 3 — TÍTULO COMÚN
   ───────────────────────────────────────────── */
.footer__col-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 16px;
}


/* ─────────────────────────────────────────────
   COLUMNA 2 — NAVEGACIÓN
   ───────────────────────────────────────────── */
.footer__nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__nav-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.footer__nav-link:hover {
  color: rgba(255, 255, 255, 1);
  transform: translateX(4px);
}


/* ─────────────────────────────────────────────
   COLUMNA 3 — CONTACTO
   ───────────────────────────────────────────── */
.footer__email {
  display: inline-block;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color var(--transition-fast);
  word-break: break-all;
}

.footer__email:hover {
  color: rgba(255, 255, 255, 1);
}

.footer__whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 16px;
  background: #25D366;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  transition: background var(--transition-fast);
}

.footer__whatsapp:hover {
  background: #1DAA54;
}

.footer__whatsapp svg {
  flex-shrink: 0;
}


/* ─────────────────────────────────────────────
   COLUMNA 4 — FORMULARIO
   ───────────────────────────────────────────── */
.footer__form-title {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 20px;
}

.footer__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__input,
.footer__textarea {
  width: 100%;
  background: #1E293B;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 12px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #ffffff;
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.footer__input::placeholder,
.footer__textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.footer__input:focus,
.footer__textarea:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.footer__textarea {
  resize: none;
  line-height: 1.6;
}

.footer__submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(90deg, #2563EB 0%, #14B8A6 100%);
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: opacity 200ms ease, transform 200ms ease;
}

.footer__submit:hover {
  opacity: 0.90;
  transform: scale(1.01);
}


/* ── Validación: wrapper por campo ───────── */
.footer__field {
  position: relative;
}

.footer__field .footer__input {
  padding-right: 38px;
}

.footer__field-icon {
  position: absolute;
  right: 12px;
  top: 18px;
  width: 16px;
  height: 16px;
  opacity: 0;
  transition: opacity 150ms ease;
  pointer-events: none;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer__field-icon.is-visible {
  opacity: 1;
}

.footer__field-error {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #EF4444;
  margin-top: 4px;
  opacity: 0;
  transition: opacity 150ms ease;
  min-height: 0;
}

.footer__field-error.is-visible {
  opacity: 1;
}

.footer__input.is-error { border-color: #EF4444; }
.footer__input.is-valid { border-color: #14B8A6; }


/* ── Botón: estado de carga ──────────────── */
.footer__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.footer__submit.is-loading {
  opacity: 0.7;
  cursor: not-allowed;
}

@keyframes footer-spin {
  to { transform: rotate(360deg); }
}

.footer__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  flex-shrink: 0;
  animation: footer-spin 0.65s linear infinite;
}


/* ── Transición del formulario ───────────── */
.footer__form {
  transition: opacity 300ms ease;
}


/* ── Estado de éxito ─────────────────────── */
.footer__form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 32px 16px;
  transition: opacity 300ms ease;
}

.footer__form-success[hidden] {
  display: none;
}

.footer__success-icon {
  line-height: 0;
}

.footer__success-title {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

.footer__success-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
}


/* ─────────────────────────────────────────────
   DIVISOR
   ───────────────────────────────────────────── */
.footer__divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.10);
}


/* ─────────────────────────────────────────────
   BARRA INFERIOR — COPYRIGHT
   ───────────────────────────────────────────── */
.footer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
}

.footer__copy {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.5;
}

.footer__credit {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.25);
  line-height: 1.5;
}


/* ─────────────────────────────────────────────
   RESPONSIVE — MÓVIL (max 767px)
   ───────────────────────────────────────────── */
@media (max-width: 767px) {
  .footer {
    padding-top: 56px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-bottom: 40px;
  }

  /* Orden: Marca → Formulario → Contacto → Navegación */
  .footer__col--brand   { order: 1; }
  .footer__col--form    { order: 2; }
  .footer__col--contact { order: 3; }
  .footer__col--nav     { order: 4; }

  /* En móvil: logo + ig-link en la misma línea */
  .footer__col--brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 16px;
    row-gap: 8px;
  }

  .footer__logo-link {
    margin-bottom: 0;
  }

  .footer__ig-link {
    margin-top: 0;
  }

  .footer__tagline {
    width: 100%;
  }

  /* Copyright apilado y centrado */
  .footer__bar {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
  }
}
