/* ===== Common header/footer guard ===== */
#header.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: none;
  border-bottom: 1px solid rgba(9, 35, 84, 0.12);
}

#header .header-inner {
  width: min(calc(100% - 40px), var(--container, 1180px));
  min-height: 72px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

#header .brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 12px;
  color: var(--blue, #185fe7);
  font-size: 1.95rem;
  font-weight: 800;
  text-decoration: none;
}

#header .brand-logo {
  display: block;
  width: auto;
  max-width: none;
  height: 38px;
}

#header .nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
  padding: 0;
  color: #12224a;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
}

#header .nav a,
#header .nav-top {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

#header .nav .has-sub {
  position: relative;
}

#header .nav .has-sub > .nav-top::after {
  content: "▾";
  margin-left: 6px;
  font-size: 0.8em;
  color: rgba(18, 34, 74, 0.62);
}

#header .nav .has-sub > .submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 40;
  display: grid;
  min-width: 250px;
  margin-top: 14px;
  padding: 8px;
  gap: 2px;
  border: 1px solid var(--line, #d8e6fb);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow, 0 18px 42px rgba(20, 75, 168, 0.11));
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

#header .nav .has-sub:hover > .submenu,
#header .nav .has-sub:focus-within > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

#header .nav .submenu a {
  display: block;
  padding: 11px 14px;
  border-radius: 9px;
  color: var(--text, #163164);
  white-space: nowrap;
}

#header .header-actions {
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

#header .header-cta {
  padding: 13px 20px;
  border-radius: 999px;
  background: var(--blue, #185fe7);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

#header .header-cta.-secondary {
  border: 1px solid rgba(18, 34, 74, 0.18);
  background: #fff;
  color: #111;
}

#header .menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: rgba(24, 95, 231, 0.08);
  color: #12224a;
  cursor: pointer;
}

#header .menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: currentColor;
}

#footer.site-footer {
  padding: 64px 0 40px;
  border-top: 1px solid var(--line, #d8e6fb);
  background: #fff;
  color: #333a44;
}

#footer .footer-inner {
  width: min(calc(100% - 40px), var(--container, 1180px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#footer .footer-logo-link {
  display: inline-block;
}

#footer .footer-logo {
  display: block;
  width: auto;
  max-width: none;
  height: 52px;
}

#footer .footer-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 56px;
  margin-top: 44px;
}

#footer .footer-badges img {
  display: block;
  width: 100%;
  max-width: 500px;
  height: auto;
}

#footer .footer-company {
  margin: 44px 0 0;
  color: #333a44;
  font-size: 1.05rem;
  line-height: 2.2;
}

#footer .footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  margin-top: 40px;
  padding: 0;
}

#footer .footer-nav a {
  display: inline-block;
  padding: 2px 18px;
  border-left: 1px solid #c9d2de;
  color: #333a44;
  font-size: 0.95rem;
  line-height: 1.3;
  text-decoration: none;
}

#footer .footer-nav a:last-child {
  border-right: 1px solid #c9d2de;
}

#footer .footer-copy {
  display: block;
  margin-top: 30px;
  color: #8a94a6;
  font-size: 0.85rem;
}

@media (max-width: 1120px) {
  #header .nav {
    display: none;
  }

  #header .menu-toggle {
    display: inline-block;
  }
}

@media (max-width: 780px) {
  #header .header-inner,
  #footer .footer-inner {
    width: min(calc(100% - 24px), var(--container, 1180px));
  }

  #header .header-actions {
    display: none;
  }
}
