/* SAFIR · index · Barra de navegación (cabecera), botón de tema, chip de usuario y pie de página. */
/* Barra de navegación */
header.bar { background: var(--bar); color: #fff; }
/* Encabezado a todo el ancho de la pantalla (el .wrap de las secciones queda en 1120px) */
header.bar .wrap {
  display: flex; align-items: center; gap: 2rem; min-height: 72px;
  width: 100%; max-width: none; margin-inline: 0;
  padding-inline: clamp(1rem, 3vw, 2.5rem);
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: #fff; }
.brand svg { width: 52px; height: 38px; }
.brand span { font: 500 1.5rem/1 var(--sans); letter-spacing: .28em; }
/* Solo la navegación del encabezado (no la del pie compartido) */
header.bar nav { display: flex; gap: 1.6rem; margin-right: auto; }
header.bar nav a { color: #E9E7FF; text-decoration: none; font-size: .98rem; }
header.bar nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 6px; }
.theme-toggle {
  background: transparent; color: #E9E7FF; border: 1.5px solid rgba(233,231,255,.4);
  border-radius: 999px; padding: .5rem .95rem; font: 400 .9rem var(--sans); cursor: pointer;
}
.theme-toggle:hover { border-color: #fff; color: #fff; }

.btn.ghost-bar { background: transparent; color: #E9E7FF; border-color: rgba(233,231,255,.5); }
.user-chip { max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* El pie de página es el compartido: WEB-INF/vistas/comunes/pie.jspf + assets/css/pie.css */

/* Desglose "Catálogo" de la barra (categorías) */
header.bar { position: relative; z-index: 50; }
.cat-wrap { position: relative; display: flex; align-items: center; }
.cat-btn {
  display: inline-flex; align-items: center; gap: .35rem; padding: 0; margin: 0; border: 0; background: transparent;
  color: #E9E7FF; font: inherit; font-size: .98rem; line-height: inherit; cursor: pointer;
}
/* Igual que los demás enlaces de la barra: subrayado al pasar el cursor */
.cat-btn:hover, .cat-btn[aria-expanded="true"] { color: #fff; text-decoration: underline; text-underline-offset: 6px; }
.cat-btn .caret { width: 12px; height: 12px; flex: none; transition: transform .2s; }
.cat-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }
.menu {
  position: absolute; left: 0; top: calc(100% + .6rem); min-width: 230px; max-height: 70vh; overflow-y: auto;
  padding: .5rem; background: var(--surface); color: var(--text); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 24px 50px -18px rgba(18,20,46,.5);
}
.menu[hidden] { display: none; }
.menu .sep { height: 1px; background: var(--line); margin: .35rem .2rem; }
header.bar nav .menu a {
  display: flex; justify-content: space-between; gap: 1rem; padding: .65rem .8rem;
  border-radius: 10px; color: var(--text); font-size: .98rem; text-decoration: none;
}
header.bar nav .menu a:hover, header.bar nav .menu a:focus-visible { background: var(--soft); color: var(--title); text-decoration: none; }
header.bar nav .menu a small { color: var(--muted); font-variant-numeric: tabular-nums; }
header.bar nav .menu a.cat-todo { color: var(--title); font-weight: 600; }