.dfao-header {
  --dfao-blue-950: #082653;
  --dfao-blue-900: #123b73;
  --dfao-blue-700: #2b5fc5;
  --dfao-green-500: #6fc377;
  --dfao-green-100: #eaf8ed;
  --dfao-ink: #122033;
  --dfao-muted: #64748b;
  --dfao-line: #e5ebf2;
  --dfao-white: #fff;
  position: relative;
  z-index: 999;
  width: 100%;
  color: var(--dfao-ink);
  background: var(--dfao-white);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-shadow: 0 8px 30px rgba(8, 38, 83, .06);
}

.dfao-header *,
.dfao-header *::before,
.dfao-header *::after {
  box-sizing: border-box;
}

.dfao-header--sticky {
  position: sticky;
  top: 0;
}

body.admin-bar .dfao-header--sticky {
  top: 32px;
}

.dfao-header__accent {
  height: 3px;
  background: linear-gradient(90deg, var(--dfao-green-500) 0 28%, #42b8b0 48%, var(--dfao-blue-700) 100%);
}

.dfao-header__container {
  width: min(1320px, calc(100% - 48px));
  margin-inline: auto;
}

.dfao-header__topbar {
  border-bottom: 1px solid rgba(229, 235, 242, .85);
  color: #728198;
  background: #fbfcfe;
  font-size: 13.5px;
}

.dfao-header__topbar-inner {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.dfao-header__topbar p {
  margin: 0;
  font: inherit;
  letter-spacing: .015em;
}

.dfao-header__contacts {
  display: flex;
  align-items: center;
  gap: 13px;
}

.dfao-header__contacts > span {
  width: 1px;
  height: 12px;
  background: #dbe3ed;
}

.dfao-header__contacts a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #53647a;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s ease;
}

.dfao-header__contacts a:hover {
  color: var(--dfao-blue-700);
}

.dfao-header__contact-icon--email {
  position: relative;
  width: 14px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.dfao-header__contact-icon--email::after {
  position: absolute;
  top: -1px;
  left: 2px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: rotate(45deg) translate(-1px, -3px);
}

.dfao-header__main {
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(16px);
}

.dfao-header__main-inner {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 38px;
}

.dfao-header__brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  text-decoration: none;
}

.dfao-header__brand img {
  display: block;
  width: clamp(230px, 19vw, 290px);
  height: auto;
}

.dfao-header__navigation {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: clamp(20px, 2.1vw, 34px);
}

.dfao-header__nav,
.dfao-header__menu {
  margin: 0;
}

.dfao-header__menu,
.dfao-header__menu ul {
  padding: 0;
  list-style: none;
}

.dfao-header__menu {
  display: flex;
  align-items: center;
  gap: clamp(16px, 1.7vw, 28px);
}

.dfao-header__menu > li {
  position: relative;
  display: flex;
  min-height: 92px;
  align-items: center;
}

.dfao-header__menu > li > a {
  position: relative;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  color: #26364a;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .025em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease;
}

.dfao-header__menu > li > a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--dfao-green-500), var(--dfao-blue-700));
  content: "";
  opacity: 0;
  transform: scaleX(.35);
  transition: opacity .2s ease, transform .2s ease;
}

.dfao-header__menu > li:hover > a,
.dfao-header__menu > li:focus-within > a,
.dfao-header__menu > .current-menu-item > a,
.dfao-header__menu > .current-menu-ancestor > a {
  color: var(--dfao-blue-700);
}

.dfao-header__menu > li:hover > a::after,
.dfao-header__menu > li:focus-within > a::after,
.dfao-header__menu > .current-menu-item > a::after,
.dfao-header__menu > .current-menu-ancestor > a::after {
  opacity: 1;
  transform: scaleX(1);
}

.dfao-header__submenu-toggle {
  display: none;
}

.dfao-header__menu .sub-menu {
  position: absolute;
  top: calc(100% - 6px);
  left: -22px;
  width: max-content;
  min-width: 245px;
  max-width: 320px;
  padding: 10px;
  border: 1px solid var(--dfao-line);
  border-radius: 15px;
  visibility: hidden;
  background: #fff;
  box-shadow: 0 24px 60px rgba(8, 38, 83, .15);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.dfao-header__menu li:hover > .sub-menu,
.dfao-header__menu li:focus-within > .sub-menu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.dfao-header__menu .sub-menu::before {
  position: absolute;
  top: -7px;
  left: 28px;
  width: 13px;
  height: 13px;
  border-top: 1px solid var(--dfao-line);
  border-left: 1px solid var(--dfao-line);
  background: #fff;
  content: "";
  transform: rotate(45deg);
}

.dfao-header__menu .sub-menu li {
  position: relative;
  margin: 0;
}

.dfao-header__menu .sub-menu a {
  display: block;
  padding: 11px 13px;
  border-radius: 9px;
  color: #3a4b60;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  white-space: normal;
  transition: color .18s ease, background .18s ease, padding .18s ease;
}

.dfao-header__menu .sub-menu a:hover,
.dfao-header__menu .sub-menu a:focus {
  padding-left: 17px;
  color: var(--dfao-blue-700);
  background: #f1f5fc;
}

.dfao-header__cta {
  display: inline-flex;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--dfao-blue-700);
  border-radius: 11px;
  color: #fff;
  background: var(--dfao-blue-700);
  box-shadow: 0 10px 24px rgba(43, 95, 197, .2);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .015em;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.dfao-header__cta:hover {
  color: #fff;
  background: var(--dfao-blue-900);
  box-shadow: 0 14px 30px rgba(18, 59, 115, .24);
  transform: translateY(-2px);
}

.dfao-header a:focus-visible,
.dfao-header button:focus-visible {
  outline: 3px solid rgba(43, 95, 197, .3);
  outline-offset: 3px;
}

.dfao-header__mobile-toggle {
  display: none;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  border: 1px solid var(--dfao-line);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
}

.dfao-header__mobile-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: var(--dfao-blue-900);
  transition: transform .2s ease, opacity .2s ease;
}

@media (max-width: 1180px) {
  .dfao-header__navigation {
    gap: 18px;
  }

  .dfao-header__menu {
    gap: 16px;
  }

  .dfao-header__menu > li > a {
    font-size: 13.5px;
  }

  .dfao-header__cta {
    padding-inline: 14px;
  }
}

@media (max-width: 1040px) {
  .dfao-header__container {
    width: min(100% - 36px, 1320px);
  }

  .dfao-header__main-inner {
    min-height: 82px;
  }

  .dfao-header__brand img {
    width: 245px;
  }

  .dfao-header__mobile-toggle {
    display: inline-flex;
  }

  .dfao-header__mobile-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .dfao-header__mobile-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .dfao-header__mobile-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .dfao-header__navigation {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: grid;
    max-height: calc(100vh - 118px);
    align-items: stretch;
    gap: 20px;
    overflow-y: auto;
    padding: 18px;
    border-top: 1px solid var(--dfao-line);
    visibility: hidden;
    background: rgba(255, 255, 255, .99);
    box-shadow: 0 28px 60px rgba(8, 38, 83, .14);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  }

  .dfao-header.is-menu-open .dfao-header__navigation {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .dfao-header__menu {
    display: grid;
    gap: 0;
  }

  .dfao-header__menu > li {
    display: grid;
    min-height: 0;
    grid-template-columns: 1fr auto;
    border-bottom: 1px solid #edf1f6;
  }

  .dfao-header__menu > li > a {
    min-height: 50px;
    padding: 0 6px;
    font-size: 15.5px;
  }

  .dfao-header__menu > li > a::after {
    display: none;
  }

  .dfao-header__submenu-toggle {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    margin: 2px 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
  }

  .dfao-header__submenu-toggle span {
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--dfao-blue-900);
    border-bottom: 2px solid var(--dfao-blue-900);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform .2s ease;
  }

  .dfao-header__submenu-toggle[aria-expanded="true"] span {
    transform: rotate(225deg) translate(-1px, -1px);
  }

  .dfao-header__menu .sub-menu {
    position: static;
    display: none;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 4px 0 12px 14px;
    border: 0;
    border-radius: 0;
    visibility: visible;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    grid-column: 1 / -1;
    transform: none;
    transition: none;
  }

  .dfao-header__menu .sub-menu::before {
    display: none;
  }

  .dfao-header__menu li.is-submenu-open > .sub-menu {
    display: block;
  }

  .dfao-header__menu .sub-menu a {
    padding: 10px 13px;
    background: #f7f9fc;
  }

  .dfao-header__cta {
    width: 100%;
    min-height: 50px;
  }

  body.dfao-menu-lock {
    overflow: hidden;
  }
}

@media (max-width: 600px) {
  body.admin-bar .dfao-header--sticky {
    top: 0;
  }

  .dfao-header__topbar p,
  .dfao-header__contacts > span,
  .dfao-header__contacts a:first-child {
    display: none;
  }

  .dfao-header__topbar-inner {
    justify-content: center;
  }

  .dfao-header__brand img {
    width: min(225px, 68vw);
  }

  .dfao-header__main-inner {
    min-height: 76px;
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dfao-header *,
  .dfao-header *::before,
  .dfao-header *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
