/* =========================
   CONTACTO — Credifiable
========================= */

#contenido {
  background: #fff;
  padding: clamp(32px, 6vw, 72px) clamp(16px, 4vw, 24px);
  max-width: var(--maxw);
  margin: 0 auto;

  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(20px, 4vw, 40px);
  align-items: start;
}

/* -------- Encabezado -------- */
.contacto-head {
  grid-column: 1 / -1;
  margin: 0 0 clamp(20px, 3vw, 28px);
  text-align: left;
}
#contacto-title {
  margin: 0 0 6px;
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--text);
  text-align: left;
}
.contacto-sub {
  margin: 0;
  color: #51636b;
  font-size: clamp(.95rem, 2.4vw, 1.05rem);
  text-align: left;
}

/* -------- Info: mapa + datos -------- */
.contacto-info {
  display: flex;
  flex-direction: column;
  gap: clamp(60px, 7vw, 80px);
  text-align: left;
}
.mapa {
  margin: 0 0 28px;
}
.mapa iframe {
  width: 100%;
  height: 380px; 
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}


.mapa,
.contacto-map,
.mapa-embed {  /* cubrimos los 3 nombres comunes */
  margin-bottom: clamp(28px, 6vw, 72px) !important;
}


.datos {
  display: block;
  text-align: left;
}
.lista-datos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  text-align: left;
}
.lista-datos li {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: start;
  column-gap: 12px;
}
.lista-datos li i {
  font-size: 20px;
  color: #00d0bc;
  line-height: 1;
  margin-top: 2px;
}
.lista-datos address {
  font-style: normal;
}
.lista-datos a {
  text-decoration: underline;
  color: var(--text);
}

/* -------- Formulario -------- */
.contacto-card {
  background: #e8f8f6;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 40px);
  text-align: left;
}

/* Texto intro */
.cta-text {
  font-size: 1rem;
  margin: 0 0 20px;
  color: #2e3b3f;
  text-align: center;
}

/* WhatsApp + separador en columna */
.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25d366;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: var(--radius);
  transition: background .2s ease;
}
.btn-whatsapp:hover {
  background: #1ebe5b;
}

/* divisor con líneas y texto ó */
.divider {
  display: flex;
  align-items: center;
  width: 100%;
  color: #000;
  font-weight: 700;
  font-size: 1rem;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 3px;
  background: #fff; 
}
.divider::before {
  margin-right: 10px;
}
.divider::after {
  margin-left: 10px;
}


/* Formulario */
.form {
  display: grid;
  gap: 16px;
}
.campo {
  display: flex;
  flex-direction: column;
}
.campo label {
  font-weight: 700;
  margin-bottom: 6px;
}
.campo input {
  padding: 10px;
  border: 1px solid #bbb;
  border-radius: var(--radius);
  font-size: 1rem;
  background: #fff;
}
.campo input:focus {
  outline: 2px solid #4b3b91;
  border-color: #4b3b91;
}

/* Checkbox */
.checks {
  margin: 10px 0 4px;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .9rem;
  line-height: 1.4;
}

/* Botón enviar */
.btn-enviar {
  background: #4b3b91;
  color: #fff;
  font-weight: 700;
  padding: 12px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s ease;
  width: 100%;
}
.btn-enviar:hover {
  background: #3a3175;
}

/* =========================
   ERRORES DEL FORMULARIO
========================= */

/* Campo inválido */
.is-invalid {
  border-color: #d93025 !important; /* rojo */
  outline: none;
  animation: shake 0.25s ease;
}

/* Texto de error */
.field-error {
  display: block;
  margin-top: 4px;         /* pequeño espacio debajo del input */
  font-size: 0.9rem;
  color: #d93025;          /* rojo */
  font-weight: 600;
  line-height: 1.3;
}

/* Animación shake */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

/* =========================
   MENSAJES DEL FORMULARIO
========================= */
.form-status {
  margin-top: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid transparent; 
}

/* Error */
.form-status.error {
  color: #7d1b1b;           /* texto rojo oscuro */
  background: #fdecec;      /* fondo rojo muy claro */
  border: 1px solid #f5b5b5;
}

/* Éxito */
.form-status.success {
  color: #0a4d26;
  background: #e6f5ed;
  border: 1px solid #9fd8b5;
}

/* Info */
.form-status.info {
  color: #333;
  background: #f3f3f3;
  border: 1px solid #ccc;
}

.form-status:empty { 
  display: none; 
}

#recaptcha-placeholder {
  width: 0;
  height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 0;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 860px){
  #contenido{ 
    grid-template-columns: 1fr; 
  }

  .contacto-info{ 
    align-items: flex-start; 
  }

  /* Header margen lateral */
  .contacto-head{
    max-width: 100%;
    margin: 0 28px 28px;
  }

  /* Mapa margen lateral */
  .mapa{ 
    max-width: 100%; 
    margin: 0 auto 28px;
  }

  /* Datos margen lateral */
  .datos{ 
    max-width: 100%; 
    margin: 0 28px;
  }

  .contacto-card{ 
    order: 2; 
    margin: 0 16px;
  }
}

/* Mapa responsivo y sin saltos de layout */
.contacto-map { margin: 0; }

.mapa-embed {
  aspect-ratio: 3 / 2;              
  background: #eef2f4;               
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.mapa-embed iframe {
  width: 100%;
  height: 100%;
  display: block;                   
}

/* Ajuste en móvil: cuadrado para más altura visible */
@media (max-width: 600px) {
  .mapa-embed { aspect-ratio: 1 / 1; }
}
