/* Hide legacy theme header chrome; #menu is moved to body by JS */
body.askr-header-active #header,
body.askr-header-active table#logos {
  display: none !important;
}

body.askr-header-active .main-content {
  margin-top: 0 !important;
}

/* Desktop still uses theme #menu as slide panel */
body.askr-header-active #menu.default:not(.askr-header-menu-open):not(.active) {
  display: none !important;
}

body.askr-header-active #menu.askr-header-menu-open,
body.askr-header-active #menu.active {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: min(420px, 92vw) !important;
  max-width: 100%;
  height: 100vh !important;
  overflow: auto;
  background: #fff !important;
  z-index: 100050 !important;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
  padding: 72px 20px 40px;
  box-sizing: border-box;
  margin: 0 !important;
}

body.askr-header-active #menu .menu {
  display: flex !important;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

body.askr-header-active #menu .menu li {
  height: auto !important;
  list-style: none;
  width: 100%;
}

body.askr-header-active #menu .menu li a {
  font-family: "Romul", "Astra", serif;
  font-size: 18px;
  padding: 12px 4px;
  color: #000 !important;
  text-decoration: none;
  display: block;
}

body.askr-header-active #menu .menu li .sub-menu {
  position: static !important;
  display: block !important;
  background: transparent !important;
  margin: 0 0 0 12px !important;
  padding: 0;
}

.askr-header-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 100040;
  cursor: pointer;
}

.askr-site-header__burger.is-open span:nth-child(1) {
  transform: translateY(12.5px) rotate(45deg);
}
.askr-site-header__burger.is-open span:nth-child(2) {
  opacity: 0;
}
.askr-site-header__burger.is-open span:nth-child(3) {
  transform: translateY(-12.5px) rotate(-45deg);
}
.askr-site-header__burger span {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.askr-site-header {
  position: sticky;
  top: 0;
  z-index: 100000;
  background: #ffffff;
  border-bottom: 2px solid #000000;
  font-family: "Romul", "Astra", Georgia, serif;
  color: #000;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.askr-site-header__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px 20px;
  min-height: 72px;
  padding: 10px 28px;
  box-sizing: border-box;
}

.askr-site-header__left {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-self: start;
  min-width: 0;
}

.askr-site-header__center {
  justify-self: center;
  text-align: center;
}

.askr-site-header__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  justify-self: end;
}

.askr-site-header__burger {
  width: 34px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.askr-site-header__burger span {
  display: block;
  height: 3px;
  width: 100%;
  background: #000;
}

.askr-site-header__search-toggle {
  border: 0;
  background: transparent;
  padding: 4px;
  cursor: pointer;
  color: #000;
  display: inline-flex;
  align-items: center;
}

.askr-site-header__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: center;
}

.askr-site-header__nav a {
  color: #000;
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.askr-site-header__nav a:hover {
  text-decoration: underline;
}

.askr-site-header__title {
  color: #000;
  text-decoration: none;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-transform: uppercase;
}

.askr-site-header__title:hover {
  opacity: 0.75;
}

.askr-site-header__langs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.askr-site-header__lang {
  color: #666;
  text-decoration: none;
}

.askr-site-header__lang.is-active,
.askr-site-header__lang:hover {
  color: #000;
  text-decoration: underline;
}

.askr-site-header__lang-sep {
  color: #999;
}

.askr-header-socials,
.askr-footer-socials,
.askr-mobile-drawer__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.askr-header-social,
.askr-footer-socials a,
.askr-mobile-drawer__socials a {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.askr-header-social img,
.askr-footer-socials img,
.askr-mobile-drawer__socials img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.askr-site-header__search {
  border-top: 1px solid #e5e5e5;
  padding: 10px 28px 14px;
  background: #fff;
}

.askr-site-header__search[hidden] {
  display: none !important;
}

.askr-site-header__search form {
  display: flex;
  gap: 8px;
  max-width: 640px;
}

.askr-site-header__search input[type="search"] {
  flex: 1;
  border: 1px solid #000;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
}

.askr-site-header__search button {
  border: 1px solid #000;
  background: #000;
  color: #fff;
  padding: 8px 14px;
  cursor: pointer;
  font-family: inherit;
}

/* Mobile drawer (Yuk Hui style) — hidden on desktop */
.askr-mobile-drawer {
  display: none;
}

/* Hide hardcoded theme footer social images when our block is injected */
body.askr-header-active .footer-new .col-md-4 > a {
  display: none !important;
}

body.askr-header-active .footer-new .col-md-4 .askr-footer-socials {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

body.askr-header-active .footer-new .col-md-4 .askr-footer-socials img {
  filter: brightness(0) invert(1);
}

@media (max-width: 900px) {
  body.askr-header-active {
    padding-top: 56px;
  }

  body.askr-header-active .askr-site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-bottom: 1px solid #ddd;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }

  /* Compact bar: burger + centered title only */
  .askr-site-header__bar {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    padding: 12px 16px;
    min-height: 52px;
    gap: 0;
  }

  .askr-site-header__left {
    justify-self: start;
  }

  .askr-site-header__search-toggle,
  .askr-site-header__nav,
  .askr-site-header__right,
  .askr-site-header__search {
    display: none !important;
  }

  .askr-site-header__center {
    justify-self: center;
  }

  .askr-site-header__title {
    font-size: 18px;
    letter-spacing: 0.14em;
  }

  .askr-site-header__burger {
    width: 28px;
    height: 22px;
  }

  /* On mobile use custom drawer, not theme #menu */
  body.askr-header-active #menu {
    display: none !important;
  }

  .askr-mobile-drawer[hidden] {
    display: none !important;
  }

  .askr-mobile-drawer:not([hidden]) {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: min(92vw, 420px);
    height: 100%;
    height: 100dvh;
    background: #fff;
    z-index: 100060;
    padding: 0 22px 28px;
    box-sizing: border-box;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 6px 0 24px rgba(0, 0, 0, 0.12);
    font-family: "Romul", "Astra", Georgia, serif;
  }

  .askr-mobile-drawer__top {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    min-height: 56px;
    margin: 0 -6px;
    border-bottom: 1px solid #eee;
  }

  .askr-mobile-drawer__close {
    border: 0;
    background: transparent;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #000;
    padding: 0;
    width: 40px;
    height: 40px;
  }

  .askr-mobile-drawer__title {
    text-align: center;
    color: #000;
    text-decoration: none;
    font-size: 18px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .askr-mobile-drawer__search {
    position: relative;
    margin: 18px 0 8px;
  }

  .askr-mobile-drawer__search input[type="search"] {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cfcfcf;
    padding: 12px 42px 12px 12px;
    font-family: inherit;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #000;
    background: #fff;
  }

  .askr-mobile-drawer__search input::placeholder {
    color: #b0b0b0;
  }

  .askr-mobile-drawer__search button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    padding: 4px;
    cursor: pointer;
    color: #000;
  }

  .askr-mobile-drawer__nav {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
  }

  .askr-mobile-drawer__nav > a,
  .askr-mobile-drawer__wp-menu a {
    display: block;
    color: #000 !important;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
  }

  .askr-mobile-drawer__wp-menu .menu {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .askr-mobile-drawer__wp-menu .menu li {
    list-style: none;
    margin: 0;
  }

  .askr-mobile-drawer__wp-menu .sub-menu {
    margin: 0 0 0 12px;
    padding: 0;
    list-style: none;
  }

  .askr-mobile-drawer__langs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 22px;
  }

  .askr-mobile-drawer__lang {
    color: #666;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 14px;
  }

  .askr-mobile-drawer__lang.is-active {
    color: #000;
  }

  .askr-mobile-drawer__socials {
    justify-content: flex-start;
    gap: 14px;
    margin-top: auto;
    padding-top: 28px;
  }

  body.askr-header-menu-visible {
    overflow: hidden;
  }
}
