
/* ==========================================
   ADGUARDDNS.ORG
   PREMIUM FLOATING STICKY HEADER
   Desktop + Tablet + Mobile
========================================== */

/* HEADER CONTAINER */

.site-header {
  position: sticky;
  top: 14px;
  z-index: 1000;

  width: calc(100% - 40px);
  max-width: 1220px;
  margin: 14px auto 0;

  background: #FFFFFF;
  border: 1px solid #E9E4EF;
  border-radius: 24px;

  box-shadow:
    0 5px 30px rgba(43, 22, 60, 0.07);

  /* Important: do not clip mobile navigation */
  overflow: visible;
}

/* HEADER INNER */

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  width: 100%;
  max-width: none;
  min-height: 76px;
  margin: 0;
  padding: 0 28px;

  box-sizing: border-box;
}

/* ==========================================
   LOGO / BRAND
========================================== */

.site-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 0;
}

.site-logo {
  display: inline-block;
  width: fit-content;

  color: #542177;
  font-family: var(
    --font-heading,
    "Plus Jakarta Sans",
    sans-serif
  );

  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.9px;
  text-decoration: none;
  white-space: nowrap;
}

.site-logo span {
  color: #24212B;
}

.site-logo:hover {
  color: #542177;
}

.brand-description {
  margin: 4px 0 0;

  color: #696571;
  font-family: var(
    --font-body,
    "Inter",
    sans-serif
  );

  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;
}

/* ==========================================
   DESKTOP NAVIGATION
========================================== */

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  gap: clamp(20px, 2.5vw, 34px);
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: clamp(12px, 1.6vw, 24px);

  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list li {
  margin: 0;
  padding: 0;
}

.nav-list a {
  position: relative;
  display: inline-flex;
  align-items: center;

  min-height: 44px;
  padding: 6px 0;

  color: #342E3B;
  font-family: var(
    --font-body,
    "Inter",
    sans-serif
  );

  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;

  text-decoration: none;
  white-space: nowrap;

  transition: color 160ms ease;
}

/* HOVER */

.nav-list a:hover {
  color: #542177;
}

/* ACTIVE LINK */

.nav-list a.nav-active {
  color: #542177;
}

.nav-list a.nav-active::after {
  content: "";

  position: absolute;
  bottom: 1px;
  left: 0;
  right: 0;

  height: 2px;
  background: #542177;
  border-radius: 3px;
}

/* ==========================================
   HEADER CTA
========================================== */

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  flex: 0 0 auto;
  min-height: 46px;
  padding: 11px 21px;

  background: #C83824;
  color: #FFFFFF;

  border: 1px solid transparent;
  border-radius: 999px;

  font-family: var(
    --font-body,
    "Inter",
    sans-serif
  );

  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;

  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.header-cta:hover {
  background: #A92D1B;
  color: #FFFFFF;
}

.header-cta:active {
  transform: translateY(1px);
}

.header-cta svg {
  flex-shrink: 0;
}

/* ==========================================
   ACCESSIBLE KEYBOARD FOCUS
========================================== */

.site-header a:focus-visible,
.menu-toggle:focus-visible {
  outline: 3px solid #542177;
  outline-offset: 4px;
}

/* ==========================================
   MOBILE MENU BUTTON
   HIDDEN ON DESKTOP
========================================== */

.menu-toggle {
  display: none;

  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;

  width: 44px;
  height: 44px;
  flex: 0 0 44px;

  padding: 0;

  background: #F3EDF7;
  border: 1px solid #E9DDF0;
  border-radius: 14px;

  cursor: pointer;
}

.menu-toggle span {
  display: block;

  width: 20px;
  height: 2px;

  background: #542177;
  border-radius: 3px;

  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

/* OPEN MENU ICON */

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================
   TABLET + MOBILE
   MATCHES EXISTING JS BREAKPOINT
========================================== */

@media (max-width: 1099px) {

  .site-header {
    top: 10px;

    width: calc(100% - 24px);
    margin-top: 10px;

    border-radius: 20px;
  }

  .site-header .header-inner {
    min-height: 68px;
    padding: 0 18px;
    gap: 12px;
  }

  .site-logo {
    font-size: 20px;
  }

  .brand-description {
    font-size: 10px;
  }

  /* SHOW MOBILE TOGGLE */

  .menu-toggle {
    display: flex;
  }

  /* MOBILE NAVIGATION DROPDOWN */

  .primary-nav {
    display: none;

    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;

    width: 100%;
    padding: 16px;

    background: #FFFFFF;
    border: 1px solid #E9E4EF;
    border-radius: 20px;

    box-shadow:
      0 18px 40px rgba(43, 22, 60, 0.12);

    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  /* OPENED NAVIGATION */

  .primary-nav.is-open {
    display: flex;
  }

  /* NAVIGATION LINKS */

  .nav-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;

    width: 100%;
  }

  .nav-list li {
    width: 100%;
  }

  .nav-list a {
    display: flex;
    align-items: center;

    width: 100%;
    min-height: 44px;
    padding: 12px 14px;

    border-radius: 10px;

    font-size: 14px;
    font-weight: 600;
    white-space: normal;
  }

  .nav-list a:hover {
    background: #F7F2FA;
    color: #542177;
  }

  .nav-list a.nav-active {
    background: #F3EDF7;
    color: #542177;
  }

  .nav-list a.nav-active::after {
    display: none;
  }

  /* MOBILE CTA */

  .header-cta {
    display: flex;

    width: 100%;
    min-height: 48px;

    border-radius: 12px;
    font-size: 14px;
  }

}

/* ==========================================
   SMALL MOBILE — 359px AND BELOW
========================================== */

@media (max-width: 359px) {

  .site-header {
    width: calc(100% - 20px);
    border-radius: 18px;
  }

  .site-header .header-inner {
    padding: 0 13px;
    min-height: 64px;
  }

  .site-logo {
    font-size: 18px;
    letter-spacing: -0.7px;
  }

  .brand-description {
    font-size: 9px;
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .primary-nav {
    padding: 13px;
    border-radius: 16px;
  }

}

/* ==========================================
   REDUCED MOTION
========================================== */

@media (prefers-reduced-motion: reduce) {

  .nav-list a,
  .header-cta,
  .menu-toggle span {
    transition: none;
  }

}
