/* ==========================================================================
   HEADER - SIMPLIFIED & REFACTORED
   ========================================================================== */

/* ==========================================================================
   SKIP LINK - Accessibility
   ========================================================================== */

.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-primary, #1b352c);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 8px 8px;
  font-weight: 500;
  text-decoration: none;
  z-index: 10001;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--brand-secondary, #c9a876);
  outline-offset: 2px;
}

:root {
  --header-height: 80px;
  --top-bar-height: 36px;
  --brand-primary: #1b352c;
  --brand-secondary: #c9a876;
  --color-background: #ffffff;
  --color-border: rgba(0, 0, 0, 0.1);
  --text-primary: #1b352c;
  --text-muted: #666;
  --font-weight-medium: 500;
  --transition: 0.3s ease;
}

/* ==========================================================================
   TOP BAR
   ========================================================================== */

.top-bar {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--top-bar-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1001;
  display: flex;
  align-items: center;
  transition: transform var(--transition);
}

.top-bar_inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.top-bar_left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.top-bar_left a {
  color: var(--text-primary);
  font-weight: var(--font-weight-medium);
}

.top-bar_right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.top-bar_right a {
  color: var(--text-primary);
  font-weight: var(--font-weight-medium);
}

.top-bar_divider {
  color: var(--text-muted);
}

body.top-bar-hidden .top-bar {
  transform: translateY(-100%);
}

/* ==========================================================================
   HEADER BASE
   ========================================================================== */

.header {
  position: fixed;
  top: var(--top-bar-height);
  width: 100%;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: top var(--transition);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo img {
  height: 40px;
  width: auto;
}

.header-spacer {
  height: calc(var(--header-height) + var(--top-bar-height));
}

body.top-bar-hidden .header {
  top: 0;
}

body.top-bar-hidden .header-spacer {
  height: var(--header-height);
}

/* ==========================================================================
   DESKTOP NAVIGATION - FIXED SELECTOR
   ========================================================================== */

.desktop-nav {
  display: flex;
  gap: 3rem; /* Increased spacing between nav links */
  margin-left: 4rem;
  margin-right: auto;
}

.desktop-nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  padding: 0.5rem 0;
  transition: color 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--brand-primary);
}

/* Remove focus ring on header controls (per request) */
.header a:focus,
.header button:focus,
.header a:focus-visible,
.header button:focus-visible {
  outline: none;
  box-shadow: none;
}

/* ==========================================================================
   DESKTOP NAV DROPDOWN
   ========================================================================== */

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown_toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-primary);
  background: none;
  border: none;
  font-weight: var(--font-weight-medium);
  font-size: 1rem;
  padding: 0.5rem 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nav-dropdown_toggle:hover,
.nav-dropdown.is-open .nav-dropdown_toggle {
  color: var(--brand-primary);
}

.nav-dropdown_chevron {
  font-size: 0.75rem;
  transform: translateY(-1px);
}

.nav-dropdown_menu {
  position: absolute;
  top: calc(150% + 0.75rem);
  right: 0;
  min-width: 180px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  padding: 0.5rem 0;
  display: none;
  z-index: 1001;
}

.nav-dropdown_menu::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 20px;
  border-width: 0 8px 8px 8px;
  border-style: solid;
  border-color: transparent transparent #ffffff transparent;
}

.nav-dropdown_menu::after {
  content: "";
  position: absolute;
  top: -9px;
  right: 20px;
  border-width: 0 8px 8px 8px;
  border-style: solid;
  border-color: transparent transparent var(--color-border) transparent;
}

.nav-dropdown.is-open .nav-dropdown_menu {
  display: block;
}

.nav-dropdown_menu--mega {
  right: auto;
  left: 0;
  width: min(960px, 92vw);
  padding: 1.25rem 1.5rem 1rem;
  max-height: 70vh;
  overflow: auto;
}

.nav-dropdown_menu--mega::before,
.nav-dropdown_menu--mega::after {
  right: auto;
  left: 28px;
}

.nav-dropdown_grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 1rem 1.75rem;
}

@media (min-width: 1200px) {
  .nav-dropdown_grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
  }
}

.nav-dropdown_group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-dropdown_column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nav-dropdown_title {
  font-size: 0.85rem;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--primary-colour);
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(27, 53, 44, 0.12);
}

.nav-dropdown_menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  border-radius: 8px;
}

.nav-dropdown_menu a:hover {
  background: rgba(27, 53, 44, 0.06);
  color: var(--brand-primary);
}

.nav-dropdown_footer {
  border-top: 1px solid var(--color-border);
  margin-top: 1rem;
  padding-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-dropdown_helper {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
}

.nav-dropdown_all {
  align-self: flex-start;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(27, 53, 44, 0.08);
  color: var(--brand-primary);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}

.nav-dropdown_all:hover {
  background: rgba(27, 53, 44, 0.14);
  color: var(--brand-primary);
}

.nav-dropdown_cta-right {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  color: var(--brand-primary);
  font-weight: var(--font-weight-semibold);
}

.nav-dropdown_cta-right::after {
  content: "→";
  font-size: 0.95em;
}

.nav-dropdown_cta-right:hover {
  background: rgba(27, 53, 44, 0.08);
  color: var(--brand-primary);
}

.nav-dropdown_menu:not(.nav-dropdown_menu--mega) a {
  white-space: nowrap;
}

/* ==========================================================================
   HEADER ACTIONS
   ========================================================================== */

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ==========================================================================
   HAMBURGER MENU
   ========================================================================== */

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--brand-primary);
  margin: 3px 0;
  transition: all var(--transition);
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ==========================================================================
   MOBILE MENU - COMPLETELY HIDDEN BY DEFAULT
   ========================================================================== */

.mobile-menu,
.mobile-menu-overlay {
  display: none;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.mobile-menu {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background: var(--color-background);
  padding: 2rem 1rem;
  z-index: 999;
  overflow-y: auto;
}

.mobile-nav {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.mobile-nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 20px 1rem 0;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  font-size: 1.125rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: color 0.2s ease;
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav a:hover {
  color: var(--brand-primary);
}

.mobile-menu a:not(.btn)::after {
  content: ">";
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.mobile-menu a:not(.btn):hover::after {
  color: var(--brand-primary);
}

.mobile-menu .mobile-legal a::after {
  content: none;
}

.mobile-menu-group {
  display: grid;
}

.mobile-menu-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem 20px 1rem 0;
  border: 0;
  background: none;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  font-size: 1.125rem;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: color 0.2s ease;
}

.mobile-menu-toggle:hover {
  color: var(--brand-primary);
}

.mobile-menu-toggle::after {
  content: ">";
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.mobile-menu-group.is-open .mobile-menu-toggle::after {
  transform: rotate(90deg);
}

.mobile-menu-links {
  display: none;
}

.mobile-menu-group.is-open .mobile-menu-links {
  display: block;
}

.mobile-menu-group:last-child .mobile-menu-toggle {
  border-bottom: none;
}

.mobile-menu-divider {
  height: 1px;
  background: var(--color-border);
  margin: 1.5rem 0;
}

.mobile-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.mobile-menu .footer-legal a {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.mobile-menu .footer-legal a:hover {
  color: var(--brand-primary);
}

.mobile-menu .footer-legal .top-bar_divider {
  color: var(--text-muted);
}

/* ==========================================================================
   RESPONSIVE - 3 BREAKPOINTS ONLY - FIXED SELECTORS
   ========================================================================== */

/* MOBILE: 0px - 768px */
@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }

  .top-bar {
    display: none;
  }

  .header {
    top: 0;
  }

  .header-spacer {
    height: var(--header-height);
  }
  
}

/* TABLET: 769px - 1024px */
@media (min-width: 769px) and (max-width: 1220px) {
  .desktop-nav {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }

  .top-bar {
    display: none;
  }

  .header {
    top: 0;
  }

  .header-spacer {
    height: var(--header-height);
  }
  
}

/* DESKTOP: 1025px+ */
@media (min-width: 1220px) {
  .desktop-nav {
    display: flex;
  }
  
  .hamburger {
    display: none;
  }
  
  /* Hide mobile menu completely on desktop */
  .mobile-menu,
  .mobile-menu-overlay {
    display: none !important;
  }
}

@media (max-width: 1220px) {
  .header-assessment {
    display:none;

  }
}

/* ==========================================================================
   BODY SCROLL LOCK
   ========================================================================== */

body.menu-open {
  overflow: hidden;
}

@media (max-width: 599px) {
  .header-actions .btn.secondary {
    display: none;
  }
}
