/* Бет секциялары */

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  box-shadow: 0 1px 0 var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

/* Логотип */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo__icon {
  width: 54px;
  height: 51px;
}

.logo__tagline {
  font-size: 10.5px;
  line-height: 1.2;
  color: var(--text-muted);
}

/* Навигация */
.main-nav {
  margin-inline: auto;
}

.main-nav__list {
  display: flex;
  align-items: center;
  gap: 22px;
}

.main-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--header-h);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color var(--transition);
}

.main-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  height: 2px;
  border-radius: 2px;
  background: var(--green-600);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.main-nav__link:hover,
.main-nav__link.is-active {
  color: var(--green-600);
}

.main-nav__link.is-active {
  font-weight: 600;
}

.main-nav__link:hover::after,
.main-nav__link.is-active::after {
  transform: scaleX(1);
}

/* Оң жақ: іздеу, тіл, батырма */
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.lang-switch {
  display: flex;
  align-items: center;
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--text);
}

.lang-switch__item {
  padding-inline: 10px;
  transition: color var(--transition);
}

.lang-switch__item + .lang-switch__item {
  border-left: 1px solid var(--border);
}

.lang-switch__item:first-child {
  padding-left: 0;
}

.lang-switch__item:last-child {
  padding-right: 0;
}

.lang-switch__item:hover {
  color: var(--green-600);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: #f6fbf7;
}

/* Фото оң жақта, сол жағы mask арқылы ақ фонға сіңеді */
.hero__bg {
  position: absolute;
  top: 0;
  right: 0;
  width: 74%;
  height: 100%;
  object-fit: cover;
  object-position: center 70%;
  -webkit-mask-image: linear-gradient(to right, transparent 16%, #000 62%);
  mask-image: linear-gradient(to right, transparent 16%, #000 62%);
}

.hero__inner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 440px;
  padding-block: 56px;
}

.hero__content {
  max-width: 600px;
}

.hero__title {
  margin-top: 18px;
  font-size: clamp(30px, 3.4vw, var(--fs-h1));
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.hero__text {
  max-width: 500px;
  margin-top: 20px;
  font-size: 16px;
  font-weight: 500;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 30px;
}

/* Мобильде батырмалардың астында көрінетін статистика (иконка + сан + жазу, ақ фонсыз, 2 бағанмен) */
.hero__stats {
  display: none;
}

.hero__stat {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero__stat-icon {
  width: 40px;
  height: 40px;
  color: var(--green-500);
  flex-shrink: 0;
}

.hero__stat-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

.hero__stat-label {
  margin-top: 2px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* ===== Статистика ===== */
.stats {
  padding-top: 12px;
}

.stats__panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-block: 20px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.stats__panel .stat {
  padding: 6px 16px 6px 44px;
}

.stats__panel .stat + .stat {
  border-left: 1px solid var(--border);
}

/* ===== Біз неге ерекшеміз ===== */
.why {
  background: var(--green-50);
}

.why__layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 2.7fr;
  gap: 32px;
  align-items: center;
}

.why__text {
  margin-top: 14px;
  color: var(--text-muted);
}

/* ===== Мектеп ішіндегі мүмкіндіктер ===== */
.infra__cards {
  margin-top: 20px;
}

/* ===== Асхана ===== */

.canteen__panel {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: stretch;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.canteen__img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.canteen__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 48px 56px;
  background: linear-gradient(160deg, var(--green-800), var(--green-900));
  color: rgba(255, 255, 255, 0.85);
}

.canteen__icon {
  margin-bottom: 16px;
}

.canteen__content .eyebrow {
  color: var(--yellow-500);
}

.canteen__content .section-title {
  margin-top: 10px;
  color: #fff;
}

.canteen__text {
  margin-top: 14px;
  max-width: 380px;
  line-height: 1.7;
}

.canteen__content .btn {
  margin-top: 28px;
}

/* ===== Білім беру процесі ===== */
.process {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--section-gap) / 2);
  padding-bottom: 0;
  background: linear-gradient(90deg, #f8fbf8 0%, #f3f9f1 60%, #eaf5e4 100%);
}

.process__layout {
  position: relative;
  display: grid;
  grid-template-columns: 1.75fr 1fr;
  gap: 16px;
}

.process__main {
  padding-bottom: 28px;
}

.process__cards {
  margin-top: 20px;
  gap: 16px;
}

/* Оң жақ: оқушылар + жапырақтар + жазу (экранның оң шетіне дейін созылады) */
.process__visual {
  position: relative;
  min-height: 320px;
  margin-right: calc(min(0px, (var(--container) + var(--gutter) * 2 - 100vw) / 2) - var(--gutter));
}

/* Суреттің астыңғы қатаң жиегін жұмсартып, келесі блокпен байланыстыратын жасыл-сары жарқыл */
.process__visual::before {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -46px;
  height: 90px;
  background: radial-gradient(ellipse at center, var(--yellow-500) 0%, var(--green-400) 55%, transparent 78%);
  filter: blur(26px);
  opacity: 0.5;
  pointer-events: none;
}

.process__students {
  position: absolute;
  left: 0;
  bottom: 0;
  width: auto;
  max-width: none;
  height: 94%;
}

.process__slogan {
  position: absolute;
  top: 16px;
  right: 20px;
  transform: rotate(-9deg);
}

.process__sun {
  position: absolute;
  width: 30px;
  height: 30px;
  color: var(--yellow-500);
  fill: currentColor;
}

.process__sun--2 {
  right: 36px;
  bottom: 110px;
}

/* Толық тізім беті (documents.html / charter.html): жолда 2 құжаттан */
.documents-page__list {
  grid-template-columns: repeat(2, 1fr);
}

/* Бір жолдағы карточкалар биіктігі тең болып, мазмұны әртүрлі болса да
   қатар тегіс көрінуі үшін */
.documents-page__list > li {
  display: flex;
  min-width: 0;
}

.documents-page__list .document-card,
.documents-page__list .doc-row {
  flex: 1;
  width: 100%;
  min-width: 0;
}

/* ===== Құжаттар: Оқу және тәрбие + Мектеп жарғысы (бір қатарда, екі панель) ===== */
.doc-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.doc-panel {
  min-width: 0;
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.doc-panel .panel__head {
  margin-bottom: 0;
}

.doc-panel__title {
  margin-top: 6px;
  margin-bottom: 16px;
  font-size: var(--fs-lg);
  font-weight: 700;
}

.doc-rows {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.doc-rows > li {
  min-width: 0;
}

.doc-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  transition: border-color var(--transition), background-color var(--transition), transform var(--transition);
}

.doc-row:hover {
  border-color: var(--green-200);
  background: #fff;
  box-shadow: var(--shadow-card);
  transform: translateX(2px);
}

.doc-row__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.doc-row__icon .icon {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: none;
}

.doc-row__title {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-row__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--green-50);
  color: var(--green-800);
  font-size: 12.5px;
  font-weight: 700;
  transition: background-color var(--transition), color var(--transition);
}

.doc-row:hover .doc-row__action {
  background: var(--green-600);
  color: #fff;
}

.doc-row__action .icon {
  width: 14px;
  height: 14px;
}

/* ===== Мектеп әкімшілігі ===== */
.admin__cards {
  margin-top: 20px;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

/* ===== Жаңалықтар ===== */
.news__cards {
  margin-top: 20px;
  gap: 16px;
}

/* ===== Фотоальбом (толық енді фон-слайдер) ===== */
.gallery {
  background: var(--green-50);
}

.gallery__grid {
  display: flex;
  margin-top: 20px;
  padding-bottom: 6px;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-inline: max(var(--gutter), calc((100vw - var(--container) - var(--gutter) * 2) / 2 + var(--gutter)));
  scroll-padding-left: max(var(--gutter), calc((100vw - var(--container) - var(--gutter) * 2) / 2 + var(--gutter)));
}

.gallery__grid::-webkit-scrollbar {
  display: none;
}

.gallery__grid > li {
  flex: 0 0 min(760px, 78%);
  scroll-snap-align: start;
}

.gallery-tile {
  height: 420px;
}

/* Фотоальбом беті (gallery.html): слайдер емес, кәдімгі тор */
.gallery-page__grid .gallery-tile {
  height: auto;
  aspect-ratio: 4 / 3;
}

/* ===== FAQ + Байланыс ===== */
.info__layout {
  display: grid;
  grid-template-columns: 1.05fr 1.65fr;
  gap: 20px;
  align-items: start;
}

.contacts__body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
}

.contacts__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

/* ===== Footer ===== */
.site-footer {
  position: relative;
  margin-top: calc(var(--section-gap) / 2);
  background: var(--green-900);
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--fs-sm);
}

.site-footer__top {
  display: grid;
  grid-template-columns: 1.9fr 1fr 1fr 1fr 1.3fr;
  gap: 32px;
  padding-block: 40px 32px;
}

.site-footer .logo {
  margin-bottom: 26px;
}

.logo--light .logo__tagline {
  color: rgba(255, 255, 255, 0.7);
}

.footer-nav__title {
  margin-bottom: 12px;
  font-size: var(--fs-md);
  font-weight: 700;
  color: #fff;
}

.footer-nav__list {
  display: grid;
  gap: 8px;
}

.footer-nav__list a,
.site-footer__legal a {
  transition: color var(--transition);
}

.footer-nav__list a:hover,
.site-footer__legal a:hover {
  color: var(--yellow-500);
}

.site-footer__slogan {
  justify-self: end;
  align-self: start;
  color: #fff;
  font-size: 30px;
  font-weight: 600;
  transform: rotate(-8deg);
}

.site-footer__underline {
  width: 120px;
  height: 22px;
  margin: 2px 0 0 28px;
  fill: none;
  stroke: var(--yellow-500);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: var(--fs-xs);
}

.site-footer__attestation {
  color: inherit;
  opacity: .7;
  font-size: 13px;
  text-decoration: none;
}

.site-footer__attestation:hover {
  opacity: 1;
}

.site-footer__legal {
  display: flex;
  gap: 16px;
}

.site-footer__legal a + a {
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
}

/* Контейнердің оң жағындағы бос орында тұрады */
.site-footer .to-top {
  position: absolute;
  right: max(12px, calc((100vw - var(--container)) / 2 - 68px));
  bottom: 64px;
}

/* Мобильді мәзір (checkbox арқылы, JS-сіз) */
.nav-toggle,
.burger {
  display: none;
}

@media (max-width: 1339px) {
  .site-header__inner {
    gap: 16px;
  }

  .nav-toggle {
    display: block;
  }

  .burger {
    order: 3;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: var(--text);
    cursor: pointer;
  }

  .burger svg {
    width: 26px;
    height: 26px;
  }

  .burger__close,
  .nav-toggle:checked ~ .burger .burger__open {
    display: none;
  }

  .nav-toggle:checked ~ .burger .burger__close {
    display: block;
  }

  .nav-toggle:focus-visible ~ .burger {
    outline: 2px solid var(--green-600);
    outline-offset: 3px;
    border-radius: 4px;
  }

  .header-actions {
    margin-left: auto;
  }

  /* display үнемі block: анимация display емес, max-height/opacity/transform арқылы жүреді */
  .main-nav {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0 var(--gutter);
    max-height: 0;
    overflow: hidden;
    background: var(--bg);
    border-top: 0 solid var(--border);
    box-shadow: var(--shadow-card);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: max-height 0.32s ease, opacity 0.22s ease, transform 0.22s ease,
      padding-block 0.32s ease, border-top-width 0.32s ease;
  }

  .nav-toggle:checked ~ .main-nav {
    max-height: 420px;
    padding-block: 8px 16px;
    border-top-width: 1px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .main-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .main-nav__link {
    height: 46px;
    font-size: var(--fs-base);
  }

  .main-nav__link::after {
    display: none;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
    --header-h: 64px;
    --fs-h2: 22px;
  }

  .logo__icon {
    width: 44px;
    height: 41px;
  }

  .logo__tagline,
  .header-actions .btn {
    display: none;
  }

  .header-actions {
    gap: 12px;
  }
}

/* Hero адаптив */
@media (max-width: 900px) {
  .hero__bg {
    width: 100%;
    opacity: 0.22;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .hero__inner {
    min-height: 380px;
    padding-block: 48px 84px;
  }
}

@media (max-width: 760px) {
  .hero__inner {
    min-height: 480px;
    padding-block: 44px 48px;
  }

  .hero__stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 16px;
    margin-top: 28px;
  }
}

/* Тар экранда екі батырма бір қатарға сыятындай ықшамдалады */
@media (max-width: 600px) {
  .hero__actions {
    flex-wrap: nowrap;
    gap: 10px;
  }

  .hero__actions .btn {
    flex: 1;
    min-width: 0;
    padding-inline: 12px;
    gap: 6px;
    font-size: 12.5px;
  }

  .hero__actions .btn .icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
  }
}

/* Статистика және «Біз неге ерекшеміз» адаптив */
@media (max-width: 1100px) {
  .why__layout {
    grid-template-columns: 1fr;
  }

  .stats__panel .stat {
    padding-left: 24px;
  }
}

@media (max-width: 900px) {
  .stats__panel {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 20px;
  }

  .stats__panel .stat:nth-child(odd) {
    border-left: 0;
  }

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

/* Статистика толығымен hero-ге көшкендіктен, мобильде бұл блок жасырылады */
@media (max-width: 760px) {
  .stats {
    display: none;
  }
}

@media (max-width: 520px) {
  .why__cards {
    grid-template-columns: 1fr;
  }
}

/* Инфрақұрылым адаптив */
@media (max-width: 760px) {
  .infra__cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .media-card__caption {
    padding: 12px;
    gap: 8px;
  }
}

/* Толық тізім беттері (documents.html / charter.html) адаптив */
@media (max-width: 700px) {
  .documents-page__list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .document-card {
    padding: 14px 16px;
  }

  .document-card__icon {
    width: 44px;
    height: 44px;
  }

  .document-card__action {
    width: 38px;
    height: 38px;
  }
}

/* Құжаттар панельдері (Оқу және тәрбие + Мектеп жарғысы) адаптив:
   тар экранда бір қатарға сыймайды, сондықтан астыға қарай қатарланады */
@media (max-width: 900px) {
  .doc-panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .doc-row {
    padding: 10px 12px;
    gap: 10px;
  }

  .doc-row__icon {
    width: 36px;
    height: 36px;
  }

  .doc-row__action {
    padding: 7px 10px;
  }
}

/* Асхана адаптив */
@media (max-width: 760px) {
  .canteen__panel {
    grid-template-columns: 1fr;
  }

  .canteen__img {
    min-height: 220px;
  }

  .canteen__content {
    padding: 32px 24px;
  }

  .canteen__text {
    max-width: none;
  }
}

/* Білім беру процесі адаптив */
@media (max-width: 1100px) {
  .process__layout {
    grid-template-columns: 1fr;
  }

  .process__main {
    padding-bottom: 0;
  }

  .process__visual {
    min-height: 320px;
    margin-right: 0;
  }

  .process__students {
    left: -90px;
    height: 100%;
  }

  .process__slogan {
    right: 8px;
  }
}

@media (max-width: 900px) {
  .process__cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .process__cards {
    grid-template-columns: 1fr;
  }

  .process__visual {
    min-height: 280px;
  }

  .script-text {
    font-size: 28px;
  }
}

@media (max-width: 360px) {
  .process__students {
    left: -115px;
  }
}

/* Мектеп әкімшілігі адаптив */
@media (max-width: 900px) {
  .admin__cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .admin__cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* Мобильде тек басты беттегі әкімшілік блогы (staff.html-дегі толық тізімге тимейді):
   көрсеткі батырмасыз, саусақпен солға/оңға жылжытылатын слайдер */
@media (max-width: 760px) {
  .admin .admin__cards {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 14px;
    padding-bottom: 4px;
  }

  .admin .admin__cards::-webkit-scrollbar {
    display: none;
  }

  .admin .admin__cards > li {
    flex: 0 0 44%;
    scroll-snap-align: start;
  }
}

@media (max-width: 480px) {
  .admin .admin__cards > li {
    flex: 0 0 60%;
  }
}

/* Жаңалықтар + Фотоальбом адаптив */
@media (max-width: 1100px) {
  .gallery-tile {
    height: 260px;
  }
}

@media (max-width: 900px) {
  .gallery-page__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .news__cards {
    grid-template-columns: 1fr;
  }

  .gallery-tile {
    height: 220px;
  }
}

@media (max-width: 480px) {
  .gallery-page__grid {
    grid-template-columns: 1fr;
  }
}

/* FAQ + Байланыс адаптив */
@media (max-width: 1100px) {
  .info__layout {
    grid-template-columns: 1fr 1fr;
  }

  .info__layout > :last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .info__layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .contacts__body {
    grid-template-columns: 1fr;
  }
}

/* Footer адаптив */
@media (max-width: 1500px) {
  /* Контейнер сыртында орын жоқ: батырма төменгі жолға түседі */
  .site-footer .to-top {
    right: var(--gutter);
    bottom: 18px;
  }

  .site-footer__bottom {
    padding-right: 64px;
  }
}

@media (max-width: 1100px) {
  .site-footer__top {
    grid-template-columns: repeat(3, 1fr);
  }

  .site-footer__brand {
    grid-column: 1 / 3;
  }

  .site-footer__slogan {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 600px) {
  .site-footer__top {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 20px;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }

  .site-footer__slogan {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-self: start;
  }

  .site-footer .logo__tagline {
    display: block;
  }
}

/* Десктоп: блоктар арасын және тайтлдан кейінгі бос орынды арттыру (моб. нұсқаға тимейді) */
@media (min-width: 1340px) {
  :root {
    --section-gap: 140px;
  }

  .why__text {
    margin-top: 22px;
  }

  .infra__cards {
    margin-top: 36px;
  }

  .canteen__text {
    margin-top: 20px;
  }

  .process__cards {
    margin-top: 36px;
  }

  .admin__cards {
    margin-top: 36px;
  }

  .news__cards,
  .gallery__grid {
    margin-top: 32px;
  }

  .panel__head {
    margin-bottom: 24px;
  }

  /* Hero биігірек, статистика панелі hero мен келесі блоктың ортасында қалқиды */
  .hero__inner {
    min-height: 560px;
  }

  .stats {
    position: relative;
    z-index: 5;
    padding-top: 0;
    margin-top: -54px;
  }

  .stats__panel {
    box-shadow: var(--shadow-card);
  }
}

/* ===== Article page (news detail) ===== */
.article { max-width: 860px; margin: 0 auto; }
.article__cover { width: 100%; height: auto; border-radius: 20px; margin-bottom: 32px; object-fit: cover; }
.article__body { font-size: var(--fs-md, 1.05rem); line-height: 1.7; }
.article__body p, .article__body ul, .article__body ol { margin: 0 0 1em; }
.article__body h2, .article__body h3 { margin: 1.4em 0 .6em; line-height: 1.25; }
.article__body ul, .article__body ol { padding-left: 1.4em; }
.article__body a { color: var(--c-green, #2e7d32); text-decoration: underline; }

/* ===== Страницы ошибок (404/403/500…): по центру, крупный код рукописным шрифтом, кнопки «На главную»/«Назад» ===== */
.error-page {
  background: linear-gradient(180deg, var(--green-50) 0%, var(--bg) 100%);
}

.error-page__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100vh - var(--header-h) - 320px);
  padding-block: 40px;
  text-align: center;
}

.error-page__code {
  margin-top: 8px;
  font-size: clamp(120px, 18vw, 200px);
  line-height: 1;
  color: var(--green-200);
  letter-spacing: -0.04em;
}

.error-page__title {
  margin-top: -18px;
  font-size: clamp(26px, 3.4vw, var(--fs-h1));
  line-height: 1.15;
}

.error-page__text {
  max-width: 520px;
  margin-top: 16px;
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--text-muted);
}

.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

@media (max-width: 640px) {
  .error-page__inner {
    min-height: auto;
    padding-block: 24px;
  }

  .error-page__title {
    margin-top: -10px;
  }

  .error-page__actions .btn {
    width: 100%;
  }
}
