/* Header */
header.navbar {
  background: #fff;
  height: var(--header-height);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  width: 100%;
  padding: 0;
}

.navbar-container {
  width: 100%;
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo img {
  height: 50px;
}

/* Navigation */
nav.nav {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 30px;
  max-width: 90%;
  width: 100%;
}

nav.nav .logo {
  display: none;
}

nav.nav ul {
  list-style: none;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 30px;
  margin: 0;
  padding: 0;
}
nav.nav ul li a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}
nav.nav ul li.active a {
  font-weight: bold;
  color: #007bff;
}

/* Action Buttons */
.nav-buttons {
  display: flex;
  gap: 10px;
}

/* Burger Icon (hidden desktop) */
.burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}
.burger span {
  width: 25px;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
}


/* Overlay */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 999;
}

/* ===================== Mobile ===================== */
@media (max-width: 768px) {
  .navbar-container {
    padding: 0 20px;
  }

  nav.nav .logo {
    display: block;
  }

  .burger {
    display: flex;
  }

  /* Hide desktop nav/buttons */
  nav.nav {
    position: fixed;
    top: 0;
    right: -260px;
    height: 100vh;
    width: 260px;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 30px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    z-index: 1001;
    justify-content: flex-start;
  }
  nav.nav.active {
    right: 0;
  }

  nav.nav ul {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .nav-buttons {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .overlay.active {
    display: block;
  }

  /* On mobile, center items vertically inside sidebar */
  .navbar-container {
    justify-content: space-between;
  }
  nav.nav {
    flex: unset;
  } /* disable centering in sidebar */
}

/* ================= Nav Account ================= */
.nav-account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  background: #f9f9f9;
  border-radius: 30px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: background 0.3s ease;
}

.nav-account:hover {
  background: #f1f1f1;
}

.nav-account img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #007bff; /* matches active link color */
}

.nav-account-info {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  gap: 0.5rem !important;
}

.nav-account-info li {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.nav-account-info .account-no {
  font-size: 12px;
  color: #666;
  font-weight: 400;
}

/* ================= Mobile ================= */
@media (max-width: 768px) {
  .nav-account {
    padding: 10px;
    border-radius: 16px;
    background: transparent;
    box-shadow: none;
  }

  .nav-account img {
    width: 34px;
    height: 34px;
    border: 1px solid #ddd;
  }

  .nav-account-info li {
    font-size: 13px;
  }
}
