:root {
    --topbar-primary: #004361;
    --topbar-text: #17212b;
    --topbar-soft-bg: #eef4f8;
    --topbar-shadow: 0 16px 34px rgba(4, 29, 58, .18);
    --topbar-font: Arial, Helvetica, sans-serif;
  }

  .topbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 3000;
    width: 100%;
    background: var(--top-primary, var(--primary, var(--topbar-primary)));
    color: #fff;
    box-shadow: var(--topbar-shadow);
    font-family: var(--topbar-font);
  }

  .topbar__inner {
    display: grid;
    grid-template-columns: minmax(240px, 386px) 1fr auto;
    align-items: center;
    gap: 24px;
    width: min(1180px, calc(100% - 32px));
    min-height: 86px;
    margin: 0 auto;
    padding: 18px 0;
  }

  .site-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    color: #fff;
    text-decoration: none;
  }

  .brand-image {
    display: block;
    width: min(386px, 100%);
    height: auto;
  }

  .menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 110px;
    min-width: 110px;
    height: 46px;
    min-height: 46px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    color: var(--top-primary, var(--primary, var(--topbar-primary)));
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    cursor: pointer;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 700;
  }

  .menu-toggle:hover,
  .menu-toggle:focus-visible {
    background: #f5f7fa;
    outline: none;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .14);
  }

  .menu-toggle__icon {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 14px;
    flex: 0 0 18px;
  }

  .menu-toggle__icon::before,
  .menu-toggle__icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }

  .menu-toggle__icon::before {
    top: 0;
    box-shadow: 0 6px 0 currentColor;
  }

  .menu-toggle__icon::after {
    top: 12px;
  }

  .nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(14px, 2.4vw, 30px);
    white-space: nowrap;
    font-size: .96rem;
    font-weight: 700;
  }

  .nav-links a,
  .dropdown-btn {
    color: rgba(255, 255, 255, .92);
  }

  .nav-links a {
    text-decoration: none;
  }

  .nav-links a:hover,
  .nav-links a:focus-visible {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 6px;
    outline: none;
  }

  .dropdown {
    position: relative;
  }

  .dropdown::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    height: 10px;
  }

  .dropdown:hover::after,
  .dropdown:focus-within::after {
    display: block;
  }

  .dropdown-btn {
    min-height: 40px;
    padding: 12px 6px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
  }

  .dropdown-btn:hover,
  .dropdown-btn:focus-visible {
    background: rgba(255, 255, 255, .10);
    color: #fff;
    outline: none;
  }

  .dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 3100;
    min-width: 260px;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
  }

  .dropdown-content a {
    display: block;
    padding: 12px 18px;
    background: #fff;
    color: var(--top-text, var(--text, var(--topbar-text)));
    text-decoration: none;
    font-weight: 500;
  }

  .dropdown-content a:hover,
  .dropdown-content a:focus-visible {
    background: var(--topbar-soft-bg);
    color: var(--top-primary, var(--primary, var(--topbar-primary)));
    outline: none;
  }

  .dropdown:hover .dropdown-content,
  .dropdown:focus-within .dropdown-content {
    display: block;
  }

  @media (max-width: 980px) {
    .topbar__inner {
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: start;
      gap: 12px;
      width: min(100% - 24px, 1180px);
      min-height: 74px;
      padding: 14px 0;
    }

    .brand-image {
      width: min(300px, calc(100vw - 134px));
    }

    .menu-toggle {
      display: inline-flex;
    }

    .nav-links {
      display: none;
      grid-column: 1 / -1;
      width: 100%;
      white-space: normal;
      text-align: left;
    }

    .nav-links.is-open {
      display: grid;
      grid-template-columns: 1fr;
      max-height: calc(100vh - 86px);
      padding: 10px 0 2px;
      overflow-y: auto;
    }

    .dropdown::after {
      display: none !important;
    }

    .nav-links .dropdown {
      width: 100%;
    }

    .nav-links > a,
    .dropdown-btn {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      min-height: 44px;
      padding: 11px 0;
      border-top: 1px solid rgba(255, 255, 255, .16);
      color: #fff;
      text-align: left;
    }

    .nav-links > a:hover,
    .nav-links > a:focus-visible,
    .dropdown-btn:hover,
    .dropdown-btn:focus-visible {
      background: transparent;
      color: #fff;
    }

    .dropdown-content {
      position: static;
      display: none;
      min-width: 0;
      margin: 0 0 8px;
      padding: 0 0 4px 14px;
      overflow: visible;
      border-left: 2px solid rgba(255, 255, 255, .22);
      border-radius: 0;
      background: transparent;
      box-shadow: none;
    }

    .nav-links .dropdown.is-open .dropdown-content {
      display: grid;
    }

    .nav-links .dropdown:not(.is-open):hover .dropdown-content,
    .nav-links .dropdown:not(.is-open):focus-within .dropdown-content {
      display: none;
    }

    .dropdown-content a {
      min-height: 38px;
      padding: 8px 0;
      background: transparent;
      color: rgba(255, 255, 255, .86);
      font-size: .92rem;
      font-weight: 600;
    }

    .dropdown-content a:hover,
    .dropdown-content a:focus-visible {
      background: transparent;
      color: #fff;
    }
  }

  @media (max-width: 560px) {
    .menu-toggle {
      width: 100px;
      min-width: 100px;
      padding: 0 10px;
    }
  }

  @media print {
    .topbar,
    .menu-toggle {
      display: none !important;
    }
  }
