:root {
  --bg: #f4f5ef;
  --paper: #ffffff;
  --ink: #20251d;
  --muted: #69715f;
  --line: #dde2d4;
  --olive: #667543;
  --olive-dark: #2f3e22;
  --orange: #e28b2d;
  --orange-soft: #fff1df;
  --green-soft: #eef4e8;
  --shadow: 0 24px 70px rgba(38, 48, 28, 0.12);
  --r: 8px;
  --page: min(1240px, calc(100% - 40px));
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f7f8f4 0%, #eef1ea 100%);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.45;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
img { display: block; max-width: 100%; }

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  width: var(--page);
  min-height: 76px;
  margin: 28px auto 0;
  padding: 0 26px;
  border: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: var(--r) var(--r) 0 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 268px;
}

.brand__logo {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #fff;
  background: var(--orange);
  border-radius: var(--r);
  font-weight: 900;
}

.brand__text strong,
.brand__text small {
  display: block;
}

.brand__text strong {
  font-size: 15px;
  letter-spacing: 0;
}

.brand__text small {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  color: #3f4638;
  font-size: 14px;
  font-weight: 700;
}

.nav a:hover,
.contact-links a:hover,
.docs__list a:hover {
  color: var(--olive);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.phone {
  color: var(--olive-dark);
  font-weight: 900;
  white-space: nowrap;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r);
  padding: 0 20px;
  border: 1px solid transparent;
  font-weight: 900;
}

.button--dark {
  color: #fff;
  background: var(--olive-dark);
  box-shadow: 0 14px 34px rgba(47, 62, 34, 0.22);
}

.header__actions .button--dark {
  background: var(--orange);
  box-shadow: 0 14px 34px rgba(226, 139, 45, 0.22);
}

.button--light {
  color: var(--olive-dark);
  background: var(--orange-soft);
  border-color: #ffd7a8;
}

.menu {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.menu span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

main {
  width: var(--page);
  margin: 0 auto;
  overflow: hidden;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  display: block;
  min-height: 425px;
}

.hero__left,
.program-picker,
.catalog,
.docs,
.about,
.contacts {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.94);
}

.hero__left {
  min-height: 425px;
  padding: 54px 500px 44px 40px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.84) 42%, rgba(255, 255, 255, 0.12) 100%),
    url("assets/hero-training-ground.png") center right / cover no-repeat,
    #fff;
  box-shadow: none;
}

.hero__label,
.kicker {
  display: block;
  margin-bottom: 12px;
  color: var(--olive);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 500px;
  margin-bottom: 22px;
  font-size: 45px;
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}

.hero__left p {
  max-width: 470px;
  color: var(--muted);
  font-size: 16px;
}

.hero__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 34px;
}

.hero__contacts {
  display: grid;
  max-width: 520px;
  grid-template-columns: 1.35fr 1fr;
  gap: 32px;
}

.hero__contacts a {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-weight: 800;
}

.hero__contacts span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.program-picker {
  position: absolute;
  top: 26px;
  right: 34px;
  z-index: 2;
  display: flex;
  width: 410px;
  min-height: auto;
  flex-direction: column;
  padding: 20px;
  box-shadow: 0 18px 46px rgba(37, 43, 32, 0.16);
}

.program-picker__top {
  margin-bottom: 14px;
}

.program-picker__top strong {
  font-size: 18px;
}

.picker-list {
  display: grid;
  gap: 10px;
}

.picker-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 54px;
  padding: 9px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fbfcf8;
}

.picker-list a:hover {
  border-color: #bfc9ad;
  background: var(--green-soft);
}

.picker-list span {
  display: flex;
  align-items: center;
  gap: 13px;
  font-weight: 900;
}

.picker-list em {
  display: grid;
  font-style: normal;
}

.picker-list small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.picker-list strong {
  color: var(--orange);
  white-space: nowrap;
}

.catalog {
  min-width: 0;
  padding: 24px;
  border: 0;
  box-shadow: none;
}

.catalog__head {
  display: block;
  margin-bottom: 12px;
}

.catalog__head h2 {
  margin-bottom: 12px;
  font-size: 23px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.tab {
  min-height: 45px;
  flex: 1 1 130px;
  padding: 0 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.tab.is-active {
  color: #fff;
  border-color: var(--olive-dark);
  background: var(--olive-dark);
}

.tab:first-child {
  border-radius: var(--r) 0 0 var(--r);
}

.tab:last-child {
  border-radius: 0 var(--r) var(--r) 0;
}

.price-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
}

.price-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.05fr) minmax(280px, 1.65fr) 170px 130px;
  gap: 18px;
  align-items: center;
  min-height: 54px;
  padding: 0 14px;
  border-top: 1px solid var(--line);
  color: #343c30;
  font-size: 14px;
}

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

.price-row--head {
  min-height: 44px;
  color: #7b8374;
  background: #fafbf7;
  font-size: 12px;
}

.price-row.is-hidden {
  display: none;
}

.price-row--group {
  min-height: 42px;
  color: var(--olive-dark);
  background: var(--green-soft);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.catalog-group {
  border-top: 1px solid var(--line);
}

.catalog-group:first-of-type {
  border-top: 0;
}

.catalog-toggle {
  display: flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  border: 0;
  background: var(--green-soft);
  color: var(--olive-dark);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
}

.catalog-toggle__meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #6f7d61;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.catalog-toggle__icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--olive-dark);
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(47, 62, 34, 0.1);
}

.catalog-group.is-open .catalog-toggle__icon {
  transform: rotate(45deg);
}

.catalog-group__body {
  display: none;
}

.catalog-group.is-open .catalog-group__body {
  display: block;
}

.catalog-group__body .price-row:first-child {
  border-top: 0;
}

.program-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.line-icon {
  display: block;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  object-fit: cover;
  border: 1px solid #dfe6d8;
  border-radius: 10px;
  background: #f7f8f4;
  box-shadow: 0 6px 14px rgba(47, 62, 34, 0.08);
}

.price-row p {
  margin: 0;
}

.price-row b {
  color: var(--olive-dark);
  font-size: 17px;
  white-space: nowrap;
}

.catalog-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid #dfe7d8;
  border-radius: var(--r);
  background: var(--green-soft);
}

.catalog-source strong,
.catalog-source span {
  display: block;
}

.catalog-source span {
  color: var(--muted);
  font-size: 14px;
}

.catalog-source a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0 16px;
  color: #fff;
  border-radius: 7px;
  background: var(--olive-dark);
  font-weight: 900;
}

.content-grid {
  display: block;
  padding: 26px 28px;
}

.info-grid {
  display: block;
  margin-top: 0;
  padding: 0 28px 24px;
}

.docs,
.about,
.contacts {
  padding: 28px;
}

.docs {
  display: block;
  padding: 24px;
  margin-top: 22px;
  box-shadow: none;
  align-items: start;
}

.docs__title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.docs h2,
.about h2,
.contacts h2 {
  font-size: 22px;
}

.docs h2 {
  margin-bottom: 0;
}

.docs__groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.docs details {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fbfcf8;
}

.docs summary {
  padding: 14px;
  color: var(--olive-dark);
  cursor: pointer;
  font-weight: 900;
}

.docs__list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.docs__list a {
  min-height: 53px;
  padding: 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font-weight: 800;
}

.docs__list a:last-child {
  border-bottom: 0;
}

.docs__text {
  padding: 0 14px 14px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.docs__text p {
  margin: 14px 0 0;
}

.about p,
.contacts p {
  color: var(--muted);
}

.worktime {
  color: var(--olive-dark);
  font-weight: 800;
}

.about {
  display: block;
}

.about__head {
  max-width: 760px;
  margin-bottom: 18px;
}

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

.about__text p {
  margin-bottom: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.stats div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fbfcf8;
}

.stats strong,
.stats span {
  display: block;
}

.stats strong {
  color: var(--olive-dark);
  font-size: 24px;
}

.stats span {
  color: var(--muted);
  font-size: 13px;
}

.contacts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  margin: 0 28px 24px;
}

.reviews-section,
.gallery-section,
.seo-section {
  margin: 0 28px 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.94);
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-title h2 {
  margin-bottom: 0;
  font-size: 32px;
}

.section-title a {
  color: var(--olive);
  font-weight: 900;
}

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

.seo-grid article {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fbfcf8;
}

.seo-grid h3 {
  margin: 0 0 8px;
  color: var(--olive-dark);
  font-size: 18px;
}

.seo-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.review-card {
  min-height: 205px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fbfcf8;
}

.review-card div {
  display: grid;
  gap: 2px;
}

.review-card b,
.review-card strong,
.review-card span {
  display: block;
}

.review-card span {
  color: var(--muted);
  font-size: 13px;
}

.review-card strong {
  width: fit-content;
  margin: 12px 0;
  padding: 4px 9px;
  color: var(--olive-dark);
  border-radius: 999px;
  background: var(--green-soft);
}

.review-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 12px;
}

.photo-grid img {
  width: 100%;
  height: 235px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.photo-grid .photo-wide {
  grid-column: span 2;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.contact-links a {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fbfcf8;
  font-weight: 900;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: var(--page);
  margin: 0 auto;
  padding: 24px 28px;
  color: #fff;
  border-radius: 0 0 var(--r) var(--r);
  background: var(--olive-dark);
}

.footer strong {
  color: #fff;
}

.mobile-bar {
  display: none;
}

@media (max-width: 1120px) {
  .phone,
  .nav {
    display: none;
  }

  .menu {
    display: block;
  }

  .nav.is-open {
    position: absolute;
    top: 76px;
    right: 0;
    left: 0;
    display: grid;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: #fff;
    box-shadow: var(--shadow);
  }
}

@media (max-width: 980px) {
  .hero,
  .contacts {
    grid-template-columns: 1fr;
  }

  main {
    overflow: visible;
  }

  .content-grid {
    padding: 18px;
  }

  .program-picker {
    position: static;
    width: auto;
    margin: -12px 18px 18px;
  }

  .hero__left {
    min-height: auto;
    padding: 34px 28px 120px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.84)),
      url("assets/hero-training-ground.png") right bottom / 68% auto no-repeat,
      #fff;
  }

  .program-picker {
    min-height: auto;
  }

  .about__text {
    grid-template-columns: 1fr;
  }

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

  .price-table {
    overflow-x: auto;
  }

  .price-row {
    min-width: 740px;
  }

}

@media (max-width: 680px) {
  :root {
    --page: min(100% - 24px, 1240px);
  }

  body {
    padding-bottom: 74px;
  }

  .header {
    min-height: 66px;
  }

  .brand {
    min-width: 0;
  }

  .brand__logo {
    width: 42px;
    height: 42px;
  }

  .brand__text strong {
    font-size: 13px;
  }

  .brand__text small,
  .header__actions .button {
    display: none;
  }

  .nav.is-open {
    top: 66px;
  }

  .hero {
    padding-top: 14px;
  }

  .hero__left,
  .program-picker,
  .catalog,
  .docs,
  .about,
  .contacts {
    padding: 20px;
  }

  .content-grid,
  .info-grid {
    padding-right: 12px;
    padding-left: 12px;
  }

  .contacts {
    margin-right: 12px;
    margin-left: 12px;
  }

  .reviews-section,
  .gallery-section,
  .seo-section {
    margin-right: 12px;
    margin-left: 12px;
    padding: 20px;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 30px;
  }

  .hero__left p {
    font-size: 16px;
  }

  .hero__buttons,
  .hero__contacts,
  .stats {
    grid-template-columns: 1fr;
  }

  .hero__buttons .button {
    width: 100%;
  }

  .price-row {
    grid-template-columns: 1fr auto;
    min-width: 0;
    min-height: auto;
    gap: 8px 12px;
    padding: 14px;
  }

  .price-row--head {
    display: none;
  }

  .price-row p,
  .price-row > span {
    grid-column: 1 / -1;
  }

  .catalog-source {
    align-items: stretch;
    flex-direction: column;
  }

  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .tab {
    white-space: nowrap;
  }

  .docs__list {
    grid-template-columns: 1fr;
  }

  .docs,
  .docs__groups {
    grid-template-columns: 1fr;
  }

  .docs__title {
    align-items: start;
    flex-direction: column;
  }

  .section-title {
    align-items: start;
    flex-direction: column;
  }

  .reviews-grid,
  .photo-grid,
  .seo-grid {
    grid-template-columns: 1fr;
  }

  .photo-grid .photo-wide {
    grid-column: auto;
  }

  .photo-grid img {
    height: 220px;
  }

  .footer {
    display: grid;
    padding-bottom: 28px;
  }

  .mobile-bar {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
  }

  .mobile-bar a {
    display: grid;
    min-height: 46px;
    place-items: center;
    border-radius: var(--r);
    font-weight: 900;
  }

  .mobile-bar a:first-child {
    color: var(--olive-dark);
    background: var(--green-soft);
  }

  .mobile-bar a:last-child {
    color: #fff;
    background: var(--olive-dark);
  }
}
