/* #back-to-top {
    position: fixed;
    top: 64px; 
    z-index: 2;
    display: block;
    padding: 8px 16px;
    margin-inline-start: 50%;
    font-size: 17px;
    color: var(--md-default-fg-color--light);
    cursor: pointer;
    background-color: var(--md-default-bg-color);
    border-radius: 32px;
    outline: none;
    box-shadow: var(--md-shadow-z2);
    transition:
      color 125ms,
      background-color 125ms,
      transform 125ms cubic-bezier(0.4, 0, 0.2, 1),
      opacity 125ms;
    transform: translate(-50%, 0);
  }
  
  @media print {
    #back-to-top {
      display: none;
    }
  }
  
  [dir="rtl"] #back-to-top {
    transform: translate(50%, 0);
  }
  
  #back-to-top[hidden] {
    pointer-events: none;
    opacity: 0;
    transition-duration: 0ms;
    transform: translate(-50%, 4px);
  }
  
  [dir="rtl"] #back-to-top[hidden] {
    transform: translate(50%, 4px);
  }
  
  #back-to-top:is(:focus, :hover) {
    color: var(--md-accent-bg-color);
    background-color: #64649F;
  }
  
  #back-to-top svg {
    display: inline-block;
    vertical-align: -0.5em;
  }*/

  .md-top:is(:focus, :hover) {
    color: var(--md-accent-bg-color);
    background-color: #6b46c1;
  }

/* Override the header background color */
.md-header {
    position: sticky;
    display: block;
    left: 0;
    right: 0;
    top: 0;
    z-index: 4;
    /* background-color: #64649F !important; */
    background: linear-gradient(180deg,#6b46c1,#7b46c1); /* 5b3ba4 */
    color: var(--md-primary-bg-color);     /* Keep text color from default palette */
    box-shadow: 0 0 .2rem #0000, 0 .2rem .4rem #0000;
}

/* Override the tabs background color */
.md-tabs {
    background-color: #64649F !important;  /* Custom color for tabs */
    color: var(--md-primary-bg-color);     /* Keep text color from default palette */
}

/* Optionally, adjust text color for better contrast */
.md-tabs .md-tab {
    color: white !important;  /* Adjust tab text color to white for better visibility */
}

:root {
    --md-primary-fg-color: #7b46c1 !important;
  }

.md-footer-meta__inner {
    background-color: rgb(33,33,33) !important;
}

.md-footer__link {
    margin-top: 0.4rem;
}

/* ===== TEXT LOGO ===== */
.bewhere-text-logo {
  font-size: 18px;  
  font-weight: 750;
  letter-spacing: 1px;
  color: #fff;
  text-decoration: none;
}

/* ===== RIGHT NAV CONTAINER ===== */
.bewhere-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: 16px;
}

/* ===== LINKS ===== */
.bewhere-link,
.bewhere-profile-btn {
  line-height: 1;
  font-size: 16px;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.5px;
}

.bewhere-link:hover {
  opacity: 1 !important;
}

/* ===== DROPDOWN ===== */
.bewhere-dropdown {
  position: relative;
}

.bewhere-menu {
  position: absolute;
  right: 0;
  top: 32px;
  width: 160px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all .2s ease;
  z-index: 999;
}

.bewhere-dropdown:hover .bewhere-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.bewhere-menu a {
  display: block;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
  text-decoration: none;
}

.bewhere-menu a:hover {
  background: #f3f3f3;
  color: #6a44ff;
}

/* ===== CARET ===== */
.bewhere-caret {
  width: 6px;
  height: 6px;
  margin-left: 4px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  transition: transform .25s ease;
}

.bewhere-dropdown:hover .bewhere-caret {
  transform: rotate(225deg);
}

/* ===== PROFILE ===== */
.bewhere-profile-circle {
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Match MkDocs Material header height */
.md-header {
  height: 56px !important;
}

/* Inner header alignment */
.md-header__inner {
  min-height: 56px !important;
  padding: 0 12px !important;
  display: flex;
  align-items: center;
}


/* Ensure header inner is flex */
/*.md-header__inner {
  display: flex;
  align-items: center;
}*/

/* Move SEARCH towards left-center */
.md-header__inner > label[for="__search"] {
  margin-left: auto;
  margin-right: 20px;
}

/* Right-align Home / Docs / Profile */
.bewhere-nav-right {
  display: flex;
  align-items: center;
  margin-left: 0;       /* reset */
  gap: 30px;
}

/* Prevent wrapping */
.bewhere-nav,
.md-header__inner {
  white-space: nowrap;
}

/* Ensure header is flex */
.md-header__inner {
  display: flex;
  align-items: center;
}

/* Move SEARCH towards the left */
.md-search {
  margin-left: auto;     /* pushes search away from title */
  margin-right: 32px;    /* gap before Home / Docs / Profile */
  max-width: 360px;      /* keeps it compact */
}

/* Keep right navbar locked to the right */
.bewhere-nav-right {
  display: flex;
  align-items: center;
}

/* Prevent wrapping */
.md-header__inner,
.bewhere-nav {
  white-space: nowrap;
}


/* === FINAL HEADER GRID FIX === */
/*.md-header__inner.md-grid {
  display: grid !important;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  column-gap: 24px;
}*/

/* Logo */
.bewhere-text-logo {
  grid-column: 1;
}

/* Page title */
.md-header__title {
  grid-column: 2;
}

/* SEARCH — center-left */
.bewhere-search-zone {
  grid-column: 3;
  justify-self: start;
  max-width: 360px;
}

/* Right nav — far right */
.bewhere-nav-right {
  grid-column: 4;
  justify-self: end;
}

/* Header stays untouched */
.md-header__inner {
  align-items: center;
}

/* Push custom navbar to the far right */
.bewhere-nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
}

/* Keep search visually left of navbar */
.bewhere-search-zone {
  margin-right: 32px;
}

.bewhere-header-layout {
  max-width: 65rem !important;
}

.bewhere-header-layout .md-logo {
  margin: 0px;
  padding: 0px;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: 1px;
}

.bewhere-header-layout .md-logo:hover {
  opacity: 1 !important;
}
