:root {
  --bg: #f7fcf9;
  --surface: #ffffff;
  --surface-soft: #effaf4;
  --surface-green: #dff5e9;

  --text: #163d31;
  --muted: #648078;

  --green-dark: #123c31;
  --green: #268b66;
  --green-bright: #5bd39a;

  --border: #d5eee2;
  --shadow: 0 18px 48px rgba(28, 105, 76, 0.1);
}

html[data-theme="dark"] {
  --bg: #0f1915;
  --surface: #192a23;
  --surface-soft: #14231e;
  --surface-green: #203d30;

  --text: #e9f8f0;
  --muted: #a6c3b4;

  --green-dark: #e1faeb;
  --green: #6bdba3;
  --green-bright: #85e8b5;

  --border: #315343;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
}


/* Базовые настройки */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
  transition:
    color 0.25s ease,
    background-color 0.25s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin-right: auto;
  margin-left: auto;
}


/* Шапка сайта */

.topbar {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.topbar-inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 28px;
}

.brand {
  flex: 0 0 auto;
  color: var(--green-dark);
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -1.5px;
}

.brand-mark {
  color: var(--green);
}

.brand-number {
  color: var(--green-dark);
}

.brand-domain {
  color: var(--green);
}

.main-nav {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  gap: 22px;
}

.main-nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-current {
  color: var(--green);
}

.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.max-link {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.theme-button,
.menu-button {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--green-dark);
  background: var(--surface-soft);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}

.theme-button:hover,
.menu-button:hover {
  border-color: var(--green);
  transform: translateY(-1px);
}

.theme-button {
  font-size: 20px;
}

.menu-button {
  display: none;
  flex-direction: column;
  gap: 4px;
}

.menu-button span {
  width: 18px;
  height: 2px;
  background: var(--green-dark);
}


/* Страница статей */

.articles-page {
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
}


/* Верхний баннер */

.hero {
  overflow: hidden;
  background:
    radial-gradient(
      circle at 85% 18%,
      rgba(255, 255, 255, 0.85),
      transparent 30%
    ),
    linear-gradient(
      135deg,
      #f0fff7 0%,
      #d5f5e4 52%,
      #9cdebd 100%
    );
}

html[data-theme="dark"] .hero {
  background:
    radial-gradient(
      circle at 85% 18%,
      rgba(91, 211, 154, 0.18),
      transparent 30%
    ),
    linear-gradient(
      135deg,
      #14271f 0%,
      #1d4936 55%,
      #286147 100%
    );
}

/*
  ВЫСОТА БАННЕРА НА КОМПЬЮТЕРЕ

  Чем меньше min-height, тем компактнее баннер.

  Рекомендуемые значения:

  260px — очень компактно
  290px — текущий вариант
  330px — больше воздуха
*/
.hero-inner {
  position: relative;
  display: flex;

  /*
    Уменьшает пустое пространство
    между шапкой и текстом.
  */
  min-height: 290px;

  /*
    ВАЖНО:
    текст начинается сверху,
    а не выравнивается по центру.
  */
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 650px;

  /*
    Здесь регулируется расстояние
    от шапки до текста.

    24px — близко к шапке
    34px — средний отступ
    45px — больше воздуха
  */
  padding: 24px 0 36px;
}

.breadcrumbs {
  display: flex;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
}

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

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 620px;
  margin: 0 0 16px;
  color: var(--green-dark);
  font-size: clamp(38px, 5vw, 60px);
  line-height: 0.98;
  letter-spacing: -3px;
}

.hero-text {
  max-width: 540px;
  margin: 0;
  color: #37695b;
  font-size: 16px;
  line-height: 1.5;
}

html[data-theme="dark"] .hero-text {
  color: #c0ddcd;
}

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

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 19px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 800;
}

.button-primary {
  color: #ffffff;
  background: var(--green);
}

.button-primary:hover {
  background: #1e7657;
}

.button-secondary {
  border: 1px solid rgba(38, 139, 102, 0.35);
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.42);
}

.button-secondary:hover {
  border-color: var(--green);
  background: rgba(255, 255, 255, 0.7);
}


/* Декоративная часть баннера */

.hero-art {
  position: relative;
  width: 330px;
  height: 260px;
  flex: 0 0 330px;
  margin-top: 12px;
}

.hero-orb {
  position: absolute;
  border: 1px solid rgba(38, 139, 102, 0.2);
  border-radius: 50%;
}

.hero-orb-one {
  top: 4px;
  right: 22px;
  width: 230px;
  height: 230px;
}

.hero-orb-two {
  right: -20px;
  bottom: -20px;
  width: 180px;
  height: 180px;
}

.hero-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 20px;
  color: #ffffff;
  background: rgba(18, 60, 49, 0.88);
  box-shadow: 0 18px 38px rgba(18, 60, 49, 0.2);
  backdrop-filter: blur(8px);
}

.hero-card-main {
  top: 42px;
  left: 28px;
  width: 205px;
  padding: 20px;
}

.hero-card-main span,
.hero-card-small span {
  color: #94edbd;
  font-size: 12px;
  font-weight: 800;
}

.hero-card-main strong {
  margin: 6px 0;
  font-size: 46px;
  line-height: 1;
}

.hero-card small {
  color: #c5e9d5;
  font-size: 11px;
}

.hero-card-small {
  right: 0;
  bottom: 28px;
  width: 130px;
  padding: 15px;
}

.hero-card-small span {
  margin-bottom: 4px;
  font-size: 23px;
}


/* Заголовок раздела */

.articles-section {
  padding-top: 58px;
  padding-bottom: 78px;
}

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

.section-heading h2 {
  margin: 0;
  color: var(--green-dark);
  font-size: 36px;
  letter-spacing: -1.5px;
}

.section-description {
  max-width: 540px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.article-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-filter {
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.article-filter:hover,
.article-filter.is-active {
  border-color: var(--green);
  color: #ffffff;
  background: var(--green);
}

.articles-status {
  min-height: 20px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

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


/* Карточки статей */

.article-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 52px rgba(20, 90, 63, 0.18);
}

html[data-theme="dark"] .article-card:hover {
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.42);
}

.article-card-image-link {
  display: block;
  overflow: hidden;
  aspect-ratio: 1.6;
  background: var(--surface-green);
}

.article-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-card:hover .article-card-image {
  transform: scale(1.04);
}

.article-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px;
  background: var(--surface);
}

.article-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.article-card-category {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.article-card-time,
.article-card-date {
  color: var(--muted);
  font-size: 12px;
}

.article-card-title {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 21px;
  line-height: 1.18;
}

.article-card-title a:hover {
  color: var(--green);
}

.article-card-excerpt {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.article-card-bottom {
  display: flex;
  margin-top: auto;
  padding-top: 16px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
}

.article-card-read {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.article-card-read:hover {
  color: var(--green-bright);
}

.articles-empty {
  grid-column: 1 / -1;
  padding: 42px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--muted);
  background: var(--surface);
  text-align: center;
}


/* Блок ссылок на другие страницы */

.benefits-section {
  padding-bottom: 76px;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.benefit-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.benefit-card:hover {
  transform: translateY(-3px);
  border-color: var(--green);
}

.benefit-icon {
  display: flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #ffffff;
  background: var(--green);
  font-size: 22px;
  font-weight: 900;
}

.benefit-card strong,
.benefit-card small {
  display: block;
}

.benefit-card strong {
  margin-bottom: 4px;
  color: var(--text);
  font-size: 15px;
}

.benefit-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}


/* Подвал */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
}

.footer-inner {
  display: flex;
  min-height: 120px;
  align-items: center;
  gap: 30px;
}

.footer-logo {
  display: block;
  margin-bottom: 7px;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-left: auto;
}

.footer-nav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.footer-nav a:hover {
  color: var(--green);
}

.footer-copy {
  white-space: nowrap;
}


/* Планшеты */

@media (max-width: 900px) {
  .main-nav {
    gap: 12px;
  }

  .main-nav a {
    font-size: 12px;
  }

  .hero-art {
    width: 290px;
    flex-basis: 290px;
    transform: scale(0.88);
    transform-origin: right center;
  }

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

  .footer-inner {
    flex-wrap: wrap;
    padding-top: 25px;
    padding-bottom: 25px;
  }

  .footer-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }
}


/* Телефоны */

@media (max-width: 680px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  .topbar-inner {
    min-height: 64px;
    gap: 10px;
  }

  .brand {
    font-size: 21px;
  }

  .main-nav {
    position: absolute;
    top: 64px;
    right: 14px;
    left: 14px;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 13px;
    font-size: 14px;
  }

  .max-link {
    display: none;
  }

  .menu-button {
    display: inline-flex;
  }

  /*
    Высота баннера на телефоне.

    Уменьшить можно до 350px.
  */
  .hero-inner {
    display: block;
    min-height: 390px;
  }

  /*
    Расстояние от шапки до текста.

    Уменьшить можно до 22px.
  */
  .hero-copy {
    padding: 24px 0 0;
  }

  .breadcrumbs {
    margin-bottom: 15px;
  }

  .hero h1 {
    margin-bottom: 15px;
    font-size: 42px;
    letter-spacing: -2px;
  }

  .hero-text {
    font-size: 15px;
  }

  .hero-links {
    margin-top: 18px;
  }

  .hero-art {
    width: 100%;
    height: 135px;
    margin-top: 0;
    transform: scale(0.58);
    transform-origin: center top;
  }

  .section-heading {
    display: block;
  }

  .section-heading h2 {
    font-size: 30px;
  }

  .article-filters {
    margin-top: 22px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .article-filter {
    flex: 0 0 auto;
  }

  .articles-section {
    padding-top: 52px;
    padding-bottom: 64px;
  }

  .articles-grid,
  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .benefits-section {
    padding-bottom: 60px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 26px;
    padding-bottom: 26px;
    gap: 20px;
  }

  .footer-nav {
    width: 100%;
    margin-left: 0;
  }

  .footer-copy {
    width: 100%;
  }
}


/* Маленькие телефоны */

@media (max-width: 400px) {
  /*
    Здесь тоже можно уменьшить высоту баннера.
  */
  .hero-inner {
    min-height: 350px;
  }

  .hero-copy {
    padding-top: 20px;
  }

  .hero h1 {
    font-size: 37px;
  }

  .hero-text {
    font-size: 14px;
  }

  .hero-art {
    height: 110px;
    transform: scale(0.5);
  }
}