/* Shared header component: keep its layout independent of page/theme overrides. */
.header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  height: 88px;
  min-height: 88px;
  padding: 0;
  gap: 24px;
}
.header .nav > .brand {
  --logo-width: 180px;
  position: relative;
  left: auto;
  transform: none;
  order: 0;
  flex: 0 0 var(--logo-width);
}
.header .nav-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
  width: auto;
  margin: 0;
  padding: 0;
  gap: 16px;
  font-size: 14px;
  line-height: 1.4;
  max-height: none;
  overflow: visible;
  order: 1;
}
.header .nav-links > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: none;
  margin: 0;
  white-space: nowrap;
}
.header .nav-links > a.nav-small { max-width: none; }
.header .nav-links > a[aria-current="page"] { color: #ad482d; }
.header .nav-links .button { padding: 12px 18px; font-size: 14px; }
.header .language-switch {
  order: 2;
  gap: 2px;
  margin: 0;
  padding-left: 16px;
  border-left: 1px solid var(--line);
  font-size: 12px;
}
.header .language-switch a { min-height: 44px; padding: 8px 5px; }
.header .menu-toggle { display: none; order: 3; }
.header a:focus-visible, .header button:focus-visible {
  outline: 2px solid #ad482d;
  outline-offset: 4px;
}
.header .nav-item { position: relative; display: flex; align-items: center; gap: 2px; }
.header .nav-item > a { display: flex; align-items: center; min-height: 44px; white-space: nowrap; }
.header .nav-item > a[aria-current="page"] { color: #ad482d; }
.header .submenu-toggle {
  display: grid; place-items: center; width: 26px; height: 44px; padding: 0;
  flex-shrink: 0; border: 0; background: transparent; color: #ad482d;
  font: inherit; font-size: 20px; cursor: pointer;
}
.header .submenu-toggle span { transition: transform .2s ease; }
.header .nav-item.is-open .submenu-toggle span { transform: rotate(180deg); }
.header .nav-dropdown {
  position: absolute; top: 100%; left: -18px; width: 310px; padding: 22px;
  background: #fff; border: 1px solid #dce2e4; border-top: 3px solid #ad482d;
  box-shadow: 0 16px 32px #24333c18; z-index: 40;
  animation: header-drop .18s ease-out;
}
.header .nav-dropdown[hidden] { display: none; }
.header .dropdown-eyebrow { display: block; font-size: 10px; letter-spacing: .14em; color: #ad482d; margin-bottom: 12px; }
.header .nav-dropdown a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; min-height: 44px; font-size: 14px; line-height: 1.5; white-space: normal; }
.header .nav-dropdown a:hover { color: #ad482d; }
.header .nav-dropdown a span { color: #ad482d; }
.header .nav-dropdown .dropdown-overview { margin-top: 10px; border-top: 1px solid #dce2e4; color: #ad482d; font-size: 12px; }
@keyframes header-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .header .nav-dropdown { animation: none; } .header .submenu-toggle span { transition: none; } }
@media (max-width: 1279px) {
  .header .nav-item { flex-wrap: wrap; gap: 0; }
  .header .nav-item > a { flex: 1; padding: 12px 4px; white-space: normal; }
  .header .submenu-toggle { width: 44px; border-left: 1px solid #e5e9ea; }
  .header .nav-dropdown { position: static; flex: 0 0 100%; width: 100%; padding: 16px; box-shadow: none; background: #f6f8f8; margin-bottom: 8px; }
  .header .nav { height: auto; min-height: 80px; flex-wrap: wrap; gap: 0 16px; padding: 12px 0; }
  .header .nav > .brand { --logo-width: 180px; }
  .header .language-switch { margin-left: auto; padding-left: 0; border: 0; }
  .js .header .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 9px 14px;
    border: 1px solid #ccd4d7;
    background: #fff;
    color: #24333c;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
  }
  .header .menu-toggle::before { content: '☰'; font-size: 16px; }
  .header .menu-toggle[aria-expanded="true"]::before { content: '×'; }
  .header .nav-links {
    order: 4;
    flex: 0 0 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: 16px;
    max-height: calc(100dvh - 104px);
    overflow-y: auto;
  }
  .js .header .nav-links { display: none; }
  .js .header .nav-links.is-open { display: flex; }
  .header .nav-links > a { padding: 12px 4px; white-space: normal; }
  .header .nav-links .button { justify-content: center; margin-top: 12px; padding: 14px 18px; }
}
@media (max-width: 560px) {
  .header .nav { min-height: 72px; gap: 0 8px; }
  .header .nav > .brand { --logo-width: 136px; }
  .header .language-switch a { padding: 8px 4px; }
  .js .header .menu-toggle { padding: 8px 10px; font-size: 13px; }
}
@media (max-width: 359px) {
  .header .nav > .brand { --logo-width: 116px; }
  .header .menu-toggle::before { display: none; }
}

/* Graphite metal finish, using the clean upper area of the supplied brand image. */
.header {
  isolation: isolate;
  background: #25282c;
  color: #f3f4f4;
  border-bottom: 1px solid #454a4e;
  box-shadow: 0 4px 18px #10141824;
}
.header::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 88px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, #15181c30, #15181c08), url('../assets/images/header-texture.webp') center top / max(100%, 900px) auto no-repeat;
}
.header .brand-logo { filter: brightness(2.35) saturate(.55); }
.header .nav-item > a, .header .nav-links > .nav-small { color: #f3f4f4; }
.header .nav-item > a:hover, .header .nav-item > a[aria-current="page"],
.header .nav-links > .nav-small:hover { color: #f4b59c; }
.header .submenu-toggle { color: #f4b59c; }
.header .language-switch { color: #c9cdd0; border-color: #62686d; }
.header .language-switch a[aria-current="true"], .header .language-switch a:hover { color: #f4b59c; }
.header .nav-dropdown { color: #24333c; }
.header .nav-dropdown a { color: #24333c; }
.header .nav-dropdown a:hover, .header .nav-dropdown .dropdown-overview { color: #ad482d; }
.header a:focus-visible, .header button:focus-visible { outline-color: #f4b59c; }
@media (max-width: 1279px) {
  .js .header .menu-toggle { background: #ffffff0a; border-color: #747b80; color: #f3f4f4; }
  .header .nav-links { border-top-color: #62686d; }
  .header .submenu-toggle { border-left-color: #62686d; }
}


/* Clean dark-background logo: preserve native proportions without brightness filters. */
.header .nav > .brand, .footer .brand { --logo-width: 200px; height: 66px; overflow: visible; }
.header .brand .brand-logo, .footer .brand .brand-logo { position: static; display: block; width: 100%; height: auto; max-width: 100%; left: auto; top: auto; object-fit: contain; filter: none; }
@media (max-width: 1279px) { .header .nav > .brand { --logo-width: 180px; height: 56px; } }
@media (max-width: 560px) { .header .nav > .brand { --logo-width: 140px; height: 48px; } }
@media (max-width: 359px) { .header .nav > .brand { --logo-width: 116px; } }

/* Steel wordmark with a copper gear accent. */
.header .brand .brand-logo, .footer .brand .brand-logo { filter: grayscale(1) brightness(.84) contrast(1.08); }

.header .nav > .brand::after, .footer .brand::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  aspect-ratio: 2079 / 756;
  transform: translateY(-50%);
  background: #c47c59;
  -webkit-mask: url('../assets/images/vesmar-header-logo-v2.webp') center / 100% 100% no-repeat;
  mask: url('../assets/images/vesmar-header-logo-v2.webp') center / 100% 100% no-repeat;
  clip-path: polygon(0 15%, 9.3% 15%, 12.8% 34%, 13% 73%, 0 73%);
  pointer-events: none;
}

/* Correct spelling as crisp, scalable text, independent of the source raster. */
.header .brand .brand-logo, .footer .brand .brand-logo { clip-path: polygon(0 0, 100% 0, 100% 73%, 0 73%); }
.brand .brand-subtitle {
  position: absolute;
  left: 26%;
  top: calc(50% + var(--logo-width) * .09);
  width: 56%;
  color: #c47c59;
  font-family: Arial, Helvetica, sans-serif;
  font-size: calc(var(--logo-width) * .054);
  font-weight: 700;
  line-height: 1;
  letter-spacing: .25em;
  text-align: center;
  white-space: nowrap;
}

/* Keep navigation beside the brand, with the meeting action aligned right. */
@media (min-width: 1280px) {
  .header .nav { gap: 32px; }
  .header .nav-links { justify-content: flex-start; gap: 22px; }
  .header .nav-links > .button { margin-left: auto; }
}

/* Bold primary navigation labels in both languages. */
.header .nav-item > a,
.header .nav-links > .nav-small { font-weight: 800; }
