/*
 * ============================================================================
 * FILE: bars.css
 *
 * DESCRIPTION:
 * Contains all styles for the horizontal top navigation bar.
 * ============================================================================
 */

/* The main navbar flex container */
.navbar-container {
  display: flex;
  align-items: center; /* Vertically aligns all items in the middle */
  justify-content: space-between; /* Pushes items to the edges and center */
  padding: var(--space-md) var(--space-xl);
  width: 100%;
  max-width: calc(var(--max-width-screen) * 0.7);
  margin: 0 auto;
}

/* --- Left: Brand/Logo --- */
.navbar-brand .logo-container {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-text-primary);
  font-weight: 600;
}

.navbar-brand .logo-container:hover {
  color: var(--color-text-primary);
}

.navbar-brand .logo-icon {
  width: 32px;
  height: 32px;
}

.navbar-brand .logo-text {
  font-size: 1.25rem;
}

/* --- Middle: Nav Menu --- */
.navbar-menu {
  display: flex;
  gap: var(--space-xl);
}

.nav-item {
  position: relative;
  padding: var(--space-sm);
  border-radius: var(--border-radius);
  color: var(--color-text-primary);
  font-weight: 500;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
  text-decoration: none;
}

/* Create the underline */
.nav-item::after {
  content: "";
  position: absolute;
  width: 100%;
  transform: scaleX(0); /* Initially invisible */
  height: 2px; /* The thickness of the underline */
  bottom: 0;
  left: 0;
  background-color: var(--color-accent);
  transform-origin: center; /* The animation grows from the center */
  transition: transform 0.25s ease-out; /* Smooth animation */
}

.nav-item:hover {
  color: var(--color-text-primary);
  background-color: transparent;
}

/* This scales the underline to its full width on hover */
.nav-item:hover::after {
  transform: scaleX(1);
}

/* --- Right: User Section --- */
.navbar-user {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}
