/* --- KB Modal Styling --- */
.kb-modal .modal-dialog {
  max-width: 900px;
}

.kb-modal .modal-content {
  border-radius: 12px;
  border: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  animation: kbFadeIn 0.25s ease-out;
}

.kb-modal .modal-header {
  border-bottom: none;
  padding: 1.25rem 1.5rem;
  background: #0d6efd;
  color: #fff;
  border-radius: 12px 12px 0 0;
}

.kb-modal .modal-title {
  font-weight: 600;
  font-size: 1.4rem;
}

.kb-modal .btn-close {
  filter: invert(1);
}

.kb-modal .modal-body {
  padding: 1.5rem;
  line-height: 1.6;
  font-size: 1rem;
}

.kb-modal .modal-body img,
.kb-modal .modal-body video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
  border-radius: 6px;
}

.kb-modal .modal-footer {
  border-top: none;
  padding: 1rem 1.5rem;
}

.kb-modal .btn-primary {
  padding: 0.5rem 1.25rem;
  font-weight: 500;
  border-radius: 8px;
}

/* --- Fancy Animations --- */
@keyframes kbFadeIn {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* --- Responsive Modal for Small Screens --- */
@media (max-width: 576px) {
  .kb-modal .modal-dialog {
    margin: 0.5rem;
    max-width: 100%;
  }
  .kb-modal .modal-content {
    border-radius: 8px;
  }
  .kb-modal .modal-title {
    font-size: 1.2rem;
  }
}

.kb-page .page-wrapper {
  overflow: visible;
}

/* Sticky KB sidebar */
.kb-sidebar {
  position: sticky;
  top: 100px;      /* adjust for your fixed header */
  align-self: flex-start; /* necessary inside Bootstrap’s flex .row */
  height: fit-content;
}

/* Active state styling (your buttons) */
.kb-link.active{
  color:#fff;
  background:linear-gradient(135deg,#0054B3 0%,#0ea5e9 100%);
  border-color:transparent;
  box-shadow:0 2px 0 rgba(0,0,0,.05),0 12px 28px rgba(0,84,179,.25);
}


.kb-sidebar__title {
  margin-bottom: 1rem;
}

/* Sidebar list animation on load */
.kb-sidebar__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.kb-sidebar__list li {
  opacity: 0;
  transform: translateY(6px);
  animation: kbFadeUp 0.5s ease forwards;
}
.kb-sidebar__list li:nth-child(1){animation-delay:.02s}
.kb-sidebar__list li:nth-child(2){animation-delay:.06s}
.kb-sidebar__list li:nth-child(3){animation-delay:.10s}
.kb-sidebar__list li:nth-child(4){animation-delay:.14s}

@keyframes kbFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* --- Pill-style Buttons --- */
.kb-link {
  display: block;
  padding: 0.8rem 1rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow:
    0 1px 0 rgba(0,0,0,.02),
    0 6px 18px rgba(0,0,0,.06);
  color: #0f172a;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

.kb-link:hover {
  transform: translateX(3px);
  background-color: #007bff;
  color: #fff;
}

@media (prefers-color-scheme: dark) {
  .kb-link {
    background: #0b1220;
    color: #e5e7eb;
    border-color: rgba(255,255,255,.08);
    box-shadow:
      0 1px 0 rgba(255,255,255,.03),
      0 6px 18px rgba(0,0,0,.35);
  }
  .kb-link:hover {
    background-color: #0054B3;
    color: #fff;
  }
}

/* Accessibility: focus visible */
.kb-link:focus-visible {
  outline: none;
  border-color: #0054B3;
  box-shadow:
    0 0 0 3px rgba(0,84,179,.15),
    0 8px 20px rgba(0,84,179,.15);
}

/* Reduced motion users */
@media (prefers-reduced-motion: reduce) {
  .kb-sidebar__list li { animation: none; opacity: 1; transform: none; }
  .kb-link { transition: none; }
}
