header {
  top:0;
  position: fixed;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  flex-wrap: nowrap;
  width: 100vw;
  justify-content: space-between;
  z-index: 1000;
  padding: 1rem;
  box-sizing: border-box;
}

/* ---------- Header / Logo ---------- */
.logo {
  z-index: 2;
  color: var(--white);
  width: 6rem;
}

.logo img {
  width: 100%;
  height: auto;
}

.logo-link {
  z-index: 1001;
}

.time {
  z-index: 1001;
}

header .right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  z-index: 1001;
  position: relative;
}

.headerCTA {
   color: var(--red);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 0 20px 5px rgba(238, 28, 37, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: min-content;
  position: fixed;
  top: 5rem;
  right: 1rem;
  text-align: right;
  background: var(--lilac-light);
}

.headerCTA:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px 8px rgba(238, 28, 37, 0.4);
}

/* ---------- Hamburger ---------- */
.hamburger {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
}

.hamburger img {
  width: 100%;
}

/* ---------- Navigation Overlay (Mobile Default) ---------- */
.nav-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--lilac-light, white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-wrap.is-open {
  opacity: 1;
  visibility: visible;
}

.nav-wrap nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.nav-wrap nav ul li {
  margin: 1.5rem 0;
  padding: 0;
  display: block;
}

.nav-wrap nav ul li a {
  font-family: var(--font-sans);
  font-size: 1.68rem;
  text-decoration: none;
  text-transform: uppercase;
  color: var(--purple-deep);
  font-weight: 700;
  transition: color 0.3s ease;
}

.nav-wrap nav ul li a[aria-current="page"] {
  color: var(--white) !important;
}

.nav-wrap nav ul li:has(a[aria-current="page"]) {
  background: var(--red);
}

.nav-wrap nav ul li a:hover {
  color: var(--red, #555);
}

/* ---------- Desktop Layout ---------- */
@media (min-width: 993px) {
  header {
    align-items: flex-start;
  }

  .hamburger {
    display: none;
  }

  .nav-wrap {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    height: auto;
    background: none;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: visible;
    flex-grow: 1;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .nav-wrap.scrolled,
  [data-theme="sub"] .nav-wrap {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-wrap nav ul {
    flex-direction: row;
    gap: 1rem;
  }

  .nav-wrap nav ul li {
    border-radius: 20px;

    margin: 0;
    background: var(--lilac-light, white);
    padding:  0.5rem 1rem;

  }

  .nav-wrap nav ul li a {
    font-size: 0.9rem;
    color: var(--purple-deep);
    font-family: var(--font-sans, sans-serif);
    text-transform: none; /* Reset if needed, or keep uppercase if desired */
  }

  .nav-wrap nav ul li a[aria-current="page"] {
    color: var(--white);
  }

  .nav-wrap nav ul li:has(a[aria-current="page"]) {
    background: var(--red) !important;
  }

  .nav-wrap nav ul li a:hover {
    text-decoration: underline;
    color: var(--lilac-light);
    background: var(--red);
    box-shadow: 0 0 20px 5px rgba(238, 28, 37, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .headerCTA:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px 8px rgba(238, 28, 37, 0.4);

  }

  .nav-wrap nav ul li:has(a:hover) {
    background: var(--red);
  }
}
