/* GitHub icon for navbar search bar */
.github-icon-nav {
  width: 28px;
  height: 28px;
  vertical-align: middle;
  margin-right: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(31,38,135,0.15);
}
/* Prevent unwanted horizontal scrollbars */
html, body {
  overflow-x: hidden;
}
nav.navbar {
  position: fixed;
  top: 120px;
  left: 0;
  width: 100vw;
  z-index: 2000;
  box-shadow: 0 2px 8px rgba(44,62,80,0.08);
}

.nav-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100vw;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  box-shadow: 0 10px 27px rgba(0,0,0,0.3);
  z-index: 2450;
  flex-direction: column;
  padding: 0.5em 0;
}
.nav-menu.active {
  display: flex;
}
@media (max-width: 900px) {
  .nav-menu {
    display: none;
  }
  .nav-menu.active {
    display: flex;
  }
  .navbar .nav-left > a,
  .navbar .nav-right > .search-input-wrapper,
  .navbar .nav-right > a {
    display: none;
  }
}
/* Search input with icon on right */
.search-input-wrapper {
  position: relative;
  display: inline-block;
}

#searchBar {
  padding-right: 2em;
}

#searchBar::placeholder {
  color: #888;
  font-size: 1em;
}
/* navbar.css: Styles for navbar and aside/sidebar */

/* Navbar styles */
.navbar {
  width: 100%;
  background: linear-gradient(90deg, #1e2024 0%, #011d4d 100%);
  color: #fff;
  display: flex;
  align-items: center;
  flex-direction: row;
  justify-content: space-between;
  min-height: 56px;
  box-shadow: 0 2px 8px rgba(44,62,80,0.07);
  z-index: 1200;
  height: 60px;
  --navbar-height: 60px;
}


.nav-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  float:left;
  padding-left: 25px;
}
.nav-left a {
  color: #fff;
  text-decoration: none;
  font-size: 1em;
  transition: color 0.2s;
  padding: 0 20px;

}
.nav-right {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  padding-right: 20px;

}
.nav-link {
  color: #fff;
  text-decoration: none;
  font-size: 1em;
  transition: color 0.2s;
}
.navbar a:hover {
  color: #ffd700;
  text-decoration: underline;
}
/* Hamburger icon styles - improved visibility and spacing */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: #fff;
  border-radius: 6px;
  border: 2px solid #eee;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin: 4px 8px 4px 8px;
}
.hamburger .bar {
  width: 24px;
  height: 4px;
  background-color: #7a3e1d;
  margin: 4px 0;
  border-radius: 5px;
  transition: background 0.2s;
}

#searchBar {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1em;
  margin-right: 0.5rem;
}


/* Sidebar styles */
.sidebar {
  position: fixed;
  top: calc(var(--header-height, 115px) + var(--navbar-height, 60px)); /* Start immediately below header + navbar */
  left: 0;
  width: 260px;
  height: auto;
  background: #1a1a2e;
  color: #fff;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
  z-index: 2000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: hidden !important; /* Never show scroll bar */
}
.sidebar.active {
  transform: translateX(0);
  overflow-y: hidden !important;
}

/* Hide scrollbar for Webkit browsers when sidebar is active */
.sidebar.active::-webkit-scrollbar {
  display: none;
}
.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-list li {
  margin: 0;
  padding: 0;
}
.sidebar-list .nav-link {
  display: block;
  padding: 12px 24px;
  color: #fff;
  text-decoration: none;
  font-size: 1em;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background 0.2s, color 0.2s;
}
.sidebar-list .nav-link:hover {
  background: rgba(255,255,255,0.12);
  color: #ffd700;
}

/* Ensure header and navbar set CSS variables for their heights */
.header-row {
  height: 120px;
  --header-height: 120px;
}
.navbar {
  height: 60px;
  --navbar-height: 60px;
}

/* Responsive styles for navbar and sidebar */
@media (max-width: 992px) {
  .navbar {
    flex-direction: row;
    min-height: 48px;
  }
  .nav-container {
    flex-direction: row;
    justify-content: flex-start;
    gap: 1rem;
    padding: 0 12px;
  }
  .nav-right {
    display: none !important;
  }
  .hamburger {
    display: flex !important;
  }
  .sidebar {
    width: 180px;
    padding-top: 60px;
  }
}
@media (max-width: 600px) {
  .header-row {
    height: 80px;
    --header-height: 80px;
  }
  .navbar {
    height: 48px;
    --navbar-height: 48px;
  }
  .navbar {
    flex-direction: row;
    min-height: 44px;
  }
  .nav-container {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0 6px;
  }
  #searchBar {
    font-size: 0.95em;
    padding: 4px 8px;
    margin-right: 0.2rem;
  }
  #searchBtn img {
    height: 22px;
    width: 22px;
  }
  .nav-right {
    display: none !important;
  }
  .hamburger {
    display: flex !important;
  }
  .sidebar {
    width: 140px;
    padding-top: 50px;
  }
}
