/* ============================================
   ГЕО-СТРАНИЦЫ: РЕДИЗАЙН (НЕ ТРОГАЕТ HEADER/FOOTER)
   ============================================
   Применяется только на page-template-page-seo-city.
   Версия 1.0 — фикс «полотно текста» + визуальный ритм.
*/

body.page-template-page-seo-city main {
  padding: 0;
  margin: 0;
}

/* ── Общие стили всех seo-text секций ───────────────────── */
body.page-template-page-seo-city section.seo-text {
  padding: 64px 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid #eef0f4;
  position: relative;
}

body.page-template-page-seo-city section.seo-text:nth-of-type(odd) {
  background: #ffffff;
}
body.page-template-page-seo-city section.seo-text:nth-of-type(even) {
  background: #f7f9fc;
}

/* Контейнер */
body.page-template-page-seo-city section.seo-text > .container {
  max-width: 1180px !important;
  padding: 0 24px !important;
}

/* ── Section header (заголовок секции) ──────────────────── */
body.page-template-page-seo-city .section__header {
  margin-bottom: 36px !important;
  text-align: left;
  position: relative;
  padding-left: 18px;
}

body.page-template-page-seo-city .section__header::before {
  content: '';
  position: absolute;
  left: 0; top: 4px;
  width: 4px; height: 36px;
  background: #ff6b35;
  border-radius: 2px;
}

body.page-template-page-seo-city .section__title {
  font-size: 28px !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  color: #1b3c59 !important;
  margin: 0 0 6px !important;
  letter-spacing: -0.01em;
  text-transform: none !important;
}

body.page-template-page-seo-city .section__subtitle {
  font-size: 16px;
  color: #5b6b7d;
  margin: 0;
  max-width: 720px;
}

/* ── Контент seo-text__content ─────────────────────────── */
body.page-template-page-seo-city .seo-text__content {
  font-size: 15.5px;
  line-height: 1.75;
  color: #2d3a48;
}

body.page-template-page-seo-city .seo-text__content p {
  margin: 0 0 16px;
  max-width: 760px;
}

body.page-template-page-seo-city .seo-text__content p:last-child {
  margin-bottom: 0;
}

body.page-template-page-seo-city .seo-text__content h3 {
  font-size: 19px;
  font-weight: 600;
  color: #1b3c59;
  margin: 24px 0 10px;
  padding-left: 14px;
  border-left: 3px solid #ff6b35;
  line-height: 1.3;
}

body.page-template-page-seo-city .seo-text__content ul,
body.page-template-page-seo-city .seo-text__content ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

body.page-template-page-seo-city .seo-text__content ul li,
body.page-template-page-seo-city .seo-text__content ol li {
  margin-bottom: 8px;
  line-height: 1.65;
}

body.page-template-page-seo-city .seo-text__content strong {
  color: #1b3c59;
  font-weight: 600;
}

/* Aside-card (правая колонка с особенностями) */
body.page-template-page-seo-city .seo-text .col-lg-4 .card {
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  border: 1px solid #e6ebf2 !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 18px rgba(15, 31, 61, 0.04);
  position: sticky;
  top: 100px;
}

body.page-template-page-seo-city .seo-text .col-lg-4 .card .card-body {
  padding: 22px 24px;
}

body.page-template-page-seo-city .seo-text .col-lg-4 .card h3 {
  font-size: 16px !important;
  font-weight: 600;
  color: #1b3c59;
  margin: 0 0 14px !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.page-template-page-seo-city .seo-text .col-lg-4 .card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

body.page-template-page-seo-city .seo-text .col-lg-4 .card ul li {
  position: relative;
  padding: 10px 0 10px 26px;
  border-top: 1px solid #eef0f4;
  font-size: 14px;
  color: #2d3a48;
  line-height: 1.5;
}

body.page-template-page-seo-city .seo-text .col-lg-4 .card ul li:first-child {
  border-top: none;
  padding-top: 0;
}

body.page-template-page-seo-city .seo-text .col-lg-4 .card ul li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 10px;
  width: 18px; height: 18px;
  background: #ff6b35;
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

body.page-template-page-seo-city .seo-text .col-lg-4 .card ul li:first-child::before {
  top: 0;
}

/* CTA внутри card */
body.page-template-page-seo-city .seo-text .card__cta {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #eef0f4;
}

body.page-template-page-seo-city .seo-text .card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 18px;
  background: #ff6b35;
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

body.page-template-page-seo-city .seo-text .card__button:hover {
  background: #e85a25;
}

/* ── advantages__grid (карточки с иконками внутри seo-text) ─ */
body.page-template-page-seo-city .seo-text .advantages__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 24px 0;
}

body.page-template-page-seo-city .seo-text .advantage__item {
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 12px;
  padding: 22px 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

body.page-template-page-seo-city .seo-text .advantage__item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 31, 61, 0.08);
}

body.page-template-page-seo-city .seo-text .advantage__icon {
  width: 44px; height: 44px;
  background: #fff3ed;
  color: #ff6b35;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}

body.page-template-page-seo-city .seo-text .advantage__title {
  font-size: 16px;
  font-weight: 600;
  color: #1b3c59;
  margin: 0 0 6px;
  border: none;
  padding: 0;
}

body.page-template-page-seo-city .seo-text .advantage__description {
  font-size: 14px;
  color: #5b6b7d;
  margin: 0;
  line-height: 1.55;
}

/* ── ДУБЛЬ: скрываем seo-text «why» если есть features-v2 ─ */
/* features-v2 (с иконками) визуально лучше чем seo-text why-us */
body.page-template-page-seo-city section#why-us.seo-text {
  display: none !important;
}

/* ── Скрытие пустых tips (когда default из шаблона) ──────── */
/* tips часто остается с дефолтным «Помогаем подобрать» — выглядит мусором */
body.page-template-page-seo-city section#tips.seo-text .seo-text__content > p:only-child {
  /* Не скрываем — но улучшим вид. Если только 1 параграф — сделаем покрупнее */
  font-size: 17px;
  color: #1b3c59;
  font-style: italic;
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid #eef0f4;
  border-bottom: 1px solid #eef0f4;
}

/* ── Сертификаты: скрыть пустую секцию (если 0 файлов) ──── */
body.page-template-page-seo-city section.certificates .certificates__grid:empty {
  display: none !important;
}

body.page-template-page-seo-city section.certificates .certificates__grid:empty + .certificates__map {
  margin-top: 0 !important;
}

/* Если в секции certificates нет ни grid'а с items, ни map'а — скрыть полностью */
body.page-template-page-seo-city section.certificates:not(:has(img)) {
  display: none;
}

/* ── catalog (каталог продукции внутри гео) ─────────────── */
body.page-template-page-seo-city section.catalog {
  padding: 72px 0 !important;
  background: #f7f9fc;
}

body.page-template-page-seo-city section.catalog .catalog__grid {
  gap: 16px;
}

/* ── workflow (как мы работаем) ──────────────────────────── */
body.page-template-page-seo-city section.workflow {
  padding: 72px 0 !important;
  background: linear-gradient(135deg, #1b3c59 0%, #0f1f3d 100%);
  color: #fff;
}

body.page-template-page-seo-city section.workflow .section__title {
  color: #fff !important;
}

body.page-template-page-seo-city section.workflow .section__subtitle {
  color: rgba(255,255,255,.75);
}

body.page-template-page-seo-city section.workflow .section__header::before {
  background: #ff6b35;
}

body.page-template-page-seo-city section.workflow .workflow__step {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  transition: background 0.2s;
}

body.page-template-page-seo-city section.workflow .workflow__step:hover {
  background: rgba(255,255,255,0.1);
}

body.page-template-page-seo-city section.workflow .workflow__number {
  color: #ff6b35;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

body.page-template-page-seo-city section.workflow .workflow__title {
  color: #fff;
  font-size: 17px;
  margin-bottom: 8px;
}

body.page-template-page-seo-city section.workflow .workflow__description {
  color: rgba(255,255,255,.7);
  font-size: 14px;
}

/* ── brands (Официальный дистрибьютор) ───────────────────── */
body.page-template-page-seo-city section.brands {
  padding: 64px 0 !important;
  background: #fff;
}

body.page-template-page-seo-city section.brands .brands__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

body.page-template-page-seo-city section.brands .brand__card {
  text-align: center;
  padding: 28px 20px;
  border: 1px solid #e6ebf2;
  border-radius: 14px;
  background: #fff;
  transition: all 0.2s;
}

body.page-template-page-seo-city section.brands .brand__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(15, 31, 61, 0.08);
}

body.page-template-page-seo-city section.brands .brand__image {
  max-height: 60px;
  width: auto;
  margin-bottom: 14px;
  filter: grayscale(0.2);
  transition: filter 0.2s;
}

body.page-template-page-seo-city section.brands .brand__card:hover .brand__image {
  filter: grayscale(0);
}

body.page-template-page-seo-city section.brands .brand__name {
  font-size: 16px;
  font-weight: 600;
  color: #1b3c59;
  margin: 0 0 6px;
}

body.page-template-page-seo-city section.brands .brand__description {
  font-size: 13px;
  color: #5b6b7d;
  margin: 0;
  line-height: 1.5;
}

/* ── certificates (если показывается) ──────────────────── */
body.page-template-page-seo-city section.certificates {
  padding: 64px 0 !important;
  background: #f7f9fc;
}

/* ── contacts ─────────────────────────────────────────── */
body.page-template-page-seo-city section.contacts {
  padding: 64px 0 !important;
  background: #fff;
}

body.page-template-page-seo-city section.contacts .contacts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

body.page-template-page-seo-city section.contacts .contacts__item {
  background: #f7f9fc;
  border: 1px solid #e6ebf2;
  border-radius: 14px;
  padding: 22px 24px;
}

body.page-template-page-seo-city section.contacts .contacts__item h3 {
  font-size: 13px;
  font-weight: 600;
  color: #5b6b7d;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 10px;
}

body.page-template-page-seo-city section.contacts .contacts__item p {
  font-size: 15px;
  color: #1b3c59;
  margin: 0;
  line-height: 1.5;
}

body.page-template-page-seo-city section.contacts .contacts__item a {
  color: #ff6b35;
  text-decoration: none;
  font-weight: 500;
}

/* ── popular-categories ─────────────────────────────── */
body.page-template-page-seo-city section.popular-categories,
body.page-template-page-seo-city section.popular-tags {
  padding: 56px 0 !important;
  background: #f7f9fc;
}

body.page-template-page-seo-city .tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

body.page-template-page-seo-city .tag-item {
  display: inline-block;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 999px;
  color: #1b3c59;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s;
}

body.page-template-page-seo-city .tag-item:hover {
  background: #ff6b35;
  border-color: #ff6b35;
  color: #fff;
}

/* ── CTA блок «Запросить расчёт оптовых цен» ─────────────── */
body.page-template-page-seo-city section.cta {
  padding: 64px 24px !important;
  background: linear-gradient(135deg, #ff6b35 0%, #e85a25 100%);
  color: #fff;
  text-align: center;
}

body.page-template-page-seo-city section.cta .button,
body.page-template-page-seo-city section.cta a {
  background: #fff;
  color: #ff6b35;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}

body.page-template-page-seo-city section.cta .button:hover,
body.page-template-page-seo-city section.cta a:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.2);
}

/* ── Mobile responsive (375-768px) ──────────────────────── */
@media (max-width: 768px) {
  body.page-template-page-seo-city section.seo-text {
    padding: 40px 0 !important;
  }

  body.page-template-page-seo-city .section__title {
    font-size: 22px !important;
  }

  body.page-template-page-seo-city .section__header {
    margin-bottom: 24px !important;
  }

  body.page-template-page-seo-city .seo-text__content {
    font-size: 15px;
    line-height: 1.7;
  }

  body.page-template-page-seo-city .seo-text .col-lg-4 .card {
    position: static !important;
    margin-top: 18px;
  }

  body.page-template-page-seo-city .seo-text .advantages__grid {
    grid-template-columns: 1fr;
  }

  body.page-template-page-seo-city section.workflow,
  body.page-template-page-seo-city section.catalog,
  body.page-template-page-seo-city section.brands,
  body.page-template-page-seo-city section.contacts {
    padding: 48px 0 !important;
  }
}
