:root {
  --main-nav-height: 80px;
  --sub-nav-height: 60px;
}

/* push content down by both navbars' heights */
.docs-container {
  padding-top: calc(var(--main-nav-height) + var(--sub-nav-height));
}

/* ALWAYS show the sub‑nav in exactly the same spot & size */
.sub-nav {
  position: fixed;              /* fixed so it never "jumps" */
  top: var(--main-nav-height);  /* sits right under your main navbar */
  left: 0;
  right: 0;
  height: var(--sub-nav-height);
  background: rgba(26, 31, 41, 0.9);
  border-bottom: 1px solid rgba(79, 111, 224, 0.2);
  z-index: 9;

  display: flex;                /* flex container */
  justify-content: center;      /* ← this centers the items */
  align-items: center;          /* vertically center them too */
}

/* your link list can stay simple */
.sub-nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;                    /* space between items */
}

.sub-nav-links li a {
  color: #8892b0;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 3px solid transparent;
  transition: border-color 0.2s;
  font-size: 1.1rem;
}
.sub-nav-links li a:hover,
.sub-nav-links li a.active {
  color: #fff;
  border-bottom-color: #4f6fe0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  :root {
    --main-nav-height: 60px;    /* reduce main nav height on mobile */
    --sub-nav-height: 50px;     /* reduce sub nav height on mobile */
  }
  
  .sub-nav-links {
    gap: 1.5rem;                /* reduce spacing between items */
  }
  
  .sub-nav-links li a {
    font-size: 1rem;            /* smaller font size */
  }
}

@media (max-width: 600px) {
    .sub-nav-links li a {
    font-size: 0.9rem;
  }
}

@media (max-width: 535px) {
    .sub-nav-links li a {
    font-size: 0.8rem;
  }

}

@media (max-width: 490px) {
  :root {
    --main-nav-height: 50px;    /* even smaller for very small screens */
    --sub-nav-height: 45px;
  }
  
  .sub-nav-links {
    gap: 1rem;
  }
  
  .sub-nav-links li a {
    font-size: 0.7rem;
    padding: 0.4rem 0;
  }
}

@media (max-width: 400px) {
    .sub-nav-links li a {
    font-size: 0.6rem;
  }

}