/* Pagefind UI colors inherit the same editorial palette as the theme. */
:root,
pagefind-modal.jp-pagefind-theme {
  --pf-text: #182536;
  --pf-text-secondary: #536174;
  --pf-text-muted: #738092;
  --pf-background: #ffffff;
  --pf-border: #e5e9ef;
  --pf-border-focus: #b63745;
  --pf-hover: #f5f7fa;
  --pf-mark: #922a36;
  --pf-shadow-md: 0 12px 35px rgba(24, 37, 54, .13);
  --pf-shadow-lg: 0 22px 70px rgba(24, 37, 54, .25);
  --pf-outline-focus: #b63745;
  --pf-font: inherit;
  --pf-input-height: 48px;
  --pf-input-font-size: 16px;
  --pf-result-title-font-size: 16px;
  --pf-result-excerpt-font-size: 14px;
  --pf-border-radius: 13px;
  --pf-modal-backdrop: rgba(15, 23, 42, .58);
  --pf-modal-max-width: 700px;
  --pf-modal-max-height: min(82dvh, 850px);
  --pf-modal-top: 8dvh;
}

.jp-header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  float: right;
  position: relative;
  z-index: 2;
  margin-left: auto;
  padding: 0 0 0 12px;
}
.jp-header-tools--mobile { display: none !important; }

.jp-pagefind-open,
.jp-mobile-menu-open,
.jp-drawer-close,
.jp-drawer-search {
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  font: inherit;
  cursor: pointer;
}

.jp-pagefind-open {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 15px;
  border: 1px solid #e1e6ed;
  border-radius: 999px;
  background: #fff;
  color: #182536;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(24, 37, 54, .035);
  transition: border-color .18s ease, color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.jp-pagefind-open:hover,
.jp-pagefind-open:focus-visible {
  border-color: #b63745;
  background: #fff7f7;
  color: #922a36;
  box-shadow: 0 6px 18px rgba(182, 55, 69, .10);
}

.jp-pagefind-open:active,
.jp-mobile-menu-open:active { transform: scale(.97); }
.jp-pagefind-open svg,
.jp-mobile-menu-open svg,
.jp-drawer-close svg,
.jp-drawer-search svg {
  display: block;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.jp-mobile-menu-open {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #e1e6ed;
  border-radius: 14px;
  background: #fff;
  color: #182536;
  box-shadow: 0 4px 12px rgba(24, 37, 54, .06);
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}

.jp-mobile-menu-open:hover,
.jp-mobile-menu-open:focus-visible {
  border-color: #b63745;
  background: #fff7f7;
  color: #922a36;
}

.jp-pagefind-status {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 1002;
  width: min(340px, calc(100vw - 32px));
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #f1c9c9;
  border-radius: 12px;
  background: #fff8f8;
  color: #842b35;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: 0 12px 34px rgba(24, 37, 54, .13);
}
.jp-pagefind-status[hidden] { display: none !important; }
.jp-pagefind-native-trigger {
  position: fixed !important;
  top: 0 !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Full-height mobile drawer. The shell is inert until it is opened by JS. */
.jp-drawer-shell {
  position: fixed;
  z-index: 100000;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear .3s;
}
body.jp-drawer-open .jp-drawer-shell {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.jp-drawer-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(13, 22, 36, .56);
  opacity: 0;
  cursor: pointer;
  transition: opacity .28s ease;
}
body.jp-drawer-open .jp-drawer-backdrop { opacity: 1; }
.jp-mobile-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(410px, calc(100vw - 24px));
  min-height: 0;
  padding: max(18px, env(safe-area-inset-top)) 22px max(18px, env(safe-area-inset-bottom));
  overflow: hidden;
  border-left: 1px solid rgba(255, 255, 255, .6);
  border-radius: 24px 0 0 24px;
  background: #fff;
  color: #182536;
  box-shadow: -20px 0 65px rgba(11, 21, 36, .22);
  transform: translateX(104%);
  transition: transform .3s cubic-bezier(.22, .8, .26, 1);
  outline: none;
}
body.jp-drawer-open .jp-mobile-drawer { transform: translateX(0); }
.jp-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 5px 0 20px;
  border-bottom: 1px solid #e9edf2;
}
.jp-drawer-brand { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.jp-drawer-brand strong {
  overflow: hidden;
  color: #182536;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
}
.jp-drawer-close {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #e4e8ee;
  border-radius: 14px;
  background: #f8fafc;
  color: #182536;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.jp-drawer-close:hover,
.jp-drawer-close:focus-visible { background: #fff0f1; color: #922a36; }
.jp-drawer-close:active { transform: scale(.96); }
.jp-drawer-search-row { padding: 19px 0 14px; }
.jp-drawer-search {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid #e4e8ee;
  border-radius: 14px;
  background: #f7f9fc;
  color: #657286;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  transition: border-color .18s ease, background .18s ease;
}
.jp-drawer-search:hover,
.jp-drawer-search:focus-visible { border-color: #c77a83; background: #fff8f8; }
.jp-drawer-search svg { color: #b63745; }
.jp-drawer-search span { min-width: 0; flex: 1; }
.jp-drawer-navigation {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 3px 0 20px;
  scrollbar-width: thin;
}
.jp-mobile-drawer .main-nav,
.jp-mobile-drawer .jp-offcanvas-menu,
.jp-mobile-drawer .jp-offcanvas-menu li {
  display: block;
  float: none;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  background: transparent;
}
.jp-mobile-drawer .jp-offcanvas-menu > li { border-bottom: 1px solid #edf0f4; }
.jp-mobile-drawer .jp-offcanvas-menu a {
  display: flex;
  min-height: 49px;
  align-items: center;
  gap: 10px;
  padding: 11px 4px;
  border: 0;
  background: transparent;
  color: #263447;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  transition: padding .18s ease, color .18s ease;
}
.jp-mobile-drawer .jp-offcanvas-menu a:hover,
.jp-mobile-drawer .jp-offcanvas-menu a:focus-visible,
.jp-mobile-drawer .jp-offcanvas-menu .current-menu-item > a,
.jp-mobile-drawer .jp-offcanvas-menu .current_page_item > a {
  padding-left: 9px;
  color: #a32f3d;
}
.jp-mobile-drawer .jp-offcanvas-menu .sub-menu,
.jp-mobile-drawer .jp-offcanvas-menu .children {
  display: none;
  padding: 0 0 8px 14px;
  border-left: 2px solid #f0d1d5;
  margin: 0 0 8px 4px;
}
.jp-mobile-drawer .jp-offcanvas-menu .jp-submenu-open > .sub-menu,
.jp-mobile-drawer .jp-offcanvas-menu .jp-submenu-open > .children { display: block; }
.jp-mobile-drawer .jp-offcanvas-menu .sub-menu a,
.jp-mobile-drawer .jp-offcanvas-menu .children a {
  min-height: 40px;
  padding-top: 8px;
  padding-bottom: 8px;
  color: #637084;
  font-size: 14px;
  font-weight: 600;
}
.jp-mobile-drawer .jp-offcanvas-menu .dropdown-menu-toggle,
.jp-mobile-drawer .jp-offcanvas-menu .page_item_has_children > .dropdown-menu-toggle {
  display: inline-flex;
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  border: 1px solid #e9edf2;
  border-radius: 10px;
  background: #f8fafc;
  color: #5c6879;
  padding: 0;
  font: inherit;
  appearance: none;
  cursor: pointer;
}
.jp-mobile-drawer .jp-offcanvas-menu .dropdown-menu-toggle svg { width: 13px; height: 13px; }
.jp-mobile-drawer .jp-offcanvas-menu .jp-submenu-open > a .dropdown-menu-toggle,
.jp-mobile-drawer .jp-offcanvas-menu .jp-submenu-open > .dropdown-menu-toggle { transform: rotate(180deg); }
body.jp-drawer-open { overflow: hidden; overscroll-behavior: none; }
body.jp-drawer-open .jp-mobile-drawer { touch-action: pan-y; }

/* On tablets and phones, GeneratePress can hide #site-navigation entirely.
   Keep the search and custom drawer in the separate mobile-control wrapper. */
@media (max-width: 1024px) {
  .inside-header {
    position: relative;
    padding-right: 124px !important;
  }
  .site-branding {
    min-width: 0;
    max-width: calc(100% - 4px);
  }
  .site-title,
  .site-description,
  .site-logo { max-width: 100%; }
  .site-logo img { max-width: 100%; height: auto; }

  /* Use one consistent off-canvas navigation across tablets and phones. */
  #site-navigation { display: none !important; }
  #mobile-menu-control-wrapper {
    display: flex !important;
    position: absolute !important;
    top: 50% !important;
    right: max(16px, env(safe-area-inset-right)) !important;
    z-index: 30;
    width: auto !important;
    min-height: 0;
    align-items: center;
    justify-content: flex-end;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: translateY(-50%) !important;
  }
  #mobile-menu-control-wrapper > .menu-toggle { display: none !important; }
  #mobile-menu-control-wrapper .jp-header-tools--mobile {
    display: flex !important;
    float: none;
    gap: 9px;
    margin: 0;
    padding: 0;
    visibility: visible;
    opacity: 1;
  }
  .jp-header-tools--nav { display: none !important; }
  .jp-pagefind-open {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 14px;
  }
  .jp-search-text { display: none !important; }
  .jp-mobile-menu-open { display: inline-flex !important; }
}

@media (max-width: 480px) {
  .inside-header { padding-right: 116px !important; }
  #mobile-menu-control-wrapper { right: max(12px, env(safe-area-inset-right)) !important; }
  .jp-header-tools--mobile { gap: 7px !important; }
  .jp-pagefind-open,
  .jp-mobile-menu-open { width: 42px; min-width: 42px; height: 42px; min-height: 42px; }
  .jp-mobile-drawer {
    width: calc(100vw - 14px);
    padding-right: 17px;
    padding-left: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jp-pagefind-open,
  .jp-mobile-menu-open,
  .jp-drawer-backdrop,
  .jp-mobile-drawer,
  .jp-drawer-close,
  .jp-drawer-search,
  .jp-mobile-drawer .jp-offcanvas-menu a { transition-duration: .01ms !important; }
}
