/*
Theme Name: SDA - Служба дежурных адвокатов
Theme URI: https://s-d-a.ru/
Author: SDA
Description: Классическая тема на базе одобренных макетов 04.11.2026 (sluzhba / srochnyy-vyezd).
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: MIT
Text Domain: sda
*/

/* s-d-a.ru — общая база для макетов 04.11.2026
   Токены взяты из реальных сохранённых страниц сайта (:root в контенте):
   --bg-light:#ededed --bg-white:#fff --text-dark:#2b2b2b --bg-dark:#14171c
   --accent-orange:#fcaf3b --accent-secondary:#ab641d --gold:#C5A059
   --light-text:#FDFCF0 --anthracite:#2c3e50 --gold-button:#d4af37
*/
:root{
  --bg-light:#ededed;
  --bg-white:#ffffff;
  --text-dark:#2b2b2b;
  --bg-dark:#14171c;
  --accent-orange:#fcaf3b;
  --accent-secondary:#ab641d;
  --gold:#c5a059;
  --light-text:#fdfcf0;
  --anthracite:#2c3e50;
  --gold-button:#d4af37;
  --muted:#6a7e81;
  --radius:14px;
  --container:1200px;
  --font:"PT Sans","Segoe UI",Arial,sans-serif;
  --font-head:"PT Serif",Georgia,"Times New Roman",serif;
}
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{font-family:var(--font);color:var(--text-dark);background:var(--bg-white);line-height:1.6;font-size:17px;-webkit-font-smoothing:antialiased}
img{max-width:100%;display:block;height:auto}
a{color:inherit;text-decoration:none}
.wrap{width:100%;max-width:var(--container);margin:0 auto;padding:0 20px}

/* Шапка */
.hdr{background:var(--bg-white);border-bottom:1px solid #e6e6e6;position:sticky;top:0;z-index:50}
.hdr__in{display:flex;align-items:center;gap:24px;min-height:78px}
.hdr__logo{display:flex;align-items:center;gap:12px;font-family:var(--font-head);font-weight:700;font-size:20px;color:var(--anthracite)}
.hdr__logo img{width:48px;height:48px;object-fit:contain}
.hdr__logo span{display:block;font-family:var(--font);font-size:12px;font-weight:400;color:var(--muted);letter-spacing:.02em}
.hdr__nav{margin-left:auto;font-size:13.5px;line-height:1.2}
.hdr__list{display:flex;align-items:center;gap:16px;list-style:none;margin:0;padding:0}
.hdr__list>li{position:relative;display:flex;align-items:center}
.hdr__list>li>a{display:inline-block;padding:9px 0;white-space:nowrap;color:var(--text-dark);
  border-bottom:2px solid transparent;transition:color .15s ease,border-color .15s ease}
.hdr__list>li>a:hover{color:var(--accent-secondary);border-bottom-color:var(--accent-orange)}
.hdr__list>li.is-current>a{color:var(--accent-secondary);border-bottom-color:var(--accent-orange);font-weight:700}
/* шеврон у пункта с выпадающим списком (на десктопе есть и :hover) */
.hdr__list>li.has-sub>a::after{content:"";display:inline-block;width:6px;height:6px;margin-left:7px;
  border-right:1.6px solid currentColor;border-bottom:1.6px solid currentColor;
  transform:translateY(-2px) rotate(45deg)}
/* выпадающий список «Дропперы»: чистый CSS, раскрытие по наведению/фокусу */
.hdr__list .sub{position:absolute;top:100%;left:-14px;z-index:60;min-width:310px;
  max-height:calc(100vh - 120px);overflow:auto;list-style:none;margin:0;padding:8px 6px;
  background:#fff;border:1px solid #e6e6e6;border-radius:14px;box-shadow:0 18px 40px rgba(20,23,28,.16);
  opacity:0;visibility:hidden;transform:translateY(6px);
  transition:opacity .15s ease,transform .15s ease,visibility .15s}
.hdr__list .sub a{display:block;padding:8px 14px;border-radius:9px;font-size:13.5px;line-height:1.3;
  white-space:normal;color:#3a3f45}
.hdr__list .sub a:hover,.hdr__list .sub a[aria-current]{background:#fdf3e2;color:var(--accent-secondary)}
.hdr__list>li.has-sub:hover>.sub,
.hdr__list>li.has-sub:focus-within>.sub{opacity:1;visibility:visible;transform:none}
.hdr__subbtn{display:none}
/* кнопка-бургер (появляется до 1100px) */
.hdr__burger{display:none;flex-direction:column;align-items:center;justify-content:center;gap:5px;
  width:44px;height:44px;padding:0;border:1px solid #e6e6e6;border-radius:10px;background:#fff;
  cursor:pointer;flex:0 0 44px}
.hdr__burger span{display:block;width:22px;height:2px;border-radius:2px;background:var(--bg-dark);
  transition:transform .2s ease,opacity .15s ease}
.hdr__burger.is-open span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.hdr__burger.is-open span:nth-child(2){opacity:0}
.hdr__burger.is-open span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
.hdr__tel{font-weight:700;font-size:18px;color:var(--anthracite);white-space:nowrap}
.hdr__tel small{display:block;font-weight:400;font-size:12px;color:var(--muted)}

/* Кнопки */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:16px 30px;border-radius:999px;
  background:var(--accent-orange);color:#1a1a1a;font-weight:700;font-size:16px;border:0;cursor:pointer;
  transition:transform .15s ease,box-shadow .15s ease;box-shadow:0 6px 18px rgba(252,175,59,.35)}
.btn:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(252,175,59,.45)}
.btn--gold{background:var(--gold-button);box-shadow:0 6px 18px rgba(212,175,55,.35)}
.btn--dark{background:var(--bg-dark);color:#fff;box-shadow:none}
.btn--ghost{background:transparent;border:2px solid var(--accent-orange);color:var(--text-dark);box-shadow:none}
.btn--lg{padding:20px 42px;font-size:18px}

/* Секции */
.sec{padding:64px 0}
.sec--grey{background:var(--bg-light)}
.sec--dark{background:var(--bg-dark);color:var(--light-text)}
.sec__title{font-family:var(--font-head);font-size:34px;line-height:1.25;font-weight:700;margin-bottom:14px}
.sec--dark .sec__title{color:#fff}
.sec__sub{color:var(--muted);max-width:820px;margin-bottom:36px}
.sec--dark .sec__sub{color:#b9c3c8}

/* Hero */
.hero{position:relative;color:#fff;overflow:hidden;background:var(--bg-dark)}
.hero__bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.55}
.hero__in{position:relative;padding:96px 0 88px;max-width:860px}
.hero h1{font-family:var(--font-head);font-size:46px;line-height:1.15;font-weight:700;margin-bottom:20px;text-wrap:balance}
.hero__sub{font-size:19px;color:#e8eef0;max-width:720px;margin-bottom:30px}
.hero__list{display:flex;flex-wrap:wrap;gap:12px 28px;list-style:none;margin-top:26px;font-size:16px}
.hero__list li::before{content:"✓";color:var(--accent-orange);font-weight:700;margin-right:8px}

/* Овальные карточки главной (8 шт., «4 по 2») */
.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:20px}
.card{background:var(--bg-white);border:1px solid #e6e6e6;border-radius:var(--radius);padding:26px 22px;text-align:center;
  display:flex;flex-direction:column;gap:14px;transition:transform .15s ease,box-shadow .15s ease}
.card:hover{transform:translateY(-3px);box-shadow:0 12px 30px rgba(20,23,28,.08)}
.card img{width:96px;height:96px;object-fit:contain;margin:0 auto}
.card h3{font-size:19px;line-height:1.3;font-weight:700;font-family:var(--font-head)}
.card p{font-size:15px;color:#4a4a4a}
.card--oval{border-radius:110px/70px;padding:34px 24px}

/* ---- Фото 8 карточек (07.11.2026) ----
   Было: .card img{width:96px;height:96px;object-fit:contain} из набора «карточки с иконками»,
   и фото 1400x1000 рисовалось полоской 96px в рамке 272px — владелец видел «полукруги».
   Теперь полноценный кадр 200px с кропом по центру-верху (головы людей в верхней трети).
   Арку карточки (border-radius у .card--oval) правило не трогает. */
.cards--oval .card img,
.cards--oval .card__pic{width:100%;height:200px;object-fit:cover;object-position:center 35%;
  margin:0;border-radius:0}

/* Шаги */
.steps{display:grid;gap:22px}
.steps--5{grid-template-columns:repeat(5,1fr)}
.steps--3{grid-template-columns:repeat(3,1fr)}
.step{background:var(--bg-white);border:1px solid #e6e6e6;border-radius:var(--radius);padding:26px 22px}
.step img{width:72px;height:72px;object-fit:contain;margin-bottom:14px}
.step__n{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;
  background:var(--accent-orange);color:#1a1a1a;font-weight:700;margin-bottom:12px}
.step h3{font-size:18px;margin-bottom:8px;font-family:var(--font-head)}
.step p{font-size:15px;color:#4a4a4a}

/* Преимущества с галкой */
.adv{display:grid;grid-template-columns:repeat(2,1fr);gap:22px}
.adv__item{display:flex;gap:16px;align-items:flex-start;background:var(--bg-white);border:1px solid #e6e6e6;border-radius:var(--radius);padding:22px}
.adv__item img{width:44px;height:44px;flex:0 0 44px;object-fit:contain}
.adv__item strong{display:block;font-size:18px;margin-bottom:6px;font-family:var(--font-head)}
.adv__item p{font-size:15px;color:#4a4a4a}

/* Тёмный блок аргументов */
.args{display:grid;grid-template-columns:repeat(2,1fr);gap:26px}
.arg{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.12);border-radius:var(--radius);padding:26px}
.arg h3{font-family:var(--font-head);font-size:20px;color:var(--accent-orange);margin-bottom:14px}
.arg ul{list-style:none;display:grid;gap:10px}
.arg li{font-size:15.5px;color:#dbe3e6;padding-left:22px;position:relative}
.arg li::before{content:"—";position:absolute;left:0;color:var(--gold)}
.arg p{font-size:15.5px;color:#dbe3e6}

/* Чек-лист */
.check{display:grid;gap:14px;list-style:none;max-width:900px}
.check li{background:var(--bg-white);border-left:4px solid var(--accent-orange);border-radius:10px;padding:16px 20px;font-size:16px}
.check li strong{font-family:var(--font-head)}

/* FAQ */
.faq{display:grid;gap:12px;max-width:980px}
.faq details{background:var(--bg-white);border:1px solid #e6e6e6;border-radius:12px;padding:18px 22px}
.faq summary{cursor:pointer;font-weight:700;font-size:17px;list-style:none;display:flex;justify-content:space-between;gap:16px}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";color:var(--accent-secondary);font-size:22px;line-height:1}
.faq details[open] summary::after{content:"–"}
.faq p{margin-top:12px;font-size:16px;color:#3d3d3d}

/* Форма захвата */
.cap{background:var(--bg-dark);color:var(--light-text);border-radius:22px;padding:44px;display:grid;grid-template-columns:1.15fr .85fr;gap:36px}
.cap h2{font-family:var(--font-head);font-size:30px;color:#fff;margin-bottom:12px}
.cap p{color:#b9c3c8;margin-bottom:20px}
.cap form{display:grid;gap:12px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.14);border-radius:16px;padding:22px}
.cap input,.cap textarea{width:100%;padding:15px 16px;border-radius:10px;border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.95);font-family:var(--font);font-size:16px;color:var(--text-dark)}
.cap small{color:#8e9ba1;font-size:12px}

/* Статья внизу */
.article{max-width:900px}
.article h2{font-family:var(--font-head);font-size:28px;margin:30px 0 12px}
.article h3{font-family:var(--font-head);font-size:21px;margin:24px 0 10px}
.article p{margin-bottom:14px}
.article ul,.article ol{margin:0 0 16px 22px;display:grid;gap:8px}

/* Подвал */
.ftr{background:var(--bg-dark);color:#c8d1d5;padding:52px 0 28px;font-size:15px}
.ftr__in{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:32px}
.ftr h3{color:#fff;font-family:var(--font-head);font-size:17px;margin-bottom:12px}
.ftr a{color:var(--accent-orange)}
.ftr__bottom{border-top:1px solid rgba(255,255,255,.12);margin-top:32px;padding-top:18px;font-size:13px;color:#8e9ba1}

/* Планшет / мобилка */
@media (max-width:1100px){
  .cards{grid-template-columns:repeat(2,1fr)}
  .steps--5{grid-template-columns:repeat(2,1fr)}
  .steps--3{grid-template-columns:1fr}
  .adv,.args{grid-template-columns:1fr}
  .cap{grid-template-columns:1fr}
  .ftr__in{grid-template-columns:1fr 1fr}
  /* меню/бургер шапки — в едином блоке ниже (07.11.2026): см. @media (max-width:1199px) */
  .hdr__nav.is-open{display:block;position:absolute;left:0;right:0;top:100%;margin:0;
    background:#fff;border-top:1px solid #e6e6e6;box-shadow:0 18px 40px rgba(20,23,28,.16);
    max-height:calc(100vh - 70px);overflow:auto;padding:4px 0 16px;font-size:16px}
  .hdr__list{display:block;padding:0 20px}
  .hdr__list>li{display:block;border-bottom:1px solid #ededed}
  .hdr__list>li:last-child{border-bottom:0}
  .hdr__list>li>a{display:block;padding:13px 0;font-size:16px;border-bottom:0}
  .hdr__list>li.is-current>a{border-bottom:0}
  .hdr__list>li.has-sub{display:grid;grid-template-columns:1fr 44px;align-items:center}
  .hdr__list>li.has-sub>a::after{display:none}
  .hdr__subbtn{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;
    padding:0;border:1px solid #e6e6e6;border-radius:9px;background:#fafafa;color:var(--bg-dark);cursor:pointer}
  .hdr__subbtn svg{transition:transform .2s ease}
  .hdr__list>li.sub-open .hdr__subbtn{background:var(--accent-orange);border-color:var(--accent-orange);color:#1a1a1a}
  .hdr__list>li.sub-open .hdr__subbtn svg{transform:rotate(180deg)}
  .hdr__list .sub{grid-column:1/-1;position:static;display:none;width:100%;min-width:0;max-height:none;
    margin:0;padding:0 0 12px;background:transparent;border:0;border-radius:0;box-shadow:none;
    opacity:1;visibility:visible;transform:none}
  .hdr__list>li.sub-open>.sub{display:block}
  .hdr__list .sub a{padding:9px 0 9px 14px;font-size:15px;color:#4a4a4a;border-radius:0}
  .hdr__list .sub a:hover{background:transparent;color:var(--accent-secondary)}
}

/* ===== ЕДИНЫЙ БРЕЙКПОЙНТ ШАПКИ (07.11.2026) =====
   До 1199 px включительно — меню скрыто, бургер виден; с 1200 px — наоборот.
   Раньше бургер включался только до 1099px (инлайн-CSS в header.php), а меню
   пряталось до 1100px (здесь): на ровно 1100 px не было НИ меню, НИ бургера. */
@media (max-width:1199px){
  .hdr__nav{display:none}
  .hdr__burger{display:flex}
}
@media (min-width:1200px){
  .hdr__nav{display:block}
  .hdr__burger{display:none}
}
@media (max-width:720px){
  body{font-size:16px}
  .hdr__nav.is-open{max-height:calc(100vh - 66px)}
  .hdr__in{min-height:66px;gap:12px}
  .hdr__logo{font-size:16px}
  .hdr__logo img{width:38px;height:38px}
  .hdr__tel{font-size:15px}
  .cards--oval .card img,
  .cards--oval .card__pic{height:160px}
  .hero__in{padding:56px 0 48px}
  .hero h1{font-size:29px}
  .hero__sub{font-size:16px}
  .sec{padding:44px 0}
  .sec__title{font-size:24px}
  .cards{grid-template-columns:1fr}
  .card--oval{border-radius:var(--radius)}
  .steps--5{grid-template-columns:1fr}
  .cap{padding:26px 20px}
  .cap h2{font-size:22px}
  .ftr__in{grid-template-columns:1fr}
  .btn{width:100%}
}

/* ===== 2026-11-07: H1 для страниц без заголовка в контенте =====
   Импортированные статьи (64 шт.) не содержат <h1>; шаблон выводит заголовок
   страницы в .wrap. Рисунок — как у H1 новых страниц (.hero h1): PT Serif,
   46px на десктопе / 29px на мобиле, цвет --text-dark. */
.page-h1{
  font-family:var(--font-head);
  font-size:46px;
  line-height:1.15;
  font-weight:700;
  color:var(--text-dark);
  margin:40px 0 16px;
  padding:0;
  text-wrap:balance;
}
@media (max-width:720px){
  .page-h1{font-size:29px;line-height:1.2;margin:24px 0 12px}
}

/* ===== Заполнение рядов (07.11.2026) =====
   У 4652 страниц свои инлайн-стили, и сетки в них заданы жёстким числом
   колонок: 4 колонки на 6 карточек, 3 на 4 шага, 6 на 4 плашки — последний
   ряд остаётся недобитым. Здесь только безопасные свойства: раскладку
   колонок досчитывает скрипт темы (sda-grid-fill), CSS даёт auto-fit для
   плашек героя и выравнивание карточек по высоте ряда.
   Ниже 900px не вмешиваемся: там медиазапросы страниц (max-width 768/720)
   сами переводят сетки в одну колонку. */
@media (min-width: 900px) {
  /* 4 плашки в сетке на 6 колонок: пустые дорожки схлопываются, плашки
     растягиваются на всю ширину ряда, а не липнут к левому краю */
  .hero-stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important; }
  /* ряд идёт сверху вниз, карточки одного ряда — одной высоты */
  .cards-grid,
  .steps-grid,
  .sda-grid { grid-auto-flow: row; align-items: stretch; }
}

/* ===== Контакты и типовая раскладка контента (07.11.2026) =====
   Разметка .sda-layout / .sda-card / .sda-sidebar пришла из старого сайта
   (импорт WP-страниц). В теме стилей для неё не было, поэтому на /contact-us/
   форма и карточка контактов растягивались на всю ширину окна (1867 px при
   окне 1440), поля формы оставались браузерными «по умолчанию», сайдбар не
   отделялся от формы.

   Все правила ниже включаются ТОЛЬКО внутри .sda-layout. Этот класс в разметке
   есть ровно на двух страницах сайта (/contact-us/ и /zayavka-bankrotstvo/);
   у остальных 4270+ страниц .sda-card описан своим инлайн-<style> в контенте и
   имеет другой дизайн (тёмно-синие карточки) — их правка не касается.
   Глобальные селекторы (img, table, input вне .sda-layout) не переопределяются. */

.sda-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 380px;
  gap:32px;
  max-width:1200px;
  margin:0 auto;
  padding:0 20px;
  align-items:start;
}
/* в контенте сайдбар идёт ПЕРВЫМ — ставим его в правую колонку явно */
.sda-layout>.sda-main{
  grid-column:1;
  grid-row:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:24px;
}
.sda-layout>.sda-sidebar{
  grid-column:2;
  grid-row:1;
  min-width:0;
}
/* форма без сайдбара (/zayavka-bankrotstvo/) — на всю ширину, без пустой колонки */
.sda-layout>.sda-main:only-child{grid-column:1 / -1}

.sda-layout .sda-sidebar{display:flex;flex-direction:column;gap:16px}

.sda-layout .sda-card{
  background:var(--bg-white);
  border:1px solid #e6e6e6;
  border-radius:var(--radius);
  padding:24px;
  min-width:0;
}

/* типографика внутри карточек */
.sda-layout .sda-card>h2,
.sda-layout .sda-card>h3,
.sda-layout .sda-header{
  font-family:var(--font-head);
  font-size:20px;
  line-height:1.3;
  font-weight:700;
  color:var(--bg-dark);
  margin:0 0 14px;
  padding:0;
}
.sda-layout .sda-sidebar .sda-header{
  font-size:19px;
  padding-bottom:12px;
  border-bottom:2px solid var(--accent-orange);
}
.sda-layout .sda-card p{
  margin:0 0 10px;
  font-size:16px;
  line-height:1.6;
  color:var(--text-dark);
}
.sda-layout .sda-card p:last-child{margin-bottom:0}
.sda-layout .sda-card a{color:var(--accent-secondary)}
.sda-layout .sda-card a:hover{color:var(--bg-dark)}

/* блок контактов в сайдбаре */
.sda-layout .sda-item{margin-bottom:14px}
.sda-layout .sda-item:last-child{margin-bottom:0}

/* шаги «Как мы работаем» */
.sda-layout .sda-steps{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  margin-top:2px;
}
.sda-layout .sda-num{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border-radius:50%;
  background:var(--accent-orange);
  color:var(--bg-dark);
  font-weight:700;
  font-size:16px;
  margin-bottom:10px;
}
.sda-layout .sda-step p{margin:0 0 6px;font-size:15px}
.sda-layout .sda-step p:last-child{margin-bottom:0}

/* подсказка «Хотите быстрее?» */
.sda-layout .sda-hint{
  background:#fdf8ee;
  border-left:4px solid var(--accent-orange);
  border-radius:10px;
  padding:14px 16px;
  margin-bottom:22px;
}
.sda-layout .sda-hint p{margin:0;font-size:15px;line-height:1.55}

/* поля формы */
.sda-layout .sda-form-row{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
.sda-layout .sda-field{margin-bottom:16px;min-width:0}
.sda-layout .sda-field p{margin:0}
.sda-layout .sda-field label{
  display:block;
  font-size:14px;
  font-weight:700;
  color:var(--text-dark);
  margin-bottom:6px;
}
.sda-layout .wpcf7-form-control-wrap{display:block}
.sda-layout input[type=text],
.sda-layout input[type=tel],
.sda-layout input[type=email],
.sda-layout input[type=search],
.sda-layout input[type=url],
.sda-layout textarea,
.sda-layout select{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  font-family:var(--font);
  font-size:16px;
  line-height:1.5;
  color:var(--text-dark);
  background:#fbfbfb;
  border:1px solid #dcdcdc;
  border-radius:10px;
  padding:11px 14px;
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.sda-layout input[type=text]:focus,
.sda-layout input[type=tel]:focus,
.sda-layout input[type=email]:focus,
.sda-layout textarea:focus,
.sda-layout select:focus{
  outline:none;
  background:var(--bg-white);
  border-color:var(--accent-orange);
  box-shadow:0 0 0 3px rgba(252,175,59,.2);
}
.sda-layout textarea{min-height:130px;resize:vertical}

/* кнопка отправки */
.sda-layout .sda-submit-block p{margin:0}
.sda-layout .sda-btn,
.sda-layout input[type=submit]{
  display:inline-block;
  width:auto;
  max-width:100%;
  box-sizing:border-box;
  cursor:pointer;
  font-family:var(--font);
  font-size:16px;
  font-weight:700;
  line-height:1.2;
  color:var(--bg-dark);
  background:var(--accent-orange);
  border:0;
  border-radius:10px;
  padding:13px 28px;
  transition:background .15s ease;
}
.sda-layout .sda-btn:hover,
.sda-layout input[type=submit]:hover{background:#f0a02a}

/* контент внутри раскладки не должен вылезать за колонку */
.sda-layout img{max-width:100%;height:auto}
.sda-layout iframe{max-width:100%}
.sda-layout table{width:100%;max-width:100%}

/* те же ограничения для обычного контента WordPress (на будущих страницах
   без .sda-layout: сейчас тема не печатает .entry-content, правила лежат
   наготове и ничего не переопределяют) */
.entry-content img{max-width:100%;height:auto}
.entry-content iframe{max-width:100%}
.entry-content table{width:100%;max-width:100%}

/* --- выравнивание остального контента /contact-us/ по тому же контейнеру ---
   Обёртка блока Cover пришла из старого сайта без отступов: H1 «Связаться
   с нами» и абзац «Работаем по всей России» липли к самому краю окна, а
   карточка «Реквизиты» (у неё инлайн-стиль margin:32px 20px) стояла слева,
   пока форма уже отцентрована. Правила ниже включаются ТОЛЬКО на этой
   странице (page-id-4649), тексты и разметку не трогают. */
body.page-id-4649 .wp-block-cover__inner-container{
  max-width:1200px;
  margin:0 auto;
  padding:0 20px;
  box-sizing:border-box;
}
/* отступ даёт обёртка Cover — второй такой же внутри .sda-layout не нужен,
   иначе H1 и карточки встают с разным отступом (20 px разницы) */
body.page-id-4649 .sda-layout{padding:0}
body.page-id-4649 main>.wp-block-paragraph{
  max-width:1200px;
  margin-left:auto;
  margin-right:auto;
  padding:0 20px;
}
body.page-id-4649 main>div[style*="max-width:820px"]{
  margin-left:max(20px, calc((100% - 1200px) / 2 + 20px))!important;
  margin-right:20px!important;
}

@media (max-width:900px){
  .sda-layout{
    grid-template-columns:1fr;
    gap:20px;
    padding:0 16px;
  }
  .sda-layout>.sda-main,
  .sda-layout>.sda-sidebar{
    grid-column:1;
    grid-row:auto;
  }
  .sda-layout .sda-card{padding:18px}
  .sda-layout .sda-steps{grid-template-columns:1fr;gap:12px}
  .sda-layout .sda-form-row{grid-template-columns:1fr}
}
@media (max-width:420px){
  .sda-layout{padding:0 12px}
  .sda-layout .sda-card{padding:16px}
}
