/* Base header */
header {
  box-sizing: border-box;
  top: 0;
  z-index: 99;
  height: 100px;
  width: 100%;
  position: fixed;
  display: flex;
  justify-content: center;
  color: white;
  transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

/* Content width alignment */
header .header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--content-width-full);
  width: 100%;
  padding: 10px var(--space-lg);
}

@media (min-width: 768px) {
  header .header-content {
    padding: 10px var(--space-3xl);
  }
}

/* States */
.initial {
  background-color: transparent;      /* No delayed animation -> no flash */
}

.scrolled {
  opacity: 1;
}

.dark-background {
  background-color: rgb(17, 17, 17);
}

.no-hero {
  background-color: rgb(17, 17, 17) !important;
}

header.hidden {
  transform: translateY(-100%) !important;
  display: flex !important;
}

/* Idle at top: subtle fade */
header.idle.initial {
  opacity: 0.35;
}

/* Utilities */
body.no-scroll {
  overflow: hidden;
}

/* Branding */
.logo-and-title {
  display: flex;
  font-family: 'Sora';
  font-weight: 600;
  align-items: center;
  user-select: none;
}

.logo-and-title a {
  text-decoration: none;
  color: white;
}

.logo-and-title img {
  height: 2em;
  margin-right: 10px;
  transition: opacity 0.3s ease;
}

header .title {
  margin: 0;
  font-size: 2rem;
}

/* Nav */
nav {
  display: flex;
  justify-content: flex-end;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  user-select: none;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 30px;
}

nav ul li a {
  color: white;
  padding-bottom: 15px;
  text-decoration: none;
  font-weight: 400;
  font-size: 1rem;
  text-transform: uppercase;
}

nav ul li:hover > a {
  border-bottom: 4px solid #fff;
  /* border-bottom: 4px solid var(--brand-orange); */
  /* transition: all 0.2s ease-in-out; */
}

/* Dropdown */
nav ul li .dropdown-content {
  display: none;
  position: absolute;
  background-color: rgba(0,0,0,0.75);
  min-width: 160px;
  border-radius: 0px 5px 5px 5px;
  margin-top: 15px;
  cursor: pointer;
  user-select: none;
  padding: 15px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
}

nav ul li .dropdown-content li { margin: 0; }

nav ul li .dropdown-content li a {
  padding: 12px 16px;
  display: block;
  text-align: left;
  color: #fff;
}

nav ul li .dropdown-content li a:hover {
  background-color: #ff4500;
  color: #000;
  border-bottom: none;
}

nav ul li:hover .dropdown-content {
  display: block;
}

/* Hamburger */
.hamburger { display: none; cursor: pointer; }

/* Mobile */
@media (max-width: 900px) {
  .logo-and-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  /* Hide the Contact Us CTA button on mobile to prevent overlap */
  .holo-btn {
    display: none;
  }

  ul.dropdown-content { display: none !important; }

  nav ul {
    top: 0;
    padding-top: 100px !important;
    right: -100%;
    width: 100vw;
    height: 100vh;
    position: absolute;
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.9);
    transition: right 0.3s ease;
    gap: 5px;
  }

  nav ul.show { right: 0; }

  nav ul li {
    margin: 0 !important;
    padding: 25px;
    width: calc(100% - 50px);
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

  nav ul li .dropdown-content {
    z-index: 1;
    right: 0;
    top: 150px;
    display: none;
    position: absolute;
    width: 50%;
    height: 100vh;
    padding: 0;
    border: none;
    cursor: pointer;
    user-select: none;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  }

  nav ul li .dropdown-content li a { border-bottom: none; }

  .hamburger { display: block; }

  .hamburger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px;
    transition: all 0.3s ease-in-out;
  }

  .hamburger.active .bar1 { transform: rotate(-45deg) translate(-5px, 6px); }
  .hamburger.active .bar2 { opacity: 0; }
  .hamburger.active .bar3 { transform: rotate(45deg) translate(-5px, -6px); }
}
