/* Адаптивность для разных экранов и устройств. */
@media (max-width: 100px) { /* 👈 ОПЕЧАТКА: Вместо 640px указано 100px */
  main#main  {
    margin-top: 0 !important;
  }
}

@media (max-width: 1024px) {
  .cards-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .promo-conditions-grid {
    grid-template-columns: 1fr;
  }
  .promo-cell--action {
    text-align: center;
  }
}

@media (max-width: 840px) {
  .map-wrapper {
    width: 90%;
    margin: 0 auto;
  }
}

/* Базовое скрытие кнопки на ПК */
.menu-toggle {
  display: none;
}

@media (max-width: 640px) {
.grid-2,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; 
  }

  .lang-btn {
    width: 25px;
    height: 25px;
  }

  /* Элементы хидера в одну строку с выравниванием строго по центру и середине */
  .site-header__inner {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 15px;
    padding: 12px 16px;
    box-sizing: border-box;
  }

  .site-header__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 140px;
  }

  /* Кнопка «Меню» из shell.js без лишних ограничений */
  .menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 0 !important;
  }

  /* Навигационный контейнер */
  .site-header__nav {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .site-header__lang {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  /* ПРЯЧЕМ СПИСОК ПО УМОЛЧАНИЮ */
  .site-header__menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    text-align: center;
    gap: 14px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    z-index: 100;
  }

  /* РАСКРЫВАЕМ МЕНЮ, КОГДА КЛАСС АКТИВЕН */
  .site-header__menu.is-open {
    display: flex !important;
  }

  .tech-item {
    grid-template-columns: 1fr;
  }

  .tech-item img {
    width: 100%;
  }

  .hero-slider .slider__overlay--left {
    align-items: center;
    text-align: center;
    padding-left: var(--space);
  }

  .slider__title {  
    font-size: 22px;  
  }
  
  .slider__caption {  
    font-size: 16px;  
  }

  .slider__track2 {  
    margin-inline: 10px;
  }

  .slider__track {
    min-height: 320px;
  }
  
  .btn:not(.btn--filter),
  .icon-btn {
    margin-inline: auto;
    display: inline-flex;
  }

  .filter-bar {
    flex-direction: column;
    align-items: center;
  }
  
  .btn--filter {
    width: 100%;
    max-width: 260px;
    margin-bottom: 6px;
  }
}

/* Смартфоны (Экран меньше 576px) */
@media (max-width: 576px) {
  /* Галерея сертификатов в один столбец с выравниванием по центру и середине */
  .cert-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    justify-items: center !important;
    align-items: center !important;
    width: 100%;
  }

  .cert-card {
    max-width: 140px;
    width: 100%;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-top-block {
    min-height: auto;
    margin-bottom: 0;
  }

  .footer-column:nth-child(1) {
    grid-column: span 1;
    border-bottom: none;
    padding-bottom: 0;
  }

  .footer-product-cell {
    display: none;
  }

  .cards-grid {
    display: grid;
    gap: var(--space);
  }
  
  .cards-grid--3 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .grid-contacts {
    gap: 24px;
  }

  .contact-split-row {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .map-wrapper {
    width: 95%;
    margin: 0 auto;
  }

  /* Адаптивность кнопок лайтбокса */
  .lightbox__close, 
  .lightbox__prev, 
  .lightbox__next {
    font-size: 24px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 130, 92, 0.5);
    border-radius: 50%;
    color: #fff;
  }

  .lightbox__close {
    top: 12px;
    right: 12px;
  }

  .lightbox__prev {
    left: 4px;
  }

  .lightbox__next {
    right: 4px;
  }

  .lightbox__dialog {
    width: min(95vw, 980px);
    height: min(75vh, 900px);
    margin: 12vh auto;
  }
}
