/* Header Part */
.header {
  top: 0;
  width: 100vw;
  height: 128px;
  position: fixed;
  z-index: 100;
}

.header-background {
  width: 100vw;
  height: 128px;

  /* Background Image */
  background-image: url("../svg/nav-back.svg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top;
  position: fixed;
  z-index: 10;
}

.white-header-bg {
  background-color: white;
  position: fixed;
  height: 100px;
  width: 100vw;
  z-index: 1;
}

/* The Header Content */
.header-container {
  display: flex;
  justify-content: space-between;
}

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

@media (max-width: 1300px) {
  .header-background {
    height: 40px;
    background-color: #4b0082;
  }
}

@media (max-width: 1000px) {
  .header {
    height: 54px;
  }

  .header-background {
    height: 54px;
    background-color: #4b0082;
  }

  .white-header-bg {
    display: none;
  }
}

/* The left side - Logo */
.header-logo {
  display: flex;
  align-items: center;
  margin-top: 20px;
  z-index: 1000;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header-logo img {
  height: 64px;
  width: auto;
}

.header-logo-text {
  padding-left: 1.25rem;
  font-size: 1.25rem;
  font-weight: 700;
}

@media (max-width: 1300px) {
  .header-logo {
    margin-top: 40px;
    width: auto;
  }
  .header-logo img {
    height: 44px;
  }

  .header-logo-text {
    color: #4b0082;
    font-size: 1.125rem;
    padding-left: 1rem;
  }
}

@media (max-width: 1000px) {
  .header-logo {
    margin-top: 3px;
  }

  .header-logo-text {
    color: white;
    font-size: 1rem;
    font-weight: 500;
  }
}

@media (max-width: 480px) {
  .header-logo-text {
    display: none;
  }
}

/* The right side, navigation area */
.header-right {
  z-index: 1000;
}

/* The first line - Login */
.header-top {
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: end;
}

.header-top ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 15px;
}

/* The second line - Main Nav */
.header-bottom {
  background-color: white;
}

.header-bottom nav {
  height: 3.75rem;
  display: flex;
  align-items: center;
  justify-content: start;
}

.header-bottom ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-bottom a {
  color: #4b0082;
  font-weight: 600;
  transition: color 0.2s ease;
}

.header-bottom a:hover {
  color: #6a1b9a;
}

/* Hamburger Menu Button - Mobile Only */
@media (max-width: 1000px) {
  .mobile-menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    height: 54px;
    width: 54px;
  }

  .hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
  }

  .hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: white;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  /* Hamburger to X animation when menu is open */
  .mobile-menu-button.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .mobile-menu-button.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-button.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Mobile Navigation Container */
  .mobile-nav-container {
    display: none;
    position: fixed;
    top: 54px;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2rem;
    background-color: white;
    overflow-y: auto;
    animation: slideDown 0.3s ease;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .mobile-nav-container.show {
    display: block;
  }

  .header-top {
    display: none;
  }

  .header-top ul,
  .header-bottom ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .header-bottom {
    background: none;
  }

  .header-bottom nav {
    height: auto;
  }

  .header-bottom ul li {
    width: 100%;
  }

  .header-bottom ul li a {
    display: block;
    padding: 16px 0;
    font-size: 1.125rem;
    border-bottom: 1px solid #f0f0f0;
  }

  .header-bottom ul li:last-child a {
    border-bottom: none;
  }

  .header-contact-button {
    margin-top: 1.5rem;
    padding-top: 1rem;
  }

  .header-contact-button a {
    display: block;
    text-align: center;
    padding: 16px 32px;
    border-bottom: none !important;
  }
}

/* Tablet specific adjustments */
@media (min-width: 769px) and (max-width: 1000px) {
  .mobile-nav-container {
    right: 50%;
    bottom: auto;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  }
}
