/* Shared outer frame. Reading columns and full-bleed media retain their roles. */
html { scrollbar-gutter: stable; overflow-x: clip; }
body { overflow-x: clip; isolation: isolate; }
/* Decorations span the whole page, including the footer, without section seams. */
.bt-page-background { position: absolute; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.bt-nav__menu > .menu-item-has-children { display: grid; grid-template-columns: auto 32px; align-items: center; column-gap: 2px; }
.bt-nav__menu > .menu-item-has-children > a::after { display: none; }
.bt-nav__submenu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 40px; border: 0; background: transparent; color: white; cursor: pointer; }
.bt-nav__submenu-toggle::before { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.bt-nav__submenu-toggle[aria-expanded="true"]::before { transform: rotate(225deg); }
.bt-nav__submenu-toggle:focus-visible { outline: 2px solid white; outline-offset: -3px; border-radius: 6px; }
.bt-nav__menu > li > .sub-menu.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%); }
.bt-nav,
.bt-footer,
.hero,
.bt-opis,
.bt-articles,
.bt-home-extra,
.bt-galleries,
.bt-gallery-single,
.bt-workshop-current,
.bt-static-page {
  width: var(--layout-available);
  max-width: var(--layout-max);
  margin-left: auto;
  margin-right: auto;
}

/* These sections already own the page gutter; their children fill that frame. */
.bt-mr,
.bt-conf2026,
.bt-event {
  padding-left: var(--layout-gutter);
  padding-right: var(--layout-gutter);
}
.bt-mr__intro,
.bt-mr .bt-mr__articles,
.bt-conf2026__content {
  width: 100%;
  max-width: var(--layout-max);
}

/* Avoid applying a second horizontal gutter inside a constrained section. */
.bt-home-extra { padding-left: 0; padding-right: 0; }
.contbg, .bt-galleries, .bt-gallery-single { padding-left: 0; padding-right: 0; }
.bt-gallery-row__info { min-width: 0; }
.bt-gallery-row__title, .bt-gallery-row__excerpt { overflow-wrap: anywhere; }
.bt-home-links,
.bt-home-extra .grid,
.bt-gallery-single .bt-masonry,
.hero .herobar {
  width: 100%;
  max-width: none;
}
.bt-opis__content { padding-inline: clamp(24px, 4vw, 50px); }

/* Article copy stays at 910 px; its title, media and related cards use the frame. */
.bt-single__header,
.bt-single .bt-single__related {
  width: var(--layout-available);
  max-width: var(--layout-max);
}
.bt-single .bt-article__hero-img { max-width: var(--layout-max); }
.bt-single .bt-article__content > * { width: var(--layout-available); }
.bt-single .bt-article__content > :is(.wp-block-image, .wp-block-gallery, .wp-block-columns, .alignwide) {
  width: var(--layout-available);
  max-width: var(--layout-max);
}
.bt-single .bt-article__content > .alignfull { width: 100%; max-width: none; }
.bt-single .bt-article__content > .wp-block-image.alignfull img { max-width: var(--layout-max); }
.bt-single .bt-article__external { width: var(--layout-available); }

@media (max-width: 600px) {
  :root { --layout-gutter: 20px; }
}
@media (max-width: 1050px) {
  html { scrollbar-gutter: auto; }
  .bt-nav { top: 0; left: 0; transform: none; width: 100%; max-width: none; margin: 0; border-radius: 0; padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); }
  .bt-nav__menu { top: 61px; width: 100%; max-height: calc(100dvh - 61px); border-radius: 0 0 20px 20px; }
  .bt-nav__menu > .menu-item-has-children { grid-template-columns: auto 44px; justify-content: center; }
  .bt-nav__submenu-toggle { width: 44px; height: 44px; }
  .bt-nav__menu > li > .sub-menu,
  .bt-nav__menu > li > .sub-menu.is-open { grid-column: 1 / -1; transform: none; }
}
@media (max-width: 768px) {
  .bt-gallery-row { max-height: none; }
  .bt-footer { padding: 24px; }
  .bt-footer__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 20px; align-items: end; }
  .bt-footer__links { grid-column: 1 / -1; grid-row: 1; justify-content: center; flex-wrap: wrap; gap: 12px 22px; }
  .bt-footer__logo { grid-column: 1; grid-row: 2; justify-self: start; height: 28px; }
  .bt-footer__vl-logo { grid-column: 2; grid-row: 2; justify-self: end; height: 32px; }
}
