:root {
  --primary: #ff6e00;
  --green: #00ff9c;
  --bg: linear-gradient(270deg, #ff6e00, #00ff9c);
}

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

/* NAVBAR */
.navbar {
  min-height: 85px;
  padding: 10px 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: var(--bg);
  background-size: 300% 300%;
  animation: gradientFlow 10s ease infinite;

  top: 0;
  z-index: 1000;
  position: relative;
  overflow: hidden;
}

/* SHIMMER */
.navbar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  animation: shimmer 6s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* GRADIENT */
@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* LEFT / RIGHT */
.nav-left-section,
.nav-right {
  z-index: 3;
}

/* CENTER GROUP */
.title-group {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);

  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 80%;
}

/* LOGOS */
.logo-left,
.logo-right {
  height: clamp(50px, 6vw, 80px);
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
  transition: 0.3s;
}

/* TITLE */
.title {
  color: white;
  font-weight: 800;
  font-size: clamp(18px, 2vw, 30px);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* LOGIN */
.login-btn {
  background: var(--green);
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 12px var(--green);
}

/* HAMBURGER */
.menu-toggle {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  z-index: 1100;
}

.menu-toggle span {
  height: 3px;
  width: 25px;
  background: white;
  margin: 4px 0;
  transition: 0.4s;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* OVERLAY */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);

  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* SIDE MENU */
.mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;

  width: 280px;
  height: 100vh;

  background: #111;
  padding-top: 100px;

  display: flex;
  flex-direction: column;

  transition: left 0.4s ease;
  z-index: 1050;
}

.mobile-menu.active {
  left: 0;
}

.mobile-menu a {
  padding: 18px 20px;
  color: white;
  text-decoration: none;
}

/* ================= MOBILE ================= */
@media (max-width: 900px) {
  .login-btn {
    display: none;
  }

  /* 🔥 DYNAMIC SAFE ZONE */
  .title-group {
    width: calc(100% - 120px); /* adaptive spacing */
    justify-content: space-between;
    gap: 8px;
  }

  /* 🔥 AUTO BALANCE LOGOS */
  .logo-left {
    margin-left: max(8px, 2vw);
  }

  .logo-right {
    margin-right: max(8px, 2vw);
  }

  .logo-left,
  .logo-right {
    height: clamp(45px, 10vw, 75px);
    flex-shrink: 0;
  }

  /* TEXT */
  .title {
    flex: 1;
    text-align: center;

    font-size: clamp(13px, 4vw, 17px);
    font-weight: 600;

    line-height: 1.35;
    white-space: normal;
  }
}
/* 🔥 STICK THEM AS ONE UNIT */
.header-wrapper {
  position: sticky;
  top: 0;
  z-index: 2000;
}

/* NAVBAR */
.navbar {
  position: relative; /* no sticky here */
}

/* GREETING BAR */
.greeting-bar {
  width: 100%;
  padding: 10px;
  text-align: center;

  color: white;
  font-weight: 600;

  background: #0f8a44;
  transition: background 0.8s ease;
}
.mobile-login {
  margin: 20px;
  padding: 12px;
  text-align: center;
  background: #00ff9c;
  color: black;
  font-weight: bold;
  border-radius: 8px;
}
/* MENU ITEM */
.menu-item {
  display: flex;
  flex-direction: column;
}

/* CLICKABLE HEADER */
.menu-link {
  padding: 18px 20px;
  color: white;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ARROW ROTATION */
.menu-link.active .arrow {
  transform: rotate(180deg);
}

/* SUBMENU */
.submenu {
  display: flex;
  flex-direction: column; /* 🔥 FORCE VERTICAL */
  max-height: 0;
  overflow: hidden;
  background: #1a1a1a;
  transition: max-height 0.3s ease;
}

/* SHOW */
.submenu.active {
  max-height: 300px;
}

/* SUB LINKS */
.submenu a {
  display: block;
  padding: 14px 30px;
  color: #ccc;
  text-decoration: none;
  white-space: nowrap; /* 🔥 PREVENT BREAKING */
}

.submenu a:hover {
  background: #222;
  color: #00ff9c;
}

/* ARROW */
.arrow {
  transition: 0.3s;
}
