/* Cabecera compartida con la home (extraída de home.css). */
:root {
  color-scheme: dark;
  --ink: #1c1c1e;
  --navigation: #000;
  --selected: #1c1035;
  --selected-hover: #2b1c47;
  --selected-line: #594477;
  --panel: #131216;
  --paper: #faf9fc;
  --muted: #c1bdc9;
  --accent: #e5deee;
  --line: #343237;
  --header-height: 66px;
  --mono: "IBM Plex Mono", monospace;
  --external-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 12 12 4M5 4h7v7' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --down-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3v10m-4-4 4 4 4-4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
[data-arrow] { --arrow-mask: var(--external-arrow); }
[data-arrow="up"], [data-arrow="down"] { --arrow-mask: var(--down-arrow); }
[data-arrow]::after {
  content: "";
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  vertical-align: -.14em;
  background: currentColor;
  -webkit-mask: var(--arrow-mask) center / contain no-repeat;
  mask: var(--arrow-mask) center / contain no-repeat;
}
a[data-arrow]::after { margin-inline-start: 4px; }
[data-arrow="up"]::after { transform: rotate(180deg); }
.skip-link { position: fixed; z-index: 5; left: 16px; top: 12px; padding: 10px 16px; background: var(--paper); color: var(--ink); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 2vw, 32px);
  min-height: var(--header-height);
  padding: 8px max(calc((100% - 1520px) / 2), clamp(22px, 3vw, 52px));
  background: var(--navigation);
  border-bottom: 1px solid var(--line);
}
.header-brand { display: inline-flex; align-items: center; flex: none; gap: 5px; min-height: 44px; color: var(--paper); font-size: 1.02rem; font-weight: 700; letter-spacing: .075em; text-transform: uppercase; white-space: nowrap; }
.header-brand img { display: block; width: 48px; height: 48px; }
.site-navigation { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 12px; }
.nav-links { display: flex; align-items: center; gap: 3px; }
.nav-links a { display: flex; align-items: center; min-height: 42px; padding: 7px 10px; border-radius: 6px; color: var(--muted); font-size: .88rem; font-weight: 600; white-space: nowrap; }
.nav-links a { position: relative; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--paper); }
.nav-links a[aria-current]::before { content: ""; position: absolute; inset: auto auto 3px 10px; width: 22px; height: 2px; border-radius: 2px; background: var(--paper); }
.nav-bottom { display: flex; align-items: center; gap: 8px; }
.hub-link, .shop-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--muted); font-size: .85rem; line-height: 1.2; white-space: nowrap; }
.hub-link:hover, .shop-button:hover { border-color: var(--accent); color: var(--paper); }
.header-controls { display: flex; align-items: center; gap: 8px; }
.lang-toggle { display: flex; gap: 3px; }
.lang-toggle button, .menu-button { padding: 5px 8px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--muted); font: 500 .7rem/1.4 var(--mono); }
.lang-toggle button { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 36px; padding: 5px 6px; }
.lang-toggle .flag { width: 26px; height: 17px; }
.lang-toggle button[aria-pressed="true"]::after { content: ""; position: absolute; inset: auto auto 3px 50%; width: 16px; height: 2px; border-radius: 2px; background: var(--paper); transform: translateX(-50%); }
.flag { display: inline-block; flex: none; width: 18px; height: 12px; object-fit: fill; border-radius: 1px; }
.flag--senyera { background: repeating-linear-gradient(#fcdd09 0 11.11%, #da121a 11.11% 22.22%); }
.menu-button { display: none; }
@media (max-width: 1280px) {
  :root { --header-height: 61px; }
  .site-header { gap: 8px; padding: 8px 18px; }
  .header-brand { gap: 3px; font-size: .86rem; }
  .header-brand img { width: 40px; height: 40px; }
  .site-navigation { flex-direction: column; align-items: stretch; gap: 14px; }
  .nav-links { display: grid; }
  .nav-links a[aria-current]::before { inset: 50% auto auto 0; width: 2px; height: 16px; transform: translateY(-50%); }
  .nav-bottom { padding-top: 10px; border-top: 1px solid var(--line); }
  .has-menu .site-navigation { position: absolute; top: 100%; inset-inline: 0; display: none; max-height: calc(100dvh - var(--header-height)); overflow: auto; background: var(--navigation); padding: 12px 18px 18px; border-bottom: 1px solid var(--line); }
  .has-menu .site-navigation.is-open { display: flex; }
  .has-menu .menu-button { display: block; border-color: var(--line); }
  html:not(.has-menu) .site-header { position: relative; display: block; }
  .nav-links a, .lang-toggle button, .menu-button { min-height: 44px; }
  .menu-button { min-width: 66px; }
}
@media (max-width: 430px) {
  .site-header { gap: 4px; padding-inline: 8px; }
  .lang-toggle { gap: 2px; }
  .lang-toggle button { min-width: 32px; padding-inline: 3px; }
  .lang-toggle .flag { width: 24px; height: 16px; }
  .menu-button { min-width: 52px; }
}
@media (max-width: 360px) {
  .header-brand { gap: 2px; font-size: .68rem; letter-spacing: .045em; }
  .header-brand img { width: 32px; height: 32px; }
}
:where(.motion-enabled) .site-navigation.is-open { animation: menu-in 180ms ease-out; }
@keyframes menu-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.site-header .shop-button { text-decoration: none; }
