/* ═══════════════════════════════════════════
   SITE HEADER
═══════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.admin-bar .site-header {
  top: calc(18px + 32px);
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: calc(18px + 46px);
  }
}

/* ═══════════════════════════════════════════
   NAV PILL
═══════════════════════════════════════════ */
.nav {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  width: min(1140px, 92%);
  padding: 10px 10px 10px 16px;
  background: rgba(14, 14, 14, .82);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 60px;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .5);
  transition: background .4s ease, padding .4s ease;
  gap: 16px;
  box-sizing: border-box !important; /* Stops pill from resizing on archives */
}

.nav.scrolled {
  background: rgba(14, 14, 14, .96);
  padding: 8px 10px 8px 14px;
}

/* ═══════════════════════════════════════════
   LOGO
═══════════════════════════════════════════ */
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  margin-right: auto; /* Guarantees it pushes to the left edge */
}

.nav-logo .custom-logo-link {
  display: flex;
  align-items: center;
  line-height: 0;
}

.nav-logo .custom-logo {
  display: block;
  object-fit: contain;
  object-position: left center;
  max-width: 180px; 
}

.nav-logo-fallback {
  color: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-weight: 700;
  font-size: 15px;
  line-height: 1 !important;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
}

/* ═══════════════════════════════════════════
   NAV LIST
═══════════════════════════════════════════ */
.nav-list {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  list-style: none;
  margin: 0 !important; /* Reset WordPress archive margins */
  padding: 0 !important;
}

.nav-list .menu-item {
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.nav-list .menu-item a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.2 !important; 
  padding: 8px 14px;
  border-radius: 30px;
  text-decoration: none;
  transition: all .25s;
  white-space: nowrap;
  box-sizing: border-box !important; 
}

.nav-list .menu-item a:hover,
.nav-list .menu-item.current-menu-item a {
  background: rgba(255, 255, 255, .08);
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   DROPDOWN
═══════════════════════════════════════════ */
.nav-list .menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23ffffff' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: .7;
  transition: transform .3s;
}

.nav-list .menu-item-has-children:hover > a::after {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-list .sub-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: rgba(14, 14, 14, .96);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  padding: 8px;
  min-width: 150px;
  list-style: none;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: all .3s cubic-bezier(.2, .8, .2, 1);
  box-sizing: border-box !important;
}

.nav-list .sub-menu::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
}

.nav-list .menu-item-has-children:hover .sub-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-list .sub-menu li {
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
}

.nav-list .sub-menu li a {
  display: block;
  width: 100%;
  box-sizing: border-box !important;
  padding: 10px 14px;
  border-radius: 8px;
  color: rgba(255, 255, 255, .8);
  font-size: 13.5px;
  text-decoration: none;
  transition: all .2s;
}

.nav-list .sub-menu li a:hover {
  background: rgba(255, 255, 255, .06);
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   CTA BUTTON
═══════════════════════════════════════════ */
.nav-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #0E0E0E;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.2 !important; 
  padding: 10px 24px;
  border-radius: 30px;
  text-decoration: none;
  white-space: nowrap;
  transition: all .3s;
  margin-left: auto;
  box-sizing: border-box !important; 
}

.nav-cta:hover {
  background: #fff;
  color: #0E0E0E;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -6px rgba(111, 190, 240, .4);
}

/* ═══════════════════════════════════════════
   MOBILE TOGGLE
═══════════════════════════════════════════ */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all .3s;
}

/* ═══════════════════════════════════════════
   PAGE TITLE BAR
═══════════════════════════════════════════ */
.page-title-bar {
  padding: 140px 0 40px;
  background: #fafafa;
  border-bottom: 1px solid rgba(14, 14, 14, .08);
}

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  color: #0E0E0E;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 1000px) {

  .nav {
    padding: 10px 14px;
    justify-content: space-between;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(14, 14, 14, .97);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, .08);
    gap: 5px;
    z-index: 100;
  }

  .nav.open .nav-list {
    display: flex;
  }

  .nav-list .menu-item {
    width: 100%;
  }

  .nav-list .menu-item a {
    width: 100%;
  }

  .nav-list .sub-menu {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    background: rgba(255, 255, 255, .04);
    border: none;
    border-radius: 10px;
    padding: 4px 0 4px 12px;
    min-width: unset;
    left: auto;
    right: auto;
    display: none;
  }

  .nav-list .menu-item-has-children.open .sub-menu {
    display: block !important;
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

}

@media (max-width: 600px) {
  .site-header {
    top: 12px;
  }
}