/* Shared header, mega menu, footer (markup injected by assets/js/layout.js). */
main#top nav.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 52px; padding-block: 14px; color: #616161; font-size: 14px; line-height: 20px; font-weight: 400; }
main#top nav.breadcrumb a { display: inline-flex; align-items: center; min-height: 40px; color: #1e3a7b; font-weight: 400; text-decoration: none; }
main#top nav.breadcrumb a:hover { text-decoration: underline; }
main#top nav.breadcrumb a:active { color: #0b1b3f; text-decoration: underline; }
main#top nav.breadcrumb a:focus-visible { outline: 2px solid #1e3a7b; outline-offset: 2px; }
main#top nav.breadcrumb > span { color: #616161; }
@media (max-width: 600px) { main#top nav.breadcrumb a { min-height: 44px; } }
.sh { position: sticky; top: 0; z-index: 60; height: 56px; background: #fff; border-bottom: 1px solid #e6e6e6; }
.sh ul { list-style: none; }
.sh-bar { display: flex; align-items: center; height: 55px; gap: 36px; }
.sh-logo { flex: none; display: flex; align-items: center; }
.sh-logo img { height: 28px; width: auto; }
.sh-nav { display: flex; align-items: center; height: 100%; min-width: 0; }
.sh-list { display: flex; align-items: center; gap: 24px; height: 100%; }
.sh-item { display: flex; align-items: center; height: 100%; }
.sh-trigger, .sh-link {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0;
  border: 0; background: none; color: #262626; font: 400 14px/20px var(--font-body);
  cursor: pointer; white-space: nowrap; text-decoration: none; position: relative;
}
/* Bold ghost keeps width stable when the open trigger becomes 600. */
.sh-t { display: inline-grid; }
.sh-t::after { content: attr(data-t); font-weight: 600; height: 0; visibility: hidden; overflow: hidden; }
.sh-chev { flex: none; transition: transform 150ms ease; }
.sh-link:hover, .sh-trigger:hover { color: #000; text-decoration: underline; }
.sh-link:active, .sh-trigger:active { color: #0b1b3f; }
.sh-trigger[aria-expanded="true"] { color: #000; font-weight: 600; }
.sh-trigger[aria-expanded="true"]::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: #1e3a7b; }
.sh-trigger[aria-expanded="true"] .sh-chev { transform: rotate(180deg); }
.sh-utils { display: flex; align-items: center; gap: 16px; margin-left: auto; flex: none; }
.sh-search-mobile { display: none; }
.sh-search-desktop { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: #262626; }
.sh-search-desktop:hover { text-decoration: underline; }
.sh-search-desktop:focus-visible { outline: 2px solid #1e3a7b; outline-offset: 2px; }
.sh-sep { width: 1px; height: 24px; background: #e6e6e6; }
.sh .lang { margin: 0; }
.sh .lang::after { content: none; }
.sh-cta { display: flex; gap: 12px; }
.sh-menu-cta { display: none; }
.btn.btn-outline { background: #fff; color: #262626; border: 1px solid #262626; }
.btn.btn-outline:hover, .btn.btn-outline:active { background: #f2f2f2; color: #000; }
.sh .btn { white-space: nowrap; }
.sh-burger { display: none; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid #e6e6e6; border-radius: 2px; background: #fff; color: #262626; cursor: pointer; }

/* Desktop mega panel: overlay directly under header, full viewport width. */
.mm-panel {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 59;
  max-height: calc(100dvh - 56px); overflow-y: auto; overflow-x: hidden;
  background: #f2f2f2; border-block: 1px solid #e6e6e6; box-shadow: 0 8px 16px rgba(0, 0, 0, .08);
}
.mm-panel[hidden] { display: none; }
.mm-inner { padding-block: 32px 48px; }
.mm-intro { padding-bottom: 16px; margin-bottom: 24px; border-bottom: 1px solid #e6e6e6; }
.mm-intro .action-link, .mm-intro > .mm-unavailable { display: inline-flex; align-items: center; min-height: 40px; padding-inline: 8px; margin-inline: -8px; }
.mm-panel .mm-unavailable { color: #616161; }
.mm-grid { display: grid; gap: 32px; }
.mm-grid-5 { grid-template-columns: repeat(5, minmax(180px, 1fr)); }
.mm-grid-4 { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
.mm-cat { min-width: 0; }
.mm-cat-title { margin-bottom: 12px; font: 600 14px/20px var(--font-body); color: #262626; }
.mm-cat-toggle { display: none; }
.mm-list { display: grid; gap: 4px; align-content: start; }
.mm-list a, .mm-list .mm-unavailable {
  display: flex; align-items: center; min-height: 36px; padding: 8px; margin-inline: -8px;
  color: #262626; font-size: 14px; line-height: 20px; text-decoration: none; overflow-wrap: anywhere;
}
.mm-list a:hover { background: #fff; text-decoration: underline; color: #000; }
.mm-list a:active { color: #0b1b3f; }
.mm-grid-4.mm-list { gap: 4px 32px; }
.mm-group-title { margin-bottom: 12px; }

/* Footer keeps design-system.css rules; only lang separator reset. */
#situs-footer .lang::after { content: none; }

@media (prefers-reduced-motion: reduce) {
  .sh-chev { transition: none; }
  .sh-trigger[aria-expanded="true"] .sh-chev { transform: none; }
}

@media (max-width: 1365px) {
  .sh-bar { gap: 24px; }
  .sh-list { gap: 18px; }
  .mm-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
  .mm-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Compact: ☰ menu with accordions. Full header needs ~1220px with EN labels. */
@media (max-width: 1279px) {
  .sh-search-desktop { display: none; }
  .sh-search-mobile { display: block; }
  .sh-bar { gap: 16px; }
  .sh-burger { display: grid; order: 3; }
  .sh-utils { order: 2; gap: 8px; }
  .sh-sep, .sh-cta { display: none; }
  .sh-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; height: auto;
    flex-direction: column; align-items: stretch;
    max-height: calc(100dvh - 56px); overflow-y: auto; overflow-x: hidden;
    padding: 0 24px 24px; background: #fff; border-block: 1px solid #e6e6e6;
  }
  .sh.is-open .sh-nav { display: flex; }
  .sh-list { flex-direction: column; align-items: stretch; gap: 0; height: auto; }
  .sh-item { display: block; height: auto; border-bottom: 1px solid #e6e6e6; }
  .sh-trigger, .sh-link {
    width: 100%; height: auto; min-height: 48px; justify-content: space-between; gap: 12px;
    padding: 12px 0; font-size: 16px; line-height: 24px; white-space: normal; text-align: left;
  }
  .sh-trigger[aria-expanded="true"]::after { content: none; }
  .sh-trigger[aria-expanded="true"] { font-weight: 600; }
  .mm-panel {
    position: static; max-height: none; overflow: visible; box-shadow: none;
    background: #fff; border: 0;
  }
  .mm-inner { padding: 0 0 12px; max-width: none; }
  .mm-intro { margin: 0; padding: 0; border: 0; }
  .mm-intro .action-link, .mm-intro > .mm-unavailable { min-height: 44px; margin: 0; padding: 12px 0 12px 16px; font-size: 16px; line-height: 20px; }
  .mm-grid, .mm-grid-5, .mm-grid-4, .mm-grid-4.mm-list { display: block; }
  .mm-cat { border-top: 1px solid #e6e6e6; }
  .mm-cat-title { display: none; }
  .mm-group-title { display: block; margin: 0; padding: 12px 0 4px 16px; border-top: 1px solid #e6e6e6; }
  .mm-cat-toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
    min-height: 48px; padding: 12px 0 12px 16px; border: 0; background: none; color: #262626;
    font: 600 16px/24px var(--font-body); text-align: left; cursor: pointer;
  }
  .mm-cat-toggle[aria-expanded="true"] .sh-chev { transform: rotate(180deg); }
  .mm-cat .mm-list { display: none; padding-bottom: 8px; }
  .mm-cat.is-open .mm-list { display: grid; }
  .mm-list { gap: 0; }
  .mm-list a, .mm-list .mm-unavailable { min-height: 44px; margin: 0; padding: 12px 8px 12px 32px; font-size: 16px; line-height: 20px; }
  .mm-grid-4.mm-list a, .mm-grid-4.mm-list .mm-unavailable { padding-left: 16px; }
  .mm-grid-4.mm-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sh-menu-cta { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; }
  .sh-menu-cta .btn { width: 100%; white-space: normal; }
}
@media (max-width: 1279px) and (prefers-reduced-motion: reduce) {
  .mm-cat-toggle[aria-expanded="true"] .sh-chev { transform: none; }
}

@media (max-width: 600px) {
  .sh-bar { padding-inline: 16px; gap: 8px; }
  .sh-logo { margin-right: auto; }
  .sh-logo img { height: 24px; }
  .sh-nav { padding: 0 16px 16px; }
}
