/* ==========================================================================
   Knowledge Centre — flagship educational hub
   ========================================================================== */

body.page-knowledge-centre.page-modern {
  background: #fafafa;
}

body.page-modern .kc-page-head__title {
  font-family: 'Chillax', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* --- Hero --- */
.kc-hero {
  position: relative;
  z-index: 10;
  padding: calc(var(--header-height) + 56px) 24px 72px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(215, 25, 32, 0.06), transparent),
    #fafafa;
  text-align: center;
}

.kc-hero__inner {
  max-width: 820px;
  margin: 0 auto;
}

.kc-hero__eyebrow {
  display: inline-block;
  margin-bottom: 20px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(215, 25, 32, 0.08);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: 9.75rem;
  min-width: 9.75rem;
  max-width: 9.75rem;
  text-align: center;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kc-hero__title {
  margin: 0;
  font-family: 'Chillax', sans-serif;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #1a1a1a;
}

.kc-hero__subtitle {
  margin: 20px auto 0;
  max-width: 58ch;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.7;
  color: #5b6472;
}

.kc-search {
  max-width: 640px;
  margin: 40px auto 0;
  position: relative;
  z-index: 20;
}

.kc-search__control {
  position: relative;
  z-index: 30;
}

.kc-search__icon {
  position: absolute;
  left: 22px;
  top: 30px;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  z-index: 2;
}

.kc-search__input {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 60px;
  padding: 0 24px 0 56px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
  font-size: 16px;
  color: #1a1a1a;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.kc-search__input::placeholder {
  color: #9ca3af;
}

.kc-search__input:focus {
  outline: none;
  border-color: rgba(215, 25, 32, 0.25);
  box-shadow: 0 12px 40px rgba(215, 25, 32, 0.08);
}

.kc-search__hint {
  margin: 14px 0 0;
  font-size: 13px;
  color: #9ca3af;
}

.kc-search__hint.is-hidden {
  display: none;
}

.kc-search__results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  z-index: 1000;
  max-height: min(360px, 50vh);
  overflow-y: auto;
  padding: 8px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.04),
    0 20px 48px rgba(0, 0, 0, 0.14);
  text-align: left;
  isolation: isolate;
}

.kc-search.is-open {
  padding-bottom: min(320px, 48vh);
}

.kc-search.is-open .kc-search__hint,
.kc-search.is-open .kc-search__empty {
  visibility: hidden;
}

.kc-search__results:not([hidden]) {
  display: block;
}

.kc-search__result {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 200ms ease;
}

.kc-search__result:hover,
.kc-search__result:focus-visible {
  outline: none;
  background: rgba(215, 25, 32, 0.06);
}

.kc-search__result-type {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.kc-search__result-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: #1a1a1a;
}

.kc-search__empty {
  display: none;
  margin-top: 32px;
  padding: 24px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #6b7280;
  font-size: 15px;
}

.kc-search__empty.is-visible {
  display: block;
}

/* --- Sections --- */
.kc-section {
  position: relative;
  z-index: 1;
  padding: clamp(72px, 9vw, 108px) 0;
  scroll-margin-top: calc(var(--header-height, 72px) + 24px);
}

.kc-section--white {
  background: #fff;
}

.kc-section--soft {
  background: #f8f9fb;
}

.kc-page-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(40px, 5vw, 64px);
}

.kc-page-head--left {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.kc-page-head__eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.kc-page-head__title {
  margin: 0 0 14px;
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.1;
  color: #1a1a1a;
}

.kc-page-head__subtitle {
  margin: 0;
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.7;
  color: #5b6472;
}

/* --- Category cards --- */
.kc-categories__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.kc-category-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  padding: 32px 28px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
  transition: transform 300ms ease, box-shadow 300ms ease, border-color 300ms ease;
  color: inherit;
}

.kc-category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.08);
  border-color: rgba(215, 25, 32, 0.12);
}

.kc-category-card.is-active {
  border-color: rgba(215, 25, 32, 0.28);
  box-shadow: 0 16px 40px rgba(215, 25, 32, 0.1);
}

.kc-category-card.is-active .kc-category-card__link {
  color: var(--color-primary);
}

.kc-category-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.kc-category-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(215, 25, 32, 0.08);
  color: var(--color-primary);
  flex-shrink: 0;
  transition: background-color 300ms ease, color 300ms ease;
}

.kc-category-card:hover .kc-category-card__icon {
  background: var(--color-primary);
  color: #fff;
}

.kc-category-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  white-space: nowrap;
}

.kc-category-card__title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1a1a1a;
}

.kc-category-card__text {
  margin: 0;
  flex-grow: 1;
  font-size: 14px;
  line-height: 1.65;
  color: #6b7280;
}

.kc-category-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
}

/* --- Featured articles --- */
.kc-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 720px;
  margin: -12px auto 28px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(215, 25, 32, 0.06);
  border: 1px solid rgba(215, 25, 32, 0.12);
}

.kc-filter-bar__text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.kc-filter-bar__clear {
  border: 0;
  background: #fff;
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.kc-filter-bar__clear:hover {
  background: #fff5f5;
}

.kc-articles__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.kc-article-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  padding: 32px 28px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
  transition: transform 300ms ease, box-shadow 300ms ease;
}

a.kc-article-card {
  text-decoration: none;
  color: inherit;
}

.kc-article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.08);
}

.kc-article-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.kc-article-card__category {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(215, 25, 32, 0.08);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.kc-article-card__time {
  font-size: 13px;
  color: #9ca3af;
}

.kc-article-card__title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #1a1a1a;
}

.kc-article-card__text {
  margin: 0;
  flex-grow: 1;
  font-size: 14px;
  line-height: 1.7;
  color: #6b7280;
}

.kc-article-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 12px 20px;
  border-radius: 999px;
  background: #1a1a1a;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  align-self: flex-start;
  transition: background 200ms ease, transform 200ms ease;
}

.kc-article-card:hover .kc-article-card__btn {
  background: var(--color-primary);
}

/* --- Downloads --- */
.kc-downloads__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.kc-download-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: calc(50% - 10px);
  justify-self: center;
  width: 100%;
}

.kc-download-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 28px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
  transition: transform 300ms ease, box-shadow 300ms ease, border-color 300ms ease;
  color: inherit;
}

.kc-download-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
  border-color: rgba(215, 25, 32, 0.12);
}

.kc-download-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 14px;
  background: rgba(215, 25, 32, 0.08);
  color: var(--color-primary);
}

.kc-download-card__body {
  flex: 1;
  min-width: 0;
}

.kc-download-card__title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
}

.kc-download-card__text {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #6b7280;
}

.kc-download-card__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
}

/* --- FAQs --- */
.kc-faq-groups {
  display: grid;
  gap: 48px;
  max-width: 840px;
  margin: 0 auto;
}

.kc-faq-group__title {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1a1a1a;
}

.kc-faq-group__list {
  display: grid;
  gap: 12px;
}

.kc-searchable.is-hidden {
  display: none !important;
}

.kc-searchable.is-match {
  opacity: 1 !important;
  transform: none !important;
}

/* --- CTA --- */
body.page-knowledge-centre .kc-cta .mobility-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .kc-categories__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kc-articles__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .kc-hero {
    padding-bottom: 56px;
  }

  .kc-categories__grid,
  .kc-articles__grid,
  .kc-downloads__grid {
    grid-template-columns: 1fr;
  }

  .kc-download-card:last-child:nth-child(odd) {
    grid-column: auto;
    max-width: none;
    justify-self: stretch;
  }

  .kc-page-head--left {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
}
