/* header.php */

.wnb-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid rgba(10, 10, 10, 0.08);
}

/* .wnb-header is fixed (removed from flow), so .wnb-main needs matching top padding
   to avoid content sliding underneath it — heights mirror .wnb-header__inner below. */
.wnb-main {
  padding-top: 5.5rem;
}

/* Offset for the WordPress admin toolbar so it doesn't clip the fixed header/mobile nav for logged-in users. */
body.admin-bar .wnb-header {
  top: 32px;
}

body.admin-bar .wnb-main {
  padding-top: calc(5.5rem + 32px);
}

body.admin-bar .wnb-mobile-nav {
  top: calc(4.25rem + 32px);
}

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

  body.admin-bar .wnb-main {
    padding-top: calc(4.25rem + 46px);
  }

  body.admin-bar .wnb-mobile-nav {
    top: calc(4.25rem + 46px);
  }
}

.wnb-header--home {
  border-bottom-color: rgba(10, 10, 10, 0.06);
}

.wnb-header__inner {
  max-width: var(--wnb-max-wide);
  margin: 0 auto;
  height: 5.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

.wnb-header__logo img {
  height: 4rem;
  width: auto;
  object-fit: contain;
  object-position: left;
}

.wnb-header__actions {
  display: flex;
  align-items: center;
  gap: clamp(1.125rem, 2.75vw, 2.75rem);
  flex-shrink: 0;
}

.wnb-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: clamp(1.125rem, 2.75vw, 2.75rem);
}

.wnb-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0;
  font-family: var(--wnb-font-nav);
  font-size: 1.125rem;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #000;
  text-decoration: none;
  transition: opacity 0.15s ease-in-out;
}

.wnb-nav__link:hover {
  opacity: 0.65;
}

.wnb-nav__link.is-current {
  text-decoration: underline;
  text-decoration-color: #000;
  text-underline-offset: 0.18em;
  opacity: 1;
}

.wnb-nav__link.is-current:hover {
  opacity: 1;
}

.wnb-nav__dropdown {
  position: relative;
}

.wnb-nav__menu {
  position: absolute;
  left: 50%;
  top: 100%;
  z-index: 10;
  margin: 0.25rem 0 0;
  min-width: 15rem;
  transform: translateX(-50%);
  list-style: none;
  padding: 0.375rem 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: var(--wnb-dropdown-bg);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.07);
}

.wnb-nav__menu-link {
  display: block;
  padding: 0.75rem 1.2rem;
  font-family: var(--wnb-font-nav);
  font-size: 1rem;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #1a1a1a;
  text-decoration: none;
  transition: background-color 0.1s ease, color 0.1s ease;
}

.wnb-nav__menu-link:hover {
  background: #e6e6e4;
  color: #444;
}

.wnb-nav__menu-link.is-current {
  background: #ebebea;
  color: #000;
  text-decoration: underline;
  text-decoration-color: #000;
  text-underline-offset: 0.18em;
}

/* ── Residential mega-menu ── */
.wnb-nav__mega {
  position: absolute;
  left: 50%;
  top: calc(100% + 0.375rem);
  z-index: 10;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 0.625rem;
  width: 540px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
}

.wnb-nav__mega-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  text-decoration: none;
  background: #111;
}

.wnb-nav__mega-card:focus-visible {
  outline: 2px solid #000;
  outline-offset: -2px;
}

.wnb-nav__mega-img {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.wnb-nav__mega-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease;
  opacity: 0.88;
}

.wnb-nav__mega-card:hover .wnb-nav__mega-img img {
  transform: scale(1.12) translate(3%, -2%);
  opacity: 1;
}

.wnb-nav__mega-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 0.625rem 0.625rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, transparent 100%);
  color: #fff;
  font-family: var(--wnb-font-nav);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.2;
  transition: background 0.3s ease;
}

.wnb-nav__mega-card:hover .wnb-nav__mega-label {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.08) 100%);
}

.wnb-nav__mega-card.is-current .wnb-nav__mega-label {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* ── WhatsApp nav icon ── */
.wnb-nav__whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #25D366;
  text-decoration: none;
  transition: opacity 0.15s ease-in-out;
  line-height: 1;
}

.wnb-nav__whatsapp:hover {
  opacity: 0.7;
}

.wnb-mobile-nav__link--whatsapp {
  color: #25D366;
  gap: 0.625rem;
}

/* ── Hamburger button ── */
.wnb-header__hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: none;
  color: #000;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.wnb-header__hamburger-close {
  display: none;
}

.wnb-header__hamburger[aria-expanded="true"] .wnb-header__hamburger-close {
  display: block;
}

.wnb-header__hamburger[aria-expanded="true"] .wnb-header__hamburger-bars {
  display: none;
}

/* ── Mobile nav overlay ── */
.wnb-mobile-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: 4.25rem;
  z-index: 99;
  overflow-y: auto;
  background: #fff;
}

.wnb-mobile-nav.is-open {
  display: block;
}

.wnb-mobile-nav__inner {
  display: flex;
  flex-direction: column;
  padding: 1.5rem clamp(1rem, 4vw, 1.5rem) 2.5rem;
}

.wnb-mobile-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.wnb-mobile-nav__list > li {
  border-bottom: 1px solid rgba(10, 10, 10, 0.07);
}

.wnb-mobile-nav__link {
  display: flex;
  align-items: center;
  padding: 1rem 0;
  font-family: var(--wnb-font-nav);
  font-size: 1.125rem;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #000;
  text-decoration: none;
}

.wnb-mobile-nav__link.is-current {
  text-decoration: underline;
  text-decoration-color: #000;
  text-underline-offset: 0.18em;
}

.wnb-mobile-nav__accordion-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  background: none;
  border: none;
  font-family: var(--wnb-font-nav);
  font-size: 1.125rem;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #000;
  cursor: pointer;
}

.wnb-mobile-nav__accordion-btn span.is-current {
  text-decoration: underline;
  text-decoration-color: #000;
  text-underline-offset: 0.18em;
}

.wnb-mobile-nav__accordion-btn svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.wnb-mobile-nav__accordion-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.wnb-mobile-nav__submenu {
  list-style: none;
  margin: 0 0 0.75rem 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.wnb-mobile-nav__sublink {
  display: block;
  padding: 0.625rem 0;
  font-family: var(--wnb-font-nav);
  font-size: 1rem;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #1a1a1a;
  text-decoration: none;
  opacity: 0.7;
}

.wnb-mobile-nav__sublink.is-current {
  opacity: 1;
  text-decoration: underline;
  text-decoration-color: #000;
  text-underline-offset: 0.18em;
}

.wnb-btn--mobile-cta {
  margin-top: 2rem;
  display: flex;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  font-family: var(--wnb-font-nav);
  font-size: 1.125rem;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.02em;
  padding: 0.875rem 1.5rem;
  background: #fff;
  color: #000;
  border: 1px solid #000;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.wnb-btn--mobile-cta:hover {
  background: #000;
  color: #fff;
}

@media (max-width: 767px) {
  .wnb-main {
    padding-top: 4.25rem;
  }

  body.admin-bar .wnb-main {
    padding-top: calc(4.25rem + 46px);
  }

  .wnb-header__inner {
    height: 4.25rem;
    flex-direction: row;
    align-items: center;
  }

  .wnb-header__logo img {
    height: 3.625rem;
  }

  .wnb-header__actions {
    display: none;
  }

  .wnb-header__hamburger {
    display: flex;
  }
}

@media (min-width: 768px) {
  .wnb-mobile-nav {
    display: none !important;
  }
}
