/* Компоненты интерфейса: кнопки, карточки, слайдеры, фильтры, формы и модалки. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  font-weight: 700;
}

.grid-2 .btn {
  justify-self: center; /* 👈 Сжимает кнопку по ширине текста и ставит её ровно по центру */
}

.btn:hover,
.btn:focus-visible,
.btn:active {
  background: var(--orange);
}

.btn--filter.is-active {
  background: var(--green-dark);
}

.btn--filter.is-active:hover,
.btn--filter.is-active:focus-visible {
  background: var(--orange);
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  background: var(--orange);
}

/* Меню */
.site-nav__link {
  color: #fff;
  font-weight: 700;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--green);
}

.site-nav__link.is-active {
  color: var(--green);
}

/* Языковый переключатель */
.lang-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  background: transparent;
  border: 2px solid transparent;
}

.lang-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lang-btn[aria-pressed="true"] {
  border-color: var(--green);
}

/* Слайдер */
.slider {
  position: relative;
  overflow: hidden;
}

.slider__track {
  position: relative;
  min-height: clamp(260px, 55vw, 640px);
}

.slider__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.slider__slide.is-active {
  opacity: 1;
}

.slider__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: var(--space);
  background: rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.hero-slider .slider__overlay {
  gap: 10px;
}

.hero-slider .slider__overlay--left {
  align-items: flex-start;
  text-align: left;
  padding-left: calc((100vw - min(100% - 32px, var(--container))) / 2 + 16px);
}

.slider--narrow .slider__overlay {
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.slider__track2 {
  position: relative;
  min-height: clamp(150px, 35vw, 360px);
  margin-inline: 15%;
}

.slider__logo {
  width: min(300px, 40vw);
}

.slider__title {
  margin: 0;
  color: #fff;
  font-size: clamp(24px, 4vw, 58px);
  line-height: 1.05;
  text-shadow: 0 1px 0 #000, 0 0 2px #000;
}

.slider__caption {
  margin: 0;
  max-width: 900px;
  color: #fff;
  text-shadow: 0 1px 0 #000, 0 0 2px #000;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.3;
}

.slider__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  z-index: 0;
}

.slider__dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.slider__dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.slider__dot.is-active {
  background: var(--green);
}

/* Деятельность и карточки */
.cards-grid {
  display: grid;
  gap: var(--space);
}

.cards-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
}

.info-card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  margin-bottom: 12px;
}

.info-card h3 {
  margin: 0;
  font-size: 18px;
  text-align: center;
  width: 100%;
}

/* Фильтр и товары */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space);
}

.product-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  justify-items: center;
}

.product-card__img {
  width: 75%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 0;
  margin-top: 25px;
}

.product-card__body {
  padding: 8px;
  display: grid;
  gap: 8px;
  width: 95%;
}

.product-card__title {
  font-size: 18px;
  text-align: center;
  margin: 0;
}

.product-card__category {
  display: none;
}

/* Технологии и чек-лист */
.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 15px;
}

.check-list li {
  clear: both;
}

.check-list__icon {
  float: left;
  margin-right: 12px;
  margin-bottom: 4px;
  width: 24px;
  height: auto;
  object-fit: contain;
}

.check-list li span {
  display: block;
  line-height: 1.4;
}

.tech-list {
  display: grid;
  gap: var(--space);
}

.tech-item {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  align-items: center;
  background: #fff;
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.tech-item--reverse {
  grid-template-columns: 1fr 300px;
}

.tech-item img {
  width: 300px;
  height: auto;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 14px;
}

.packing-sublist {
  display: grid;
  gap: 12px;
  margin-top: 15px;
}

.packing-subitem {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tech-item .Packing__icon,
.tech-item .packing-subitem img {
  width: 32px;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 0;
}

.packing-subitem span {
  font-size: 14px;
  line-height: 1.4;
}

/* Сертификаты */
.cert-grid {
  display: grid;
  gap: calc(var(--space) * 0.75);
  grid-template-columns: repeat(3, minmax(100px, 200px));
  max-width: 640px;
  margin: 0 auto;
  justify-content: center;
  width: 100%;
}

.cert-card {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  width: 100%;
}

.cert-card img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.cert-card:hover img {
  transform: scale(1.03);
}

/* Lightbox */
.lightbox[hidden] {
  display: none;
  pointer-events: none;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
}

.lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 980px);
  height: min(86vh, 900px);
  margin: 5vh auto;
  display: grid;
  place-items: center;
  padding: 15px;
}

.lightbox__dialog img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  z-index: 2;
}

.lightbox__close {
  top: 8px;
  right: 8px;
}

.lightbox__prev {
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__next {
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}

/* Формы */
.contact-form {
  max-width: 860px;
  margin-inline: auto;
  display: grid;
  gap: 18px;
}

.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid__full {
  grid-column: 1 / -1;
}

.contact-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #cfcfcf;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
}

.form-status {
  min-height: 1.5em;
  margin: 0;
  font-weight: 700;
  color: var(--green-dark);
}
