/* Compatibility with existing markup: do not duplicate the legacy design rules. */
.language-menu a{display:block; padding:7px; border-radius:8px; color:var(--yellow);text-decoration:none;cursor:pointer;}
.language-menu a:hover,.language-menu a.is-active{background:var(--yellow);color:var(--brown);}
.catalog-product-card img,.related-product img{object-fit:contain;}
.product-view__copy>.product-description{border:1px dashed #a78b75;padding:10px;border-radius:0;}
.product-view__copy>.product-description p{margin:0 0 .65em;}
.product-view__copy>.product-description p:last-child{margin-bottom:0;}
.product-packaging__item summary{cursor:pointer;}
.bayan-product-variant-bar{display:flex;flex-wrap:wrap;gap:9px;margin:14px 0 20px;}
.bayan-variant-button{border:1px solid #b49c86;border-radius:20px;background:white;color:var(--brown);padding:6px 14px;cursor:pointer;}
.bayan-variant-button.is-active{background:var(--yellow);border-color:var(--yellow);}
.bayan-product-meta-secondary{padding-top:12px;font-size:.85em;display:flex;gap:16px;flex-wrap:wrap;}
.bayan-product-meta-secondary>span:empty{display:none;}
.bayan-product-gallery{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;}
.bayan-product-gallery button{width:58px;height:58px;padding:2px;background:#fff;border:1px solid #ddd;cursor:pointer;}
.bayan-product-gallery button.is-active{border-color:#5b2509;}
.bayan-product-gallery button img{width:100%;height:100%;object-fit:contain;}
.catalog-products__pagination{display:flex;justify-content:center;gap:14px;padding:32px 0;}
.catalog-products__pagination .current{font-weight:700;color:var(--brown);text-decoration:underline;}
.catalog-products__pagination a{color:var(--brown);}
/* Keep sidebar below product content on small screens, as agreed in the original site. */
@media(max-width:820px){.catalog-layout{display:flex;flex-direction:column;}.catalog-products,.product-view{order:1;}.product-sidebar,.catalog-sidebar{order:2;}.related-products{order:3;}.catalog-products__grid{grid-template-columns:repeat(2,minmax(0,1fr));}}

.product-nutrition [hidden],.product-packaging__item[hidden]{display:none!important;}

.bayan-extra-product-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin-top:32px;color:#78645b;}
.bayan-extra-product-fields div{border-top:1px solid #ddd;padding-top:10px;}
.bayan-extra-product-fields dt{font-weight:600;}
.bayan-extra-product-fields dd{margin:4px 0 0;}

.catalog-download.is-disabled{opacity:.7;cursor:default;}
/* PDF catalog names may be longer than the old numeric labels. */
.catalog-downloads__list{flex-wrap:wrap;}
.catalog-download{max-width:110px;text-align:center;overflow-wrap:anywhere;}

/* v1.1: primary WP menu reuses the same DOM at every breakpoint. */
@media (min-width: 821px) {
  .nav-list--dynamic { grid-template-columns: repeat(var(--bayan-nav-count, 8), minmax(0, 1fr)); }
}
.nav-item { position: relative; }
.nav-submenu-toggle { border: 0; color: var(--yellow); background: transparent; cursor: pointer; padding: 6px; }
.nav-item.has-submenu > .nav-link:not(.nav-link--primary) { display: inline-flex; }
.nav-item.has-submenu > .nav-submenu-toggle { display: inline-flex; }
@media(max-width:820px) {
  .nav-item.has-submenu > .nav-link:not(.nav-link--primary) { width: calc(100% - 50px); }
  .nav-item.has-submenu > .nav-submenu-toggle { width: 42px; justify-content: center; vertical-align: middle; }
}
.bayan-sidebar-widgets { margin-top: 24px; }
.bayan-sidebar-widgets .widget { margin-bottom: 20px; }
.bayan-page-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(220px,280px); gap:32px; }
.bayan-page-aside .widget { margin-bottom: 24px; }
.bayan-footer-widgets { margin: 12px auto 32px; }
@media(max-width:820px) { .bayan-page-layout { grid-template-columns: minmax(0,1fr); } }

/* v1.1.2: two independent widget columns, retaining the existing footer layout. */
.footer__column > .footer__widget { margin: 0; min-width: 0; }
.footer__column--right > .widget_bayan_footer_copyright { margin-top: auto; }
.footer__column .footer__nav-list,
.footer__column .widget_nav_menu ul.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.footer__column .footer__nav-list a,
.footer__column .widget_nav_menu ul.menu a {
  color: var(--brown);
  font-size: 17px;
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer__column .footer__nav-list .sub-menu,
.footer__column .widget_nav_menu .sub-menu { list-style: none; margin: 7px 0 0 10px; padding: 0; }
@media (max-width: 820px) {
  /* display:contents passes individual menu/contact/copyright items to the original mobile grid. */
  .footer__column > .footer__widget,
  .footer__column > .widget_bayan_footer_menu > .footer__nav,
  .footer__column > .widget_nav_menu > div { display: contents; }
  .footer__column--left .footer__nav-list,
  .footer__column--left .widget_nav_menu ul.menu { grid-column: 1; grid-row: 2; }
  .footer__column--right .footer__nav-list,
  .footer__column--right .widget_nav_menu ul.menu { grid-column: 2; grid-row: 2; }
  .footer__column--left .footer__contacts { grid-column: 1 / -1; grid-row: 3; margin-top: 0; }
  .footer__column--right .footer__copy { grid-column: 1 / -1; grid-row: 4; margin: 0; }
  .footer__column .footer__nav-list a,
  .footer__column .widget_nav_menu ul.menu a { font-size: 15px; }
}

/* All core WordPress archive/search templates share the existing news layout. */
.news-archive__description { margin: -3px 0 24px; color: var(--brown); max-width: 900px; }
.news-archive__description p { margin: 0 0 12px; }
.news-filter--simple { grid-template-columns: minmax(0,1fr) 130px; }
.news-list-card__type { display: block; margin: 9px 10px 12px; color: #bd9400; font-size: 17px; font-weight: 600; }
.news-list-card--product .news-list-card__image img { object-fit: contain; background: #fff; }
.pagination__ellipsis { color: var(--brown); padding: 0 3px; }
.bayan-not-found > p:not(.news-archive__eyebrow) { margin: 0 0 30px; max-width: 650px; }
.bayan-not-found__back, .bayan-attachment a { color: var(--brown); text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 4px; }
.bayan-attachment figure { margin: 0 0 24px; }
.bayan-attachment figure img { max-height: 70vh; width: auto; object-fit: contain; }
.bayan-attachment figcaption { margin-top: 10px; }
.bayan-attachment h1 { line-height: 1.1; }
@media (max-width: 980px) {
  .news-filter--simple { grid-template-columns: minmax(0,1fr) 150px; }
  .news-filter--simple .news-filter__field--search, .news-filter--simple .news-filter__submit { grid-column: auto; width: auto; }
}
@media (max-width: 820px) {
  .news-filter--simple { grid-template-columns: 1fr; }
  .news-filter--simple .news-filter__submit { width: 100%; }
  .news-list-card__type { margin: 7px 4px 8px; font-size: 14px; }
}

/* News/category archive date selector: locale follows RU/KZ/EN on the site,
   rather than the visitor's OS/browser language. Native inputs remain fallback. */
.news-filter[data-calendar-language] { position: relative; z-index: 5; }
.news-filter__field--date.is-localized { position: relative; z-index: 1; }
.news-filter__field--date.is-localized .news-calendar__native,
.news-filter__field--date.is-localized .news-filter__date-label { display: none; }
.news-filter__field--date .news-calendar__trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; height: 100%; padding: 0 16px; border: 0;
  border-radius: inherit; background: transparent; text-align: left;
  color: var(--brown); font: inherit; font-size: 16px; cursor: pointer;
}
.news-filter__field--date .news-calendar__trigger:focus-visible { outline: 2px solid #7c4700; outline-offset: 3px; }
.news-calendar__trigger.is-placeholder { color: rgba(54, 26, 10, .48); }
.news-calendar__icon {
  display: block; width: 17px; height: 16px; flex: 0 0 17px;
  border: 1.5px solid #6b6764; border-radius: 2px; position: relative;
}
.news-calendar__icon::before { content: ''; position: absolute; top: 3px; left: 0; right: 0; border-top: 1.5px solid #6b6764; }
.news-calendar__popup {
  position: absolute; right: 0; top: calc(100% + 7px);
  width: 320px; max-width: calc(100vw - 20px); box-sizing: border-box;
  padding: 12px; background: #fff; border: 1px solid #dadada;
  border-radius: 8px; box-shadow: 0 5px 20px rgba(0,0,0,.16);
  color: #2e1a10; z-index: 100; font-size: 14px;
}
.news-calendar__popup[hidden] { display: none; }
/* On mobile the picker follows the entire filter, never overlapping its fields or news. */
@media (max-width: 820px) {
  .news-calendar__popup.is-below-form {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    max-width: 100%;
    margin: -14px 0 30px;
  }
}
.news-calendar__heading { display: flex; align-items: center; gap: 4px; margin-bottom: 12px; }
.news-calendar__heading strong { flex: 1; padding-left: 6px; font-size: 15px; font-weight: 600; }
.news-calendar__move, .news-calendar__day, .news-calendar__action {
  border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer;
}
.news-calendar__move { font-size: 23px; width: 32px; height: 32px; line-height: 1; }
.news-calendar__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.news-calendar__weekday { padding: 7px 0; color: #5e5149; font-size: 12px; }
.news-calendar__day { height: 34px; border-radius: 4px; font-size: 13px; }
.news-calendar__day.is-other-month { color: #a8a4a0; }
.news-calendar__day.is-today { outline: 1px solid #d0a000; outline-offset: -2px; }
.news-calendar__day.is-selected { background: var(--yellow); color: #271400; font-weight: 700; }
.news-calendar__move:hover, .news-calendar__day:hover, .news-calendar__action:hover { background: #fff0b2; }
.news-calendar__move:focus-visible, .news-calendar__day:focus-visible, .news-calendar__action:focus-visible { outline: 2px solid #785000; }
.news-calendar__actions { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #eee; padding-top: 7px; margin-top: 9px; }
.news-calendar__action { padding: 7px; color: #865700; }

/* Year archive navigation belongs to News only; other categories keep their filters. */
.news-years {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 34px;
}
.news-years__link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 9px 20px;
  border: 1.5px solid var(--yellow);
  border-radius: 12px;
  background: #fff;
  color: var(--brown);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.news-years__link:hover,
.news-years__link:focus-visible,
.news-years__link.is-active {
  background: var(--yellow);
  color: var(--brown);
}
.news-years__link:focus-visible { outline: 2px solid var(--brown); outline-offset: 3px; }
@media (max-width: 820px) {
  .news-years {
    flex-wrap: nowrap;
    gap: 9px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    margin-right: -18px;
    padding: 0 18px 10px 0;
    margin-bottom: 24px;
  }
  .news-years__link { flex: 0 0 auto; min-height: 40px; padding: 8px 16px; }
}

/* Dedicated news archive entry and manually assigned article tags. */
.news-archive__year-entry { margin: 0 0 24px; }
.news-archive__year-entry a,
.news-view__tags a {
  color: var(--brown);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--yellow);
}
.news-archive__year-entry a:hover,
.news-view__tags a:hover { color: #a97000; }
.news-view__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin-top: 30px;
  font-size: 16px;
  color: var(--brown);
}
.news-view__tags span { font-weight: 600; }

/* Shared partner-style tabs for shareholders and financial statements.
   Allow translated labels to wrap on small screens. */
.news-archive__document-tabs { flex-wrap: wrap; }
.news-archive__document-tabs .partners-page__tab {
  max-width: 100%;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}

/* Shareholder disclosures and financial statements: full-width, text-only archive.
   Keep the shared card typography, filters, and pagination unchanged. */
.news-archive__grid--documents { grid-template-columns: minmax(0, 1fr); gap: 38px; }

/* Regular WordPress pages use the same header scale and spacing as Brands. */
.bayan-generic-page {
  padding-top: calc(var(--header-height) + 56px);
  padding-bottom: 80px;
  min-height: 45vh;
}
/* About Company: the slider begins immediately below the fixed menu. */
main.bayan-generic-page--company { padding-top: var(--header-height); }
@media (min-width: 821px) {
  body.admin-bar main.bayan-generic-page--company {
    padding-top: calc(var(--header-height) - var(--wp-admin--admin-bar--height, 32px));
  }
}
.bayan-page__header { margin: 0 0 48px; min-width: 0; }
.bayan-page__title { overflow-wrap: anywhere; }
@media (max-width: 820px) {
  .bayan-generic-page { padding-top: calc(var(--header-height) + 28px); }
  .bayan-page__header { margin-bottom: 26px; }
}

/* Brands: 1C "Направление", reusing the existing three-column product cards. */
.brands-main .brands-layout {
  padding-top: 56px;
  grid-template-areas:
    "header header"
    "sidebar products";
  align-items: start;
  row-gap: 0;
}
.brands-header {
  grid-area: header;
  min-width: 0;
  margin: 0 0 48px;
}
.brands-main .brands-sidebar {
  grid-area: sidebar;
  padding-top: 0;
}
.brands-main .brands-products {
  grid-area: products;
}
.brands-list { gap: 12px; }
.brands-main .brands-list a { font-size: 17px; line-height: 1.35; }
.brands-products__eyebrow, .bayan-page__eyebrow { margin: 0 0 12px; color: #dadada; font-size: 21px; }
.brands-products__title, .bayan-page__title { margin: 0; color: var(--brown); font-size: clamp(30px, 3.2vw, 46px); line-height: 1.13; font-weight: 600; }
/* About Company: match the standard light-gray page subtitle without affecting other .eyebrow labels. */
.about--company .about__copy > .eyebrow {
  margin: 0 0 12px;
  color: #dadada;
  font-size: 21px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}
@media (max-width: 820px) {
  .about--company .about__copy > .eyebrow { font-size: 16px; }
}
/* About slider: keep paragraphs inside their own grid column, even when
   text pasted from Word contains non-breaking spaces or long unbroken runs.
   Leave intentional line breaks (<br>) and all typography unchanged. */
.about--company .about__layout,
.about--company .about__copy,
.about--company .about-copy-slider,
.about--company .about-copy-slide {
  min-width: 0;
}
.about--company .about-copy-slide > p {
  max-width: min(720px, 100%);
  overflow-wrap: anywhere;
  word-break: normal;
}

/* About Company: the decorative white overlay on the visual column was
   painted over the last characters of the text. Keep the illustration and
   statistics in their columns, but do not let that overlay mask the copy.
   Reserve a real text-to-statistics gutter at desktop/tablet widths. */
@media (min-width: 821px) {
  .about--company .about__visual::before {
    display: none;
  }
  .about--company .about__copy {
    padding-right: clamp(110px, 8vw, 150px);
  }
}

/* Match Contacts to the shared page heading; keep its yellow underline from site.css. */
.contacts-page .bayan-page__title { font-size: clamp(30px, 3.2vw, 46px); line-height: 1.13; text-transform: none; }
/* News category: match the shared heading typography and spacing on Warranty/Contacts.
   Keep news cards, filter layout and pagination as they are. */
body.category-news .news-archive__section {
  padding-top: calc(var(--header-height) + 56px);
}
body.category-news .news-archive__eyebrow {
  margin: 0 0 12px;
  color: #dadada;
  font-size: 21px;
  font-weight: 400;
}
body.category-news .news-archive h1#news-archive-title {
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.13;
  font-weight: 600;
}
@media (max-width: 820px) {
  body.category-news .news-archive__section {
    padding-top: calc(var(--header-height) + 28px);
  }
  body.category-news .news-archive__eyebrow { font-size: 16px; }
  body.category-news .news-archive h1#news-archive-title { font-size: 30px; }
}
@media (max-width: 820px) {
  .brands-main .brands-layout {
    padding-top: 28px;
    grid-template-areas:
      "header"
      "products"
      "sidebar";
  }
  .brands-header { margin-bottom: 26px; }
  .brands-main .brands-sidebar { padding-top: 26px; }
  .brands-main .brands-list { gap: 10px 16px; }
  .brands-main .brands-list a { font-size: 15px; }
  .brands-products__eyebrow, .bayan-page__eyebrow { font-size: 16px; }
  .brands-products__title, .bayan-page__title { font-size: 30px; }
  .contacts-page .bayan-page__title { font-size: 30px; }
}

.nav-item.has-submenu:not(.nav-item--products) > .mega-menu .mega-menu__grid {
  column-count: 1;
}

/* WordPress editor content (Classic Editor, imported Gutenberg blocks, media captions).
   Scope these rules to actual article bodies: never to header, site sliders or product images.
   WordPress core/plugin generated ID and utility classes do not need one rule per ID. */
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) {
  display: flow-root; /* contain floated images without swallowing the next section */
  min-width: 0;
}
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(img, video, iframe, figure, .wp-caption, .wp-block-embed, .wp-block-table) {
  max-width: 100%;
}
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(img, video) {
  height: auto;
}

/* Classic WordPress image alignment, including linked images and captions. */
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) .alignnone {
  margin: 0 0 1em;
}
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) .aligncenter {
  display: block;
  float: none;
  margin: 0 auto 1.3em;
  text-align: center;
}
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) .alignleft {
  float: left;
  margin: 0 1.25em 1em 0;
}
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) .alignright {
  float: right;
  margin: 0 0 1em 1.25em;
}
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.alignwide, .alignfull) {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  clear: both;
}
/* A full-width block is full within the editorial content column, not under a sidebar. */
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) .alignfull {
  width: 100%;
}

/* Classic [caption] output and Gutenberg image captions. */
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) .wp-caption {
  box-sizing: border-box;
  max-width: 100%;
  padding: 5px;
  border: 1px solid #e3dcd5;
  background: #f8f6f3;
  text-align: center;
  border-radius: 4px;
}
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) .wp-caption img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  padding: 0;
  border: 0;
}
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.wp-caption-text, .wp-block-image figcaption, .wp-block-gallery > figcaption, .blocks-gallery-caption) {
  margin: 7px 0 0;
  padding: 0 4px 3px;
  color: #66554a;
  font-size: .82em;
  line-height: 1.4;
  text-align: center;
}
/* Classic caption paragraphs must override the news article paragraph spacing. */
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) .wp-caption p.wp-caption-text {
  margin: 7px 0 0;
  padding: 0 4px 3px;
}
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(figure.wp-block-image, .wp-block-image figure) {
  max-width: 100%;
  margin-top: 0;
  margin-bottom: 1.3em;
}
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) .wp-block-image.aligncenter img {
  margin-left: auto;
  margin-right: auto;
}

/* Classic [gallery] shortcode and galleries copied from block-based posts. */
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.gallery, .wp-block-gallery, .blocks-gallery-grid) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
  max-width: 100%;
  margin: 0 0 1.5em;
  padding: 0;
  list-style: none;
  clear: both;
}
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.gallery-item, .wp-block-gallery figure.wp-block-image, .blocks-gallery-item) {
  box-sizing: border-box;
  float: none;
  width: auto !important; /* Classic gallery prints width percentages inline. */
  max-width: 100%;
  min-width: 0;
  margin: 0;
  list-style: none;
}
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.gallery, .wp-block-gallery, .blocks-gallery-grid) img {
  display: block;
  max-width: 100%;
  height: auto;
}
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.gallery-caption, .blocks-gallery-item__caption) {
  font-size: .78em;
  line-height: 1.35;
  text-align: center;
}
/* Column classes appear on the gallery wrapper in both legacy and block markup. */
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.gallery.gallery-columns-1, .wp-block-gallery.columns-1, .blocks-gallery-grid.columns-1) { grid-template-columns: minmax(0, 1fr); }
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.gallery.gallery-columns-2, .wp-block-gallery.columns-2, .blocks-gallery-grid.columns-2) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.gallery.gallery-columns-4, .wp-block-gallery.columns-4, .blocks-gallery-grid.columns-4) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.gallery.gallery-columns-5, .wp-block-gallery.columns-5, .blocks-gallery-grid.columns-5) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.gallery.gallery-columns-6, .wp-block-gallery.columns-6, .blocks-gallery-grid.columns-6) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.gallery.gallery-columns-7, .wp-block-gallery.columns-7, .blocks-gallery-grid.columns-7) { grid-template-columns: repeat(7, minmax(0, 1fr)); }
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.gallery.gallery-columns-8, .wp-block-gallery.columns-8, .blocks-gallery-grid.columns-8) { grid-template-columns: repeat(8, minmax(0, 1fr)); }
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.gallery.gallery-columns-9, .wp-block-gallery.columns-9, .blocks-gallery-grid.columns-9) { grid-template-columns: repeat(9, minmax(0, 1fr)); }

/* Text and media blocks commonly present in imported WordPress content. */
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) .wp-block-media-text {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.wp-block-columns, .wp-block-media-text) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 22px;
  margin-bottom: 1.4em;
}
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.wp-block-column, .wp-block-media-text__content) { min-width: 0; }
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) .wp-block-media-text__media img { width: 100%; height: auto; }
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.wp-block-table, .wp-block-table table) { width: 100%; }
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) .wp-block-table { overflow-x: auto; }
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) .wp-block-table table { border-collapse: collapse; }
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) .wp-block-table :is(td, th) { border: 1px solid #ddd; padding: 8px 12px; }
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) .wp-block-table.is-style-stripes tr:nth-child(odd) { background: #faf8f4; }
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(blockquote, .wp-block-quote) { border-left: 3px solid var(--yellow); padding-left: 18px; margin: 1.3em 0; }
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) .has-text-align-center { text-align: center; }
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) .has-text-align-right { text-align: right; }
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.wp-block-buttons, .wp-block-social-links) { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; }
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) .wp-block-button__link { display: inline-block; border-radius: 10px; background: var(--brown); color: #fff; padding: 10px 20px; text-decoration: none; }
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) .wp-block-separator { border: 0; border-top: 1px solid #d8d0c9; margin: 1.4em 0; }
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) .wp-block-embed.is-type-video iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
:where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.wp-block-video video, .wp-block-audio audio) { max-width: 100%; }

@media (max-width: 700px) {
  /* Text wrapping around floats becomes unreadable on narrow screens. */
  :where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.alignleft, .alignright) {
    float: none;
    display: block;
    max-width: 100%;
    margin: 0 auto 1.2em;
  }
  :where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.gallery, .wp-block-gallery, .blocks-gallery-grid),
  :where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.gallery, .wp-block-gallery, .blocks-gallery-grid)[class*="columns-"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  :where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.gallery.gallery-columns-1, .wp-block-gallery.columns-1, .blocks-gallery-grid.columns-1) { grid-template-columns: minmax(0, 1fr); }
  :where(.bayan-generic-page article, .news-view__content, .product-description, .catalog-products__description, .bayan-relate__intro) :is(.wp-block-columns, .wp-block-media-text) { grid-template-columns: minmax(0, 1fr); }
}

/* WordPress accessibility helper: hide visually, retain text for screen readers. */
.screen-reader-text:not(:focus) {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Desktop WordPress submenus: the hover target must span the whole header.
   The catalog already does this; without it the menu closes across the gap. */
@media (min-width: 821px) {
  .nav-list > .nav-item.has-submenu:not(.nav-item--products) {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--header-height);
  }

  /* Keep the existing full-width chocolate backdrop, but align ordinary
     submenu links with their parent nav link on any desktop width/language. */
  .nav-list > .nav-item.has-submenu:not(.nav-item--products) > .mega-menu > .mega-menu__inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 38px 32px 46px var(--bayan-submenu-offset, 48px);
  }
}

.footer__nav a:hover {
  text-decoration: none;
}

/* Brand links below product PDF catalogues (task 3.8). */
.catalog-brands{margin-top:34px;}
.catalog-brands__title{margin:0 0 12px;color:var(--brown);font-size:18px;font-weight:700;}
.catalog-brands__list{gap:7px;}
.catalog-brands__list a{line-height:1.4;overflow-wrap:anywhere;}
@media(max-width:820px){.catalog-brands__list a{font-size:15px;}}

/* About Company / Sponsorship and Culture: four organization logos, 2x2 as in the approved mockup. */
.about--company .about-stats-slide--sponsorship {
  position: relative;
  z-index: 2;
}
.about--company .about-sponsorship-logos {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, 120px);
  align-items: center;
  justify-items: center;
  gap: 22px 24px;
  width: max-content;
  margin-left: -85px;
}
.about--company .about-sponsorship-logos img {
  display: block;
  width: 120px;
  height: 110px;
  max-width: 100%;
  object-fit: contain;
}
@media (min-width: 821px) and (max-width: 1100px) {
  .about--company .about-sponsorship-logos {
    grid-template-columns: repeat(2, 100px);
    gap: 16px;
    margin-left: -45px;
  }
  .about--company .about-sponsorship-logos img {
    width: 100px;
    height: 100px;
  }
}
@media (max-width: 820px) {
  .about--company .about-sponsorship-logos {
    grid-template-columns: repeat(2, minmax(0, 110px));
    gap: 18px;
    margin-left: 22px;
    padding-bottom: 50px;
  }
  .about--company .about-sponsorship-logos img {
    width: 110px;
    height: 100px;
  }
}
@media (max-width: 380px) {
  .about--company .about-sponsorship-logos {
    grid-template-columns: repeat(2, minmax(0, 90px));
    gap: 12px;
    margin-left: 8px;
  }
  .about--company .about-sponsorship-logos img {
    width: 90px;
    height: 88px;
  }
}


/* Contacts: native expandable list of additional department contacts (RU/KZ/EN). */
.contacts-page__extra {
  margin-top: 30px;
  border-bottom: 2px solid var(--yellow);
  color: var(--brown);
}
.contacts-page__extra-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 62px;
  padding: 15px 28px;
  cursor: pointer;
  list-style: none;
  font-size: 23px;
  line-height: 1.2;
  font-weight: 600;
}
.contacts-page__extra-toggle::-webkit-details-marker { display: none; }
.contacts-page__extra-toggle::marker { content: ''; }
.contacts-page__extra-toggle:hover,
.contacts-page__extra-toggle:focus-visible { color: #8c5b15; }
.contacts-page__extra-toggle:focus-visible { outline: 2px solid var(--yellow); outline-offset: -2px; }
.contacts-page__extra-chevron {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform .18s ease;
}
.contacts-page__extra[open] .contacts-page__extra-chevron {
  transform: translateY(3px) rotate(225deg);
}
.contacts-page__extra-content { padding: 5px 28px 32px; }
.contacts-page__extra-content h2 {
  margin: 22px 0 18px;
  color: var(--brown);
  font-size: 21px;
  line-height: 1.3;
  font-weight: 600;
}
.contacts-page__extra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 46px;
}
.contacts-page__extra-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  gap: 5px;
  padding: 16px 0;
  border-top: 1px solid #e5e0dc;
  font-size: 17px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.contacts-page__extra-item strong { font-weight: 600; }
.contacts-page__extra-item a:hover,
.contacts-page__extra-item a:focus-visible { color: #b87d0a; }
@media (max-width: 820px) {
  .contacts-page__extra { margin-top: 22px; }
  .contacts-page__extra-toggle { padding: 15px 0; font-size: 19px; }
  .contacts-page__extra-content { padding: 0 0 26px; }
  .contacts-page__extra-content h2 { font-size: 19px; }
  .contacts-page__extra-grid { grid-template-columns: 1fr; }
  .contacts-page__extra-item { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .contacts-page__extra-chevron { transition: none; }
}

/* History: one desktop layout for every slide (including newly added ones).
   Slide height follows its text; its image keeps a fixed, shared display height.
   Taking media out of the grid sizing prevents tall source images from making
   individual slides enormous when the browser zoom or text length changes. */
@media (min-width: 821px) {
  .page-history .history__stage {
    height: auto;
    min-height: clamp(500px, 36vw, 570px);
  }
  .page-history .history__slides {
    height: auto;
    min-height: inherit;
  }
  .page-history .history-slide.is-active {
    position: relative;
    min-height: inherit;
  }
  .page-history .history-slide__copy {
    align-self: start;
    padding-top: 96px;
    padding-bottom: 84px;
  }
  .page-history .history-slide__media {
    position: absolute;
    top: 0;
    right: calc(-1 * var(--history-right-bleed));
    width: calc(46% + var(--history-right-bleed));
    height: clamp(500px, 36vw, 570px);
    margin-right: 0;
  }
}


/* Front page: keep the introductory copy within its own grid column.
   Remove only the white decoration that was covering the final characters. */
.home #about .about__layout,
.home #about .about__copy,
.home #about .about-static__copy { min-width: 0; }
.home #about .about-static__copy > p {
  max-width: min(720px, 100%);
  overflow-wrap: anywhere;
  word-break: normal;
}
@media (min-width: 821px) {
  .home #about .about__visual::before { display: none; }
  .home #about .about__copy { padding-right: clamp(116px, 8vw, 150px); }
}
