/* ==========================================================================
   04-header.css — logo bar, desktop nav, mobile bar + drawer
   ========================================================================== */

.site-header {
  background-color: var(--c-black);
}

/* --------------------------------------------------------------------------
   Desktop: three-column logo bar (meta | logo | phone) + nav strip
   -------------------------------------------------------------------------- */

/* Duda renders a 15px-padded row wrapping a 1200px grid of three equal
   columns; content is centred inside each column. */
.header-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  min-height: var(--header-h);
}

.header-bar__meta {
  font-family: var(--f-ui);
  font-size: var(--fs-meta);
  color: var(--c-white);
  text-align: center;
}

.header-bar__meta a:hover {
  color: var(--c-gold);
}

.header-bar__logo {
  display: block;
  width: 250px;
  margin-inline: auto;
}

.header-bar__logo img {
  width: 100%;
  height: auto;
}

/* Nav strip */

.site-nav {
  background-color: var(--c-black);
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  min-height: var(--navbar-h);
}

.site-nav__link {
  display: block;
  padding: 7px 15px;
  font-family: var(--f-ui);
  font-size: var(--fs-nav);
  letter-spacing: var(--ls-nav);
  color: var(--c-white);
  position: relative;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--c-gold);
}

/* Active page marker — the live site underlines the current item */
.site-nav__item.is-active .site-nav__link::after {
  content: '';
  position: absolute;
  left: 15px;
  right: 15px;
  top: 0;
  height: 2px;
  background-color: var(--c-white);
}

/* --------------------------------------------------------------------------
   Mobile bar + drawer
   -------------------------------------------------------------------------- */

.header-mobile {
  display: none;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 10px;
  padding: 9px var(--gutter);
  background-color: var(--c-black);
}

.header-mobile__name {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--c-white);
  text-align: center;
}

.header-mobile__call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--c-white);
}

.header-mobile__call svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.hamburger {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  flex: 0 0 auto;
}

.hamburger__slice {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--c-white);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 200;
  width: min(320px, 85vw);
  padding: 28px 24px;
  background-color: var(--c-black);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.drawer.is-open {
  transform: translateX(0);
}

.drawer__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  font-size: 26px;
  line-height: 1;
  color: var(--c-white);
}

.drawer__nav {
  margin-block: 40px 28px;
}

.drawer__nav a {
  display: block;
  padding: 11px 0;
  font-family: var(--f-ui);
  font-size: 16px;
  letter-spacing: var(--ls-nav);
  color: var(--c-white);
}

.drawer__nav a:hover {
  color: var(--c-gold);
}

.drawer__meta {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--c-white);
}

.drawer__meta-title {
  font-size: 22px;
  margin-bottom: 10px;
}

.drawer__meta a {
  display: block;
  margin-bottom: 6px;
  color: var(--c-white);
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 199;
  background-color: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* --------------------------------------------------------------------------
   Breakpoint swap — Duda switches its header at 1024px
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
  .site-nav {
    display: none;
  }

  .header-mobile {
    display: grid;
  }

  /* The logo bar collapses to just the centred logo */
  .header-bar {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-block: 6px 21px;
  }

  .header-bar__meta {
    display: none;
  }

  .header-bar__logo {
    width: 105px;
  }

  /* Live only keeps the logo on the mobile home page */
  body:not(.page-home) .header-bar {
    display: none;
  }
}

@media (min-width: 768px) {
  .drawer,
  .drawer-overlay {
    display: none;
  }
}
