/* ── Cabecera institucional compartida GeoPerú (diseño del visor) ──
   Tokens en css/variables.css; fuente Roboto en css/fuentes.css. */
.gobpe-header {
  container-type: inline-size;
  width: 100%;
  height: 64px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 var(--sp-lg);
  box-sizing: border-box;
  font-family: var(--font-primary);
}

.gobpe-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  text-decoration: none;
  flex-shrink: 0;
}

.gobpe-shield {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.gobpe-logotype {
  font-size: 26px;
  font-weight: 800;
  color: var(--gobpe-red);
  letter-spacing: -0.5px;
}

.gobpe-app-name {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-left: var(--sp-md);
  flex: 1;
  min-width: 0;
}

.gobpe-divider {
  width: 1px;
  height: 28px;
  background: var(--color-border);
  flex-shrink: 0;
}

.gobpe-text-hierarchy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  justify-content: center;
  min-width: 0;
}

.gobpe-title-line {
  display: flex;
  align-items: baseline;
  gap: 7px;
  white-space: nowrap;
  line-height: 1.2;
}

.gobpe-title-main {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text-strong);
  letter-spacing: -0.2px;
}

.gobpe-title-sep {
  font-size: 17px;
  font-weight: 400;
  color: var(--color-text-muted);
}

.gobpe-title-brand {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.2px;
}

.gobpe-subtitle {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  line-height: 1.2;
}

/* ── Banda de título del reporte (slot estandarizado bajo la cabecera) ── */
.gobpe-report-band {
  font-family: var(--font-primary);
  text-align: center;
  padding: 10px var(--sp-md) 6px;
}

/* Con acción a la derecha, la banda pasa a tres zonas para que el título siga
   centrado respecto de la página y no se solape con el enlace. Sin la clase,
   la banda conserva el centrado simple de siempre. */
.gobpe-report-band.con-accion {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--sp-md);
}

.gobpe-report-band.con-accion .gobpe-report-titulo-zona {
  grid-column: 2;
}

.gobpe-report-accion {
  grid-column: 3;
  justify-self: end;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
}

.gobpe-report-accion:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.gobpe-report-title {
  font-size: var(--h3-size, 24px);
  font-weight: var(--h3-weight, 700);
  line-height: var(--h3-lh, 32px);
  color: var(--color-primary-dark);
}

.gobpe-report-subtitle {
  font-size: var(--tag-size, 14px);
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

/* ── Ajustes automáticos según el ancho del contenedor (container queries):
      la misma cabecera se compacta sola en columnas estrechas (A3 col1,
      paneles laterales), sin reglas por reporte ── */
@container (max-width: 980px) {
  .gobpe-shield { width: 26px; height: 26px; }
  .gobpe-logotype { font-size: 20px; }
  .gobpe-title-main, .gobpe-title-sep, .gobpe-title-brand { font-size: 13px; }
  .gobpe-subtitle { font-size: 10px; }
}
@container (max-width: 700px) {
  .gobpe-title-main { font-size: 11.5px; }
  .gobpe-subtitle { display: none; }
}
@container (max-width: 480px) {
  .gobpe-title-main, .gobpe-title-sep { display: none; }
}
@media print {
  .gobpe-header {
    border-bottom-color: #c9c9c9;
  }
}
