/* ==== База шаблона + белый текст на всём боди ==== */
body.page-template-sitemap-page{
  --page-max: 1160px;
  --gap: clamp(16px,2.4vw,28px);
  --card-bg: rgba(255,255,255,.02);
  --card-bd: rgba(255,255,255,.08);
  background:#151515 !important;
  color:#fff !important;          /* <— белый текст по умолчанию */
}

/* Убираем обертки темы */
body.page-template-sitemap-page .site-main,
body.page-template-sitemap-page .site-content,
body.page-template-sitemap-page .content-area{
  margin:0 !important; padding:0 !important;
  background:transparent !important; border:0 !important;
}
body.page-template-sitemap-page .entry-header,
body.page-template-sitemap-page .ast-breadcrumbs-wrapper,
body.page-template-sitemap-page .after-footer-widget-area{ display:none !important; }
body.page-template-sitemap-page .site-footer{ margin-top:0 !important; }

/* ==== HERO ==== */
.sm-hero{
  position:relative; isolation:isolate;
  min-height:46svh;
  padding:clamp(80px,10vh,120px) 16px 48px;
  background-image:var(--hero-bg);
  background-size:cover; background-position:center;
}
.sm-hero::before{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.66) 60%, rgba(0,0,0,.72) 100%);
  z-index:0;
}
.sm-hero__inner{
  position:relative; z-index:1;
  max-width:var(--page-max); margin:0 auto;
  display:grid; grid-template-columns:1fr; gap:var(--gap); align-items:end;
}
.sm-hero__title{
  margin:0 0 10px; font-weight:900; line-height:1.05;
  font-size:clamp(32px,6vw,56px); color:#fff;
  text-shadow:0 6px 18px rgba(0,0,0,.55);
}
.sm-hero__lead{ margin:0 0 16px; font-size:clamp(14px,2vw,18px); opacity:.96; }
.sm-hero__cta{ display:flex; gap:12px; flex-wrap:wrap; }

/* ==== Кнопки (универсальные) ==== */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:13px 18px; border-radius:999px; font-weight:800; font-size:15px;
  text-decoration:none; border:0; cursor:pointer;
  transition:transform .06s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-cta      { background:#444; color:#fff; box-shadow:none; }
.btn-cta:hover{ background:#505050; transform:translateY(-1px); }
.btn-outline  { background:transparent; color:#fff; border:2px solid rgba(255,255,255,.8); text-decoration:none; }
.btn-outline:hover{ color:#fff; border-color:rgba(255,255,255,.9); background:rgba(255,255,255,.10); text-decoration:none; }

/* ==== Секции ==== */
.sm-section{ background:#1f1f1f; }
.sm-section__inner{
  max-width:min(var(--page-max), 980px);
  margin:0 auto; padding:28px clamp(16px,3.5vw,48px) 40px;
}
.sm-h2{
  margin:0 0 14px; color:#fff; font-weight:900; line-height:1.05; letter-spacing:.2px;
  font-size:clamp(26px,4.6vw,40px); text-align:left;
  text-shadow:0 6px 18px rgba(0,0,0,.5);
}

/* ==== Основные страницы ==== */
.sm-list{
  list-style:none; margin:0; padding:0;
  display:grid; gap:10px;
}
.sm-list__item{
  background:var(--card-bg);
  border:1px solid var(--card-bd);
  border-radius:14px; padding:14px 16px;
  box-shadow:0 12px 28px rgba(0,0,0,.35);
}
.sm-link{
  color:#fff; text-decoration:none; font-weight:800; display:inline-block;
}
.sm-link:hover{ text-decoration:underline; }

/* ==== Группы услуг ==== */
.sm-groups{ display:grid; gap:14px; }
.sm-group{
  background:var(--card-bg);
  border:1px solid var(--card-bd);
  border-radius:16px; padding:16px;
  box-shadow:0 12px 28px rgba(0,0,0,.35);
}
.sm-group__title{ margin:0 0 10px; font-weight:900; font-size:18px; }
.sm-group__list{
  list-style:none; margin:0; padding:0;
  display:grid; gap:8px;
}
.sm-group__list a{ color:#fff; text-decoration:none; font-weight:700; }
.sm-group__list a:hover{ text-decoration:underline; }

.sm-footnote{ margin-top:16px; font-size:13px; opacity:.9; }

/* Сетки */
@media (min-width: 980px){
  .sm-list{ grid-template-columns: repeat(3, minmax(0,1fr)); }
  .sm-groups{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 979px){
  .sm-list, .sm-groups{ grid-template-columns: 1fr; }
}

/* ==== Фикс мобильного меню (как на других страницах) ==== */
@media (max-width:960px){
  body.page-template-sitemap-page .site-header .main-nav .menu{
    position: fixed !important;
    inset: 72px 0 0 0 !important;
    width: 100% !important;
    height: calc(100vh - 72px) !important;
    background: rgba(0,0,0,0.96) !important;
    display: none !important;      /* скрыто по дефолту */
    flex-direction: column !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    z-index: 2147483647 !important;
  }
  #nav-toggle:checked ~ .main-nav .menu{ display:flex !important; }
  body.menu-open{ overflow:hidden !important; height:100vh !important; }
  body.page-template-sitemap-page .site-header{ z-index:2147483648 !important; }
}

/* Мелочи */
a, button, input, textarea{ -webkit-tap-highlight-color: transparent; outline:none; }

/* === HERO: выравниваем по центру === */
.sm-hero{
  position:relative; isolation:isolate;
  min-height:46svh;
  padding:clamp(80px,10vh,120px) 16px 48px;
  background-image:var(--hero-bg);
  background-size:cover; background-position:center;
  display:grid;                 /* центрирование по обоим осям */
  place-items:center;           /* <— ключевое */
}
.sm-hero__inner{ max-width:var(--page-max); margin:0 auto; text-align:center; }

/* === Ссылки: без синего цвета нигде === */
.sm-link,
.sm-link:link,
.sm-link:visited,
.sm-link:hover,
.sm-link:focus,
.sm-link:active{
  color:#fff !important;
  text-decoration:none !important;
  outline:none !important;
  background:transparent !important; /* убираем синий фон некоторых браузеров */
}
/* ховер оставим подчёркнутым, если хочется — можно снять */
.sm-link:hover{ text-decoration:underline !important; }

/* убираем «синий тап-хайлайт» и выделение текста на мобильных */
.sm-link{
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

/* === Заголовки групп «Услуги» всегда белые === */
.sm-group__title{
  color:#fff !important;
}

/* (на всякий) кнопки тоже без синевы при фокусе на мобилках */
.btn, .btn:focus, .btn:active{
  color:#fff !important;
  -webkit-tap-highlight-color: transparent;
}
