:root {
  --ink: #0e1320;
  --muted: #6b7280;
  --line: #e7ecf5;
  --brand: #0c4a7a;   /* azul del sitio */
  --brand-hover: #2563eb;
  --bg: #fff;
  --ok: #16a34a;
  --err: #ef4444;
  --container: 1200px;
  --radius: 12px;
}

/* ===== BASE ===== */
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden; /* evita scroll horizontal por 100vw y full-bleed */
}

a {
  color: var(--brand);
  text-decoration: none;
}
a:hover,
a:focus { color: var(--brand-hover); text-decoration: underline; }
a:focus-visible { outline: 2px solid rgba(12,74,122,.25); outline-offset: 2px; }

/* ===== CONTENEDOR GENERAL ===== */
.p-wrap {
  width: min(var(--container), 100%);
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== ENCABEZADO: "Contacto" ===== */
.p-head {
  padding: 30px 0 35px;
  background: #fff;
}

.p-title {
  /* Máximo respeta tu 3.3rem; se adapta en pantallas chicas */
  font-size: clamp(1.8rem, 3.2vw + 1rem, 3.3rem);
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  color: var(--ink);
  margin: 0;
  text-shadow: 0 0 .3px currentColor;
}

.p-underline {
  display: block;
  width: 100px;
  height: 3px;
  background-color: #0d60b4;
  margin-top: 20px;
  border-radius: 4px;
}

/* ===== BANNER ===== */
.p-banner { margin: 0; }
.p-banner img {
  width: 100vw;              /* conservado */
  max-width: 100%;           /* seguridad */
  height: 260px;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0 auto;
  border-radius: 0;
}
@media (max-width: 768px) {
  .p-banner img { height: 180px; }
}

/* ===== BLOQUE INFORMATIVO ===== */
.p-info {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 50/50 columnas */
  gap: 50px;                      /* Espacio entre columnas */
  margin: 30px 0 40px;
}
@media (max-width: 1024px) {
  .p-info { gap: 36px; }
}
@media (max-width: 900px) {
  .p-info { grid-template-columns: 1fr; gap: 28px; }
}

.p-h2 { font-size: 1.4rem; font-weight: 600; margin-bottom: 10px; }
.p-h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.p-lead { font-weight: 400; color: #444; }
.p-link { font-weight: 600; color: var(--brand); }
.p-link:hover { text-decoration: underline; color: var(--brand-hover); }
.p-line { margin-bottom: 18px; }
.p-addr { margin-bottom: 6px; color: var(--ink); }
.p-phone { font-weight: 600; color: var(--ink); }

@media (max-width: 576px) {
  .p-h2 { font-size: 1.25rem; }
  .p-h3 { font-size: 1rem; }
  .p-lead { font-size: .98rem; }
}

/* ===== CV BLOQUE ===== */
.cv-block { margin-top: 18px; }
.cv-text { font-weight: 600; margin-bottom: 12px; }
.btn-cv {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
}
.btn-cv:hover{
  display: inline-block;
  background: var(--brand-hover);
  color: #fff;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
}

/* ===== REDES SOCIALES ===== */
/* Fix: evitar que los enlaces visitados se vean morados/rosados */
.social-block a,
.social-block a:visited {
  color: var(--brand);
  text-decoration: none;
}
.social-block a:hover,
.social-block a:focus {
  color: var(--brand-hover);
  text-decoration: underline;
}

/* Fila horizontal y flexible, pero sin cortar los @usuarios en 2 líneas */
.social-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
}
.social-line li {
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--muted);
  font-size: .95rem;
  white-space: nowrap;         /* evita quiebres en textos largos */
  min-width: 0;                /* permite elipsis si es necesario */
  overflow: hidden;
  text-overflow: ellipsis;
}
.social-line li i {
  margin-right: 6px;
  color: var(--brand);
  font-size: 1rem;
  flex: 0 0 auto;
}

/* Bloques por área: siguen horizontales; en móvil se apilan los grupos,
   pero cada enlace se mantiene en UNA sola línea */
.social-block {
  display: flex;
  flex-wrap: nowrap;
  gap: 15px;
}
.social-group { flex: 1 1 240px; min-width: 220px; }
.social-group h4 {
  margin: 10px 0 12px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}
.social-group ul { list-style: none; margin: 0; padding: 0; }
.social-group li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: .95rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;          /* clave: no partir en 2 líneas */
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.social-group li i { font-size: 1.1rem; color: var(--brand); }

.social-group li a {
  white-space: nowrap;          /* mantiene el usuario en una línea */
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: inline-block;
}

@media (max-width: 992px) {
  .social-block { flex-wrap: wrap; }
  .social-group { flex: 1 1 320px; }
}
@media (max-width: 576px) {
  .social-group { flex: 1 1 100%; }
  .social-line { gap: 10px 14px; }
}

/* ===== FORMULARIO ===== */
.p-form { margin-bottom: 60px; }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.c-form { margin-top: 6px; }
.group { display: flex; flex-direction: column; margin-bottom: 14px; }
.lbl { font-weight: 600; margin-bottom: 4px; color: var(--ink); }

.inp {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 1rem;
  background: #fff;
  width: 100%; /* responsive */
}
.inp:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 2px rgba(47, 93, 204, .1);
}
.ta { min-height: 120px; resize: vertical; }

.err { color: var(--err); font-size: .9rem; margin-top: 4px; }

.btn {
  background: var(--brand);
  color: #fff;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: .2s ease;
}
.btn:hover { opacity: .95; background: var(--brand-hover); }
.btn--disabled {
  background: #ccc !important;
  color: #666 !important;
  cursor: not-allowed !important;
  opacity: .8 !important;
}

.hint { font-size: .9rem; color: var(--muted); margin-top: 8px; }

/* ===== ALERTAS ===== */
.alert { border-radius: 8px; padding: 12px 14px; margin: 16px 0; }
.alert.ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.alert.error {
  background: #fff1f2;
  color: #991b1b;
  border: 1px solid #fecdd3;
}
.alert-list { margin: 0; padding-left: 18px; }

/* ===== HONEYPOT ===== */
.hp { display: none !important; }

/* ===== MAPA ===== */
.p-map-container {
  width: 100vw;
  margin-top: 40px;
  margin-left: calc(-1 * (100vw - 100%) / 2); /* full-bleed centrado */
}
.p-map { display: block; width: 100%; height: 420px; border: none; }
@media (max-width: 768px) {
  .p-map { height: 320px; }
}
@media (max-width: 576px) {
  .p-map { height: 260px; }
}

/* ===== VISUAL CONSISTENCY: enlaces redes ===== */
.social-block a {
  color: var(--brand) !important;
  text-decoration: none !important;
}

/* ===== ACCESIBILIDAD: reduce animaciones si el usuario lo pidió ===== */
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
/* =========================
   CONTACTO — Modo compacto + Color
   (pegado al final del CSS)
   ========================= */

/* Limitar ancho del bloque formulario y centrar */
.p-form {
  margin: 36px auto 56px;
  max-width: 860px;
}

/* Tarjeta más contenida con borde sutil */
.p-form .card {
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,.05);
  border: 1px solid #dbeafe; /* azul suave */
  background: #f9fafb;        /* gris clarito */
}

/* Grid del formulario */
.c-form {
  display: grid;
  gap: 14px 16px;
}

/* 2 columnas en pantallas grandes */
@media (min-width: 992px) {
  .c-form {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .c-form .group:nth-of-type(5) { grid-column: 1 / -1; }
  .c-form .group.terms,
  .c-form .terms-line { grid-column: 1 / -1; }
}

/* Tipografías y espacios más sobrios */
.lbl {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: .95rem;
  color: var(--ink);
}

/* Inputs con color visual */
.inp, .ta {
  width: 100%;
  padding: 9px 12px;
  font-size: .95rem;
  height: 44px;
  border: 1.5px solid #cbd5e1;       /* gris azuloso */
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.ta { min-height: 160px; }

.inp:focus, .ta:focus {
  border-color: var(--brand);
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(12, 74, 122, 0.12);
}

/* Checkbox línea */
.terms-line,
.group.terms {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .93rem;
  color: var(--muted);
}
.terms-line input[type="checkbox"],
.group.terms input[type="checkbox"] {
  margin-top: 3px;
  flex: 0 0 auto;
  accent-color: var(--brand); /* hace que el checkbox se vea azul del sitio */
}

/* Botón más visual */
.btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--brand), #174ea6);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  background: linear-gradient(135deg, var(--brand-hover), #1e3a8a);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Alineación del botón en desktop */
@media (min-width: 992px) {
  .c-form .actions {
    grid-column: 2 / 3;
    justify-self: end;
  }
}

/* Más respiro bajo el título de sección */
.p-head { padding-bottom: 24px; }
.p-title { margin-bottom: 6px; }

/* Ajustes finos en móvil: menos aire aún */
@media (max-width: 576px) {
  .p-form { margin: 28px auto 44px; }
  .p-form .card { padding: 14px; }
  .lbl { font-size: .92rem; }
  .inp { height: 42px; }
  .btn { width: 100%; text-align: center; }
}

/* ===== FIX ALERTAS: fuerza visibilidad y color ===== */
.alert{
  display: block !important;
  padding: 12px 14px !important;
  border-radius: 10px !important;
  border: 1px solid var(--line, #e7ecf5) !important;
  background: #fff !important;
  color: #0e1320 !important;        /* color base visible */
  font-size: 15px !important;       /* por si algún padre puso font-size:0 */
  line-height: 1.45 !important;
  opacity: 1 !important;
  visibility: visible !important;
  text-indent: 0 !important;
  text-shadow: none !important;
  filter: none !important;
}
.alert *{ color: inherit !important; }   /* que los hijos no cambien color */

.alert.ok{
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #065f46 !important;
}
.alert.error{
  background: #fff1f2 !important;
  border-color: #fecdd3 !important;
  color: #991b1b !important;
}
.alert-list{ margin:0; padding-left:18px; }
.alert-list li{ list-style: disc; }
