:root {
  --nifty-green: #397342;
  --nifty-yellow: #d6971d;
  --nifty-blue: #24174d;
  --nifty-light-blue: #4b4668;
  --nifty-gray: #dbd9d9;
  --nifty-white: #ffffff;
}

/* =========================
   RIGHT SIDE TEXT BACKGROUND
   ========================= */
@media screen and (min-width: 1850px) {
  .md-main::after {
    content: "";
    position: fixed;
    top: 75px;
    right: 0;
    transform: translate(100px, -20px);
    height: calc(100vh - 150px);
    width: 100%;
    background-image: url("../assets/template/niftybits-wordmark-rotated.png");
    background-repeat: no-repeat;
    background-position: center right;
    background-size: contain;
    pointer-events: none;
    opacity: 20%;
    z-index: -1;
  }
}

/* =========================
   HEADER BACKGROUND (WHITE)
   ========================= */
.md-header {
  background-color: var(--nifty-blue) !important;
  box-shadow: none;
  border-bottom: none;
}

/* =========================
   HEADER HEIGHT (BIGGER)
   ========================= */
.md-header__inner {
  min-height: 50px; /* default ~64px */
  padding-top: 12px;
  padding-bottom: 12px;
}

/* =========================
   LOGO SIZE
   ========================= */
.md-header__button.md-logo img {
  height: 40px; /* adjust if needed */
}

.md-header__topic {
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1;
  color: var(--nifty-white) !important;
}

.md-header__title {
  margin-left: 0;
  padding-left: 76.4px;
  padding-top: 6px;
  padding-bottom: 6px;
}

/* =========================
   BLUE STRIPE UNDER HEADER
   ========================= */
.md-header::after {
  content: "";
  display: block;
  height: 4px;
  /* background-color: #0A4EDB; your blue */
  background-image: linear-gradient(
    307deg,
    var(--nifty-blue),
    var(--nifty-light-blue)
  );
}

/* =========================
   NAV TEXT COLOR FIX
   ========================= */
.md-header__title,
.md-header__topic,
.md-header__topic:first-child {
  color: var(--nifty-blue);
}

/* =========================
   HAMBURGER ICON (MOBILE)
   ========================= */
.md-header__button {
  color: var(--nifty-yellow);
}

/* Stronger left menu “Navigation” title */
.md-sidebar--primary .md-sidebar__title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--nifty-green) !important;
}
/* Nav links spacing + calmer colors */
.md-nav__link {
  padding: 6px 10px;
  border-radius: 8px;
}

/* Hover/active states: soft, not shouty */
.md-nav__link:hover,
.md-nav__link:focus {
  background: rgb(from var(--nifty-blue) r g b / 0.08);
  color: var(--nifty-blue) !important;
  outline: none;
}

.md-nav__link--active {
  background: rgb(from var(--nifty-yellow) r g b / 0.08);
  color: var(--nifty-yellow) !important;
  font-weight: 600;
}

/* Reduce cramped feeling */
.md-nav__item {
  margin: 2px 0;
}

/* Sidebar titles (Navigation / TOC) */
.md-sidebar__title,
.md-nav__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--nifty-blue);
  letter-spacing: 0.2px;
  padding: 10px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
/* --- Calm side panels --- */
.md-sidebar--primary .md-sidebar__scrollwrap,
.md-sidebar--secondary .md-sidebar__scrollwrap {
  background: #f4f6f8; /* light grey */
  border-radius: 10px;
  margin: 12px 0;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Reduce visual noise in the panels */
.md-sidebar__inner {
  padding: 10px;
}

footer {
  background-color: var(--nifty-blue) !important;
}

.md-search__input + .md-search__icon {
  color: var(--nifty-blue);
}

.md-search__options > .md-icon {
  color: var(--nifty-blue);
  fill: var(--nifty-blue);
}

.md-search__input {
  background-color: white;
  color: var(--nifty-blue);
}

.md-search__input::placeholder {
  color: var(--nifty-blue);
}

@media screen and (max-width: 1220px) {
  .md-nav--primary > .md-nav__title {
    background: var(--nifty-blue) !important;
    color: var(--nifty-white) !important;
  }

  .md-sidebar__scrollwrap {
    margin: 0 !important;
  }

  .md-sidebar--primary {
    background-color: transparent;
  }

  .md-nav__item--active,
  .md-nav__item--current {
    background: rgb(from var(--nifty-yellow) r g b / 0.08);
  }

  .md-nav__link--active,
  .md-nav__link--current {
    background: rgb(from var(--nifty-yellow) r g b / 0.08);
  }

  .md-nav__item--active .md-ellipsis,
  .md-nav__item--current .md-ellipsis,
  .md-nav__item--active .md-nav__icon,
  .md-nav__item--current .md-nav__icon {
    color: var(--nifty-yellow) !important;
    /* font-weight: 600; */
  }
}
