/* =========================================================
   AlephLearn — Unified Header (use on ALL pages)
   Purpose: Make header alignment EXACT same everywhere
   Paste this file after all other CSS, OR append to styles.css.
   ========================================================= */

/* Sticky / size lock */
header.nav{
  position: sticky;
  top: 0;
  z-index: 9999;
  height: 72px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Keep inner container consistent */
header.nav .nav-inner{
  height: 72px;
  max-width: 1350px;
  margin: 0 auto;
  padding: 0 22px;

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

  position: relative; /* for centered desktop links */
}

/* Logo */
header.nav .brand{
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
header.nav .brand-logo-svg{ height: 28px; }

/* Avatar */
header.nav .navbar-avatar{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  flex: 0 0 auto;
}

/* Quizzes trophy (if present) */
header.nav .header-trophy{
  flex: 0 0 auto;
  height: 38px;
  width: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: #e5e7eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ---------------- DESKTOP LINKS (centered) ---------------- */
@media (min-width: 861px){
  header.nav #al-burger{ display: none !important; }

  header.nav .links{
    display: flex !important;
    align-items: center;
    gap: 38px;

    /* EXACT center regardless of right-side buttons */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 0;
    width: max-content;
  }

  header.nav .links a{
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #9ca3af; /* soft grey like quizzes */
    text-decoration: none;
    white-space: nowrap;
  }
  header.nav .links a:hover{
    color: #e5e7eb;
  }

  header.nav .logout-btn-desktop{
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    padding: 10px 22px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: 0.25s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    white-space: nowrap;
  }
  header.nav .logout-btn-desktop:hover{
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
  }

  /* If width small, reduce spacing so links don't overlap */
  @media (max-width: 1180px){
    header.nav .links{ gap: 26px; }
    header.nav .links a{ font-size: 18px; }
    header.nav .logout-btn-desktop{ font-size: 15px; padding: 9px 18px; }
  }
  @media (max-width: 1020px){
    header.nav .links{ gap: 18px; }
    header.nav .links a{ font-size: 17px; }
  }
}

/* ---------------- MOBILE ---------------- */
@media (max-width: 860px){
  header.nav .links{ display: none !important; }
  header.nav #al-burger{ display: inline-flex !important; }

  /* keep logo left, avatar right */
  header.nav .brand{ margin-right: auto; }
  header.nav .navbar-avatar{ margin-left: auto; }
}
