/* Formulario de Contacto — base sobre el design system del sitio (paleta de login/compra).
   A afinar contra Figma cuando esté disponible. */

.nx-contacto-section {
    background: var(--nx-bg-soft, #f7f8fa);
    padding: 48px 16px 72px;
}
.nx-contacto-container {
    max-width: 760px;
    margin: 0 auto;
}

.nx-contacto-header { text-align: center; margin-bottom: 28px; }
.nx-contacto-title {
    font-size: 30px;
    font-weight: 700;
    color: #181d27;
    margin: 0 0 8px;
    letter-spacing: -0.4px;
}
.nx-contacto-subtitle {
    font-size: 15px;
    color: #535862;
    line-height: 1.5;
    margin: 0 auto;
    max-width: 560px;
}

.nx-contacto-form {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 1px 3px rgba(16, 26, 40, 0.04);
}

.nx-contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 18px;
}
.nx-contacto-full { grid-column: 1 / -1; }

.nx-contacto-form .nx-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}
.nx-contacto-form .nx-field-label {
    font-size: 13px;
    font-weight: 600;
    color: #181d27;
}
.nx-req { color: #cc0000; }

.nx-contacto-form .nx-field-input {
    box-sizing: border-box;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #b6bfcd;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    color: #06162B;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
}
.nx-contacto-form .nx-field-input:focus {
    outline: none;
    border-color: #898ef2;
    box-shadow: 0 0 0 3px rgba(137, 142, 242, 0.18);
}
.nx-contacto-textarea { resize: vertical; min-height: 140px; }
.nx-contacto-form .nx-field-input.is-error { border-color: #dc2626; }

/* Captcha */
.nx-contacto-captcha-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.nx-contacto-captcha-img {
    height: 50px;
    width: 200px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    display: block;
}
.nx-contacto-captcha-refresh {
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    color: #535862;
    transition: background 0.15s ease, color 0.15s ease;
}
.nx-contacto-captcha-refresh:hover { background: #f3f4f6; color: #181d27; }
.nx-contacto-captcha-input { flex: 1 1 160px; min-width: 140px; max-width: 220px; letter-spacing: 2px; text-transform: uppercase; }
/* Placeholder normal (no en mayúsculas ni espaciado); solo el texto tipeado. */
.nx-contacto-captcha-input::placeholder { text-transform: none; letter-spacing: normal; }

/* Errores generales */
.nx-contacto-errores {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 14px;
}
.nx-contacto-errores p { margin: 2px 0; }

.nx-contacto-actions {
    margin-top: 22px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nx-contacto-submit { min-width: 180px; }
.nx-contacto-submit[disabled] { opacity: 0.6; cursor: default; }

/* Estado de éxito */
.nx-contacto-exito {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 40px 28px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(16, 26, 40, 0.04);
}
.nx-contacto-exito-icon {
    width: 56px; height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    font-size: 30px;
    display: flex; align-items: center; justify-content: center;
}
.nx-contacto-exito h2 { font-size: 22px; color: #181d27; margin: 0 0 8px; }
.nx-contacto-exito p { color: #535862; margin: 0 0 20px; }

@media (max-width: 640px) {
    .nx-contacto-grid { grid-template-columns: 1fr; }
    .nx-contacto-form { padding: 22px 18px; }
    .nx-contacto-actions { flex-direction: column; align-items: stretch; }
    .nx-contacto-submit { width: 100%; }
}

/* Grupo de datos personales: se oculta cuando el motivo es anónimo (paridad legacy).
   display:contents deja que los .nx-field participen del grid como si el wrapper no existiera. */
.nx-contacto-anonimo-group { display: contents; }
.nx-contacto-anonimo-group.is-oculto { display: none; }

/* Nota de campos obligatorios (paridad legacy). */
.nx-contacto-obligatorios {
    margin: 0;
    font-size: 13px;
    color: #535862;
}
.nx-contacto-obligatorios .nx-req { color: #cc0000; }

/* Asterisco de campo obligatorio en rojo (como legacy). */
.nx-contacto-form .nx-req { color: #cc0000; font-weight: 600; }

/* ===== Hub de contacto (formas de contacto) ===== */
.nx-ct-hub { padding: 72px 0 96px; }
.nx-ct-hub-header { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.nx-ct-hub-title { font-size: 2rem; font-weight: 700; color: #0f1a28; margin: 0 0 12px; }
.nx-ct-hub-subtitle { font-size: 1rem; line-height: 1.6; color: #4a5567; margin: 0; }
.nx-ct-hub-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}
.nx-ct-hub-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  background: #0f1a28;
  border-radius: 24px;
  padding: 28px 28px 32px;
  box-shadow: 0 20px 24px -4px rgba(10,13,18,0.12);
}
.nx-ct-hub-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(246,253,96,0.14); color: #f6fd60; }
.nx-ct-hub-head { display: flex; flex-direction: column; gap: 2px; }
.nx-ct-hub-cardtitle { font-size: 1.25rem; font-weight: 600; color: #fff; margin: 0; }
.nx-ct-hub-tag { font-size: 0.8rem; color: #9fb0c3; }
.nx-ct-hub-desc { font-size: 0.95rem; line-height: 1.5; color: #d2dae6; margin: 0; flex: 1; }
.nx-ct-hub-phone { font-size: 1.05rem; font-weight: 600; color: #fff; margin: 0; }
.nx-ct-hub-btn { margin-top: 8px; }
@media (max-width: 720px) { .nx-ct-hub-list { grid-template-columns: 1fr; } .nx-ct-hub { padding: 48px 0 64px; } }
