:root {
  --sp2h-font: system-ui, -apple-system, sans-serif;
  --sp2h-offset: 96px;
  --sp2h-pad-top: 15px;
  --sp2h-pad-bottom: 10px;
  --sp2h-header-bg: rgba(3, 9, 18, 0.84);
  --sp2h-header-bg-scrolled: rgba(3, 9, 18, 0.94);
  --sp2h-header-border: rgba(255, 255, 255, 0.08);
  --sp2h-header-text: rgba(245, 248, 255, 0.88);
  --sp2h-header-text-hover: #ffffff;
  --sp2h-header-accent: rgba(77, 163, 255, 0.95);
  --sp2h-drawer-bg: rgba(3, 9, 18, 0.98);
  --sp2h-shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
}

body {
  font-family: var(--sp2h-font);
  padding-top: 0 !important;
}

body .wp-site-blocks > main {
  padding-top: 0 !important;
}

body .wp-site-blocks > header.wp-block-template-part {
  display: none !important;
}

header.wp-block-template-part,
.wp-block-template-part:has(.sp2h) {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  overflow: visible !important;
}

.wp-site-blocks .wp-block-group:has(> .wp-block-post-title),
main .wp-block-group:has(> .wp-block-post-title) {
  display: none !important;
}

.sp2h-custom {
  position: static;
}

body.admin-bar .sp2h-custom {
  top: auto;
}

@media (max-width: 782px) {
  body.admin-bar .sp2h-custom {
    top: 46px;
  }
}

.sp2h {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10060;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--sp2h-header-bg);
  border-bottom: 1px solid var(--sp2h-header-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background 0.22s ease, box-shadow 0.22s ease;
}

body.admin-bar .sp2h {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .sp2h {
    top: 46px;
  }
}
.sp2h.is-scrolled {
  background: var(--sp2h-header-bg-scrolled);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.sp2h,
.sp2h * {
  box-sizing: border-box;
}

.sp2h.wp-block-group,
.sp2h .wp-block-group,
.sp2h .has-global-padding,
.sp2h .is-layout-constrained,
.sp2h .wp-block-group-is-layout-constrained {
  max-width: none !important;
  padding: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  overflow: visible !important;
}

.sp2h a {
  text-decoration: none;
}

.sp2h .sp2h__inner {
  width: min(1680px, calc(100% - 40px));
  margin: 0 auto !important;
  padding: var(--sp2h-pad-top) 16px var(--sp2h-pad-bottom) 16px !important;
  display: grid !important;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  transition: padding 0.22s ease, gap 0.22s ease;
}

.sp2h.is-scrolled .sp2h__inner {
  padding-top: 10px !important;
  padding-bottom: 8px !important;
}

.sp2h .sp2h__brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}

.sp2h .sp2h__brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0 !important;
  line-height: 0;
}

.sp2h .sp2h__brand-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 155px;
  max-height: 50px;
  transition: max-height 0.22s ease, max-width 0.22s ease;
}

.sp2h.is-scrolled .sp2h__brand-logo {
  max-height: 44px;
  max-width: 144px;
}

.sp2h .sp2h__nav {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}

.sp2h .sp2h__menuwrap {
  width: auto;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.sp2h .sp2h__menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 1.5vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.sp2h .sp2h__menu > li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  list-style: none;
}

.sp2h .sp2h__menu > li > a,
.sp2h .sp2h__parent-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 0;
  color: var(--sp2h-header-text);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.sp2h .sp2h__menu > li > a::after,
.sp2h .sp2h__parent-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 1px;
  background: var(--sp2h-header-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s ease;
}

.sp2h .sp2h__menu > li > a:hover,
.sp2h .sp2h__menu > li > a:focus-visible,
.sp2h .sp2h__parent-link:hover,
.sp2h .sp2h__parent-link:focus-visible {
  color: var(--sp2h-header-text-hover);
}

.sp2h .sp2h__menu > li > a:hover::after,
.sp2h .sp2h__menu > li > a:focus-visible::after,
.sp2h .sp2h__parent-link:hover::after,
.sp2h .sp2h__parent-link:focus-visible::after {
  transform: scaleX(1);
}

/* submenu desktop */
.sp2h .sp2h__has-submenu {
  position: relative;
  gap: 6px;
}

.sp2h .sp2h__has-submenu::after {
  content: "";
  position: absolute;
  left: -16px;
  right: -16px;
  top: 100%;
  height: 18px;
}

.sp2h .sp2h__submenu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(245, 248, 255, 0.88);
  cursor: pointer;
}

.sp2h .sp2h__submenu-toggle span {
  display: block;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.18s ease;
}

.sp2h .sp2h__has-submenu.is-open .sp2h__submenu-toggle span {
  transform: rotate(225deg) translateY(-1px);
}

.sp2h .sp2h__submenu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  transform: translateY(4px);
  min-width: 520px;
  max-width: min(520px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 8px 14px;
  margin: 0;
  padding: 16px;
  list-style: none;
  border-radius: 20px;
  background: rgba(5, 12, 24, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--sp2h-shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 10020;
}

.sp2h .sp2h__submenu li {
  margin: 0;
  list-style: none;
}

.sp2h .sp2h__submenu a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(245, 248, 255, 0.92);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.sp2h .sp2h__submenu a:hover,
.sp2h .sp2h__submenu a:focus-visible {
  background: rgba(77, 163, 255, 0.12);
  color: #ffffff;
}

.sp2h .sp2h__has-submenu:hover > .sp2h__submenu,
.sp2h .sp2h__has-submenu:focus-within > .sp2h__submenu,
.sp2h .sp2h__has-submenu.is-open > .sp2h__submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* cta */
.sp2h .sp2h__cta,
.sp2h .sp2h__cta .wp-block-button,
.sp2h .sp2h__cta .wp-block-buttons {
  margin: 0 !important;
}

.sp2h .sp2h__cta {
  display: flex !important;
  align-items: center;
}

.sp2h .sp2h__cta-btn {
  margin: 0;
}

.sp2h .sp2h__cta .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(77, 163, 255, 0.42);
  background: rgba(77, 163, 255, 0.14);
  color: #f7fbff !important;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.sp2h .sp2h__cta .wp-block-button__link:hover,
.sp2h .sp2h__cta .wp-block-button__link:focus-visible {
  transform: translateY(-1px);
  background: rgba(77, 163, 255, 0.22);
  border-color: rgba(77, 163, 255, 0.62);
  color: #ffffff !important;
}

.sp2h .sp2h__tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.sp2h .sp2h__mobile-toggle {
  display: none;
  position: relative;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  z-index: 10061;
}

.sp2h .sp2h__mobile-toggle span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
  transition: transform 0.22s ease, opacity 0.22s ease, top 0.22s ease;
}

.sp2h .sp2h__mobile-toggle span:nth-child(1) {
  top: 15px;
}

.sp2h .sp2h__mobile-toggle span:nth-child(2) {
  top: 22px;
}

.sp2h .sp2h__mobile-toggle span:nth-child(3) {
  top: 29px;
}

.sp2h.is-mobile-open .sp2h__mobile-toggle span:nth-child(1) {
  top: 22px;
  transform: rotate(45deg);
}

.sp2h.is-mobile-open .sp2h__mobile-toggle span:nth-child(2) {
  opacity: 0;
}

.sp2h.is-mobile-open .sp2h__mobile-toggle span:nth-child(3) {
  top: 22px;
  transform: rotate(-45deg);
}

.sp2h .sp2h__mobile-overlay {
  position: fixed;
  top: var(--sp2h-offset);
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(2, 8, 18, 0.52);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  z-index: 10040;
}

.sp2h.is-mobile-open .sp2h__mobile-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* mobile */
@media (max-width: 991px) {
  .sp2h .sp2h__inner {
    width: min(100%, calc(100% - 16px));
    min-height: 74px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0 8px 0 !important;
  }

  .sp2h .sp2h__brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 0 1 auto;
    min-width: 0;
    min-height: 46px;
  }

  .sp2h .sp2h__brand-link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 46px;
    line-height: 0;
  }

  .sp2h .sp2h__brand-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 140px;
    max-height: 46px;
  }

  .sp2h .sp2h__nav {
    display: contents;
  }

  .sp2h .sp2h__tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 46px;
    min-width: 46px;
    min-height: 46px;
  }

  .sp2h .sp2h__mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    line-height: 0;
    margin: 0;
    padding: 0;
  }

  .sp2h .sp2h__menuwrap {
    position: fixed;
    top: var(--sp2h-offset);
    right: 0;
    width: clamp(300px, 62vw, 380px);
    max-width: calc(100vw - 12px);
    height: calc(100dvh - var(--sp2h-offset));
    margin-left: 0;
    padding: 18px 18px 24px;
    background: var(--sp2h-drawer-bg);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -24px 0 60px rgba(0, 0, 0, 0.34);
    transform: translateX(100%);
    transition: transform 0.24s ease;
    z-index: 10050;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 14px;
  }

  .sp2h .sp2h__menuwrap::-webkit-scrollbar {
    width: 8px;
  }

  .sp2h.is-mobile-open .sp2h__menuwrap {
    transform: translateX(0);
  }

  .sp2h .sp2h__menu {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    align-content: flex-start;
    gap: 8px;
    margin: 0;
    padding: 0;
  }

  .sp2h .sp2h__menu > li {
    width: 100%;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
  }

  .sp2h .sp2h__menu > li > a {
    width: 100%;
    min-height: 46px;
    padding: 12px 0;
    font-size: 1rem;
    white-space: normal;
  }

  .sp2h .sp2h__has-submenu > .sp2h__parent-link {
    width: calc(100% - 46px);
    min-height: 46px;
    padding: 12px 0;
    font-size: 1rem;
    white-space: normal;
    flex: 0 1 calc(100% - 46px);
  }

  .sp2h .sp2h__menu > li > a::after,
  .sp2h .sp2h__parent-link::after {
    display: none;
  }

  .sp2h .sp2h__has-submenu {
    align-items: flex-start;
  }

  .sp2h .sp2h__has-submenu::after {
    display: none;
  }

  .sp2h .sp2h__submenu-toggle {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    margin-top: 5px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
  }

  .sp2h .sp2h__submenu {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    min-width: 0;
    max-width: none;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 4px;
    padding: 6px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.18s ease, max-height 0.22s ease, visibility 0.18s ease;
  }

  .sp2h .sp2h__has-submenu.is-open > .sp2h__submenu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    max-height: 1200px;
  }

  .sp2h .sp2h__submenu li {
    width: 100%;
  }

  .sp2h .sp2h__submenu a {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    white-space: normal;
  }

  .sp2h .sp2h__cta {
    width: 100%;
    margin-top: 10px !important;
  }

  .sp2h .sp2h__cta .wp-block-button,
  .sp2h .sp2h__cta-btn,
  .sp2h .sp2h__cta .wp-block-button__link {
    width: 100%;
  }

  .sp2h .sp2h__cta .wp-block-button__link {
    min-height: 44px;
    justify-content: center;
  }
}

@media (max-width: 680px) {
  .sp2h .sp2h__brand-logo {
    max-width: 136px;
    max-height: 44px;
  }

  .sp2h .sp2h__menuwrap {
    width: min(84vw, 360px);
    max-width: calc(100vw - 8px);
  }
}