@charset "UTF-8";
/* ==========================================================================
   media.css — адаптив: 1280 / 1024 / 768 / 480 / 375
   Подключать последним.
   ========================================================================== */

/* ==========================================================================
   <= 1280px — контейнер прижимается к краям
   ========================================================================== */
@media (max-width: 1280px) {
  :root { --grid-gap: 30px; }

  /* Навигация каталога: сжимаем зазоры и не даём ей вылезать за контейнер.
     Без min-width: 0 флекс-элемент не сжимается ниже своего контента и на
     1100-1279px строка меню уезжала за правый край (появлялся гориз. скролл). */
  .nav { gap: 24px; min-width: 0; }
  .nav__link { font-size: var(--fs-xs); }
  .header__bottom { overflow: hidden; }
  .header__contacts { gap: 20px; }

  .footer__top { grid-template-columns: 380px 260px 180px 1fr; gap: 0 12px; }
  .footer__col--bordered { padding-left: 20px; }
  .footer__contacts { margin-left: 0; }
  .footer__mail { margin-bottom: 0; margin-left: 0; }
  .footer__buttons { flex-wrap: wrap; width: auto; }


  .product { grid-template-columns: 460px 1fr; }
}

/* ==========================================================================
   <= 1199px — карточка «Инженерный расчёт»: фиксированные позиции донора
   (фото 577px, подпись 929px) больше не влезают → переводим в поток
   ========================================================================== */
@media (max-width: 1199px) {
  .lead__card { display: flex; align-items: flex-end; gap: 20px; padding: 44px 44px 0; }
  .lead__body { flex: 1 1 auto; padding-bottom: 32px; }
  .lead__expert-photo { position: static; flex: 0 0 auto; width: 240px; }
  .lead__expert-info { position: static; flex: 0 0 auto; padding-bottom: 40px; }
  .lead__note { margin-left: 44px; }
}

/* ==========================================================================
   <= 1024px — планшет-лендскейп
   ========================================================================== */
@media (max-width: 1024px) {
  :root {
    --fs-h1: 40px;
    --fs-h2: 28px;
    --fs-h3: 22px;
    --grid-gap: 24px;
    --header-h: 112px;
  }

  .section { padding: 48px 0; }
  .page-head__title { font-size: 34px; }

  /* Шапка: телефон/почта прячем частично */
  .header__mail { display: none; }
  .nav { gap: 20px; }
  .nav__link { font-size: var(--fs-xs); }

  /* Первый экран (донор, брейкпоинт 960: заголовок сверху +106, отступ слева 10) */
  .hero__inner { min-height: 540px; padding: 106px 40px 40px; }
  .hero__title { width: 452px; font-size: var(--fs-h1); margin-bottom: 34px; }
  .hero__list { width: 427px; margin-bottom: 32px; }

  /* Блоки */
  .features__grid { grid-template-columns: repeat(2, 1fr); gap: 34px var(--grid-gap); }
  .cat-cards { gap: 36px var(--grid-gap); }
  .projects__grid { grid-template-columns: repeat(3, 1fr); }
  .brands__grid { grid-template-columns: repeat(3, 1fr); }
  .brands__item { min-height: 150px; }

  .promo { grid-template-columns: 1fr; min-height: 0; padding: 34px 36px; }
  .promo__media { max-height: 280px; }

  .lead__card { padding: 40px 36px 32px; }
  .lead__expert-photo,
  .lead__expert-info { display: none; }
  .lead__form { max-width: 420px; }
  .lead__note { margin-left: 36px; }

  /* Товар */
  .product { grid-template-columns: 1fr; }
  .gallery__main { max-width: 620px; }
  .product-grid,
  .product-grid--4,
  .catalog-tiles { grid-template-columns: repeat(2, 1fr); }

  .contacts-grid { grid-template-columns: 1fr; }

  .footer__top { grid-template-columns: 1fr 1fr; gap: 34px 30px; }
  .footer__col--bordered { padding-left: 0; }
  .footer__col--bordered::before { display: none; }
  .footer__contacts { align-items: flex-start; }
}

/* ==========================================================================
   <= 768px — планшет-портрет / бургер-меню
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --fs-h1: 30px;
    --fs-h2: 24px;
    --fs-h3: 20px;
    --fs-lead: 18px;
    --gutter: 16px;
    --grid-gap: 20px;
    --header-h: 64px;
  }

  .section { padding: 36px 0; }

  /* Шапка → бургер */
  .header__top { height: 64px; gap: 12px; }
  .header__logo img { width: 168px; }
  .header__contacts,
  .header__cta { display: none; }
  .header__bottom { display: none; }
  .burger { display: block; }

  /* Первый экран (донор, брейкпоинт 640: карточка 397, заголовок сверху +41, слева 37) */
  .hero { padding-bottom: 30px; }
  .hero__inner {
    min-height: 397px;
    padding: 41px 37px 32px;
    background-position: 70% center;
  }
  .hero__title { width: 312px; margin-bottom: 26px; }
  .hero__list { width: 198px; margin-bottom: 24px; }
  .hero__list li { font-size: var(--fs-base); line-height: 20px; }

  /* Блоки */
  .section__head { margin-bottom: 26px; }
  .cat-cards { grid-template-columns: 1fr; gap: 32px; }
  .projects__grid { grid-template-columns: repeat(2, 1fr); }
  .brands__grid { grid-template-columns: repeat(2, 1fr); }
  .brands__item { min-height: 120px; padding: 16px; }

  .promo { padding: 26px 22px; border-radius: var(--radius); }
  .promo__title { font-size: 24px; }
  .promo__text { font-size: var(--fs-base); }

  .lead__card { padding: 30px 22px 24px; }
  .lead__note { margin-left: 22px; }
  .lead__descr { font-size: var(--fs-base); margin-bottom: 22px; }
  .lead__form { max-width: none; }

  .seo-text { padding: 34px 0 40px; }
  .seo-text__title { font-size: var(--fs-h3); }
  .seo-text__item + .seo-text__item .seo-text__title { font-size: 18px; }

  /* Товар / каталог */
  .product-grid,
  .product-grid--4,
  .catalog-tiles { grid-template-columns: repeat(2, 1fr); gap: 24px var(--grid-gap); }
  .spec-table { min-width: 560px; font-size: var(--fs-xxs); }
  .spec-table th, .spec-table td { padding: 8px 10px; }
  .product__price { font-size: 24px; }

  /* Прочее */
  .cta-band { padding: 26px 22px; }
  .cta-band__title { font-size: 22px; }
  .popup__dialog { padding: 38px 24px 30px; }
  .popup__title { font-size: 22px; }
  .article h2 { font-size: 22px; }
  .page-head__title { font-size: 28px; }
  .page-head__lead { font-size: var(--fs-base); }

  .footer { padding-top: 28px; }
  .footer__top { grid-template-columns: 1fr; gap: 28px; }
  .footer__sep { width: 100%; margin: 20px 0; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer__dev { margin-left: 0; }

  .error-page__code { font-size: 84px; }
}

/* ==========================================================================
   <= 480px — крупные телефоны
   ========================================================================== */
@media (max-width: 480px) {
  :root { --fs-h1: 24px; --fs-h2: 22px; }

  .hero__inner { min-height: 242px; padding: 16px 20px 23px; }
  .hero__title { width: 290px; margin-bottom: 12px; }
  .hero__list { width: 249px; margin-bottom: 20px; }
  .hero__list li { font-size: var(--fs-xs); line-height: 18px; }
  .hero__cta { width: 140px; height: 40px; min-height: 40px; font-size: var(--fs-xxs); }

  .features__grid { grid-template-columns: 1fr; gap: 26px; }
  .projects__grid { grid-template-columns: 1fr; }
  .product-grid,
  .product-grid--4,
  .catalog-tiles { grid-template-columns: 1fr; }

  .form__row--2 { grid-template-columns: 1fr; }
  .product__actions .btn,
  .cta-band__actions .btn,
  .footer__buttons .btn,
  .error-page__actions .btn { width: 100%; }
  .footer__buttons { flex-direction: column; }

  .doc-item { flex-wrap: wrap; gap: 12px; }
  .doc-item__action { width: 100%; }
  .doc-item__action .btn { width: 100%; }

  .requisites__table th,
  .requisites__table td { display: block; width: auto; }
  .requisites__table th { padding-bottom: 2px; border-bottom: 0; }

  .brands__grid { grid-template-columns: repeat(2, 1fr); }
  .contacts-card { padding: 22px 20px; }
  .popup { padding: 20px 12px; }
  .popup__dialog { padding: 34px 18px 26px; }
}

/* ==========================================================================
   <= 375px — компактные телефоны
   ========================================================================== */
@media (max-width: 375px) {
  :root { --gutter: 14px; --fs-h1: 22px; }

  .header__logo img { width: 148px; }
  .hero__inner { padding: 20px 16px; }
  .spec-table { min-width: 480px; }
  .error-page__code { font-size: 64px; }
  .brands__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Печать
   ========================================================================== */
@media print {
  .header, .footer, .popup, .mobile-menu, .cta-band, .lead, .slider__controls { display: none !important; }
  body { color: #000; }
  .spec-table-wrap { overflow: visible; border: 0; }
  .spec-table { min-width: 0; }
}

/* ==========================================================================
   Уважение к настройкам пользователя
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
