/* ===== KNOWLEDGE BASE INDEX ===== */

.page-content {
  background: #ffffff;
}

.kb-index-layout {
  max-width: 1440px;
  margin: 0 auto;
  padding: 42px 28px 84px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  align-items: start;
}

.kb-index-main {
  min-width: 0;
}

.kb-index-sidebar {
  position: sticky;
  top: 112px;
}

/* ===== BREADCRUMBS ===== */

.kb-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 24px;
  color: #8a94a6;
  font-size: 0.84rem;
}

.kb-breadcrumbs a {
  color: #667085;
  text-decoration: none;
  font-weight: 500;
}

.kb-breadcrumbs a:hover,
.kb-breadcrumbs a:focus {
  color: #12203b;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== HERO ===== */

.kb-index-hero {
  max-width: 760px;
  margin-bottom: 34px;
}

.kb-index-hero h1 {
  margin: 0;
  font-size: clamp(2.05rem, 2.8vw, 3rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: #0b1730;
}

.kb-index-intro {
  margin: 18px 0 0;
  max-width: 680px;
  font-size: 1.02rem;
  line-height: 1.75;
  color: #344054;
}

/* ===== MAIN PANEL ===== */

.kb-index-panel {
  background: #ffffff;
  border: 1px solid #e6ebf2;
  border-radius: 20px;
  padding: 28px 30px 30px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.045);
}

.kb-index-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.kb-index-head h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.2;
  font-weight: 700;
  color: #12203b;
}

.kb-index-head h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 12px;
  border-radius: 999px;
  background: #e5007d;
}

.kb-index-head p {
  margin: 12px 0 0;
  color: #475467;
  font-size: 0.96rem;
  line-height: 1.6;
}

/* ===== FILTERS ===== */

.kb-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid #eef2f6;
}

.kb-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid #d8e0e8;
  background: #ffffff;
  color: #344054;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.kb-filter:hover,
.kb-filter:focus {
  background: #f8fafc;
  color: #12203b;
}

.kb-filter.is-active {
  background: #1f2a44;
  border-color: #1f2a44;
  color: #ffffff;
}

/* ===== LIST ===== */

.kb-list {
  display: flex;
  flex-direction: column;
}

.kb-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 140px 28px;
  gap: 18px;
  align-items: center;
  min-height: 68px;
  padding: 16px 0;
  border-top: 1px solid #eef2f6;
  color: inherit;
  text-decoration: none;
}

.kb-list-row:first-child {
  border-top: 0;
}

.kb-list-row:hover,
.kb-list-row:focus {
  background: #f8fafc;
  margin-left: -14px;
  margin-right: -14px;
  padding-left: 14px;
  padding-right: 14px;
  border-radius: 12px;
  outline: none;
}

.kb-list-row:focus {
  box-shadow: 0 0 0 3px #ffbf47;
}

.kb-list-title {
  min-width: 0;
  color: #12203b;
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 650;
}

.kb-list-category {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2f6;
  color: #344054;
  font-size: 0.82rem;
  line-height: 1.2;
  font-weight: 650;
  white-space: nowrap;
}

.kb-list-date {
  color: #475467;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.kb-list-arrow {
  color: #216b2a;
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.kb-list-row:hover .kb-list-arrow,
.kb-list-row:focus .kb-list-arrow {
  transform: translateX(4px);
}

.kb-empty {
  margin: 0;
  padding: 24px 0;
  color: #475467;
}

/* ===== SIDEBAR ===== */

.kb-side-card {
  background: #ffffff;
  border: 1px solid #e6ebf2;
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.kb-side-card h2 {
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eef2f6;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 700;
  color: #12203b;
}

.kb-side-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kb-side-card li {
  border-top: 1px solid #eef2f6;
}

.kb-side-card li:first-child {
  border-top: 0;
}

.kb-side-card a {
  display: block;
  padding: 12px 0;
  color: #344054;
  text-decoration: none;
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 600;
}

.kb-side-card a:hover,
.kb-side-card a:focus {
  color: #e5007d;
}

.kb-help-card p {
  margin: 0 0 18px;
  color: #475467;
  font-size: 0.94rem;
  line-height: 1.6;
}

.kb-help-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px !important;
  border-radius: 10px;
  background: #164449;
  color: #ffffff !important;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 700;
}

.kb-help-button::after {
  content: "→";
}

.kb-help-button:hover,
.kb-help-button:focus {
  background: #0f3034;
  color: #ffffff !important;
}

/* ===== ACCESSIBILITY ===== */

.kb-filter:focus,
.kb-help-button:focus,
.kb-side-card a:focus {
  outline: 3px solid #ffbf47;
  outline-offset: 3px;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1100px) {
  .kb-index-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .kb-index-sidebar {
    position: static;
  }
}

@media (max-width: 820px) {
  .kb-index-layout {
    padding: 30px 20px 60px;
  }

  .kb-index-panel {
    padding: 24px 22px;
    border-radius: 18px;
  }

  .kb-list-row {
    grid-template-columns: 1fr 28px;
    gap: 8px 14px;
    padding: 16px 0;
  }

  .kb-list-title {
    grid-column: 1;
  }

  .kb-list-category {
    grid-column: 1;
    margin-top: 4px;
  }

  .kb-list-date {
    grid-column: 1;
    font-size: 0.84rem;
  }

  .kb-list-arrow {
    grid-column: 2;
    grid-row: 1 / span 3;
    justify-self: end;
  }
}

@media (max-width: 520px) {
  .kb-index-layout {
    padding: 24px 16px 52px;
  }

  .kb-index-hero h1 {
    font-size: 2rem;
  }

  .kb-filter {
    width: 100%;
  }
}

.kb-filter-wrap {
  display: grid;
  gap: 8px;
  max-width: 360px;
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid #eef2f6;
}

.kb-filter-label {
  color: #12203b;
  font-size: 0.92rem;
  font-weight: 700;
}

.kb-category-select {
  width: 100%;
  min-height: 46px;
  padding: 10px 42px 10px 14px;
  border: 1px solid #d8e0e8;
  border-radius: 10px;
  background: #ffffff;
  color: #12203b;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.kb-category-select:focus {
  outline: 3px solid #ffbf47;
  outline-offset: 3px;
}

/* ===== SHARED PAGE SIDEBAR ===== */

.page-sidebar {
  position: sticky;
  top: 112px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.page-side-card {
  background: #ffffff;
  border: 1px solid #e6ebf2;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.page-side-card h2 {
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eef2f6;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 600;
  color: #12203b;
}

.page-side-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-side-list li {
  border-top: 1px solid #eef2f6;
}

.page-side-list li:first-child {
  border-top: 0;
}

.page-side-list a {
  position: relative;
  display: block;
  padding: 13px 24px 13px 0;
  color: #344054;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.35;
  font-weight: 500;
}

.page-side-list a::after {
  content: "›";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #98a2b3;
  font-size: 1.25rem;
  line-height: 1;
}

.page-side-list a:hover,
.page-side-list a:focus {
  color: #e5007d;
}

/* meta */

.page-side-meta {
  display: grid;
  gap: 13px;
  margin: 0;
}

.page-side-meta div {
  display: grid;
  gap: 4px;
}

.page-side-meta dt {
  color: #667085;
  font-size: 0.82rem;
  font-weight: 500;
}

.page-side-meta dd {
  margin: 0;
  color: #344054;
  font-size: 0.9rem;
  font-weight: 600;
}

/* help */

.page-side-help p {
  margin: 0 0 16px;
  color: #667085;
  font-size: 0.9rem;
  line-height: 1.6;
}

.page-side-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1f2a44 0%, #e5007d 100%);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 12px 24px rgba(229, 0, 125, 0.16);
}

.page-side-button::after {
  content: "→";
}

.page-side-button:hover,
.page-side-button:focus {
  background: linear-gradient(135deg, #14203a 0%, #c9006d 100%);
  color: #ffffff;
  transform: translateY(-1px);
}

/* focus */

.page-side-list a:focus,
.page-side-button:focus {
  outline: 3px solid #ffbf47;
  outline-offset: 3px;
}

/* mobile */

@media (max-width: 1100px) {
  .page-sidebar {
    position: static;
  }
}