/* ——— Page gutters & section spacing ——— */
.sb-dominant{
  --sb-page-pad: clamp(16px, 4vw, 40px);
  --sb-section-gap: clamp(20px, 4vw, 40px);
}

/* убираем общий padding у контейнера */
.sb-dominant .wp-site-blocks{ padding-left:0; padding-right:0; }

/* даём поля только верхнеуровневым детям… */
.sb-dominant .wp-site-blocks > *:not(header.wp-block-template-part):not(footer.wp-block-template-part){
  padding-left: var(--sb-page-pad);
  padding-right: var(--sb-page-pad);
}

/* …но НЕ для full-bleed блоков (шапка, герой, футер) */
.sb-dominant .wp-site-blocks > .alignfull{
  padding-left: 0;
  padding-right: 0;
}

/* вертикальные отступы между секциями */
.sb-dominant .wp-site-blocks > * + *{
  margin-top: var(--sb-section-gap);
}

/* wide – центрируем и ограничиваем ширину; full – по краям */
.sb-dominant .alignwide{
  max-width: min(var(--sb-max-content, 1200px), 94vw);
  margin-left:auto; margin-right:auto; width:100%;
}
.sb-dominant .alignfull{
  margin-left: calc(-1 * var(--sb-page-pad));
  margin-right: calc(-1 * var(--sb-page-pad));
}

.sb-dominant header.wp-block-template-part .alignfull,
.sb-dominant footer.wp-block-template-part .alignfull{
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.home header.wp-block-template-part{
  position:relative; width:100%; z-index:999;
}

.sb-dominant img{max-width:100%;height:auto}
.sb-dominant a{color:var(--sb-primary)}
.sb-dominant .sb-slide-title{color:var(--sb-base)}
.sb-dominant .sb-slide-card{display:block;background:var(--sb-surface, var(--sb-bg));border-radius:var(--sb-radius-m);overflow:hidden;border:1px solid var(--sb-hairline, rgba(255,255,255,.06))}
.sb-dominant .sb-slide-thumb{width:100%;height:180px;object-fit:cover;display:block}
.sb-dominant .sb-slide-meta{padding:12px}
.sb-dominant .sb-slide-title{margin:0;font-size:1rem;line-height:1.3}
.sb-dominant .sb-latest-vertical .sb-list{list-style:none;margin:0;padding:0}
.sb-dominant .sb-latest-vertical .sb-item{padding:8px 0;border-bottom:1px solid rgba(255,255,255,.08)}
.sb-dominant .sb-latest-vertical .sb-date{opacity:.7;font-size:.9em;margin-left:6px}
.sb-dominant .sb-term-chip{display:inline-block;padding:8px 12px;border-radius:var(--sb-chip-radius,999px);background:var(--sb-surface, var(--sb-bg));border:1px solid rgba(255,255,255,.08)}
/* ——— HEADER ——— */
.sb-dominant .sb-header{background:var(--sb-surface, var(--sb-bg));color:var(--sb-base);border-bottom:1px solid rgba(255,255,255,.06)}
.sb-dominant .sb-site-title a{color:var(--sb-base)!important;text-decoration:none}
.sb-dominant .sb-nav a{color:var(--sb-base)!important;text-decoration:none;padding:8px 10px;border-radius:10px;display:inline-block}
.sb-dominant .sb-nav a:hover{background:rgba(255,255,255,.06);color:var(--sb-base)!important}

/* ——— FOOTER ——— */
.sb-dominant .sb-footer{background:var(--sb-surface, var(--sb-bg));color:var(--sb-base);border-top:1px solid rgba(255,255,255,.06)}
.sb-dominant .sb-footer-head{margin:0 0 10px 0;color:var(--sb-base)}
.sb-dominant .sb-footer a{color:var(--sb-base);text-decoration:none}
.sb-dominant .sb-footer a:hover{color:var(--sb-acc1)}

/* ——— Term List ——— */
.sb-dominant .sb-term-list{list-style:none;margin:0;padding:0}
.sb-dominant .sb-term-item{padding:6px 0;border-bottom:1px dashed rgba(255,255,255,.08)}
.sb-dominant .sb-term-item:last-child{border-bottom:none}
.sb-dominant .sb-term-count{opacity:.6;margin-left:8px}

.sb-dominant .sb-header .sb-logo a{white-space:nowrap}
/* ——— Authors ——— */
.sb-dominant .sb-author-card{background: var(--sb-bg);border: 1px solid rgba(255,255,255,.12);border-radius:var(--sb-radius-l);padding: 16px;display:flex;flex-direction:column;}

/* ——— About ——— */
.sb-dominant .sb-about{ margin-top: var(--sb-section-gap); }
.sb-dominant .sb-about .wp-block-column:first-child{ flex-basis:38%; }
.sb-dominant .sb-about .wp-block-column:last-child{  flex-basis:62%; }
.sb-dominant .sb-about-photo{width:100%;aspect-ratio: 4 / 3; max-height: 420px;object-fit: cover; border-radius:var(--sb-radius-s);display:block;
}
@media (max-width: 781px){
  .sb-dominant .sb-about .wp-block-column{ flex-basis:100%!important; }
}

/* гарантируем контрастный текст внутри карточки */
.sb-dominant .sb-author-card h1, .sb-dominant .sb-author-card h2, .sb-dominant .sb-author-card h3, .sb-dominant .sb-author-card h4, .sb-dominant .sb-author-card p{  color: var(--sb-base) !important;}
.sb-dominant .sb-author-photo{width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius:var(--sb-radius-s); display: block;}
.sb-dominant .sb-author-name{ margin: 12px 0 4px; color: var(--sb-base) !important; font-weight: 700;}
.sb-dominant .sb-author-role{ margin: 0; color: var(--sb-primary) !important; font-weight: 600;}
.sb-dominant .sb-author-line{ margin-top: 8px; color: var(--sb-base) !important; opacity: .92;}
/* equal height for authors grid */
.sb-dominant .sb-authors {padding-bottom: 72px;}
.sb-dominant .sb-authors .wp-block-columns{align-items:stretch;}
.sb-dominant .sb-authors .wp-block-column{display:flex;}
.sb-dominant .sb-authors .sb-author-card{height:100%;}


/* hero text stroke for contrast */
.sb-dominant .sb-hero h1,
.sb-dominant .sb-hero p{
  -webkit-text-stroke: 1px var(--sb-bg);
  text-shadow: 0 1px 1px var(--sb-bg), 0 0 8px rgba(0,0,0,.6);
}

/* fallback: если класс вдруг снова «съедят», нацеливаемся на первый full-bleed cover на главной */
body.home .wp-site-blocks > .wp-block-cover.alignfull:first-of-type .wp-block-cover__inner-container h1,
body.home .wp-site-blocks > .wp-block-cover.alignfull:first-of-type .wp-block-cover__inner-container p{
  -webkit-text-stroke: 1px var(--sb-bg);
  text-shadow: 0 1px 1px var(--sb-bg), 0 0 8px rgba(0,0,0,.6);
}

/* ——— Promo ——— */
.sb-dominant .sb-promo{ text-align:center; border-radius:var(--sb-radius-m); }
.sb-dominant .sb-promo .wp-block-buttons{ justify-content:center; }

/* единая высота карточек */
.sb-dominant .sb-swiper .swiper-slide{height:auto}
.sb-dominant .sb-slide-card{display:flex;flex-direction:column;height:100%}
.sb-dominant .sb-slide-thumb{width:100%;aspect-ratio:16/9;height:auto;object-fit:cover;display:block}
.sb-dominant .sb-slide-meta{flex:1 1 auto;display:flex}
.sb-dominant .sb-slide-title{
  margin:0;
  font-size:1rem;line-height:1.3;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
  overflow:hidden;min-height:calc(1rem*1.3*2); /* две строки */
}

/* ——— Term chips unified ——— */
.sb-dominant .sb-term-swiper .swiper-slide{ display:flex; }
.sb-dominant .sb-term-chip{height:var(--sb-chip-height,40px); padding:0 14px; display:flex; align-items:center; justify-content:center; max-width:180px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}

/* ——— Swiper pagination below ——— */
.sb-dominant .sb-swiper .swiper-pagination, .sb-dominant .sb-term-swiper .swiper-pagination{position: static;margin-top: 10px;text-align: center;}
.sb-dominant .sb-swiper .swiper-button-prev,.sb-dominant .sb-swiper .swiper-button-next{top: 50%;transform: translateY(-50%);}

/* ——— FAQ Accordion ——— */
.sb-dominant .sb-faq .sb-accordion{
  background: var(--sb-bg);
  border: 1px solid rgba(255,255,255,.12);
  border-radius:var(--sb-radius-m);
  overflow: hidden;
}
.sb-dominant .sb-faq .sb-accordion + .sb-accordion{ margin-top: 12px; }

/* заголовок */
.sb-dominant .sb-faq summary{
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  color: var(--sb-base); font-weight: 700;
}
.sb-dominant .sb-faq summary::-webkit-details-marker{ display:none; }
.sb-dominant .sb-faq summary:hover{ background: rgba(255,255,255,.04); }
.sb-dominant .sb-faq summary:focus-visible{
  outline: 2px solid var(--sb-primary); outline-offset: 2px; border-radius: 10px;
}

/* иконка-стрелка */
.sb-dominant .sb-faq .sb-acc-icon{ width:20px; height:20px; flex:0 0 20px; transition: transform .25s ease; }
.sb-dominant .sb-faq .sb-acc-icon::before{
  content:""; display:block; width:10px; height:10px; margin:auto;
  border-right:2px solid var(--sb-base); border-bottom:2px solid var(--sb-base);
  transform: rotate(45deg) translateY(-1px);
}
.sb-dominant .sb-faq .sb-accordion[open] .sb-acc-icon{ transform: rotate(180deg); }

/* плавное раскрытие контента через grid */
.sb-dominant .sb-faq .sb-acc-content{
  display:grid; grid-template-rows: 0fr;
  transition: grid-template-rows .28s ease, padding .28s ease;
  padding: 0 16px;
}
.sb-dominant .sb-faq .sb-accordion[open] .sb-acc-content{
  grid-template-rows: 1fr; padding: 0 16px 16px;
}
.sb-dominant .sb-faq .sb-acc-inner{ overflow:hidden; }
.sb-dominant .sb-faq .sb-acc-inner p{ margin:0; color: var(--sb-base); opacity:.92; }


:root{
  --sb-page-pad:clamp(12px,4vw,28px);
  --sb-section-gap:clamp(24px,6vw,60px);
}

/* отступы между секциями (кроме шапки/подвала) */
.sb-dominant .wp-site-blocks > * + *{margin-top:var(--sb-section-gap)}
/* ядро иногда выставляет margin-block-start — обнулим только на главной */
body.home .wp-site-blocks > * + *{margin-block-start:var(--sb-section-gap)!important}

/* горизонтальные отступы только для контента; хедер/футер не паддим */
.sb-dominant .wp-site-blocks > *:not(header.wp-block-template-part):not(footer.wp-block-template-part){
  padding-left:var(--sb-page-pad);
  padding-right:var(--sb-page-pad);
}
/* защита от каскада — явно 0 для шапки/подвала */
.sb-dominant .wp-site-blocks > header.wp-block-template-part,
.sb-dominant .wp-site-blocks > footer.wp-block-template-part{
  padding-left:0!important;
  padding-right:0!important;
}


.sb-dominant .has-bg-background-color{background-color:var(--sb-bg)!important}
.sb-dominant .has-base-background-color{background-color:var(--sb-base)!important}
.sb-dominant .has-muted-background-color{background-color:var(--sb-muted)!important}
.sb-dominant .has-primary-background-color{background-color:var(--sb-primary)!important}
.sb-dominant .has-acc1-background-color{background-color:var(--sb-acc1)!important}
.sb-dominant .has-acc2-background-color{background-color:var(--sb-acc2)!important}
.sb-dominant .has-acc3-background-color{background-color:var(--sb-acc3)!important}

.sb-dominant .has-bg-color{color:var(--sb-bg)!important}
.sb-dominant .has-base-color{color:var(--sb-base)!important}
.sb-dominant .has-muted-color{color:var(--sb-muted)!important}
.sb-dominant .has-primary-color{color:var(--sb-primary)!important}
.sb-dominant .has-acc1-color{color:var(--sb-acc1)!important}
.sb-dominant .has-acc2-color{color:var(--sb-acc2)!important}
.sb-dominant .has-acc3-color{color:var(--sb-acc3)!important}

.sb-dominant .has-bg-border-color{border-color:var(--sb-bg)!important}
.sb-dominant .has-base-border-color{border-color:var(--sb-base)!important}
.sb-dominant .has-muted-border-color{border-color:var(--sb-muted)!important}
.sb-dominant .has-primary-border-color{border-color:var(--sb-primary)!important}
.sb-dominant .has-acc1-border-color{border-color:var(--sb-acc1)!important}
.sb-dominant .has-acc2-border-color{border-color:var(--sb-acc2)!important}
.sb-dominant .has-acc3-border-color{border-color:var(--sb-acc3)!important}

/* === AI Feature blocks === */
.sb-dominant .sb-ai-feature{
  display:grid; grid-template-columns: 1.25fr 1fr; gap:24px; align-items:center;
  background:var(--sb-surface, var(--sb-bg)); border:1px solid var(--sb-border, rgba(255,255,255,.12)); border-radius:var(--sb-radius-l); overflow:hidden;
  padding-left: 0px; padding-right: 0px; margin-bottom: 36px;
}
.sb-dominant .sb-ai-feature.reverse{ grid-template-columns: 1fr 1.25fr; }
.sb-dominant .sb-ai-feature .media img{
  width:100%; display:block; height:auto; aspect-ratio: var(--sb-ai-ratio, 16/9); object-fit: cover;
}
.sb-dominant .sb-ai-feature .sb-ai-meta{ padding:16px 18px; }
.sb-dominant .sb-ai-feature .sb-ai-meta h3{ margin:0 0 8px; color:var(--sb-base); }
.sb-dominant .sb-ai-feature .sb-ai-meta p{ margin:0; color:var(--sb-base); opacity:.94; }

.sb-dominant .sb-ai-grid{
  display:grid; gap:16px; grid-template-columns: repeat(3,1fr);
}
.sb-dominant .sb-ai-card{
  background:var(--sb-surface, var(--sb-bg)); border:1px solid var(--sb-border, rgba(255,255,255,.12)); border-radius:var(--sb-radius-m); overflow:hidden;
  display:flex; flex-direction:column;
}
.sb-dominant .sb-ai-card img{
  width:100%; display:block; aspect-ratio: var(--sb-ai-ratio, 16/9); object-fit:cover;
}
.sb-dominant .sb-ai-card .meta{ padding:12px 14px; }
.sb-dominant .sb-ai-card .meta h4{ margin:0 0 6px; color:var(--sb-base); }
.sb-dominant .sb-ai-card .meta p{ margin:0; color:var(--sb-base); opacity:.92; }

@media (max-width: 781px){
  .sb-dominant .sb-ai-feature{ grid-template-columns: 1fr; }
  .sb-dominant .sb-ai-grid{ grid-template-columns: 1fr 1fr; }
}

/* ——— AI Logo ——— */
.sb-dominant .sb-site-brand{display:flex;align-items:center;gap:10px}
.sb-dominant img.sb-ai-logo{width:42px;height:42px;object-fit:contain;border-radius:8px;display:block}

/* === shared: header search === */
.sb-dominant .sb-search .wp-block-search__inside-wrapper{ gap:8px; }
.sb-dominant .sb-search .wp-block-search__input{
  border-radius:10px;
  border:1px solid var(--sb-border, rgba(255,255,255,.12));
  background:var(--sb-bg);
  color:var(--sb-base);
  padding:10px 12px;
  min-width:220px;
}
.sb-dominant .sb-search .wp-block-search__button{ border-radius:10px; }

@media (max-width:600px){
  .sb-dominant .sb-search .wp-block-search__input{ min-width:0; width:100%; }
}