/* Обёртка, которая ломает flex-строку */
.pbn-breadcrumbs-wrap{
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;   /* ключевая строка */
  flex-basis: 100% !important;
  order: -1 !important;        /* ставим выше даты/автора */
}

/* Сами breadcrumbs — всегда отдельной строкой */
.pbn-breadcrumbs{
  display: block !important;
  width: 100% !important;
  margin: 0 0 10px 0 !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  line-height: 1.3 !important;
  white-space: normal !important;
}

/* На случай, если родитель — flex-nowrap */
.wp-block-post-date,
.wp-block-post-author-name{
  flex-wrap: wrap !important;
}

/* ===== Author Card ===== */
.pbn-author-card{
  margin: 48px 0;
  padding: 40px;
  background: #fff;
  border: 1px solid #eee;
}

/* grid */
.pbn-author-grid{
  display: grid;
  grid-template-columns: 320px 1fr 220px;
  column-gap: 40px;
  align-items: center;
}

/* photo */
.pbn-author-photo img{
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* name + title */
.pbn-author-name{
  margin: 0 0 6px 0;
  font-size: 42px;
  font-weight: 600;
  line-height: 1.1;
}

.pbn-author-title{
  margin: 0 0 22px 0;
  font-size: 20px;
  color: #999;
}

/* contacts */
.pbn-author-contacts{
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pbn-author-row a{
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 26px;
  font-weight: 500;
  color: #111;
  text-decoration: none;
}

.pbn-author-row a:hover{
  text-decoration: underline;
}

/* CTA */
.pbn-author-cta{
  display: flex;
  justify-content: flex-end;
}

.pbn-author-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  padding: 16px 24px;
  border: 2px solid #bbb;
  background: transparent;
  font-size: 20px;
  font-weight: 500;
  color: #111;
  text-decoration: none;
  transition: all .2s ease;
}

.pbn-author-btn:hover{
  background: #111;
  color: #fff;
  border-color: #111;
}

/* ===== Responsive ===== */
@media (max-width: 1024px){
  .pbn-author-grid{
    grid-template-columns: 260px 1fr;
    row-gap: 30px;
  }

  .pbn-author-cta{
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 640px){
  .pbn-author-card{
    padding: 28px;
  }

  .pbn-author-grid{
    grid-template-columns: 1fr;
  }

  .pbn-author-name{
    font-size: 32px;
  }

  .pbn-author-row a{
    font-size: 20px;
  }

  .pbn-author-btn{
    font-size: 18px;
    padding: 14px 20px;
  }
}

/* Author card без фото: делаем 2 колонки (текст + кнопка) */
.pbn-author-card .pbn-author-grid{
  grid-template-columns: 1fr 220px;
  align-items: center;
}

.pbn-author-card .pbn-author-info{
  max-width: 720px;
}

.pbn-author-card .pbn-author-cta{
  justify-content: flex-end;
}

/* Мобилка */
@media (max-width: 640px){
  .pbn-author-card .pbn-author-grid{
    grid-template-columns: 1fr;
    row-gap: 18px;
  }
  .pbn-author-card .pbn-author-cta{
    justify-content: flex-start;
  }
}

/* Хедер: full width без “контентного” сужения */
.pbn-header-full .wp-block-group__inner-container{
  max-width: none !important;
}

/* Колонки в хедере: лого = авто, меню = 1fr, кнопки = авто */
.pbn-header-full .lower-header{
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 18px;
}

.pbn-header-full .logo-box{
  flex: 0 0 auto;
}

.pbn-header-full .nav-box{
  flex: 1 1 auto;
  min-width: 0; /* важно для корректного “сжатия” */
}

.pbn-header-full .btn-box{
  flex: 0 0 auto;
}

/* ряд меню внутри nav-box */
.pbn-nav-row{
  display:flex;
  align-items:center;
  gap: 18px;
  width:100%;
}

/* категории занимают весь остаток и режутся только когда реально не хватает */
.pbn-cat-nav{
  display:flex;
  align-items:center;
  gap: 18px;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

.pbn-cat-link{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;  /* чтобы очень длинные названия не убивали всё меню */
}

/* правый блок: ВСЕГДА справа */
.pbn-actions{
  display:flex;
  align-items:center;
  gap: 14px;
  margin-left: auto;
  flex: 0 0 auto;
  white-space: nowrap;
}

/* навигация внутри actions не должна растягиваться */
.pbn-actions .wp-block-navigation{
  flex: 0 0 auto;
}

.pbn-actions .wp-block-social-links{
  margin: 0;
}

/* Убираем стандартный gap у блока Columns (он и делает огромный отступ) */
.pbn-header-full .wp-block-columns.lower-header{
  gap: 0 !important;
  column-gap: 0 !important;
}

/* Делаем нормальный маленький отступ между колонкой лого и колонкой меню */
.pbn-header-full .logo-box{
  margin-right: 18px;
}

/* И (опционально) уменьшим внутренний gap в самом меню */
.pbn-nav-row{
  gap: 14px; /* было 18 */
}

/* Убираем принудительные 25%/55% от WP Columns */
.pbn-header-full .lower-header > .wp-block-column.logo-box{
  flex-basis: auto !important;
  width: auto !important;
}

.pbn-header-full .lower-header > .wp-block-column.nav-box{
  flex-basis: auto !important;
  width: auto !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

/* По умолчанию (десктоп) скрываем вставленные пункты категорий внутри navigation */
.pbn-header-full .wp-block-navigation .pbn-nav-cat{
  display: none;
}

/* Когда открыто мобильное меню — показываем */
.wp-block-navigation__responsive-container.is-menu-open .pbn-nav-cat{
  display: list-item;
}

/* Мобилка: скрываем категории в шапке (в строке рядом с лого) */
@media (max-width: 1199px){
  .pbn-cat-nav{
    display: none !important;
  }
}

/* MOBILE: скрываем название сайта, оставляем только логотип */
@media (max-width: 782px){
  .wp-block-site-title{
    display: none !important;
  }
}

/* ===== BURGER OVERLAY: всегда поверх страницы ===== */

/* 1) Оверлей меню */
.wp-block-navigation__responsive-container.is-menu-open{
  position: fixed !important;
  inset: 0 !important;
  background: var(--wp--preset--color--background) !important;
  opacity: 1 !important;
  z-index: 2147483647 !important; /* максимум */
}

/* 2) Внутренний контент меню тоже поверх */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content{
  position: relative !important;
  z-index: 2147483647 !important;
  opacity: 1 !important;
}

/* 3) Кнопка закрытия тоже поверх */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close{
  position: relative !important;
  z-index: 2147483647 !important;
}

/* 4) Сам header (иногда у темы z-index выше) — тоже поднимаем, чтобы клик работал */
header.wp-block-template-part{
  position: relative;
  z-index: 10;
}

/* 5) Ключ: когда меню открыто, принудительно опускаем контент страницы */
body:has(.wp-block-navigation__responsive-container.is-menu-open) main,
body:has(.wp-block-navigation__responsive-container.is-menu-open) .wp-site-blocks{
  position: relative !important;
  z-index: 0 !important;
}


/* ===== Equal height cards ===== */

/* Важно: делаем именно flex для columns, чтобы "выровнять по высоте" */
.testimonial-sec .testimonial-cols.wp-block-columns {
  display: flex;
  align-items: stretch;
}

/* Каждый столбец — flex-контейнер */
.testimonial-sec .testimonial-cols.wp-block-columns > .wp-block-column {
  display: flex;
}

/* Карточка тянется на всю высоту столбца */
.testimonial-sec .testimonial-cols .testimonial-box {
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Имя/страна всегда внизу карточки */
.testimonial-sec .testimonial-cols .testimonial-box .testimonial-footer {
  margin-top: auto;
  padding-top: var(--wp--preset--spacing--20);
}


/* Equal height cards */
.testimonial-sec .testimonial-cols.wp-block-columns{
  display: flex;
  align-items: stretch;
}
.testimonial-sec .testimonial-cols.wp-block-columns > .wp-block-column{
  display: flex;
}
.testimonial-sec .testimonial-cols .testimonial-box{
  width: 100%;
  display: flex;
  flex-direction: column;
}
.testimonial-sec .testimonial-cols .testimonial-box .testimonial-footer{
  margin-top: auto;
  padding-top: var(--wp--preset--spacing--20);
}

/* Stars */
.testimonial-sec .pbn-stars{
  display: inline-flex;
  gap: 4px;
  align-items: center;
  line-height: 0;
  margin-bottom: var(--wp--preset--spacing--20);
}

.testimonial-sec .pbn-star{
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.testimonial-sec .pbn-star__icon{
  width: 18px;
  height: 18px;
}

/* Жёлтые заполненные */
.testimonial-sec .pbn-star.is-filled .pbn-star__icon{
  fill: #f5c542;
}

/* Пустые (серые) */
.testimonial-sec .pbn-star.is-empty .pbn-star__icon{
  fill: #cfcfcf;
  opacity: 0.65;
}

.pbn-home-header {
    max-width: max-content;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.pbn-home__h1 {
    text-align: center;
}

/* === OUR LATEST ARTICLES: 3 columns grid === */
.latest-articles-sec .wp-block-post-template.latest-articles-grid{
  list-style: none;
  padding: 0;
  margin: 0;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 80px;
  align-items: start;
  justify-items: center;
}

/* убираем дефолтные отступы у li и заголовков */
.latest-articles-sec .latest-articles-grid > li{
  margin: 0 !important;
  padding: 0 !important;
}

.latest-articles-sec .wp-block-post-title{
  margin: 0 !important;
  text-align: center;
}

/* читабельность длинных заголовков */
.latest-articles-sec .wp-block-post-title a{
  display: inline-block;
  max-width: 34ch;
  line-height: 1.35;
  text-decoration: none;
  color: inherit;
  overflow-wrap: anywhere;
}

.latest-articles-sec .wp-block-post-title a:hover{
  text-decoration: underline;
}

/* адаптив */
@media (max-width: 1024px){
  .latest-articles-sec .wp-block-post-template.latest-articles-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 40px;
  }
}
@media (max-width: 640px){
  .latest-articles-sec .wp-block-post-template.latest-articles-grid{
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* === Показать только первые 3 поста === */
.latest-articles-sec .latest-articles-grid > li{
  display: none;
}
.latest-articles-sec .latest-articles-grid > li:nth-child(-n+24){
  display: block;
}

/* раскрыто — показываем все */
.latest-articles-sec.is-expanded .latest-articles-grid > li{
  display: block;
}

/* === Read More button === */
.latest-articles-sec .latest-articles-more{
  margin-top: 34px;
  text-align: center;
}

/* кнопка исчезает после раскрытия */
.latest-articles-sec.is-expanded .latest-articles-more{
  display: none;
}

.latest-articles-sec .latest-articles-more .wp-block-button__link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 14px 26px;
  border-radius: 999px;

  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;

  background: rgba(255,255,255,.16);
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);

  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.latest-articles-sec .latest-articles-more .wp-block-button__link:hover{
  background: rgba(255,255,255,.24);
  border-color: rgba(255,255,255,.42);
  transform: translateY(-1px);
}

.latest-articles-sec .latest-articles-more .wp-block-button__link:active{
  transform: translateY(0);
}

.latest-articles-sec .latest-articles-more .wp-block-button__link:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,.35);
}

.latest-articles-sec .latest-articles-more .wp-block-button__link::after{
  content: "→";
  font-size: 16px;
  line-height: 1;
  transform: translateY(-1px);
}


.pbn-ai-links{ margin: 18px 0 28px; }
.pbn-ai-links__inner{ display:flex; flex-wrap:wrap; gap:12px; justify-content:center; }
.pbn-ai-btn{
  display:inline-flex; align-items:center; gap:10px;
  padding:10px 14px; border:1px solid rgba(0,0,0,.12);
  border-radius:999px; background:#fff; text-decoration:none; line-height:1;
}
.pbn-ai-btn:hover{ transform: translateY(-1px); box-shadow:0 6px 18px rgba(0,0,0,.08); }
.pbn-ai-btn__ico{ width:18px; height:18px; display:block; }
.pbn-ai-btn__text{ font-size:13px; font-weight:600; color:#000; white-space:nowrap; }


/* защита от вылезания элементов по ширине */
.pbn-author-card,
.pbn-author-card *{
  box-sizing: border-box;
}

/* чтобы flex-дети могли ужиматься (частая причина overflow) */
.pbn-author-grid,
.pbn-author-info,
.pbn-author-cta{
  min-width: 0;
}

/* сама кнопка не должна вылезать */
.pbn-author-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  max-width: 100%;
  white-space: normal;        /* разрешаем перенос */
  overflow-wrap: anywhere;    /* если слово/аббревиатура длинная */
  text-align: center;
}

/* узкие экраны: делаем кнопку на всю ширину */
@media (max-width: 420px){
  .pbn-author-grid{
    flex-direction: column;   /* если у тебя flex-grid */
    align-items: stretch;
  }

  .pbn-author-cta{
    width: 100%;
  }

  .pbn-author-btn{
    width: 100%;
    padding: 12px 16px;       /* чуть компактнее */
  }
}


/* ===== TOC widget styles ===== */
.pbn-toc-widget{
  background: var(--wp--preset--color--tertiary-bg-color);
  padding: var(--wp--preset--spacing--30);
  margin: 0 0 24px;
  border-bottom: 6px solid var(--wp--preset--color--primary);
}

.pbn-toc-title{
  text-align:center;
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 600;
}

.pbn-toc-list{
  margin: 0;
  padding-left: 18px;
  list-style: decimal;
}

.pbn-toc-list li{
  margin: 0 0 10px;
}

.pbn-toc-list a{
  text-decoration: none;
}

.pbn-toc-list a:hover{
  text-decoration: underline;
}



.pbn-toc-widget{
  background: var(--wp--preset--color--tertiary-bg-color);
  padding: var(--wp--preset--spacing--30);
  margin: 0 0 24px;
  border-bottom: 6px solid var(--wp--preset--color--primary);
}

.pbn-toc-title{
  text-align:center;
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
}

.pbn-toc-list{
  margin: 0;
  padding-left: 18px;
  list-style: decimal;
}

.pbn-toc-list li{
  margin: 0 0 10px;
}

.pbn-toc-empty-text{
  margin: 0;
  font-size: 14px;
  opacity: .75;
  text-align: center;
}

.pbn-toc-list a{ text-decoration:none; }
.pbn-toc-list a:hover{ text-decoration:underline; }




.footer-box.footer-box--centered {
  justify-content: center;
}

.footer-box.footer-box--centered > .wp-block-column {
  flex-grow: 0;
}

/* чтобы обе колонки имели нормальную ширину и могли центрироваться как группа */
.footer-box.footer-box--centered > .box-1 {
  flex-basis: 35%;
}

.footer-box.footer-box--centered > .box-2 {
  flex-basis: 35%;
}
