/* ==========================================================================
   Header. Measurements are Elementor template 11's at the four widths:
   top bar 47px (10px padding + a 27px line) at 1440; main bar 20px above and
   below the logo (10px section padding + 10px column padding); logo column
   27.681% wide (50% below 768px); the Menu button in the right 25% column.
   The Menu panel is JetMenu's: 400px, 20px padding, cross top right, logo, list.
   ========================================================================== */

/* ---- Top bar ----------------------------------------------------------- */

.pw-topbar {
  background: var(--pw-secondary);
  padding: 10px 0;
}
.pw-topbar__inner { padding: 0; }
.pw-topbar__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin: 0 -5px;
  padding: 0;
  list-style: none;
}
.pw-topbar__item { margin: 0 5px; padding: 0; }
.pw-topbar__item,
.pw-topbar__item a {
  display: flex;
  align-items: center;
  color: #ffffff;
  text-decoration: none;
}
.pw-topbar__item a:hover { color: #ffffff; text-decoration: none; }
.pw-topbar__item .pw-icon { margin-right: 3.5px; flex: none; }
.pw-topbar__text { padding-left: 5px; }

@media (max-width: 767px) {
  .pw-topbar__list { justify-content: center; }
}

/* ---- Main bar ----------------------------------------------------------- */

.pw-headbar { padding: 10px 0; }
.pw-headbar__inner {
  display: flex;
  align-items: stretch;
  padding: 0;
}
/* Each column carries the 10px padding Elementor's columns had. */
.pw-headbar__logo {
  padding: 10px;
  flex: 0 0 27.681%;
  width: 27.681%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.pw-headbar__spacer { flex: 1 1 50%; min-width: 0; padding: 10px; }
.pw-headbar__menu {
  padding: 10px;
  flex: 1 1 25%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
}

/* On a phone the empty middle column wraps onto a row of its own below (it is
   ordered last), which is where the extra 20px under the logo comes from. */
@media (max-width: 767px) {
  .pw-headbar__inner { flex-wrap: wrap; }
  .pw-headbar__logo { flex-basis: 50%; width: 50%; }
  .pw-headbar__spacer { flex: 0 0 100%; order: 99999; }
  .pw-headbar__menu { flex-basis: 50%; }
}

.pw-logo { display: block; line-height: 0; }
.pw-logo__img { display: block; width: 100%; height: auto; }
.pw-logo__text { display: block; font-family: var(--pw-font-heading); font-size: 26px; font-weight: 700; line-height: 1.2; color: var(--pw-ink-strongest); }

/* ---- Menu button: JetMenu's toggle (35px min, 20px bars icon + 20px text) -- */

.pw-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 35px;
  min-height: 35px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #3a3a3a;
  font-family: var(--pw-font-body);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.6;
  cursor: pointer;
}
.pw-menu-toggle:hover, .pw-menu-toggle:focus { color: #3a3a3a; background: none; }
.pw-menu-toggle__icon { width: 20px; height: auto; flex: none; }
.pw-menu-toggle__icon + .pw-menu-toggle__text { margin-left: 10px; }

/* ---- Menu panel --------------------------------------------------------- */

.pw-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 997;
  background: rgba(0, 0, 0, .5);
}

.pw-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 998;
  width: 400px;
  max-width: 100%;
  height: 100%;
  transform: translateX(100%);
  transition: transform .3s ease;
}
.pw-drawer.is-open { transform: translateX(0); }
body.admin-bar .pw-drawer { top: 32px; height: calc(100vh - 32px); }
@media (max-width: 782px) { body.admin-bar .pw-drawer { top: 46px; height: calc(100vh - 46px); } }

.pw-drawer__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
  overflow-x: hidden;
  overflow-y: auto;
  background: #ffffff;
  -webkit-overflow-scrolling: touch;
}

.pw-drawer__controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 35px;
}
.pw-close {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: none;
  color: #3a3a3a;
  cursor: pointer;
}
.pw-close:hover, .pw-close:focus { background: none; color: #3a3a3a; }
.pw-close .pw-icon { width: 16px; height: auto; }

/* The logo block (Elementor template 567: a boxed container, 10px padding). */
.pw-drawer__logo { padding: 10px; }

.pw-drawer__nav { margin-top: 10px; }
.pw-drawer__list, .pw-drawer__list ul { margin: 0; padding: 0; list-style: none; }

.pw-drawer__list li { padding: 10px 0; }
.pw-drawer__list li li { padding: 10px 0; }
.pw-drawer__list .sub-menu { padding: 10px 0 10px 30px; }

/* JetMenu's item label: the kit's "primary" typography (Cormorant Garamond 600)
   in the secondary brown. Size is not set by JetMenu, so it would inherit the
   17px body size; 20px is used here to match the Menu button above it. */
.pw-drawer__list a {
  display: block;
  color: var(--pw-secondary);
  font-family: var(--pw-font-heading);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.6;
  text-decoration: none;
}
.pw-drawer__list a:hover,
.pw-drawer__list a:focus,
.pw-drawer__list .current-menu-item > a { color: var(--pw-accent); text-decoration: none; }
.pw-drawer__list .current-menu-item > a { color: var(--pw-secondary); text-decoration: underline; text-underline-offset: .25em; }

/* Once header.js has run, a parent item is a link plus an arrow button, and its
   sub-menu is collapsed until the button is pressed. Without JS every item
   simply shows, so nothing is ever unreachable. */
.pw-drawer.is-enhanced .menu-item-has-children > .pw-drawer__row { display: flex; align-items: center; justify-content: space-between; }
.pw-drawer.is-enhanced .menu-item-has-children > .sub-menu { display: none; }
.pw-drawer.is-enhanced .menu-item-has-children.is-open > .sub-menu { display: block; }

.pw-drawer__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: none;
  color: #3a3a3a;
  cursor: pointer;
}
.pw-drawer__toggle:hover, .pw-drawer__toggle:focus { background: none; color: #3a3a3a; }
.pw-drawer__toggle .pw-icon { width: 16px; height: auto; transition: transform .2s ease; }
.menu-item-has-children.is-open > .pw-drawer__row .pw-drawer__toggle .pw-icon { transform: rotate(180deg); }

body.pw-drawer-open { overflow: hidden; }
