/* Header (parts/header.php): over the hero, white once the page scrolls. */

.nz-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px var(--nz-gutter);
  background-color: transparent;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.nz-header.is-scrolled {
  background-color: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  padding-top: 18px;
  padding-bottom: 18px;
}

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

.nz-header-logo {
  display: block;
  width: 280px;
  line-height: 0;
}

.nz-header-logo img {
  width: 100%;
  height: auto;
}

.nz-header-actions {
  display: flex;
  align-items: center;
}

/* Phone: a black button, a thin line, then the ☰ button. */
.nz-header-phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 25px;
  padding: 12px 24px;
  border-radius: 5px;
  background: var(--nz-black);
  color: #ffffff;
  font-size: 18px;
  line-height: 14px;
  text-decoration: none;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nz-header-phone::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -25px;
  width: 1px;
  height: 40px;
  transform: translateY(-50%);
  background: var(--nz-black);
}

.nz-header-phone:hover,
.nz-header-phone:focus {
  background: #ffffff;
  color: var(--nz-black);
}

.nz-header-phone svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nz-header-phone span {
  direction: ltr;
}

.nz-menu-open {
  margin-right: 25px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  line-height: 0;
}

.nz-menu-open svg {
  width: 50px;
  height: 50px;
  fill: var(--nz-black);
}

.nz-menu-open:hover,
.nz-menu-open:focus {
  background: none;
}

/* The side menu: slides in from the left over a dark backdrop. */
.nz-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  justify-content: flex-end;
  background-color: rgba(0, 0, 0, 0.8);
}

.nz-menu.is-open {
  display: flex;
  animation: nzFadeIn 0.3s ease;
}

.nz-menu.is-closing {
  animation: nzFadeIn 0.4s ease reverse forwards;
}

.nz-menu-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 300px;
  height: 100%;
  background-color: var(--nz-cream);
  box-shadow: 2px 8px 23px 3px rgba(0, 0, 0, 0.2);
  animation: nzSlideIn 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.nz-menu.is-closing .nz-menu-panel {
  animation: nzSlideIn 0.4s ease reverse forwards;
}

.nz-menu-close {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 6px;
  border: 0;
  background: none;
  cursor: pointer;
  line-height: 0;
}

.nz-menu-close:hover,
.nz-menu-close:focus {
  background: none;
}

.nz-menu-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--nz-black);
  stroke-width: 1.5;
}

.nz-menu-items {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.nz-menu-items li {
  margin-bottom: 25px;
  opacity: 0;
  transform: translateY(-10px);
}

.nz-menu-items li:last-child {
  margin-bottom: 0;
}

.nz-menu.is-open .nz-menu-items li {
  animation: nzMenuItem 0.5s ease forwards;
}

.nz-menu-items li:nth-child(1) { animation-delay: 0.1s; }
.nz-menu-items li:nth-child(2) { animation-delay: 0.2s; }
.nz-menu-items li:nth-child(3) { animation-delay: 0.3s; }
.nz-menu-items li:nth-child(4) { animation-delay: 0.4s; }
.nz-menu-items li:nth-child(5) { animation-delay: 0.5s; }
.nz-menu-items li:nth-child(6) { animation-delay: 0.6s; }
.nz-menu-items li:nth-child(7) { animation-delay: 0.7s; }
.nz-menu-items li:nth-child(8) { animation-delay: 0.8s; }

.nz-menu-items a {
  font-size: 23px;
  color: var(--nz-black);
  text-decoration: none;
}

.nz-menu-items a:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

@keyframes nzFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes nzSlideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes nzMenuItem {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (max-width: 767px) {
  .nz-header {
    padding: 18px var(--nz-gutter);
  }

  .nz-header.is-scrolled {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .nz-header-logo {
    width: 170px;
  }

  /* On phones the phone button is just the icon. */
  .nz-header-phone {
    margin-left: 16px;
    padding: 10px;
  }

  .nz-header-phone span {
    display: none;
  }

  .nz-header-phone::after {
    left: -16px;
    height: 30px;
  }

  .nz-menu-open {
    margin-right: 16px;
  }

  .nz-menu-open svg {
    width: 36px;
    height: 36px;
  }

  .nz-menu-panel {
    width: 250px;
  }

  .nz-menu-items a {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nz-menu.is-open,
  .nz-menu.is-closing,
  .nz-menu-panel,
  .nz-menu.is-closing .nz-menu-panel {
    animation-duration: 0.01s;
  }
}
