/* ==========================================================================
   Header: logo, date, CTA, navigation (mobile overlay + desktop bar)
   ========================================================================== */

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

/* ---------- Logo, date, CTA ---------- */

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

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

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

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

.headerCTA {
  position: fixed;
  top: 7rem;
  right: 1rem;
  width: min-content;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  background: var(--lilac-light);
  color: var(--red);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: right;
  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;
}

.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;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  padding: 10px;
  border: none;
  background: none;
  cursor: pointer;
}

.hamburger img {
  width: 100%;
}

/* ---------- Navigation: mobile overlay (default) ---------- */

.nav-wrap {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
  background: var(--lilac-light);
  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 {
  display: flex;
  flex-direction: column;
  list-style: none;
  text-align: center;
}

.nav-wrap nav > ul {
  gap: 1rem;
}

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

.nav-wrap nav ul li ul {
  display: none;
}

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

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

.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);
}

/* ---------- Submenu ---------- */

.nav-item {
  position: relative;
}

.nav-item.has-submenu > a {
  cursor: pointer;
}

.submenu-list {
  position: absolute;
  top: calc(100% + 1rem);
  left: 0;
  z-index: 50;
  display: flex;
  /*margin-top: 0.5rem;*/
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  /*transform: translateY(-6px);*/
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.nav-item.has-submenu:hover .submenu-list,
.nav-item.has-submenu:focus-within .submenu-list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu-list a {
  display: block;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  white-space: normal;
}

/* ---------- Navigation: desktop bar ---------- */

@media (min-width: 993px) {
  .hamburger {
    display: none;
  }

  .nav-wrap {
    position: relative;
    top: auto;
    left: auto;
    z-index: 1000;
    flex-direction: row;
    flex-grow: 1;
    width: auto;
    height: auto;
    background: none;
    opacity: 1;
    visibility: visible;
  }

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

  .nav-wrap nav ul li ul {
    display: flex;
  }

  .submenu-list {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-wrap nav ul li {
    margin: 0;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: var(--lilac-light);
  }

  .nav-wrap nav ul li a {
    font-size: 0.9rem;
    text-transform: none;
  }

  .nav-wrap nav ul li a:hover {
    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;
  }

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