/* ═══════════════════════════════════════════════════════════════════
   LS DOMÓTICA — contacto.css
   ------------------------------------------------------------------
   Sección de contacto. Dos columnas (form + canales). Stack en mobile.
═══════════════════════════════════════════════════════════════════ */

.contacto-section {
  position: relative;
  padding: clamp(64px, 10vw, 120px) 20px;
  overflow: hidden;
}

.contacto-section::before {
  content: '';
  position: absolute;
  top: 20%; left: -10%;
  width: 40vw; height: 40vw;
  max-width: 620px; max-height: 620px;
  background: radial-gradient(circle, rgba(0, 149, 255, 0.05) 0%, transparent 65%);
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}

.contacto-container {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
}

/* ─── Header ──────────────────────────────────────────────────── */
.contacto-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.contacto-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #00d4ff;
  margin-bottom: 14px;
  padding: 6px 14px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 999px;
}

.contacto-title {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 14px;
  color: var(--text-primary, #fff);
  letter-spacing: -0.02em;
}

.contacto-title .gradient-text {
  background: linear-gradient(135deg, #00d4ff 0%, #0095ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: inline-block;
}

.contacto-subtitle {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary, rgba(255, 255, 255, 0.65));
  margin: 0;
}

/* ─── Grid ────────────────────────────────────────────────────── */
.contacto-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* ─── Form wrap ───────────────────────────────────────────────── */
.contacto-form-wrap {
  background: linear-gradient(160deg,
    rgba(255, 255, 255, 0.035) 0%,
    rgba(255, 255, 255, 0.012) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 32px;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  min-height: 500px;
  display: flex;
  flex-direction: column;
}

.contacto-state { flex: 1; display: flex; flex-direction: column; }
.contacto-state.hidden { display: none; }

/* ─── Form ────────────────────────────────────────────────────── */
.contacto-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contacto-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.contacto-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contacto-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-secondary, rgba(255, 255, 255, 0.75));
}

.contacto-label-opt {
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
}

.contacto-input,
.contacto-textarea,
.contacto-select {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--text-primary, #fff);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 150ms ease, background 150ms ease;
}

.contacto-input::placeholder,
.contacto-textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.contacto-input:focus,
.contacto-textarea:focus,
.contacto-select:focus {
  outline: none;
  border-color: rgba(0, 149, 255, 0.5);
  background: rgba(0, 149, 255, 0.06);
}

.contacto-textarea { resize: vertical; min-height: 100px; }

.contacto-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}

.contacto-select option {
  background: #0a0f1a;
  color: #fff;
}

.contacto-input.invalid,
.contacto-textarea.invalid,
.contacto-select.invalid {
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.04);
}

.contacto-err {
  font-size: 12px;
  color: #fca5a5;
  min-height: 0;
}

/* ─── Submit ──────────────────────────────────────────────────── */
.contacto-submit {
  width: 100%;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  position: relative;
}

.contacto-submit[disabled] { opacity: 0.6; cursor: not-allowed; }

.contacto-submit-spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cSpin 720ms linear infinite;
  position: absolute;
}

.contacto-submit.loading .contacto-submit-label,
.contacto-submit.loading .contacto-submit-arrow { opacity: 0; }

.contacto-submit.loading .contacto-submit-spinner { display: inline-block; }

@keyframes cSpin { to { transform: rotate(360deg); } }

.contacto-privacy {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  margin: 6px 0 0;
}

/* ─── Success / Error ─────────────────────────────────────────── */
.contacto-success,
.contacto-error {
  text-align: center;
  padding: 30px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.contacto-success-ico {
  margin-bottom: 4px;
}

.contacto-success h3,
.contacto-error h3 {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary, #fff);
}

.contacto-success p,
.contacto-error p {
  font-size: 14px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.65));
  margin: 0;
  max-width: 360px;
  line-height: 1.55;
}

.contacto-error-ico {
  font-size: 40px;
}

.contacto-error-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════
   CANALES DIRECTOS (der)
═══════════════════════════════════════════════════════════════ */

.contacto-channels {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contacto-channel-card {
  background: linear-gradient(160deg,
    rgba(255, 255, 255, 0.028) 0%,
    rgba(255, 255, 255, 0.012) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 180ms ease, transform 180ms ease;
}

.contacto-channel-card:hover {
  border-color: rgba(0, 149, 255, 0.25);
  transform: translateY(-2px);
}

.contacto-wa {
  background: linear-gradient(135deg,
    rgba(34, 197, 94, 0.06) 0%,
    rgba(34, 197, 94, 0.02) 100%);
  border-color: rgba(34, 197, 94, 0.22);
}

.contacto-wa:hover {
  border-color: rgba(34, 197, 94, 0.45);
}

.contacto-channel-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.contacto-channel-static {
  cursor: default;
}

.contacto-channel-ico {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 149, 255, 0.08);
  border: 1px solid rgba(0, 149, 255, 0.18);
  border-radius: 12px;
  font-size: 20px;
}

.contacto-wa .contacto-channel-ico {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.25);
}

.contacto-channel-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.contacto-channel-body strong {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary, #fff);
}

.contacto-channel-body span {
  font-size: 14px;
  color: var(--text-primary, rgba(255, 255, 255, 0.85));
  font-weight: 500;
  word-break: break-word;
}

.contacto-channel-body em {
  font-size: 11.5px;
  font-style: normal;
  color: var(--text-secondary, rgba(255, 255, 255, 0.5));
  margin-top: 2px;
}

.contacto-channel-arrow {
  flex-shrink: 0;
  font-size: 16px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.4));
  transition: transform 180ms ease, color 180ms ease;
}

.contacto-channel-card:hover .contacto-channel-arrow {
  transform: translateX(4px);
  color: #00d4ff;
}

.contacto-wa:hover .contacto-channel-arrow {
  color: #22c55e;
}

/* ─── Social ──────────────────────────────────────────────────── */
.contacto-social {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
}

.contacto-social-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary, rgba(255, 255, 255, 0.7));
}

.contacto-social-icons {
  display: flex;
  gap: 8px;
}

.contacto-social-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.7));
  text-decoration: none;
  transition: all 180ms ease;
}

.contacto-social-btn:hover {
  background: rgba(0, 149, 255, 0.1);
  border-color: rgba(0, 149, 255, 0.3);
  color: #00d4ff;
  transform: translateY(-2px);
}

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  /* Canales (WhatsApp) primero, formulario después */
  .contacto-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .contacto-channels {
    order: -1;
  }
  .contacto-form-wrap { min-height: auto; padding: 24px; }
  .contacto-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .contacto-form-wrap { padding: 22px; }
  .contacto-channel-link { padding: 16px; gap: 12px; }
  .contacto-channel-ico { width: 40px; height: 40px; font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .contacto-channel-card, .contacto-social-btn,
  .contacto-submit-spinner, .contacto-channel-arrow {
    transition: none;
    animation: none;
  }
}
