/* Внутренние страницы: конференция, новости, контакты, запись */

.kbs-breadcrumbs {
  padding: 16px 0;
}

.kbs-breadcrumbs__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--kbs-brown);
}

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

.kbs-breadcrumbs a:hover {
  color: var(--kbs-accent);
}

.kbs-breadcrumbs__current {
  color: var(--kbs-brown);
}

body.kbs-site .kbs-main {
  padding-bottom: 0;
}

.kbs-inner {
  padding-bottom: 40px;
}

.kbs-inner-spacer {
  height: 40px;
}

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

.kbs-inner-subtitle {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--kbs-brown);
}

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

.kbs-inner-block--text p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--kbs-brown);
}

.kbs-inner-block--text strong,
.kbs-inner-block--text b {
  font-weight: 700;
  color: var(--kbs-brown);
}

.kbs-inner-block--text a {
  text-decoration: underline;
  color: var(--kbs-brown);
}

.kbs-dot-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kbs-dot-list li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.6;
  color: var(--kbs-brown);
}

.kbs-dot-list li::before {
  content: "";
  flex-shrink: 0;
  width: 4px;
  height: 4px;
  margin-top: 9px;
  border-radius: 10px;
  background: var(--kbs-accent);
}

.kbs-btn--download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 16px 24px;
}

.kbs-btn--download img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.kbs-btn--placeholder {
  cursor: not-allowed;
}

/* Конференция */
.kbs-conference__title {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.kbs-conference__title-main,
.kbs-conference__title-accent {
  display: block;
}

.kbs-conference__title-accent {
  color: var(--kbs-accent);
}

.kbs-conference__grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.kbs-conference__content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.kbs-conference__logos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

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

.kbs-conference__logo img {
  max-width: 100%;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Архив новостей */
.kbs-news-archive .kbs-page-title {
  margin-bottom: 40px;
}

.kbs-news-archive__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.kbs-news-archive__grid .kbs-news-card {
  display: flex;
  min-width: 0;
  width: 100%;
  max-width: none;
  flex: none;
}

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

body.kbs-site .kbs-news-archive .kbs-news-card__date img {
  width: 14px;
  height: 14px;
}

/* Одиночная запись */
.kbs-single-post__grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.kbs-single-post__main {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

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

.kbs-single-post .kbs-page-title {
  margin: 0;
}

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

.kbs-single-post__date {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--kbs-font-alt);
  font-size: 14px;
  line-height: 1.5;
  color: var(--kbs-accent);
}

.kbs-single-post__date img {
  width: 16px;
  height: 16px;
}

.kbs-single-post__content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--kbs-brown);
}

.kbs-single-post__content p {
  margin: 0 0 16px;
}

.kbs-single-post__content p:last-child {
  margin-bottom: 0;
}

.kbs-single-post__content h2,
.kbs-single-post__content h3 {
  margin: 24px 0 12px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--kbs-brown);
}

.kbs-single-post__content ul {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.kbs-single-post__content li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0 0 4px;
}

.kbs-single-post__content li::before {
  content: "";
  flex-shrink: 0;
  width: 4px;
  height: 4px;
  margin-top: 10px;
  border-radius: 10px;
  background: var(--kbs-accent);
}

.kbs-post-gallery {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 16px;
  width: 100%;
  margin: 32px 0 0;
}

.kbs-post-gallery > a {
  display: block;
  flex: 0 0 calc((100% - 32px) / 3);
  width: calc((100% - 32px) / 3);
  max-width: calc((100% - 32px) / 3);
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
}

.kbs-post-gallery img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.35s ease;
}

.kbs-post-gallery > a:hover img {
  transform: scale(1.03);
}

@media (max-width: 600px) {
  .kbs-post-gallery {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .kbs-post-gallery > a {
    flex-basis: auto;
    width: 100%;
    max-width: none;
  }
}

.kbs-single-post__content img.kbs-zoomable,
.kbs-single-post__content a[href$=".jpg"],
.kbs-single-post__content a[href$=".jpeg"],
.kbs-single-post__content a[href$=".png"],
.kbs-single-post__content a[href$=".webp"] {
  cursor: zoom-in;
}

/* Lightbox */
.kbs-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(12, 10, 9, 0.85);
  backdrop-filter: blur(2px);
}

.kbs-lightbox.is-open {
  display: flex;
}

.kbs-lightbox__img {
  display: block;
  max-width: min(1100px, 100%);
  max-height: 85vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.kbs-lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #45230E;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.kbs-lightbox__close:hover {
  background: #FFFFFF;
  transform: scale(1.05);
}

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

.kbs-single-post__thumb {
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 364 / 220;
}

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

.kbs-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding: 24px;
  border: 1px solid var(--kbs-border);
  border-radius: 10px;
}

.kbs-share__title {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 0;
  padding: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  color: var(--kbs-brown);
}

.kbs-share__links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.kbs-share__links a,
.kbs-share__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  line-height: 0;
}

.kbs-share__links img,
.kbs-share__copy img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.kbs-post-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--kbs-accent);
}

.kbs-post-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--kbs-accent);
  transition: color 0.25s ease;
}

.kbs-post-nav__link:hover,
.kbs-post-nav__link:focus-visible {
  color: #a85a22;
}

.kbs-post-nav__link img {
  width: 14px;
  height: 8px;
}

/* Контакты */
.kbs-contacts__grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.kbs-contacts__card {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 32px 24px;
  border: 1px solid var(--kbs-border);
  border-radius: 10px;
}

.kbs-contacts__org {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--kbs-brown);
}

.kbs-contacts .kbs-inner-block--text strong,
.kbs-contacts .kbs-inner-block--text b {
  display: block;
}

.kbs-contacts__map {
  overflow: hidden;
  border-radius: 10px;
  min-height: 280px;
  aspect-ratio: 920 / 522;
}

.kbs-contacts__map img,
.kbs-contacts__map iframe,
.kbs-contacts__map > ymaps,
.kbs-contacts__map > div {
  width: 100%;
  height: 100%;
  min-height: 280px;
  border: 0;
  object-fit: cover;
}

/* Заявка на вступление */
.kbs-application__header {
  max-width: 760px;
}

.kbs-application__header .kbs-page-title {
  margin-bottom: 16px;
}

.kbs-application__lead {
  margin: 0 0 40px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--kbs-brown);
}

.kbs-application__form {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid var(--kbs-border);
  border-radius: 10px;
  background: rgba(69, 35, 14, 0.03);
}

.kbs-application .wpcf7-form {
  margin: 0;
}

.kbs-cf7-grid {
  display: block;
}

.kbs-cf7-grid > p {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 0;
}

.kbs-cf7-grid br,
.kbs-cf7-actions br,
.kbs-cf7-consent br {
  display: none;
}

.kbs-cf7-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--kbs-brown);
}

.kbs-cf7-field--full {
  grid-column: 1 / -1;
}

.kbs-cf7-field input,
.kbs-cf7-field textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--kbs-border);
  border-radius: 10px;
  font: inherit;
  font-weight: 400;
  color: var(--kbs-brown);
  background: var(--kbs-white);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.kbs-cf7-field textarea {
  min-height: 132px;
  resize: vertical;
}

.kbs-cf7-field input:focus,
.kbs-cf7-field textarea:focus {
  border-color: var(--kbs-accent);
  box-shadow: 0 0 0 3px rgba(142, 48, 0, 0.12);
}

.kbs-cf7-actions {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.kbs-cf7-actions p,
.kbs-cf7-consent p {
  margin: 0;
}

.kbs-cf7-actions .kbs-btn {
  min-width: 220px;
  padding: 16px 24px;
  cursor: pointer;
}

.kbs-cf7-consent {
  display: flex;
  justify-content: center;
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--kbs-brown);
}

.kbs-cf7-consent .wpcf7-list-item {
  margin: 0;
}

.kbs-cf7-consent label {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 680px;
}

.kbs-cf7-consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--kbs-accent);
}

.kbs-cf7-consent a {
  color: var(--kbs-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.kbs-application .wpcf7-not-valid-tip {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 400;
  color: #b3261e;
}

.kbs-application .wpcf7-response-output {
  margin: 24px 0 0;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
}

/* Политика конфиденциальности */
.kbs-privacy__content {
  max-width: 920px;
  color: var(--kbs-brown);
}

.kbs-privacy__content h2 {
  margin: 32px 0 16px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--kbs-brown);
}

.kbs-privacy__content h2:first-child {
  margin-top: 0;
}

.kbs-privacy__content p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.6;
}

.kbs-privacy__content ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.kbs-privacy__content li {
  position: relative;
  padding-left: 16px;
  font-size: 16px;
  line-height: 1.6;
}

.kbs-privacy__content li::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--kbs-accent);
}

.kbs-privacy__table-wrap {
  width: 100%;
  margin: 24px 0;
  overflow-x: auto;
  border: 1px solid var(--kbs-border);
  border-radius: 10px;
}

.kbs-privacy__content table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: var(--kbs-white);
}

.kbs-privacy__content th,
.kbs-privacy__content td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--kbs-border);
  border-right: 1px solid var(--kbs-border);
  vertical-align: top;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

.kbs-privacy__content th:last-child,
.kbs-privacy__content td:last-child {
  border-right: 0;
}

.kbs-privacy__content tr:last-child td {
  border-bottom: 0;
}

.kbs-privacy__content th {
  font-weight: 700;
  background: rgba(69, 35, 14, 0.04);
}

.kbs-privacy__content a {
  color: var(--kbs-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Tablet ≥768px */
@media (min-width: 768px) {
  .kbs-inner-spacer {
    height: 64px;
  }

  .kbs-page-title {
    font-size: 32px;
    margin-bottom: 48px;
  }

  .kbs-inner-subtitle {
    font-size: 20px;
  }

  .kbs-inner-block--text p,
  .kbs-dot-list li {
    font-size: 16px;
  }

  .kbs-conference__grid {
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
  }

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

  .kbs-conference__logos {
    flex: 0 0 260px;
    max-width: 260px;
  }

  .kbs-news-archive__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kbs-single-post__content {
    font-size: 16px;
  }

  .kbs-post-gallery {
    flex-direction: row;
  }

  .kbs-contacts__grid {
    flex-direction: row;
    align-items: stretch;
    gap: 40px;
  }

  .kbs-contacts__card {
    flex: 0 0 320px;
    max-width: 320px;
    padding: 40px;
  }

  .kbs-contacts__map {
    flex: 1;
    min-width: 0;
    min-height: 360px;
  }

  .kbs-contacts__map img,
  .kbs-contacts__map iframe,
  .kbs-contacts__map > ymaps,
  .kbs-contacts__map > div {
    min-height: 360px;
  }

  .kbs-application__form {
    padding: 40px;
  }

  .kbs-cf7-grid {
    display: block;
  }

  .kbs-cf7-grid > p {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
  }
}

/* Desktop ≥1200px */
@media (min-width: 1200px) {
  .kbs-page-title {
    font-size: 44px;
    margin-bottom: 64px;
  }

  .kbs-inner-subtitle {
    font-size: 26px;
  }

  .kbs-conference__grid {
    gap: 64px;
  }

  .kbs-conference__logos {
    flex: 0 0 440px;
    max-width: 440px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kbs-news-archive__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kbs-single-post__grid {
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
  }

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

  .kbs-single-post__aside {
    flex: 0 0 460px;
    max-width: 460px;
    gap: 40px;
  }

  .kbs-share {
    padding: 32px;
  }

  .kbs-contacts__card {
    flex: 0 0 400px;
    max-width: 400px;
  }

  .kbs-inner-spacer {
    height: 104px;
  }
}
