/*
 * Base común del sitio GAEA: identidad, tipografía, botones y formularios.
 * La comparten todas las secciones; lo propio de cada una va en su carpeta.
 * Colores de la especificación (ficha comercial). Las variantes "-texto" son
 * versiones más oscuras para cumplir contraste AA (4,5:1) en texto chico.
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/comun/fuentes/inter-latin-var.woff2") format("woff2");
}

:root {
  --petroleo: #0D2A38;
  --petroleo-2: #133847;
  --azul: #0086B3;
  --verde: #009447;
  --celeste: #45C7E6;
  --degradado: linear-gradient(90deg, #009447, #0090D6);
  /* Mismo degradado, más oscuro: con texto blanco encima cumple AA. */
  --degradado-boton: linear-gradient(90deg, #00803D, #0077B3);
  --degradado-boton-hover: linear-gradient(90deg, #006E35, #00669A);
  --azul-texto: #006E94;
  --verde-texto: #007A3D;

  --fondo: #F8FAFA;
  --tarjeta: #FFFFFF;
  --borde: #DCE5E8;
  --texto: #0F1B2D;
  --texto-2: #3C4A5E;
  --error: #B42318;
  --error-fondo: #FEF3F2;

  --radio: 12px;
  --radio-chico: 8px;
  --sombra: 0 1px 2px rgba(15, 27, 45, .06), 0 4px 16px rgba(15, 27, 45, .06);
  --ancho: 1200px;
  --gutter: 16px;
  --alto-barra: 64px;
  --alto-pestanas: 44px;   /* menú de secciones en pestañas, solo bajo 1.024 px */
  --fuente: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (min-width: 768px) {
  :root { --gutter: 24px; --alto-barra: 72px; }
}
@media (min-width: 1024px) {
  :root { --alto-pestanas: 0px; }
}

/* Reset mínimo */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--alto-barra) + var(--alto-pestanas) + 8px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--texto);
  background: var(--fondo);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; letter-spacing: -.015em; font-weight: 700; text-wrap: balance; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--azul-texto); text-underline-offset: 2px; }
a:hover { color: var(--petroleo); }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--celeste); outline-offset: 2px; border-radius: 4px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.saltar {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--tarjeta); color: var(--texto); padding: 12px 16px; border-radius: var(--radio-chico);
}
.saltar:focus { top: 8px; }

.contenedor { width: 100%; max-width: calc(var(--ancho) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.icono { width: 1.25em; height: 1.25em; flex: none; }

/* Botones: mínimo 44 px de alto (táctil). */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 22px;
  border: 0; border-radius: 999px;
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
  cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.boton-principal { background: var(--degradado-boton); color: #fff; box-shadow: 0 2px 8px rgba(0, 119, 179, .25); }
.boton-principal:hover { background: var(--degradado-boton-hover); color: #fff; }
.boton-secundario { background: transparent; color: var(--azul-texto); box-shadow: inset 0 0 0 2px var(--azul-texto); }
.boton-secundario:hover { background: var(--azul-texto); color: #fff; }
.boton-claro { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); }
.boton-claro:hover { background: #fff; color: var(--petroleo); }
.boton-bloque { display: flex; width: 100%; }
.boton-chico { min-height: 44px; padding: 10px 16px; }

/* Formularios */
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo > label, .campo > legend, .grupo-titulo { font-weight: 600; font-size: .9375rem; }
.opcional { font-weight: 400; color: var(--texto-2); }
.entrada {
  width: 100%; min-height: 48px; padding: 11px 14px;
  font-size: 1rem; /* 16 px: evita el zoom automático de iOS */
  background: #fff; border: 1.5px solid #B9C7CC; border-radius: var(--radio-chico);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.entrada:hover { border-color: #8FA3AA; }
.entrada:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(0, 134, 179, .2); }
textarea.entrada { min-height: 112px; resize: vertical; }
select.entrada {
  appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%233C4A5E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.campo.con-error .entrada { border-color: var(--error); }
.ayuda { font-size: .875rem; color: var(--texto-2); margin: 0; }
.error-campo { display: flex; gap: 6px; align-items: flex-start; font-size: .875rem; font-weight: 500; color: var(--error); margin: 0; }
.error-campo:empty { display: none; }
.error-campo::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--error); color: #fff; font-size: .75rem; font-weight: 700; }

.casilla { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding: 10px 0; cursor: pointer; }
.casilla input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--azul); cursor: pointer; }

/* Aviso de cookies (comun/public/js/consentimiento.js) */
.cookies {
  position: fixed; z-index: 60; left: var(--gutter); right: var(--gutter); bottom: var(--gutter);
  max-width: 560px; margin: 0 auto; padding: 18px;
  background: var(--tarjeta); color: var(--texto); border: 1px solid var(--borde); border-radius: var(--radio);
  box-shadow: 0 8px 32px rgba(15, 27, 45, .18);
}
.cookies p { margin: 0 0 12px; font-size: .9375rem; }
.cookies-botones { display: flex; gap: 8px; flex-wrap: wrap; }
.cookies-botones .boton { flex: 1 1 140px; }
