/* Sitio GPDI. Valores de definiciones/marca.yaml v0.8, tema gpdi. */
:root {
  --surface: #FFFFFF;
  --surface-elevated: #E7ECF2;
  --text-primary: #1E2345;
  --text-secondary: #5D5365;
  --border: #B2B2B2;
  --primary: #1E56A0;
  --primary-on-dark: #8CA4C3;
  --fuente: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --ancho: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--surface); color: var(--text-primary); font: 16px/1.6 var(--fuente); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.2; font-weight: 600; margin: 0 0 .6em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }

.saltar { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 20; }
.saltar:focus { left: 8px; top: 8px; }
.oculto { position: absolute; left: -999px; }
a:focus-visible { outline: 3px solid var(--primary-on-dark); outline-offset: 2px; }

/* Encabezado */
.cabecera { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; max-width: var(--ancho); margin: 0 auto; padding: 14px 16px; }
.logo img { width: 180px; }
.cabecera nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.cabecera nav a, .cabecera-contacto a { color: var(--text-primary); text-decoration: none; font-size: .95rem; padding: 4px 0; }
.cabecera nav a:hover, .cabecera-contacto a:hover { color: var(--primary); text-decoration: underline; }
.cabecera-contacto { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.linkedin { font-weight: 600; }

/* Botones */
.boton { display: inline-block; background: var(--primary); color: #fff; padding: 12px 24px; font-size: .9rem; font-weight: 600; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.boton:hover { background: var(--text-primary); }
.boton-claro { background: #fff; color: var(--text-primary); }
.boton-claro:hover { background: var(--surface-elevated); }

/* Portada: dos zonas, panel indigo y foto (marca.md 7.1.2) */
.portada { display: grid; grid-template-columns: 1fr 1fr; min-height: 560px; background: var(--text-primary); }
.portada-panel { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 48px clamp(16px, 5vw, 72px); color: #fff; }
.portada-panel h1 { text-transform: uppercase; font-size: clamp(1.8rem, 3vw, 2.5rem); }
.apoyo { font-weight: 600; margin: 0 0 24px; }
.portada-fotos { position: relative; overflow: hidden; background: var(--text-primary); }
.portada-fotos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; animation: rotar 30s infinite; }
.portada-fotos img:nth-child(1) { animation-delay: 0s; }
.portada-fotos img:nth-child(2) { animation-delay: 6s; }
.portada-fotos img:nth-child(3) { animation-delay: 12s; }
.portada-fotos img:nth-child(4) { animation-delay: 18s; }
.portada-fotos img:nth-child(5) { animation-delay: 24s; }
@keyframes rotar { 0% { opacity: 0; } 3% { opacity: 1; } 20% { opacity: 1; } 23% { opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .portada-fotos img { animation: none; }
  .portada-fotos img:nth-child(2) { opacity: 1; }
}

/* Secciones */
.seccion { max-width: var(--ancho); margin: 0 auto; padding: 64px 16px; }
.seccion > h2, .seccion > h1 { text-align: center; text-transform: uppercase; }
.entrada { text-align: center; max-width: 780px; margin: 0 auto 40px; }
.centrada { text-align: center; }
.razones { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.razones li { text-align: center; }
.razones img { margin: 0 auto 14px; }
.razones strong { color: var(--primary); }
.razones p { margin: 0; }
.llamado { background: var(--primary); color: #fff; border-radius: 14px; padding: 28px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.razones .llamado p { font-size: 1.2rem; font-weight: 600; }
.dos-columnas { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.dos-columnas h2 { text-transform: uppercase; }
.lista-servicios { padding-left: 20px; margin: 0 0 24px; }
.lista-servicios li { margin-bottom: 6px; }
.lista-servicios li::marker { color: var(--primary); }
.segmentos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.segmentos article { background: var(--surface); border: 1px solid var(--surface-elevated); box-shadow: 0 8px 18px rgba(30, 35, 69, .12); }
.segmentos img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.segmentos h3 { color: var(--primary); text-align: center; text-transform: uppercase; margin: 16px 16px 8px; }
.segmentos p { text-align: center; margin: 0 16px 20px; }

/* Contacto y pie */
.contacto { background: var(--surface); padding: 0 16px 64px; }
.contacto-tarjetas { max-width: var(--ancho); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.tarjeta-contacto { background: var(--surface-elevated); padding: 28px; }
.tarjeta-contacto h2 { font-size: 1.25rem; }
.tarjeta-contacto p { margin: 0 0 12px; }
.pie { background: var(--primary); color: #fff; padding: 28px clamp(16px, 5vw, 72px) 72px; display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.pie img { width: 130px; }
.pie p { margin: 0; font-size: .95rem; }
.whatsapp { position: fixed; right: 16px; bottom: 16px; z-index: 10; background: var(--primary); color: #fff; padding: 10px 18px; border: 2px solid #fff; border-radius: 24px; font-size: .95rem; text-decoration: none; box-shadow: 0 4px 12px rgba(30, 35, 69, .3); }
.whatsapp:hover { background: var(--text-primary); }

/* Blog */
.articulos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 24px; }
.tarjeta-articulo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 14px; }
.tarjeta-articulo h2 { font-size: 1.15rem; }
.tarjeta-articulo h2 a { color: var(--text-primary); text-decoration: none; }
.tarjeta-articulo h2 a:hover { color: var(--primary); text-decoration: underline; }
.fecha { color: var(--text-secondary); font-size: .9rem; }
.enlace { font-weight: 600; }
.articulo { max-width: 760px; margin: 0 auto; padding: 48px 16px 64px; }
.articulo h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.articulo-imagen { width: 100%; margin: 12px 0 28px; }
.articulo h2 { font-size: 1.4rem; margin-top: 1.4em; }
.articulo h3 { margin-top: 1.4em; }
.articulo hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }

@media (max-width: 860px) {
  .portada { grid-template-columns: 1fr; min-height: 0; }
  .portada-fotos { height: 250px; }
  .razones, .articulos { grid-template-columns: 1fr 1fr; }
  .dos-columnas { grid-template-columns: 1fr; }
  .invertida > div { order: 1; }
  .invertida > img { order: 2; }
}
@media (max-width: 600px) {
  .razones, .articulos, .segmentos, .contacto-tarjetas { grid-template-columns: 1fr; }
  .seccion { padding: 44px 16px; }
  .cabecera { justify-content: center; text-align: center; }
  .cabecera nav, .cabecera-contacto { justify-content: center; }
  .pie { justify-content: center; text-align: center; }
}
