/* ============================================================
   contacto.css
   Sección Contacto: encabezado, grid formulario/sidebar,
   campos de formulario, feedback states, datos, mapa.
   Depende de: base.css (variables, .btn, .section-rule,
               .emp-section-tag, .reveal)
   ============================================================ */

/* ── Contenedor interno ─────────────────────────────────────── */
.con-container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

/* ════════════════════════════════════════════════════════════
   ENCABEZADO
   ════════════════════════════════════════════════════════════ */
.con-header {
  background: var(--clr-bg-2);
  padding: 7rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.con-header::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(200, 147, 58, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.con-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--clr-white);
  margin: 1rem 0 1.5rem;
}

.con-title em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--clr-accent);
}

.con-subtitle {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--clr-text-muted);
  max-width: 520px;
}

/* ════════════════════════════════════════════════════════════
   CUERPO: GRID formulario + sidebar
   ════════════════════════════════════════════════════════════ */
.con-body {
  background: var(--clr-bg);
  padding: 5rem 0 6rem;
}

.con-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 4rem;
  align-items: start;
}

/* ════════════════════════════════════════════════════════════
   FORMULARIO
   ════════════════════════════════════════════════════════════ */
.con-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Filas */
.con-form-row {
  display: flex;
  flex-direction: column;
}

.con-form-row--2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

/* Campo individual */
.con-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.con-field label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
}

.con-label-opt {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--clr-text-dim);
  font-family: var(--font-body);
  font-size: 0.75rem;
}

.con-field input,
.con-field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border-md);
  border-radius: 4px;
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
  -webkit-appearance: none;
}

.con-field input::placeholder,
.con-field textarea::placeholder {
  color: var(--clr-text-dim);
}

.con-field input:focus,
.con-field textarea:focus {
  border-color: var(--clr-accent);
  background: rgba(200, 147, 58, 0.03);
  box-shadow: 0 0 0 3px var(--clr-accent-dim);
}

.con-field textarea {
  resize: vertical;
  min-height: 140px;
}

/* Estado error */
.con-field--err input,
.con-field--err textarea {
  border-color: #e05555;
  background: rgba(224, 85, 85, 0.04);
}

.con-field--err input:focus,
.con-field--err textarea:focus {
  box-shadow: 0 0 0 3px rgba(224, 85, 85, 0.15);
}

.con-field-err {
  font-size: 0.75rem;
  color: #e05555;
  letter-spacing: 0.02em;
}

/* Acciones del form */
.con-form-actions {
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.con-submit {
  position: relative;
  min-width: 200px;
  justify-content: center;
}

/* Estado loading del botón */
.con-submit-loading { display: none; }

.con-submit.loading .con-submit-text    { display: none; }
.con-submit.loading .con-submit-loading { display: inline; }
.con-submit.loading { opacity: 0.7; pointer-events: none; cursor: default; }

.con-form-note {
  font-size: 0.75rem;
  color: var(--clr-text-dim);
  line-height: 1.5;
  flex: 1;
}

/* ── Feedback: éxito / error ────────────────────────────────── */
.con-feedback {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 6px;
  border: 1px solid;
}

.con-feedback--ok {
  background: rgba(56, 161, 105, 0.06);
  border-color: rgba(56, 161, 105, 0.25);
  color: #68d391;
}

.con-feedback--err {
  background: rgba(224, 85, 85, 0.06);
  border-color: rgba(224, 85, 85, 0.25);
  color: #fc8181;
}

.con-feedback-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.con-feedback--ok  .con-feedback-icon { background: rgba(56, 161, 105, 0.15); }
.con-feedback--err .con-feedback-icon { background: rgba(224, 85, 85, 0.15); }

.con-feedback-icon svg { width: 18px; height: 18px; }

.con-feedback strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
  color: inherit;
}

.con-feedback p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--clr-text-muted);
}

/* ════════════════════════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════════════════════════ */
.con-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}

/* ── WhatsApp CTA ───────────────────────────────────────────── */
.con-wsp-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #1a3c28 0%, #0f2419 100%);
  border: 1px solid rgba(37, 211, 102, 0.25);
  border-radius: 6px 6px 0 0;
  text-decoration: none;
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}

.con-wsp-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(37, 211, 102, 0.04);
  opacity: 0;
  transition: opacity 0.25s;
}

.con-wsp-btn:hover {
  border-color: rgba(37, 211, 102, 0.5);
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.12);
  transform: translateY(-2px);
}

.con-wsp-btn:hover::before { opacity: 1; }

.con-wsp-icon {
  color: #25D366;
  flex-shrink: 0;
}

.con-wsp-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.con-wsp-text strong {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #25D366;
}

.con-wsp-text span {
  font-size: 0.75rem;
  color: rgba(37, 211, 102, 0.6);
  letter-spacing: 0.04em;
}

.con-wsp-arrow {
  color: rgba(37, 211, 102, 0.5);
  flex-shrink: 0;
  transition: transform 0.25s var(--ease), color 0.25s;
}

.con-wsp-btn:hover .con-wsp-arrow {
  transform: translateX(4px);
  color: #25D366;
}

/* ── Datos de contacto ──────────────────────────────────────── */
.con-datos {
  border: 1px solid var(--clr-border-md);
  border-top: none;
  border-radius: 0 0 6px 6px;
  overflow: hidden;
}

.con-dato {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--clr-border);
  transition: background 0.25s;
}

.con-dato:last-child { border-bottom: none; }
.con-dato:hover      { background: var(--clr-surface); }

.con-dato-icon {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: var(--clr-accent-dim);
  border: 1px solid rgba(200, 147, 58, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-accent);
  flex-shrink: 0;
}

.con-dato-icon svg { width: 16px; height: 16px; }

.con-dato-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.con-dato-label {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clr-text-dim);
}

.con-dato-value {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  text-decoration: none;
  line-height: 1.5;
  transition: color 0.2s;
}

a.con-dato-value:hover { color: var(--clr-accent); }

/* ════════════════════════════════════════════════════════════
   MAPA
   ════════════════════════════════════════════════════════════ */
.con-mapa {
  position: relative;
  height: 420px;
  border-top: 1px solid var(--clr-border);
  overflow: hidden;
}

.con-mapa-iframe {
  display: block;
  width: 100%;
  height: 100%;
}

.con-mapa:hover .con-mapa-iframe {
  /* sin efecto hover */
}

/* Badge "Abrir en Google Maps" */
.con-mapa-overlay {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2;
}

.con-mapa-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 1rem;
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--clr-border-md);
  border-radius: 3px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--clr-text-muted);
  transition: color 0.2s, border-color 0.2s;
}

.con-mapa-link:hover {
  color: var(--clr-accent);
  border-color: rgba(200, 147, 58, 0.3);
}

.con-mapa-link svg { color: inherit; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .con-grid { grid-template-columns: 1fr; gap: 3rem; }

  .con-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .con-wsp-btn   { border-radius: 6px 0 0 6px; border-right: none; }
  .con-datos     { border-radius: 0 6px 6px 0; border-top: 1px solid var(--clr-border-md); border-left: none; }
}

@media (max-width: 768px) {
  .con-header  { padding: 5rem 0 4rem; }
  .con-body    { padding: 4rem 0 5rem; }

  .con-form-row--2 { grid-template-columns: 1fr; }

  .con-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .con-submit { width: 100%; }

  .con-sidebar {
    grid-template-columns: 1fr;
  }

  .con-wsp-btn   { border-radius: 6px 6px 0 0; border-right: 1px solid rgba(37, 211, 102, 0.25); }
  .con-datos     { border-radius: 0 0 6px 6px; border-top: none; border-left: 1px solid var(--clr-border-md); }

  .con-mapa { height: 300px; }
}

@media (max-width: 480px) {
  .con-mapa { height: 240px; }
}