/* site_extra: база знаний, главная раздела (hero, шаги, карточки, CTA). Подключается после site_extra_kb.css */

.kb-btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.kb-btn_gold {
  background: #e5b67c;
  color: #1b2433;
}
.kb-btn_gold:hover {
  background: #f0c690;
  transform: translateY(-2px);
}
.kb-btn_line {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
}
.kb-btn_line:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* hero */
.kb-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 32px;
  align-items: center;
  margin-bottom: 24px;
  padding: 48px;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #254061 0%, #1b2433 100%);
  color: #fff;
}
.kb-hero:before {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 182, 124, 0.35), rgba(229, 182, 124, 0) 70%);
  pointer-events: none;
}
.kb-hero__main,
.kb-hero__stats {
  position: relative;
}
.kb-hero__label {
  display: inline-block;
  margin-bottom: 16px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(229, 182, 124, 0.18);
  color: #e5b67c;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.kb-hero__title {
  margin: 0 0 16px;
  color: #fff;
  font-size: 44px;
  font-weight: 800;
  line-height: 1.1;
}
.kb-hero__text {
  max-width: 560px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  line-height: 1.6;
}
.kb-hero__text p {
  margin: 0;
}
.kb-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.kb-hero__stats {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.kb-hero__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}
.kb-hero__stat b {
  color: #e5b67c;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
}
.kb-hero__stat span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
}

/* как устроены статьи */
.kb-how {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0 0 44px;
  padding: 0;
  list-style: none;
}
.kb-how__item {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-areas: "num title" "num text";
  column-gap: 14px;
  row-gap: 2px;
  padding: 18px 20px;
  border-radius: 14px;
  background: #f4ead9;
}
.kb-how__num {
  grid-area: num;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #254061;
  color: #e5b67c;
  font-size: 18px;
  font-weight: 800;
}
.kb-how__title {
  grid-area: title;
  color: #254061;
  font-size: 15px;
  font-weight: 700;
}
.kb-how__text {
  grid-area: text;
  color: rgba(27, 36, 51, 0.75);
  font-size: 13px;
  line-height: 1.45;
}

/* список статей */
.kb-articles__title {
  scroll-margin-top: 100px;
}
.kb-list {
  padding-bottom: 40px;
}
.kb-item__link {
  position: relative;
  padding: 28px;
  overflow: hidden;
  border-radius: 20px;
}
.kb-item__link:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #e5b67c, #254061);
  opacity: 0;
  transition: opacity 0.2s;
}
.kb-item__link:hover:before,
.kb-item__link:focus-visible:before {
  opacity: 1;
}
.kb-item__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.kb-item__top .kb-item__tag {
  margin-bottom: 0;
}
.kb-item__time {
  color: rgba(27, 36, 51, 0.55);
  font-size: 12px;
}
.kb-item__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kb-item__arrow {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e5b67c;
  position: relative;
  transition: transform 0.2s;
}
.kb-item__arrow:after {
  content: "";
  position: absolute;
  top: 5px;
  left: 4px;
  width: 6px;
  height: 6px;
  border-top: 2px solid #1b2433;
  border-right: 2px solid #1b2433;
  transform: rotate(45deg);
}
.kb-item__link:hover .kb-item__arrow {
  transform: translateX(4px);
}
/* первая статья крупнее */
.kb-item:first-child {
  grid-column: span 2;
}
.kb-item:first-child .kb-item__link {
  border-color: #254061;
  background: #254061;
  color: #fff;
}
.kb-item:first-child .kb-item__title {
  color: #fff;
  font-size: 28px;
}
.kb-item:first-child .kb-item__text {
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
}
.kb-item:first-child .kb-item__tag {
  background: #e5b67c;
  color: #1b2433;
}
.kb-item:first-child .kb-item__time {
  color: rgba(255, 255, 255, 0.65);
}
.kb-item:first-child .kb-item__more {
  color: #e5b67c;
}

/* призыв */
.kb-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 70px;
  padding: 32px 40px;
  border: 1px solid #e5b67c;
  border-radius: 20px;
  background: #faf6ee;
}
.kb-cta__title {
  margin: 0 0 6px;
  color: #254061;
  font-size: 24px;
  font-weight: 800;
}
.kb-cta__text {
  margin: 0;
  font-size: 15px;
}

@media (max-width: 991px) {
  .kb-hero {
    grid-template-columns: 1fr;
    padding: 36px 28px;
  }
  .kb-hero__stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .kb-hero__title {
    font-size: 36px;
  }
  .kb-how {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 767px) {
  .kb-hero {
    padding: 28px 20px;
    border-radius: 18px;
  }
  .kb-hero__title {
    font-size: 30px;
  }
  .kb-hero__stats {
    grid-template-columns: 1fr;
  }
  .kb-item:first-child {
    grid-column: auto;
  }
  .kb-item:first-child .kb-item__title {
    font-size: 22px;
  }
  .kb-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .kb-btn,
  .kb-item__arrow {
    transition: none;
  }
}
