/*
Theme Name: SPM Blocks
Description: Блочная (FSE) тема по Figma-макету «СПМ | Клиенту». Пиксель-в-пиксель со статичной вёрсткой, весь контент редактируется из админки нативными блоками.
Author: SPM
Version: 1.2.9
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: spm-blocks
Domain Path: /languages
Tags: block-theme, full-site-editing, one-column, custom-colors, custom-logo
*/
/* ============================================================
   SPM — design tokens from the Figma layout "СПМ | Клиенту"
   ============================================================ */

:root {
  --bg-navy: #01024f;
  --bg-navy-2: #02034f;
  --bg-footer: #010127;
  --bg-white: #ffffff;
  --bg-off: #fafafa;
  --bg-light: #f2f2f2;
  --bg-blue-light: #f1f3fe;
  --bg-blue: #183ee9;

  --border-gray: #d8d8d8;
  --line-gray: #bdbdbd;
  --gray: #d9d9d9;
  --text-gray: #bdbdbd;

  --text-navy: #01024f;
  --white-75: rgba(255, 255, 255, 0.75);
  --white-70: rgba(255, 255, 255, 0.7);
  --white-62: rgba(255, 255, 255, 0.62);
  --white-45: rgba(255, 255, 255, 0.45);
  --white-32: rgba(255, 255, 255, 0.32);
  --white-28: rgba(255, 255, 255, 0.28);
  --navy-75: rgba(1, 2, 79, 0.75);
  --navy-68: rgba(1, 2, 79, 0.68);
  --navy-60: rgba(1, 2, 79, 0.6);
  --navy-38: rgba(1, 2, 79, 0.38);

  --font-head: "Poppins", "Montserrat", "Golos Text", sans-serif;
  --font-body: "Noto Sans", "Golos Text", Arial, sans-serif;

  --radius-lg: 16px;
  --radius-btn: 8px;
  --radius-pill: 3px;

  --container-w: 1200px;
  --content-w: 1060px;
  --gap: 12px;
  --pad: 70px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 23px;
  color: var(--text-navy);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Страховка от случайного горизонтального скролла на мобильных.
     Именно clip, а не hidden: clip не создаёт scroll-контейнер и
     не ломает position: sticky (оглавление политики). */
  overflow-x: clip;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

ul {
  list-style: none;
}

.container {
  width: min(var(--container-w), 100%);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ============================================================
   Typography
   ============================================================ */

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--text-navy);
}

.h1 {
  font-size: 60px;
  line-height: 66px;
  letter-spacing: -0.025em;
}

.h2 {
  font-size: 36px;
  line-height: 44px;
  letter-spacing: -0.02em;
}

.h3 {
  font-size: 17px;
  line-height: 23px;
  letter-spacing: -0.01em;
}

.h4 {
  font-size: 10px;
  line-height: 17px;
  letter-spacing: 0.105em;
  text-transform: uppercase;
  font-weight: 700;
}

/* ============================================================
   Header
   ============================================================ */

.header {
  background: var(--bg-navy);
  height: 72px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header__logo svg {
  width: 201px;
  height: 28px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav__link {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  color: var(--white-70);
  font-size: 13px;
  line-height: 22px;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.nav__link:hover {
  color: #ffffff;
}

.nav__link.is-active {
  background: var(--bg-blue);
  color: #ffffff;
}

.burger {
  display: none;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 53px;
  padding: 0 28px;
  border-radius: var(--radius-btn);
  border: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  line-height: 23px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #ffffff;
  transition: background 0.2s ease, opacity 0.2s ease, transform 0.1s ease;
}

.btn--blue {
  background: var(--bg-blue);
}

.btn--navy {
  background: var(--bg-navy);
}

.btn:hover {
  opacity: 0.88;
}

.btn:active {
  transform: translateY(1px);
}

.btn svg {
  width: 24px;
  height: 24px;
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  background: var(--bg-navy);
  color: #ffffff;
  overflow: hidden;
}

.hero--image {
  min-height: 712px;
}

.hero--simple {
  min-height: 415px;
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero--image .hero__content {
  padding-top: 120px;
  min-height: 712px;
}

.hero--simple .hero__content {
  padding-top: 120px;
  min-height: 415px;
}

.hero h1 {
  color: #ffffff;
  max-width: 703px;
}

.hero--simple h1 {
  max-width: 703px;
  font-size: 60px;
  line-height: 65px;
}

.hero__sub {
  margin-top: 26px;
  max-width: 703px;
  color: var(--white-75);
  font-size: 16px;
  line-height: 28px;
}

.hero--simple .hero__sub {
  color: var(--white-62);
}

.hero .btn {
  margin-top: 48px;
}

.hero__scroll {
  position: absolute;
  right: 64px;
  bottom: 46px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white-32);
  font-size: 10px;
  line-height: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero__scroll::before {
  content: "";
  width: 36px;
  height: 1px;
  background: rgba(255, 255, 255, 0.32);
}

/* ============================================================
   Sections
   ============================================================ */

.section {
  border-top: 1px solid var(--border-gray);
}

.section--white {
  background: var(--bg-white);
  color: var(--text-navy);
}

.section--light {
  background: var(--bg-light);
  color: var(--text-navy);
}

.section--navy {
  background: var(--bg-navy);
  color: #ffffff;
  border-top: none;
}

.section__inner {
  padding-top: 120px;
  padding-bottom: 120px;
}

.section--navy .section__inner {
  padding-top: 119px;
  padding-bottom: 120px;
}

.section .h2 {
  color: var(--text-navy);
}

.section--navy .h2 {
  color: #ffffff;
}

.section__lead {
  margin-top: 52px;
  max-width: 524px;
  color: var(--navy-75);
  font-size: 14px;
  line-height: 23px;
}

.section--navy .section__lead {
  color: var(--white-75);
}

/* Card */
.card {
  border-radius: var(--radius-lg);
}

/* ============================================================
   Main page: expertise directions
   ============================================================ */

.expertise__cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
  margin-top: 48px;
}

.expertise__card {
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.expertise__card--navy {
  background: var(--bg-navy);
  color: #ffffff;
}

.expertise__card--light {
  background: var(--bg-light);
  color: var(--text-navy);
}

.expertise__icon {
  width: 60px;
  height: 60px;
  margin-bottom: 34px;
}

.expertise__icon svg {
  width: 45px;
  height: 45px;
}

.expertise__card .h3 {
  max-width: 444px;
  margin-bottom: 18px;
}

.expertise__card--navy .h3 {
  color: #ffffff;
}

.expertise__card--light .h3 {
  color: var(--text-navy);
}

.expertise__text {
  max-width: 444px;
  font-size: 14px;
  line-height: 23px;
}

.expertise__card--navy .expertise__text {
  color: #ffffff;
}

.expertise__card--light .expertise__text {
  color: var(--navy-75);
}

/* Product categories */
.categories {
  margin-top: 48px;
}

.categories__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}

.categories__item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 256 / 192;
}

.categories__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.categories__btn {
  margin: 60px auto 0;
  display: flex;
  width: fit-content;
}

/* ============================================================
   Main page: production of the future
   ============================================================ */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-top: 48px;
}

.stats__item {
  border: 1px solid #ffffff;
  border-radius: var(--radius-lg);
  padding: 26px 40px;
}

.stats__num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 42px;
  line-height: 42px;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.stats__label {
  margin-top: 6px;
  color: var(--white-45);
  font-size: 12.4px;
  line-height: 16px;
}

.future__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin-top: 60px;
  align-items: start;
}

.future__text {
  max-width: 524px;
  color: var(--white-75);
  font-size: 14px;
  line-height: 23px;
}

.future__photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid #ffffff;
}

.future__photo img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  background: var(--bg-footer);
  color: #ffffff;
}

.footer__inner {
  padding-top: 120px;
}

.footer__top {
  display: flex;
  gap: 162px;
  align-items: flex-start;
}

.footer__about {
  width: 374px;
  flex-shrink: 0;
}

.footer__logo svg {
  width: 160px;
  height: 22px;
}

.footer__about-text {
  margin-top: 22px;
  color: var(--white-70);
  font-size: 14px;
  line-height: 24px;
}

.footer__nav {
  display: flex;
  gap: var(--gap);
}

.footer__col {
  width: 167px;
}

.footer__col--contact,
.footer__col--social {
  width: 166px;
}

.footer__col .h4 {
  color: var(--white-28);
}

.footer__list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer__list a {
  color: var(--white-70);
  font-size: 13px;
  line-height: 22px;
  transition: color 0.2s ease;
}

.footer__list a:hover {
  color: #ffffff;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  color: var(--white-28);
  font-size: 11px;
  line-height: 15px;
}

.footer__bottom a:hover {
  color: #ffffff;
}

/* ============================================================
   Products page
   ============================================================ */

.product__block {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.product__row {
  display: grid;
  grid-template-columns: 524px 524px;
  gap: var(--gap);
  align-items: start;
}

.product__info .h2 {
  max-width: 524px;
}

.product__tags {
  margin-top: 18px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  line-height: 21px;
  letter-spacing: -0.01em;
  color: var(--bg-navy-2);
}

.product__desc {
  margin-top: 16px;
  color: var(--navy-75);
  font-size: 14px;
  line-height: 23px;
}

.product__adv-title {
  margin-top: 28px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  line-height: 21px;
  letter-spacing: -0.01em;
  color: var(--bg-navy-2);
}

.product__adv-text {
  margin-top: 14px;
  color: var(--navy-75);
  font-size: 14px;
  line-height: 23px;
}

.product__gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
  width: 100%;
}

.product__card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray);
}

.product__card--main {
  width: 100%;
  max-width: 524px;
}

.product__card > img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.product__card--main > img {
  aspect-ratio: 524 / 313;
}

.product__card--thumb {
  width: 256px;
  flex-shrink: 0;
}

.product__card--thumb > img {
  aspect-ratio: 256 / 164;
}

.product__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 13px;
  background: var(--bg-white);
}

.product__label span {
  color: var(--text-gray);
  font-size: 11px;
  line-height: 15.4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   Manufacture page
   ============================================================ */

.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  margin-top: 48px;
}

.process__card {
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.process__card--blue {
  background: var(--bg-blue);
  color: #ffffff;
}

.process__card--light {
  background: var(--bg-blue-light);
  color: var(--text-navy);
}

.process__num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 42px;
  line-height: 42px;
  letter-spacing: -0.02em;
  color: var(--bg-blue);
}

.process__card--blue .process__num {
  color: #ffffff;
}

.process__title {
  margin-top: 14px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  line-height: 20px;
  color: var(--bg-blue);
}

.process__card--blue .process__title {
  color: #ffffff;
}

.process__text {
  margin-top: 12px;
  font-size: 12px;
  line-height: 22px;
  color: var(--navy-75);
}

.process__card--blue .process__text {
  color: rgba(255, 255, 255, 0.85);
}

/* Equipment */
.equip {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(2, 524px);
  gap: var(--gap);
}

.equip__item {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 22px 40px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.equip__icon {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.equip__icon svg {
  width: 46px;
  height: 46px;
}

.equip__text {
  font-size: 14px;
  line-height: 23px;
  color: var(--text-navy);
}

/* Production photos */
.gallery {
  margin-top: 48px;
  display: grid;
  /* Фолбэк-сетка: подстраивается под любое число фото (1, 4, 5...),
     когда карусель не инициализирована — без JS и в редакторе. */
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: var(--gap);
  align-items: center;
}

/* Ровно три фото — раскладка макета: широкий кадр по центру. */
.gallery:has(> :first-child:nth-last-child(3)) {
  grid-template-columns: 1fr 1.83fr 1fr;
}

.gallery__item {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__item--side {
  aspect-ratio: 345 / 257;
}

.gallery__item--center {
  aspect-ratio: 631 / 469;
}

/* ============================================================
   About page
   ============================================================ */

.about__mission {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.about__mission .h2 {
  max-width: 400px;
}

.about__statement {
  margin-top: 24px;
  max-width: 524px;
  font-weight: 700;
  font-size: 14px;
  line-height: 23px;
}

.about__text {
  margin-top: 20px;
  max-width: 613px;
  color: var(--navy-75);
  font-size: 14px;
  line-height: 23px;
}

.about__photo {
  margin-top: 52px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  width: 100%;
}

.about__photo img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 1060 / 464;
}

.about__statement-wide {
  margin-top: 0;
  max-width: 100%;
}

.values {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(2, 524px);
  gap: var(--gap);
}

.value__item {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 22px 40px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.value__icon {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.value__icon svg {
  width: 46px;
  height: 46px;
}

.value__text {
  font-size: 14px;
  line-height: 23px;
  font-weight: 700;
}

.why__text {
  margin-top: 20px;
  max-width: 789px;
  color: var(--navy-75);
  font-size: 14px;
  line-height: 23px;
}

/* Form */
.form-card {
  margin-top: 44px;
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.form {
  display: grid;
  /* minmax(0, 1fr), а не 1fr: auto-минимум трека раздувается
     intrinsic-шириной инпутов CF7 (size="40" ≈ 330px), и на узких
     экранах форма вылезала за границы карточки. */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px var(--gap);
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* Грид-ячейка не должна распираться intrinsic-шириной полей:
     CF7 рендерит <input size="40"> (~300px+), и на 375px форма
     вылезала за экран. */
  min-width: 0;
}

.form__field--full {
  grid-column: 1 / -1;
}

.form__label {
  font-size: 13px;
  line-height: 20px;
  color: var(--navy-60);
}

.form__input,
.form__textarea {
  width: 100%;
  background: var(--bg-white);
  border: 1px solid var(--line-gray);
  border-radius: 4px;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-navy);
  transition: border-color 0.2s ease;
}

.form__input {
  height: 44px;
}

.form__textarea {
  height: 121px;
  resize: vertical;
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: var(--navy-60);
}

.form__input:focus,
.form__textarea:focus {
  outline: none;
  border-color: var(--bg-blue);
}

.form__actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
}

.form__actions .btn {
  height: 48px;
  padding: 0 32px;
}

/* Виджет Turnstile добавляет плагин безопасности. Он — полноценная
   ячейка сетки, поэтому не сжимает и не сдвигает поля формы. */
.form .spm-security-turnstile {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.form .spm-security-turnstile iframe {
  max-width: 100%;
}

.form__input--file {
  height: auto;
  min-height: 44px;
  padding: 8px 14px;
  line-height: 20px;
  cursor: pointer;
}

.form__input--file::file-selector-button {
  margin-right: 12px;
  border: none;
  border-radius: 4px;
  background: var(--bg-light);
  color: var(--text-navy);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
}

.form__hint {
  font-size: 12px;
  line-height: 16px;
  color: var(--navy-60);
}

.form__hint--center {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: -8px;
}

.form__hint a {
  color: var(--bg-blue);
  text-decoration: underline;
}

.form__hint a:hover {
  color: var(--text-navy);
}

.form__check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 18px;
  color: var(--navy-75);
  cursor: pointer;
}

.form__check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--bg-blue);
}

.form__check a {
  color: var(--bg-blue);
  text-decoration: underline;
}

.form__check a:hover {
  color: var(--text-navy);
}

/* CF7: файл и согласие внутри той же сетки */
.form .wpcf7-form-control-wrap[data-name="your-resume"] {
  display: block;
}

.form .wpcf7-acceptance .wpcf7-list-item {
  margin: 0;
}

.form .wpcf7-acceptance .wpcf7-list-item label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 18px;
  color: var(--navy-75);
  cursor: pointer;
}

.form .wpcf7-acceptance input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--bg-blue);
}

/* ============================================================
   Career page
   ============================================================ */

.career__title {
  max-width: 849px;
}

.career__photos {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 345px 346px 345px;
  gap: var(--gap);
}

.career__photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.career__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 345 / 257;
}

.pillars {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(2, 524px);
  gap: var(--gap);
}

.pillar {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-height: 189px;
}

.pillar__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  line-height: 20px;
}

.pillar__text {
  margin-top: 12px;
  font-size: 13px;
  line-height: 22px;
  color: var(--navy-75);
}

.roles {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  max-width: 1060px;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border: 1px solid var(--text-navy);
  border-radius: 999px;
  background: var(--bg-white);
  font-size: 14px;
  line-height: 18px;
  color: var(--text-navy);
  /* Не nowrap: на 375px длинный чип вылезал за экран; на десктопе
     чипы и так помещаются в одну строку. */
}

.vacancy__text {
  margin-top: 20px;
  max-width: 458px;
  color: var(--navy-75);
  font-size: 14px;
  line-height: 23px;
}

.vacancy__btn {
  margin-top: 44px;
  height: 52px;
  padding: 0 36px;
}

/* ============================================================
   Contacts page
   ============================================================ */

.contacts__grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(2, 524px);
  gap: var(--gap);
}

.contact-card {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  min-height: 89px;
}

.contact-card__label {
  font-size: 13px;
  line-height: 18px;
  color: var(--navy-60);
}

.contact-card__value {
  margin-top: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  line-height: 20px;
  color: var(--text-navy);
}

.contact-card__value a:hover {
  color: var(--bg-blue);
}

.contacts__extra {
  margin-top: 48px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.contacts__phone {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  line-height: 24px;
}

.icon-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-circle svg {
  width: 20px;
  height: 20px;
}

.contacts__social {
  display: flex;
  gap: 12px;
  margin-left: auto;
}

.contacts__social .icon-circle {
  transition: opacity 0.2s ease;
}

.contacts__social .icon-circle:hover {
  opacity: 0.85;
}

.addresses {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(2, 524px);
  gap: var(--gap);
}

.address-card {
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  min-height: 108px;
}

.address-card--white {
  background: var(--bg-white);
}

.address-card--navy {
  background: var(--bg-navy);
}

.address-card__label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  line-height: 17px;
}

.address-card--navy .address-card__label {
  color: #ffffff;
}

.address-card__text {
  margin-top: 10px;
  font-size: 13px;
  line-height: 20px;
  color: var(--navy-75);
}

.address-card--navy .address-card__text {
  color: var(--white-75);
}

.map {
  position: relative;
  margin-top: 48px;
  border: 1px solid var(--line-gray);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.map img,
.map__frame {
  width: 100%;
  display: none;
  aspect-ratio: 1060 / 464;
  overflow: hidden;
}

.map img {
  height: auto;
  object-fit: cover;
}

.map__frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.map img.is-active,
.map__frame.is-active {
  display: block;
}

.map__toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(1, 2, 79, 0.15);
}

.map__toggle button {
  border: none;
  background: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--navy-75);
}

.map__toggle button.is-active {
  background: var(--bg-blue);
  color: #ffffff;
}

/* ============================================================
   Privacy policy page
   ============================================================ */

.policy__hero h1 {
  max-width: 1054px;
  font-size: 60px;
  line-height: 66px;
}

.policy__layout {
  display: grid;
  grid-template-columns: 272px 700px;
  gap: 88px;
  padding-top: 120px;
  padding-bottom: 120px;
}

.policy__sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
}

.policy__contents {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.policy__contents a {
  font-size: 12px;
  line-height: 22px;
  color: var(--navy-75);
}

.policy__contents a:hover {
  color: var(--bg-blue);
}

.policy__contact {
  margin-top: 26px;
  background: var(--bg-blue);
  border-radius: var(--radius-lg);
  padding: 22px 22px 24px;
}

.policy__contact-title {
  font-size: 11px;
  line-height: 18px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}

.policy__contact a {
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
  font-size: 13px;
  line-height: 22px;
  color: #ffffff;
  text-decoration: underline;
}

.policy__article h2 {
  font-size: 24px;
  line-height: 32px;
  letter-spacing: -0.017em;
  margin: 64px 0 20px;
}

.policy__article h2:first-child {
  margin-top: 0;
}

.policy__article p {
  font-size: 14px;
  line-height: 24px;
  color: var(--navy-75);
  margin-bottom: 18px;
}

.policy__article p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   Reveal animation
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1200px) {
  :root {
    --pad: 40px;
  }

  .expertise__cards,
  .future__row,
  .product__row,
  .values,
  .pillars,
  .addresses,
  .contacts__grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .gallery,
  .gallery:has(> :first-child:nth-last-child(3)) {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery__item--center {
    grid-column: 1 / -1;
    aspect-ratio: 631 / 400;
  }

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

  .career__photo:first-child {
    grid-column: 1 / -1;
  }

  .policy__layout {
    grid-template-columns: 220px 1fr;
    gap: 40px;
  }

  /* Подвал: колонки были фиксированной ширины (374 + 162 + 523),
     и на 769–1200px это вылезало за контейнер горизонтальным
     скроллом. Колонки резиновые, при нехватке места блок ссылок
     переносится под описание. Вид на 1201px+ не меняется. */
  .footer__top {
    flex-wrap: wrap;
    column-gap: 162px;
    row-gap: 40px;
  }

  .footer__about {
    max-width: 100%;
  }

  .footer__nav {
    flex: 1 1 340px;
    min-width: 0;
  }

  .footer__col,
  .footer__col--contact,
  .footer__col--social {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
  }
}

/* Шапка: логотип (201px) + шесть пунктов меню (~520px) занимают ~721px
   и на 769–830px не помещаются в контейнер (ширина экрана минус 80px):
   последний пункт уезжал на вторую строку. Поэтому бургер включается
   уже с 900px — это покрывает планшеты в портрете (768–834px). */
@media (max-width: 900px) {
  .header__inner {
    position: relative;
  }

  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-navy-2);
    padding: 12px 24px 20px;
    gap: 6px;
    display: none;
  }

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

  .nav__link {
    height: 44px;
    justify-content: center;
  }

  .burger {
    display: flex;
  }
}

@media (max-width: 768px) {
  :root {
    --pad: 24px;
  }

  .h1,
  .hero--simple h1,
  .policy__hero h1 {
    font-size: 40px;
    line-height: 46px;
  }

  .h2 {
    font-size: 28px;
    line-height: 36px;
  }

  .hero--image,
  .hero--image .hero__content {
    min-height: 720px;
  }

  .hero--image .hero__content {
    padding-top: 180px;
  }

  .hero--simple {
    min-height: 360px;
  }

  .hero--simple .hero__content {
    padding-top: 90px;
    min-height: 360px;
  }

  .hero .btn {
    margin-top: 40px;
  }

  .hero__scroll {
    display: none;
  }

  .section__inner {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .section--navy .section__inner {
    padding-top: 80px;
  }

  .expertise__cards,
  .categories__grid,
  .process,
  .future__row,
  .stats,
  .product__row,
  .values,
  .pillars,
  .equip,
  .gallery,
  .career__photos,
  .addresses,
  .contacts__grid {
    grid-template-columns: 1fr;
  }

  .product__card--thumb {
    width: auto;
    flex: 1 1 280px;
    max-width: 340px;
  }

  .gallery__item--center {
    grid-column: auto;
    aspect-ratio: 345 / 257;
  }

  .stats {
    grid-template-columns: 1fr;
  }

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

  .form__field--full,
  .form__actions {
    grid-column: auto;
  }

  .footer__top {
    flex-direction: column;
    gap: 40px;
  }

  .footer__about {
    width: auto;
    max-width: 374px;
  }

  .footer__nav {
    flex-direction: column;
    gap: 24px;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .policy__layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .policy__sidebar {
    position: static;
  }

  .contacts__extra {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .contacts__social {
    margin-left: 0;
  }
}

/* Узкие телефоны: 768px-сетка остаётся, ужимаются только крупные
   элементы, не помещающиеся в экран ~375px. */
@media (max-width: 480px) {
  .h1,
  .hero--simple h1,
  .policy__hero h1 {
    font-size: 34px;
    line-height: 40px;
    /* «Конфиденциальности» и подобные слова длиннее узкого экрана.
       max-width: 100% обязателен: .hero__content — flex-колонка с
       align-items: flex-start, без него заголовок берёт ширину
       по самому длинному слову и переносы не срабатывают. */
    max-width: 100%;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  /* «Конфиденциальности» (18 букв) помещается в строку 375px только
     до ~27px — иначе слово рвётся посреди без дефиса. */
  .policy__hero h1 {
    font-size: clamp(24px, 7.2vw, 34px);
    line-height: 1.2;
  }

  .hero--image,
  .hero--image .hero__content {
    min-height: 560px;
  }

  .hero--image .hero__content {
    padding-top: 140px;
  }

  .form-card {
    padding: 16px;
  }

  .footer__about {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   FSE block overrides
   Нативные блоки Gutenberg должны выглядеть точно как статика.
   ============================================================ */

/* --- Каркас сайта ------------------------------------------- */

/* Обёртка template-part не должна создавать бокс: иначе sticky-шапка
   «прилипает» внутри 72-пиксельного div и уезжает вместе с ним.
   В редакторе это правило отменяется в css/editor.css. */
.wp-block-template-part {
  display: contents;
}

/* Никаких служебных отступов между секциями контента */
.wp-site-blocks > *,
.wp-block-post-content > *,
.entry-content > * {
  margin-block-start: 0;
  margin-block-end: 0;
}

.wp-block-post-content,
.entry-content,
main.wp-block-group {
  margin: 0;
  padding: 0;
}

/* Списки блочного редактора — без маркеров (как глобальный ul) */
ul.wp-block-list {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

/* Картинки в контенте: figure не добавляет отступов.
   Осторожно: правило сильнее классовых (0-1-1 против 0-1-0),
   поэтому классовые отступы возвращаем явно ниже. */
figure.wp-block-image {
  margin: 0;
}

figure.wp-block-image.about__photo {
  margin-top: 52px;
}

figure.wp-block-image.expertise__icon {
  margin-bottom: 34px;
}

figure.wp-block-image img {
  display: block;
  max-width: 100%;
}

/* Поля форм в контенте наследуют типографику сайта */
input,
textarea,
select {
  font-family: var(--font-body);
}

/* --- Логотипы (блок «Изображение» вместо inline-SVG) --------- */

.header__logo img {
  width: 201px;
  height: 28px;
}

.footer__logo img {
  width: 160px;
  height: 22px;
}

/* --- Иконки (в статике inline-SVG, в блоках — <img>) -------- */

.expertise__icon img {
  width: 45px;
  height: 45px;
}

.equip__icon img,
.value__icon img {
  width: 46px;
  height: 46px;
}

.icon-circle img {
  width: 20px;
  height: 20px;
}

/* --- Блок «Навигация» = .nav / .nav__link ------------------- */

.wp-block-navigation.spm-nav {
  align-items: center;
  font-family: var(--font-body);
}

.wp-block-navigation.spm-nav .wp-block-navigation__container {
  align-items: center;
  flex-wrap: nowrap;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wp-block-navigation.spm-nav .wp-block-navigation-item {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wp-block-navigation.spm-nav .wp-block-navigation-item__content {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  color: var(--white-70);
  font-size: 13px;
  line-height: 22px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.wp-block-navigation.spm-nav .wp-block-navigation-item__content:hover,
.wp-block-navigation.spm-nav .wp-block-navigation-item__content:focus {
  color: #ffffff;
}

.wp-block-navigation.spm-nav .current-menu-item > .wp-block-navigation-item__content,
.wp-block-navigation.spm-nav .wp-block-navigation-item__content[aria-current="page"] {
  background: var(--bg-blue);
  color: #ffffff;
}

/* Бургер и крестик — белые, как в статике */
.wp-block-navigation.spm-nav .wp-block-navigation__responsive-container-open,
.wp-block-navigation.spm-nav .wp-block-navigation__responsive-container-close {
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: none;
  color: #ffffff;
}

.wp-block-navigation.spm-nav .wp-block-navigation__responsive-container-open svg,
.wp-block-navigation.spm-nav .wp-block-navigation__responsive-container-close svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Оверлей меню (панель) */
.wp-block-navigation.spm-nav .wp-block-navigation__responsive-container.is-menu-open {
  background: var(--bg-navy-2);
  color: #ffffff;
  padding: 16px var(--pad) 24px;
}

.wp-block-navigation.spm-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
  width: 100%;
  align-items: stretch;
  padding-top: 12px;
}

.wp-block-navigation.spm-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
}

.wp-block-navigation.spm-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  height: 44px;
  justify-content: center;
}

/* Брейкпоинт бургера: ядро переключается на 600px, статика — на 900px
   (см. комментарий у @media (max-width: 900px) выше: логотип и шесть
   пунктов не помещаются в шапку уже на ~830px, а ядро при нехватке
   места переносило пункты на вторую строку — flex-wrap: wrap).
   Задаём переключение сами на обеих сторонах брейкпоинта. */
@media (min-width: 901px) {
  .wp-block-navigation.spm-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: none;
  }
}

@media (max-width: 900px) {
  .wp-block-navigation.spm-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: flex;
  }

  .wp-block-navigation.spm-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
    display: none;
  }

  /* Ядро WordPress задаёт белый фон меню с той же специфичностью.
     На телефоне меню — самостоятельная тёмная панель с крупными строками. */
  .wp-block-navigation.spm-nav .wp-block-navigation__responsive-container.is-menu-open {
    background-color: var(--bg-navy-2) !important;
    background-image: none !important;
  }

  .wp-block-navigation.spm-nav .wp-block-navigation__responsive-container-close {
    top: 10px;
  }

  .wp-block-navigation.spm-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
  .wp-block-navigation.spm-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item,
  .wp-block-navigation.spm-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
    width: 100% !important;
  }

  .wp-block-navigation.spm-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
    justify-content: flex-start;
    padding: 0 16px;
    color: #ffffff;
  }
}

@media (max-width: 768px) {
  .hero--image .hero__content {
    padding-bottom: 32px;
  }

  .map img,
  .map__frame {
    aspect-ratio: 1;
  }

  .map {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: none;
    border-radius: 0;
    overflow: visible;
  }

  .map__toggle {
    position: static;
    order: -1;
    align-self: flex-end;
  }

  .map__frame {
    border: 1px solid var(--line-gray);
    border-radius: var(--radius-lg);
  }

  /* Вместо длинных колонок — короткие горизонтальные ленты для свайпа.
     Карусель .gallery-carousel (производство) работает отдельным скриптом
     и в это правило намеренно не входит. */
  .categories__grid,
  .product__gallery,
  .career__photos {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 12px;
    width: calc(100% + var(--pad));
    margin-right: calc(-1 * var(--pad));
    padding-right: var(--pad);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .categories__grid::-webkit-scrollbar,
  .product__gallery::-webkit-scrollbar,
  .career__photos::-webkit-scrollbar {
    display: none;
  }

  .categories__grid > .categories__item,
  .product__gallery > .product__card,
  .career__photos > .career__photo {
    flex: 0 0 min(82vw, 327px) !important;
    width: min(82vw, 327px);
    max-width: none;
    scroll-snap-align: start;
  }

  .career__photos > .career__photo {
    grid-column: auto;
  }
}

/* --- Блок «Кнопка» = .btn ---------------------------------- */

/* Класс btn с обёртки блока не должен красить саму обёртку —
   все визуальные стили .btn живут на ссылке (правила ниже).
   Без :hover/:active: их специфичность (0,3,0) перебивала отступы
   .categories__btn/.vacancy__btn (0,2,0), кнопка прыгала из-под
   курсора и мерцала; базового правила достаточно — оно стоит
   позже .btn:hover/.btn:active и выигрывает каскад. */
.wp-block-button.btn {
  margin: 0;
  height: auto;
  padding: 0;
  background: none;
  border-radius: 0;
  opacity: 1;
  transform: none;
}

/* Колонки подвала — wp:navigation с ref: повторяем вид .footer__list */
.wp-block-navigation.footer__list .wp-block-navigation__container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

/* В статике пункт — <li> с инлайновой <a>: строчный бокс берёт
   line-height: 23px от body, поэтому <li> ровно 23px. Блок навигации
   делает <li> флекс-контейнером, и его высота схлопывается до высоты
   ссылки (22px), что на 5 пунктах давало подвал на 5px ниже. */
.wp-block-navigation.footer__list .wp-block-navigation-item {
  min-height: 23px;
}

.wp-block-navigation.footer__list .wp-block-navigation-item__content {
  color: var(--white-70);
  font-size: 13px;
  line-height: 22px;
  transition: color 0.2s ease;
}

.wp-block-navigation.footer__list .wp-block-navigation-item__content:hover {
  color: #ffffff;
}

/* Отступ кнопки hero от подзаголовка — как .hero .btn в статике */
.hero .wp-block-button.btn {
  margin-top: 48px;
}

@media (max-width: 768px) {
  .hero .wp-block-button.btn {
    margin-top: 40px;
  }
}

.wp-block-button.btn > .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 53px;
  padding: 0 28px;
  border: none;
  border-radius: var(--radius-btn);
  background: var(--bg-navy);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  line-height: 23px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffffff;
  transition: background 0.2s ease, opacity 0.2s ease, transform 0.1s ease;
}

.wp-block-button.btn.btn--blue > .wp-block-button__link {
  background: var(--bg-blue);
}

.wp-block-button.btn.btn--navy > .wp-block-button__link {
  background: var(--bg-navy);
}

.wp-block-button.btn > .wp-block-button__link:hover {
  opacity: 0.88;
}

.wp-block-button.btn > .wp-block-button__link:active {
  transform: translateY(1px);
}

/* Стрелка вместо <img> из статики */
.wp-block-button.btn > .wp-block-button__link::after {
  content: "";
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: url(assets/img/icon-arrow-right.svg) center / contain no-repeat;
}

/* Модификаторы размера/позиции из статики живут на обёртке —
   пробрасываем их на саму ссылку. */
.wp-block-button.categories__btn {
  display: flex;
  justify-content: center;
  margin: 60px auto 0;
}

.wp-block-button.vacancy__btn {
  height: auto;
  padding: 0;
  margin-top: 44px;
}

.wp-block-button.product__catalog-btn {
  height: auto;
  padding: 0;
  margin-top: 28px;
}

.wp-block-button.vacancy__btn > .wp-block-button__link {
  height: 52px;
  padding: 0 36px;
}

/* --- Hero: фон картинкой через блок «Изображение» ----------- */

.hero__media {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

.hero__media::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 360px;
  background: linear-gradient(180deg, rgba(1, 2, 79, 0) 0%, rgba(1, 2, 79, 0.92) 100%);
  pointer-events: none;
}

/* У простого hero фон задаёт сама секция, отдельный div не нужен */
.hero--simple::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 360px;
  background: linear-gradient(180deg, rgba(1, 2, 79, 0) 0%, rgba(1, 2, 79, 0.35) 100%);
  pointer-events: none;
}

/* --- Картинки-ссылки внутри обёрток -------------------------
   Блок «Изображение» со ссылкой вставляет <a> между figure и img,
   а картинка может быть ещё и вложена в группу-обёртку. Поэтому
   селекторы прямого потомка из статики дублируем как вложенные. */

.hero__media a,
.future__photo a,
.expertise__icon a,
.categories__item a,
.about__photo a,
.career__photo a,
.gallery__item a,
.product__card a {
  display: block;
  width: 100%;
  height: 100%;
}

/* --- Карточка продукта (wp:group tagName figure) ------------
   Внутри — wp:image и wp:paragraph.product__label. Библиотека
   блоков даёт .wp-block-image { margin: 0 0 1em }, из-за чего
   между фото и подписью появляется зазор. */

.product__card .wp-block-image {
  margin: 0;
}

.product__card .wp-block-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.product__card--main .wp-block-image img {
  aspect-ratio: 524 / 313;
}

.product__card--thumb .wp-block-image img {
  aspect-ratio: 256 / 164;
}

/* --- Служебная разметка Contact Form 7 ----------------------
   CF7 оборачивает контролы в .wpcf7-form-control-wrap и добавляет
   подсказки/итоговое сообщение — стилей темы у них не было, из-за
   чего wrap распирал грид-ячейку intrinsic-шириной input size="40",
   а тексты ошибок выглядели чужеродно. */

.form .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
  min-width: 0;
}

.form__field .wpcf7-not-valid-tip {
  font-size: 12px;
  line-height: 16px;
  color: #d63638;
}

.form .wpcf7-response-output {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 18px;
}

.form .wpcf7-spinner {
  align-self: center;
}

/* ============================================================
   Карусель галереи производства (.gallery.gallery-carousel)

   Геометрия — точно из Figma (контент 1060px):
     активный слайд   631x469  по центру контентной колонки;
     боковые слайды   345x257  по вертикали центрированы и
     выглядывают за границы контейнера (зазор 80px).
   Все размеры заданы долями от ширины контентной колонки
   (--gc-content), которую js/main.js измеряет и прокидывает,
   поэтому пропорции макета держатся на любом вьюпорте.

   Инициализируется js/main.js: он ставит .is-carousel, вьюпорт
   и роли слайдам. Без JS и при одном слайде класса нет —
   остаётся обычная сетка .gallery, как в статике; в редакторе
   Gutenberg скрипт не подключён, там тоже сетка.
   ============================================================ */

.gallery-carousel.is-carousel {
  --gc-content: 1060px;
  --gc-center-w: calc(var(--gc-content) * 0.595283);
  --gc-center-h: calc(var(--gc-center-w) * 0.743264);
  --gc-side-w: calc(var(--gc-content) * 0.325472);
  --gc-side-h: calc(var(--gc-side-w) * 0.744928);
  --gc-gap: calc(var(--gc-content) * 0.075472);
  --gc-ease: 0.55s cubic-bezier(0.4, 0.02, 0.2, 1);

  display: block;
  position: relative;
  padding-bottom: 26px;
}

/* Карточки продукции используют ту же механику карусели, но сохраняют
   подпись под фото внутри фиксированной высоты слайда. */
.product__gallery.gallery-carousel.is-carousel {
  margin-right: 0;
  padding-right: 0;
  overflow: visible;
  scroll-snap-type: none;
}

.product__gallery.gallery-carousel.is-carousel .product__card {
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
}

.product__gallery.gallery-carousel.is-carousel .product__card > .wp-block-image {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
}

.product__gallery.gallery-carousel.is-carousel .product__card > .wp-block-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product__gallery.gallery-carousel.is-carousel .product__label {
  flex: 0 0 auto;
  margin: 0;
}

/* Вьюпорт растянут на ширину экрана (ширину и сдвиг ставит JS),
   поэтому боковые кадры выходят за 1200px-контейнер и обрезаются
   ровно по краям окна. */
.gallery-carousel__viewport {
  position: relative;
  width: 100%;
  height: var(--gc-center-h);
  overflow: hidden;
  touch-action: pan-y;
}

.gallery-carousel.is-carousel .gallery-carousel__slide {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: var(--gc-side-w);
  height: var(--gc-side-h);
  margin: 0;
  aspect-ratio: auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width var(--gc-ease), height var(--gc-ease),
    transform var(--gc-ease), opacity var(--gc-ease);
}

.gallery-carousel.is-carousel .gallery-carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Центральный кадр */
.gallery-carousel.is-carousel .gallery-carousel__slide.is-active {
  z-index: 2;
  width: var(--gc-center-w);
  height: var(--gc-center-h);
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

/* Правый и левый кадры — впритык к центральному через зазор */
.gallery-carousel.is-carousel .gallery-carousel__slide.is-next {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
  transform: translate(calc(var(--gc-center-w) / 2 + var(--gc-gap)), -50%);
}

.gallery-carousel.is-carousel .gallery-carousel__slide.is-prev {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
  transform: translate(
    calc(-1 * (var(--gc-center-w) / 2 + var(--gc-gap) + var(--gc-side-w))),
    -50%
  );
}

/* Градиентные вуали боковых кадров (Rectangle 240656681 в макете).
   Два псевдоэлемента с постоянными градиентами, роли меняют только
   opacity — поэтому вуаль плавно тает при перелистывании. */
.gallery-carousel.is-carousel .gallery-carousel__slide::before,
.gallery-carousel.is-carousel .gallery-carousel__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--gc-ease);
}

.gallery-carousel.is-carousel .gallery-carousel__slide::before {
  background: linear-gradient(270deg, rgba(255, 255, 255, 0) 12%, rgba(255, 255, 255, 0.9) 100%);
}

.gallery-carousel.is-carousel .gallery-carousel__slide::after {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 12%, rgba(255, 255, 255, 0.9) 100%);
}

.gallery-carousel.is-carousel .gallery-carousel__slide.is-prev::before,
.gallery-carousel.is-carousel .gallery-carousel__slide.is-far-prev::before {
  opacity: 1;
}

.gallery-carousel.is-carousel .gallery-carousel__slide.is-next::after,
.gallery-carousel.is-carousel .gallery-carousel__slide.is-far-next::after {
  opacity: 1;
}

/* Слайды за пределами тройки — за кадром и невидимы */
.gallery-carousel.is-carousel .gallery-carousel__slide.is-far-next {
  transform: translate(
    calc(var(--gc-center-w) / 2 + var(--gc-gap) * 2 + var(--gc-side-w)),
    -50%
  );
}

.gallery-carousel.is-carousel .gallery-carousel__slide.is-far-prev {
  transform: translate(
    calc(-1 * (var(--gc-center-w) / 2 + var(--gc-gap) * 2 + var(--gc-side-w) * 2)),
    -50%
  );
}

/* Перескок слайда с одного края на другой — без проезда через экран */
.gallery-carousel.is-carousel .gallery-carousel__slide.is-instant {
  transition: none;
}

.gallery-carousel.is-carousel .gallery-carousel__slide.is-fading {
  animation: gc-fade-in 0.5s ease;
}

@keyframes gc-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Индикатор: маленькие деликатные точки под каруселью
   (в макете «хрома» нет, поэтому без стрелок) */
.gallery-carousel__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  height: 26px;
}

.gallery-carousel__dot {
  position: relative;
  width: 6px;
  height: 6px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--navy-38);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

/* Невидимая зона клика: в точку 6px попасть почти невозможно */
.gallery-carousel__dot::after {
  content: "";
  position: absolute;
  inset: -8px;
}

.gallery-carousel__dot:hover {
  background: var(--navy-75);
}

.gallery-carousel__dot.is-active {
  width: 16px;
  background: var(--text-navy);
}

.section--navy .gallery-carousel__dot {
  background: var(--white-32);
}

.section--navy .gallery-carousel__dot.is-active {
  background: #ffffff;
}

/* Мобильная версия: один кадр во всю ширину контентной колонки.
   Достаточно переопределить переменные — формулы позиций те же. */
@media (max-width: 768px) {
  .gallery-carousel.is-carousel {
    --gc-center-w: var(--gc-content);
    --gc-center-h: calc(var(--gc-content) * 0.744928);
    --gc-side-w: var(--gc-content);
    --gc-side-h: calc(var(--gc-content) * 0.744928);
    --gc-gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-carousel.is-carousel .gallery-carousel__slide {
    transition: none;
    animation: none;
  }
}
