/* Shared homepage header contract. Keep this geometry aligned with home.html. */
html body header.docavi-home-header.site-header {
  display: flex;
  width: 100%;
  min-height: 0;
  align-items: center;
  justify-content: space-between;
  gap: normal;
  box-sizing: border-box;
  padding: 2.6% 5% 0;
  border: 0 !important;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: auto;
}

.docavi-home-header > .brand-logo {
  flex: 0 0 auto;
  color: #182636;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.5;
  text-decoration: none;
}

.docavi-home-header > .brand-logo:hover {
  opacity: .85;
}

.docavi-home-header .public-site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1vw, 16px);
}

.docavi-home-header .nav-item {
  position: relative;
  padding: 0;
  border: 0;
  color: #243447;
  background: transparent;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(10px, 1vw, 14.5px);
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s ease, opacity .2s ease;
}

.docavi-home-header .nav-item:hover {
  color: #132334;
}

.docavi-home-header .nav-item--duel {
  padding: 5px 10px;
  border: 1px solid rgba(19, 64, 116, .2);
  border-radius: 999px;
  color: #134074;
  background: rgba(255, 255, 255, .62);
  font-weight: 700;
}

.docavi-home-header .nav-item--duel:hover {
  color: #0b2545;
  background: rgba(255, 255, 255, .9);
}

.docavi-home-header .mobile-site-menu {
  display: none;
}

.docavi-home-header .mobile-site-menu summary {
  list-style: none;
  cursor: pointer;
}

.docavi-home-header .mobile-site-menu summary::-webkit-details-marker {
  display: none;
}

.docavi-home-header > .language-toggle {
  display: inline-flex;
  min-width: 40px;
  height: 32px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 999px;
  color: #243447;
  background: rgba(255, 255, 255, .62);
  box-shadow: 0 2px 8px rgba(24, 38, 54, .08);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.docavi-home-header > .language-toggle svg {
  display: none;
  width: 0;
  height: 0;
}

@media (max-width: 768px), (pointer: coarse) and (max-device-width: 600px) {
  html body header.docavi-home-header.site-header {
    flex-wrap: nowrap;
    gap: 8px;
    min-height: 54px;
    padding: calc(env(safe-area-inset-top, 0px) + 6px) 12px 6px;
  }

  .docavi-home-header > .brand-logo {
    font-size: 19px;
  }

  .docavi-home-header .public-site-nav {
    display: none;
  }

  .docavi-home-header .mobile-site-menu {
    position: relative;
    display: block;
    margin-left: auto;
  }

  .docavi-home-header .mobile-site-menu summary {
    display: flex;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 999px;
    color: #243447;
    background: rgba(255, 255, 255, .48);
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 10px;
    font-weight: 600;
  }

  .docavi-home-header .mobile-site-menu__panel {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 58px);
    right: 14px;
    left: 14px;
    z-index: 30;
    display: grid;
    min-width: 0;
    gap: 2px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: 16px;
    background: rgba(248, 250, 252, .86);
    box-shadow: 0 16px 40px rgba(24, 38, 54, .2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .docavi-home-header .mobile-site-menu__panel a {
    padding: 10px 12px;
    border-radius: 10px;
    color: #243447;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
  }

  .docavi-home-header .mobile-site-menu__panel a:hover,
  .docavi-home-header .mobile-site-menu__panel a:focus-visible {
    background: rgba(115, 141, 168, .14);
  }

  .docavi-home-header .mobile-site-menu__panel .nav-item--duel {
    border: 1px solid rgba(19, 64, 116, .18);
    color: #134074;
    background: rgba(19, 64, 116, .06);
    font-weight: 700;
  }

  .docavi-home-header > .language-toggle {
    min-width: 36px;
    height: 30px;
    padding: 0 5px;
    font-size: 9px;
  }
}

@media (max-width: 600px) {
  html body header.docavi-home-header.site-header {
    min-height: 54px;
    gap: 8px;
    padding: 6px 12px;
  }

  .docavi-home-header > .brand-logo {
    font-size: 19px;
  }

  .docavi-home-header .mobile-site-menu summary {
    min-height: 30px;
    padding: 6px 8px;
    font-size: 9px;
  }

  .docavi-home-header > .language-toggle {
    min-width: 32px;
    height: 28px;
    padding: 0 4px;
    font-size: 8px;
  }
}
