/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  z-index: 1000;
  padding: var(--space-xl);
  transition: background-color 0.3s ease, padding-top 0.3s ease, padding-bottom 0.3s ease, border-bottom-color 0.3s ease;
}

.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-bg-glass);
  border-bottom: 1px solid color-mix(in srgb, var(--color-border), transparent 50%);
  z-index: -1;
  width: 100%;
  /* Only transition the actually-changing properties. */
  transition: opacity 0.3s ease, height 0.3s ease;

  /* Default State (Top of page) — fully invisible, no blur layer allocated. */
  opacity: 0;
  height: 150px;
  pointer-events: none;
}

/* Scrolled State — glass blur kicks in here, not at base state.
   Allocating backdrop-filter only when needed avoids paying for an
   always-on blur layer behind a fixed element during scroll. */
.header.scrolled::before {
  opacity: 1;
  height: 85px;
}

.header .btn {
  margin: 0;
}

/* Default Header Text (Top of page) - White */
.header .header__menu a {
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.header .header__menu a:hover {
  color: rgba(255, 255, 255, 0.9);
}

.header .header__hamburger span {
  background: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Default Outline Button (Top of page) - White */
.header .btn--outline {
  color: white;
  border-color: white;
}

.header .btn--outline:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: white;
  color: white;
}

/* Scrolled Header State - Dark Text / Primary Colors */
.header.scrolled .header__menu a {
  color: var(--color-text);
  text-shadow: none;
  text-wrap: nowrap;
}

.header.scrolled .header__menu a:hover {
  color: var(--color-text);
}

.header.scrolled .header__hamburger span {
  background: var(--color-text);
  box-shadow: none;
}

.header.scrolled .btn--outline {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.header.scrolled .btn--outline:hover {
  background: var(--color-surface);
  border-color: var(--color-border-light);
  color: var(--color-text);
}

.header__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 40px;
}

.header__logo img {
  height: 100%;
  width: auto;
  display: block;
}

/* Scrolled/Shrunk Header State */
.header.scrolled {
  padding: var(--space-md) var(--space-xl);
}

.header__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1002;
  /* Ensure it's above the menu overlay/content */

  /* Positioning relative to header normally */
  position: relative;
}

/* Fix "X" button position when menu is open */
.header__hamburger[aria-expanded="true"] {
  position: fixed;
  top: 28px;
  /* Adjustment to match header padding */
  right: var(--space-lg);
}

.header__hamburger span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: all var(--transition-base);
  border-radius: 2px;
}

.header__hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header__hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.header__hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.header__right {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  margin-left: auto;
}

.header__menu {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
  margin: 0;
  padding: 0;
}

.header__menu a {
  color: var(--color-text);
  font-size: var(--text-base);
  font-weight: 500;
  transition: color var(--transition-base);
  cursor: pointer;
  display: block;
  /* Make block for reliable padding */

  /* Increase hover target vertically */
}


.header__menu li:hover>a {
  color: var(--color-primary) !important;
}

/* Submenu Styles */
.header__menu li {
  position: relative;
}

.header__menu li.has-submenu>a {
  padding-right: 1.2em;
  /* Space for arrow */
}

.header__menu li.has-submenu>a::after {
  /* Inline-SVG chevron (matches the templates filter caret) drawn via a mask so it
     inherits the link colour. A mask avoids the font-substitution that turned the old
     "▾" glyph into a "¾" fraction on some browsers. */
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 0.7em;
  height: 0.7em;
  transform: translateY(-50%);
  opacity: 0.7;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Reset mobile before Pseudo element on desktop */
.header__menu li.has-submenu>a::before {
  content: none;
}

/* Submenu container */
.header__menu .submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  min-width: 300px;
  background: radial-gradient(circle at bottom left, rgba(0, 30, 34, 0.9) 0%, rgba(0, 0, 0, 0.9) 80%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-1xl);
  padding: var(--space-sm);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: var(--space-xs);
  list-style: none;
}

.header__menu .submenu h4 {
  color: var(--color-primary);
  font-size: var(--text-xs);
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin: var(--space-md) 0 var(--space-xs) var(--space-md);
  padding-left: 0;
}

.header__menu .submenu li p {
  font-size: var(--text-lg);
  font-weight: 900;
  color: var(--color-text);
  padding: var(--space-sm) 0 var(--space-sm) var(--space-md);
  display: block;
  user-select: none;
}

/* Invisible bridge to prevent menu from closing when moving mouse */
.header__menu .submenu::before {
  content: "";
  position: absolute;
  top: -30px;
  left: 25%;
  width: 50%;
  height: 30px;
  background: transparent;
}

/* Show on hover/focus */
.header__menu li:hover .submenu,
.header__menu li:focus-within .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(15px);
}

/* Submenu links */
.header__menu .submenu a {
  padding: var(--space-md) var(--space-lg);
  display: block;
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  border-radius: var(--radius-xl);
  white-space: nowrap;
  text-align: left;
}



.header__menu .submenu hr {
  border: 1px solid rgba(255, 255, 255, .1);
  margin: var(--space-xs) 0;
}


.header__menu .submenu a:hover {
  background: rgba(255, 255, 255, .1);
  line-height: inherit;
  /* Reset existing line-height if needed */
  color: var(--color-text);
}

.header__menu .submenu a.active,
.header__menu .submenu a.active:hover {
  background: transparent !important;
  color: var(--color-text) !important;
  font-weight: 600;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header__actions .btn--primary {
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 300px;
  opacity: 1;
  transform: translateX(0);
  white-space: nowrap;
  overflow: hidden;
}

 .menu-separator{

  border-left: solid 1px rgba(255,255,255,.15);
  padding-left: var(--space-lg);

 }

/* Mobile Responsive */