:root {
  --asph-red: #e51b35;
  --asph-red-bright: #f0223f;
  --asph-white: #fff;
  --asph-border: rgba(255, 255, 255, .16);
  --asph-radius: 22px;
}

/* Avoid a duplicate Astra header when the plugin setting is enabled. */
body.asph-hide-astra #masthead,
body.asph-hide-astra .site-header,
body.asph-hide-astra #ast-desktop-header,
body.asph-hide-astra #ast-mobile-header {
  display: none !important;
}

.asph-header,
.asph-header * {
  box-sizing: border-box;
}

.asph-header {
  position: fixed;
  z-index: 99999;
  top: 16px;
  left: 0;
  right: 0;
  padding: 0 24px;
  pointer-events: none;
  transition: top .28s ease;
}

.admin-bar .asph-header { top: 48px; }

.asph-shell {
  position: relative;
  width: 100%;
  max-width: 1320px;
  min-height: 86px;
  margin: 0 auto;
  padding: 12px 16px 12px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  overflow: visible;
  pointer-events: auto;

  background:
    linear-gradient(135deg, rgba(22, 22, 22, .58), rgba(8, 8, 8, .34));
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--asph-border);
  border-radius: var(--asph-radius);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, .22),
    inset 0 1px 0 rgba(255, 255, 255, .09);

  transition:
    min-height .28s ease,
    background .28s ease,
    box-shadow .28s ease,
    border-color .28s ease;
}

.asph-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(110deg, rgba(255,255,255,.055), transparent 34%, transparent 70%, rgba(255,255,255,.025));
}

.asph-header.is-scrolled { top: 8px; }
.admin-bar .asph-header.is-scrolled { top: 40px; }
.asph-header.is-scrolled .asph-shell {
  min-height: 74px;
  background: linear-gradient(135deg, rgba(12,12,12,.82), rgba(7,7,7,.69));
  border-color: rgba(255,255,255,.12);
  box-shadow: 0 14px 38px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.06);
}

.asph-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--asph-white) !important;
  text-decoration: none !important;
}

.asph-logo-img {
  display: block;
  width: auto;
  height: 58px;
  max-width: 78px;
  object-fit: contain;
}

.asph-logo-fallback {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--asph-red);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .02em;
}

.asph-brand-copy {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}

.asph-brand-name {
  color: #fff;
  font-size: 18px;
  line-height: 1;
  letter-spacing: .015em;
  font-weight: 700;
}

.asph-brand-name strong { color: var(--asph-red-bright); font-weight: 800; }
.asph-tagline {
  margin-top: 5px;
  color: rgba(255,255,255,.64);
  font-size: 7px;
  line-height: 1;
  letter-spacing: .105em;
  font-weight: 500;
}

.asph-nav {
  position: relative;
  z-index: 2;
  justify-self: center;
}

.asph-menu {
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  gap: 28px;
}

.asph-menu > li {
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
}

.asph-menu > li > a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 26px 0;
  color: rgba(255,255,255,.88) !important;
  text-decoration: none !important;
  font-size: 14px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: .01em;
  transition: color .2s ease;
}

.asph-menu > li > a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 16px;
  width: 0;
  height: 2px;
  border-radius: 3px;
  background: var(--asph-red-bright);
  transform: translateX(-50%);
  box-shadow: 0 0 14px rgba(229,27,53,.42);
  transition: width .22s ease;
}

.asph-menu > li:hover > a,
.asph-menu > li.current-menu-item > a,
.asph-menu > li.current-menu-ancestor > a { color: #fff !important; }

.asph-menu > li:hover > a::after,
.asph-menu > li.current-menu-item > a::after,
.asph-menu > li.current-menu-ancestor > a::after { width: 100%; }

.asph-menu .sub-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% - 4px);
  left: -18px;
  width: 232px;
  margin: 0 !important;
  padding: 10px !important;
  list-style: none;
  background: rgba(10,10,10,.82);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  backdrop-filter: blur(22px) saturate(135%);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 15px;
  box-shadow: 0 20px 50px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.05);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

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

.asph-menu .sub-menu li { margin: 0 !important; }
.asph-menu .sub-menu a {
  display: block;
  padding: 11px 12px;
  border-radius: 9px;
  color: rgba(255,255,255,.84) !important;
  text-decoration: none !important;
  font-size: 13px;
  line-height: 1.35;
  transition: background .2s ease, color .2s ease, padding-left .2s ease;
}

.asph-menu .sub-menu a:hover,
.asph-menu .sub-menu a:focus-visible {
  padding-left: 16px;
  background: rgba(229,27,53,.14);
  color: #fff !important;
}

.asph-cta,
.asph-mobile-cta {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, var(--asph-red-bright), #d70d2b) !important;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 12px;
  line-height: 1;
  letter-spacing: .04em;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(229,27,53,.20);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.asph-cta {
  justify-self: end;
  padding: 10px 10px 10px 18px;
}

.asph-cta:hover,
.asph-mobile-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 13px 30px rgba(229,27,53,.30);
}

.asph-cta-arrow {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 50%;
  font-size: 17px;
  transition: transform .2s ease;
}

.asph-cta:hover .asph-cta-arrow,
.asph-mobile-cta:hover .asph-cta-arrow { transform: translateX(2px); }

.asph-mobile-actions { display: none; }

/* Strong reset prevents theme/button CSS from turning the hamburger into a large rectangle. */
.asph-toggle {
  position: relative;
  z-index: 3;
  display: none;
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  border-radius: 15px !important;
  background: linear-gradient(135deg, rgba(240,34,63,.96), rgba(205,7,42,.92)) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(229,27,53,.18), inset 0 1px 0 rgba(255,255,255,.18) !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  cursor: pointer;
  overflow: hidden;
}

.asph-toggle::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 13px;
  background: linear-gradient(150deg, rgba(255,255,255,.08), transparent 48%);
  pointer-events: none;
}

.asph-menu-icon {
  position: relative;
  z-index: 1;
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  overflow: visible;
}

.asph-menu-icon .asph-line {
  fill: none !important;
  stroke: #fff !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .22s ease, opacity .18s ease;
}

.asph-toggle.is-open .asph-line-1 { transform: translateY(5px) rotate(45deg); }
.asph-toggle.is-open .asph-line-2 { opacity: 0; }
.asph-toggle.is-open .asph-line-3 { transform: translateY(-5px) rotate(-45deg); }

.asph-brand:focus-visible,
.asph-menu a:focus-visible,
.asph-cta:focus-visible,
.asph-mobile-cta:focus-visible,
.asph-toggle:focus-visible {
  outline: 2px solid #fff !important;
  outline-offset: 3px;
}

@media (max-width: 1180px) {
  .asph-brand-copy { display: none; }
  .asph-menu { gap: 20px; }
  .asph-menu > li > a { font-size: 13px; }
}

@media (max-width: 980px) {
  .asph-header {
    top: 10px;
    padding: 0 10px;
  }

  .admin-bar .asph-header { top: 54px; }
  .admin-bar .asph-header.is-scrolled { top: 42px; }

  .asph-shell {
    min-height: 68px;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    padding: 8px 9px 8px 13px;
    border-radius: 18px;
    border-color: rgba(255,255,255,.18);
    -webkit-backdrop-filter: blur(22px) saturate(138%);
    backdrop-filter: blur(22px) saturate(138%);
    box-shadow: 0 12px 34px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.10);
  }

  /* User-selectable glass strengths. Balanced is the default. */
  body.asph-glass-light .asph-shell {
    background: linear-gradient(135deg, rgba(18,18,18,.18), rgba(7,7,7,.10));
  }
  body.asph-glass-balanced .asph-shell {
    background: linear-gradient(135deg, rgba(18,18,18,.30), rgba(7,7,7,.18));
  }
  body.asph-glass-dark .asph-shell {
    background: linear-gradient(135deg, rgba(18,18,18,.44), rgba(7,7,7,.30));
  }

  body.asph-glass-light .asph-header.is-scrolled .asph-shell {
    background: linear-gradient(135deg, rgba(12,12,12,.38), rgba(6,6,6,.26));
  }
  body.asph-glass-balanced .asph-header.is-scrolled .asph-shell {
    background: linear-gradient(135deg, rgba(12,12,12,.48), rgba(6,6,6,.34));
  }
  body.asph-glass-dark .asph-header.is-scrolled .asph-shell {
    background: linear-gradient(135deg, rgba(12,12,12,.62), rgba(6,6,6,.48));
  }

  .asph-logo-img {
    height: 46px;
    max-width: 60px;
  }

  .asph-brand-copy,
  .asph-cta { display: none !important; }

  .asph-toggle {
    display: inline-flex !important;
    justify-self: end;
  }

  .asph-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: auto;
    max-height: min(72vh, 560px);
    overflow-y: auto;
    overscroll-behavior: contain;
    justify-self: stretch;
    padding: 10px;

    background: linear-gradient(145deg, rgba(13,13,13,.72), rgba(7,7,7,.56));
    -webkit-backdrop-filter: blur(24px) saturate(138%);
    backdrop-filter: blur(24px) saturate(138%);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 18px;
    box-shadow: 0 20px 48px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.06);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(.985);
    transform-origin: top;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
  }

  .asph-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .asph-menu {
    display: block;
    width: 100%;
  }

  .asph-menu > li {
    border-bottom: 1px solid rgba(255,255,255,.055);
  }

  .asph-menu > li:last-child { border-bottom: 0; }

  .asph-menu > li > a {
    width: 100%;
    padding: 14px 12px;
    border-radius: 11px;
    font-size: 14px;
    line-height: 1.2;
  }

  .asph-menu > li > a:hover,
  .asph-menu > li > a:focus-visible,
  .asph-menu > li.current-menu-item > a {
    background: rgba(255,255,255,.055);
  }

  .asph-menu > li > a::after { display: none; }

  .asph-menu .sub-menu {
    position: static;
    display: none;
    width: auto;
    margin: 0 0 8px !important;
    padding: 6px !important;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(255,255,255,.045);
    border-color: rgba(255,255,255,.07);
    box-shadow: none;
  }

  .asph-menu li.menu-item-has-children.asph-sub-open > .sub-menu { display: block; }

  .asph-menu .sub-menu a {
    padding: 10px 12px;
    font-size: 13px;
  }

  .asph-mobile-actions {
    display: block;
    padding: 10px 2px 2px;
  }

  .asph-mobile-cta {
    width: 100%;
    min-height: 50px;
    padding: 10px 10px 10px 18px;
    justify-content: space-between;
    font-size: 12px;
  }
}

@media (max-width: 782px) {
  .admin-bar .asph-header { top: 56px; }
}

@media (max-width: 600px) {
  #wpadminbar { position: fixed; }
  .asph-header { padding: 0 9px; }
  .asph-shell { border-radius: 17px; }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .asph-shell { background: rgba(10,10,10,.74); }
  .asph-nav { background: rgba(10,10,10,.94); }
}

@media (prefers-reduced-motion: reduce) {
  .asph-header,
  .asph-shell,
  .asph-menu a,
  .asph-menu a::after,
  .asph-menu .sub-menu,
  .asph-cta,
  .asph-mobile-cta,
  .asph-cta-arrow,
  .asph-nav,
  .asph-menu-icon .asph-line {
    transition: none !important;
  }
}
