/* KBS — главная страница (Figma: 1920 / 768 / 360) */

:root {
  --kbs-brown: #45230e;
  --kbs-accent: #8e3000;
  --kbs-footer-bg: #0c0a09;
  --kbs-card-bg: rgba(69, 35, 14, 0.04);
  --kbs-border: rgba(69, 35, 14, 0.15);
  --kbs-white: #fff;
  --kbs-font: "Open Sans", sans-serif;
  --kbs-font-alt: "Manrope", sans-serif;
  --kbs-container: 1140px;
  --kbs-pad: 24px;
  --kbs-spacer: 40px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.kbs-site {
  margin: 0;
  font-family: var(--kbs-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--kbs-brown);
  background: var(--kbs-white);
}

body.kbs-site img {
  max-width: 100%;
  display: block;
}

body.kbs-front-page .kbs-icon,
body.kbs-front-page .kbs-list li img,
body.kbs-front-page .kbs-news-card__date img {
  width: 16px;
  height: 16px;
  max-width: none;
  flex-shrink: 0;
  object-fit: contain;
}

body.kbs-front-page .kbs-news-card__date img {
  width: 14px;
  height: 14px;
}

body.kbs-site a {
  color: inherit;
  text-decoration: none;
}

body.kbs-site ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.kbs-site p {
  margin: 0 0 1em;
}

body.kbs-site p:last-child {
  margin-bottom: 0;
}

/* Внутренние страницы — тёмная шапка */
body.kbs-site:not(.kbs-front-page) .kbs-header {
  background: var(--kbs-footer-bg);
  color: var(--kbs-white);
}

body.kbs-site:not(.kbs-front-page) .kbs-header__inner {
  padding-top: 32px;
  padding-bottom: 32px;
}

body.kbs-site:not(.kbs-front-page) .kbs-logo__img {
  width: 80px;
  height: 80px;
}

body.kbs-site:not(.kbs-front-page) .kbs-logo__text {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

body.kbs-site:not(.kbs-front-page) .kbs-header--inner {
  min-height: auto;
}

.kbs-container {
  width: 100%;
  max-width: calc(var(--kbs-container) + var(--kbs-pad) * 2);
  margin: 0 auto;
  padding-left: var(--kbs-pad);
  padding-right: var(--kbs-pad);
}

.kbs-spacer {
  height: var(--kbs-spacer);
}

.kbs-section-title {
  margin: 0;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--kbs-brown);
}

/* Header / Hero */
.kbs-header {
  position: relative;
  color: var(--kbs-white);
}

.kbs-header--hero {
  min-height: 724px;
  display: flex;
  flex-direction: column;
}

.kbs-header__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.kbs-header__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kbs-header__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.kbs-header__inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 24px;
  padding-bottom: 40px;
}

.kbs-header__top {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.kbs-logo {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--kbs-white);
  flex-shrink: 0;
}

.kbs-logo__img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.kbs-logo__text {
  display: flex;
  flex-direction: column;
  font-weight: 700;
  font-size: 10px;
  line-height: 1.5;
  text-transform: uppercase;
}

.kbs-burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 52px;
  height: 52px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  order: 3;
  position: relative;
  z-index: 70;
}

.kbs-burger span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--kbs-white);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.kbs-burger[aria-expanded="true"] span {
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -10px;
}

.kbs-burger[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg);
}

.kbs-burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.kbs-burger[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg);
}

.kbs-nav--desktop,
.kbs-contacts--header {
  display: none;
}

.kbs-contacts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: auto;
  min-width: 0;
  order: 2;
  flex: 1 1 auto;
}

.kbs-contacts__item {
  display: grid;
  grid-template-columns: 20px max-content;
  column-gap: 8px;
  align-items: center;
  font-size: 11px;
  line-height: 1.5;
  color: var(--kbs-white);
  white-space: nowrap;
}

.kbs-contacts__icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kbs-contacts__icon img {
  display: block;
  width: 20px;
  height: 20px;
  max-width: none;
  flex-shrink: 0;
  object-fit: contain;
}

.kbs-contacts__item--phone .kbs-contacts__text {
  font-weight: 700;
}

.kbs-contacts__item--email .kbs-contacts__text {
  font-weight: 700;
}

.kbs-nav-panel {
  position: fixed;
  z-index: 60;
  top: 90px;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: rgba(16, 15, 12, 0.95);
  border-radius: 0;
}

.kbs-nav-panel[hidden] {
  display: none;
}

body.kbs-nav-open {
  overflow: hidden;
}

.kbs-nav__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.kbs-nav__link {
  font-size: 16px;
  color: var(--kbs-white);
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.kbs-nav--mobile .kbs-nav__list {
  gap: 32px;
}

.kbs-nav--mobile .kbs-nav__link {
  font-size: 20px;
  line-height: 1.5;
}

.kbs-nav__link:hover,
.kbs-nav__link:focus-visible {
  color: #d8a44a;
  text-shadow: 0 0 18px rgba(216, 164, 74, 0.22);
}

.kbs-nav__link.is-current,
.kbs-nav .current-menu-item > .kbs-nav__link {
  font-weight: 700;
}

@media (max-width: 767px) {
  body.kbs-site:not(.kbs-front-page) .kbs-logo__img {
    width: 56px;
    height: 56px;
  }

  body.kbs-site:not(.kbs-front-page) .kbs-logo__text {
    font-size: 10px;
  }

  body.kbs-site:not(.kbs-front-page) .kbs-header__inner {
    padding-top: 20px;
    padding-bottom: 24px;
  }
}

.kbs-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  margin-top: 24px;
}

.kbs-hero__title {
  margin: 0;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.3;
  text-transform: uppercase;
}

.kbs-hero__title-line {
  display: block;
  white-space: nowrap;
}

.kbs-hero__lead {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  max-width: 700px;
}

.kbs-hero__emblem {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
}

.kbs-hero__emblem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* About */
.kbs-about__grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kbs-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kbs-gallery__main img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  aspect-ratio: 1726 / 969;
}

.kbs-gallery__bottom {
  display: flex;
  gap: 16px;
  min-height: 209px;
}

.kbs-gallery__col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 170px;
  flex-shrink: 0;
}

.kbs-gallery__col img {
  border-radius: 8px;
  object-fit: cover;
  width: 100%;
}

.kbs-gallery__col img:first-child {
  aspect-ratio: 1416 / 797;
}

.kbs-gallery__col img:last-child {
  flex: 1;
  min-height: 97px;
}

.kbs-gallery__tall {
  flex: 1;
  min-width: 0;
}

.kbs-gallery__tall img {
  width: 100%;
  height: 100%;
  min-height: 209px;
  border-radius: 10px;
  object-fit: cover;
}

.kbs-info-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kbs-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--kbs-card-bg);
  border-radius: 10px;
  padding: 16px 24px;
}

.kbs-card__title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.5;
  text-transform: uppercase;
}

.kbs-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kbs-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.4;
}

.kbs-list__icon {
  flex-shrink: 0;
  width: 16px;
  padding-top: 5px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.kbs-list__icon img {
  margin-top: 0;
}

/* Union */
.kbs-union > .kbs-spacer {
  height: 0;
}

.kbs-union__grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.kbs-union__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.kbs-union__title {
  flex: none;
  width: 100%;
  line-height: 1.5;
}

.kbs-union__copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kbs-union__copy p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.kbs-partners {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
}

.kbs-partners__item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  height: 100px;
  border: 1px solid var(--kbs-border);
  border-radius: 10px;
  padding: 10px 14px;
}

.kbs-partners__item img {
  width: auto;
  height: auto;
  max-width: min(110px, 72%);
  max-height: min(74px, 68%);
  object-fit: contain;
}

/* News */
.kbs-news__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.kbs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.kbs-btn--outline {
  border: 1px solid var(--kbs-accent);
  color: var(--kbs-accent);
  align-self: flex-start;
  background: transparent;
}

.kbs-btn--outline:not(.kbs-btn--placeholder):hover,
.kbs-btn--outline:not(.kbs-btn--placeholder):focus-visible {
  color: var(--kbs-white);
  background: var(--kbs-accent);
  border-color: var(--kbs-accent);
  box-shadow: 0 10px 24px rgba(142, 48, 0, 0.22);
  transform: translateY(-2px);
}

.kbs-btn--outline:not(.kbs-btn--placeholder):hover img,
.kbs-btn--outline:not(.kbs-btn--placeholder):focus-visible img {
  filter: brightness(0) invert(1);
}

.kbs-btn--outline:not(.kbs-btn--placeholder):active {
  box-shadow: 0 5px 14px rgba(142, 48, 0, 0.18);
  transform: translateY(0);
}

.kbs-news__grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.kbs-news-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--kbs-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--kbs-white);
}

.kbs-news-card__media {
  display: block;
  flex-shrink: 0;
  line-height: 0;
}

.kbs-news-card__media img {
  width: 100%;
  height: 220px;
  max-width: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.kbs-news-card__body {
  padding: 24px 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  flex: 1;
}

.kbs-news-card__date {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  font-family: var(--kbs-font-alt);
  font-size: 12px;
  color: var(--kbs-accent);
}

.kbs-news-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.kbs-news-card__title a {
  transition: color 0.25s ease;
}

.kbs-news-card__title a:hover,
.kbs-news-card__title a:focus-visible {
  color: #a85a22;
}

.kbs-news-card__excerpt {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.kbs-news__empty {
  text-align: center;
  color: var(--kbs-brown);
}

/* Footer */
.kbs-footer {
  background: var(--kbs-footer-bg);
  color: var(--kbs-white);
  padding: 24px 0;
}

.kbs-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
}

.kbs-footer__copy,
.kbs-footer__credit,
.kbs-footer__link {
  margin: 0;
}

.kbs-footer__link:hover {
  text-decoration: underline;
}

.kbs-footer__credit a {
  color: inherit;
  text-decoration: none;
}

.kbs-footer__credit a:hover {
  text-decoration: underline;
}

/* Tablet ≥768px */
@media (min-width: 768px) {
  :root {
    --kbs-pad: 36px;
    --kbs-spacer: 64px;
  }

  .kbs-header--hero {
    min-height: 470px;
  }

  .kbs-header__inner {
    padding-top: 32px;
    padding-bottom: 96px;
  }

  .kbs-header__top {
    flex-wrap: wrap;
    gap: 16px;
  }

  .kbs-logo__img {
    width: 64px;
    height: 64px;
  }

  .kbs-logo__text {
    font-size: 12px;
  }

  .kbs-burger {
    display: none;
  }

  .kbs-nav--desktop {
    display: block;
    order: 2;
  }

  .kbs-nav--desktop .kbs-nav__list {
    flex-direction: row;
    gap: 24px;
  }

  .kbs-contacts--header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 0 0 auto;
    width: auto;
    order: 3;
    gap: 8px;
  }

  .kbs-contacts--header .kbs-contacts__item {
    grid-template-columns: 22px max-content;
    font-size: 16px;
  }

  .kbs-contacts--header .kbs-contacts__icon,
  .kbs-contacts--header .kbs-contacts__icon img {
    width: 22px;
    height: 22px;
  }

  .kbs-nav-panel {
    display: none !important;
  }

  .kbs-hero {
    flex-direction: row;
    align-items: center;
    gap: 32px;
    margin-top: 40px;
  }

  .kbs-hero__title {
    font-size: 48px;
  }

  .kbs-hero__lead {
    font-size: 18px;
  }

  .kbs-hero__emblem {
    flex: 0 0 280px;
    max-width: 280px;
    margin: 0;
  }

  .kbs-about__grid {
    flex-direction: row;
    align-items: stretch;
    gap: 16px;
  }

  .kbs-gallery {
    flex: 0 0 330px;
    max-width: 330px;
  }

  .kbs-info-cards {
    flex: 1;
    min-width: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .kbs-card--goals {
    flex: 0 0 auto;
  }

  .kbs-card--activity {
    flex: 1 1 auto;
    min-height: 0;
  }

  .kbs-gallery__bottom {
    flex: 1;
    min-height: 0;
  }

  .kbs-gallery__col {
    width: 147px;
  }

  .kbs-card {
    padding: 24px 32px;
  }

  .kbs-card__title,
  .kbs-section-title {
    font-size: 32px;
  }

  .kbs-list li {
    font-size: 16px;
    line-height: 1.6;
  }

  .kbs-list li img {
    width: 16px;
    height: 16px;
  }

  .kbs-union__grid {
    flex-direction: row;
    align-items: center;
    gap: 40px;
  }

  .kbs-union__text {
    flex: 0 0 220px;
    max-width: 220px;
    gap: 32px;
  }

  .kbs-union__copy {
    gap: 16px;
  }

  .kbs-union__copy p {
    font-size: 16px;
    line-height: 1.6;
  }

  .kbs-partners {
    grid-template-columns: repeat(3, 1fr);
  }

  .kbs-partners__item {
    height: 180px;
    min-height: 180px;
    padding: 14px 18px;
  }

  .kbs-partners__item img {
    max-width: min(170px, 78%);
    max-height: min(150px, 78%);
  }

  .kbs-news__head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 24px;
  }

  .kbs-news__head .kbs-btn--outline {
    align-self: center;
    flex-shrink: 0;
  }

  .kbs-section-title {
    flex: 1;
    font-size: 32px;
  }

  .kbs-news__grid {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
  }

  .kbs-news-card {
    flex: 1 1 calc(50% - 12px);
    max-width: calc(50% - 12px);
  }

  .kbs-news-card:nth-child(3) {
    display: none;
  }

  .kbs-news-card__body {
    padding: 24px;
  }

  .kbs-footer__inner {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    text-align: left;
    font-size: 14px;
  }
}

/* Desktop ≥1200px */
@media (min-width: 1200px) {
  :root {
    --kbs-pad: 24px;
    --kbs-spacer: 104px;
  }

  .kbs-container {
    max-width: 1140px;
  }

  .kbs-header__top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 32px;
  }

  .kbs-nav--desktop {
    justify-self: center;
  }

  .kbs-contacts--header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .kbs-header--hero {
    min-height: 800px;
  }

  .kbs-logo__img {
    width: 80px;
    height: 80px;
  }

  .kbs-logo__text {
    font-size: 14px;
  }

  .kbs-nav--desktop .kbs-nav__list {
    gap: 32px;
  }

  .kbs-contacts--header .kbs-contacts__item {
    grid-template-columns: 24px max-content;
    font-size: 18px;
  }

  .kbs-contacts--header .kbs-contacts__icon,
  .kbs-contacts--header .kbs-contacts__icon img {
    width: 24px;
    height: 24px;
  }

  .kbs-hero__title {
    font-size: 88px;
  }

  .kbs-hero__lead {
    font-size: 24px;
  }

  .kbs-hero__emblem {
    flex: 0 0 350px;
    max-width: 350px;
  }

  .kbs-about__grid {
    align-items: stretch;
    gap: 16px;
  }

  .kbs-gallery {
    flex: 0 0 560px;
    max-width: 560px;
  }

  .kbs-info-cards {
    flex: 1;
    max-width: 564px;
    align-self: stretch;
  }

  .kbs-gallery__col {
    width: 250px;
  }

  .kbs-gallery__tall {
    flex: 0 0 294px;
  }

  .kbs-card {
    padding: 32px 40px;
  }

  .kbs-card__title,
  .kbs-section-title {
    font-size: 44px;
  }

  .kbs-union__grid {
    flex-direction: row;
    gap: 64px;
    align-items: center;
  }

  .kbs-union__text {
    flex: 0 0 260px;
    max-width: 260px;
    gap: 40px;
  }

  .kbs-partners {
    flex: 1;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .kbs-partners__item {
    height: 233px;
    min-height: 233px;
    padding: 16px 20px;
  }

  .kbs-partners__item img {
    max-width: min(230px, 88%);
    max-height: min(190px, 82%);
  }

  .kbs-news__head {
    margin-bottom: 40px;
  }

  .kbs-news__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .kbs-news-card {
    flex: none;
    max-width: none;
    width: 100%;
  }

  .kbs-news-card:nth-child(3) {
    display: flex;
    flex-direction: column;
  }

  .kbs-btn--outline {
    padding: 16px 24px;
  }

  .kbs-news-card__title {
    font-size: 18px;
  }

  .kbs-news-card__excerpt {
    font-size: 16px;
  }
}
