/* Local, framework-free additions. Original layout rules are in base.css and page CSS. */
html { scroll-behavior: smooth; }
body { margin: 0; }
.site-image { object-fit: cover; }
.media-01__img { width: 241px; max-width: 100%; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 10000; padding: 12px 20px; color: #fff; background: #292a31; }
.skip-link:focus { top: 12px; }
a:focus-visible, button:focus-visible { outline: 3px solid #3a88b5; outline-offset: 5px; }
.menu-02-item:focus-within .menu-02-item__sub { opacity: 1; visibility: visible; display: block; }
.local-menu-toggle { display: none; }
.back-to-top { position: fixed; right: 22px; bottom: 100px; z-index: 100; width: 42px; height: 42px; border: 1px solid #888; border-radius: 50%; background: #f3f3f3; color: #292a31; cursor: pointer; font-size: 24px; }
.back-to-top[hidden] { display: none; }
.slider__arrows, .slider__bullets { display: none !important; }
.slider__track { overflow-x: auto; scrollbar-width: thin; scroll-snap-type: x mandatory; }
.slider__track > * { transform: none !important; }
.flexible-list__item { scroll-snap-align: start; }
/* News banner on the home page. */
.news-banner { padding: 40px 24px; background: #292a31; color: #fff; }
.news-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  max-width: 960px;
  margin: 0 auto;
}
.news-banner__content { min-width: 0; max-width: 680px; }
.news-banner__label {
  margin: 0 0 14px;
  color: #f7f4e6;
  font: 500 14px/1.5 'Montserrat', sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.news-banner h2 { margin: 0 0 12px; font: 500 clamp(24px, 2.6vw, 34px)/1.3 'Montserrat', sans-serif; color: inherit; }
.news-banner__text { margin: 0; font: 300 21px/1.5 'Alegreya Sans', sans-serif; color: #e0e0e2; }
.news-banner__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-shrink: 0;
  padding: 18px 26px;
  border: 1px solid transparent;
  border-radius: 40px;
  background: #f7f4e6;
  color: #292a31;
  font: 500 16px/1.5 'Montserrat', sans-serif;
  text-decoration: none;
  transition: background-color .2s;
}
.news-banner__link:hover { background: #fff; color: #292a31; }
@media (max-width: 800px) {
  .news-banner { padding: 32px 24px; }
  .news-banner__inner { flex-direction: column; align-items: flex-start; gap: 24px; }
  .news-banner__link { width: 100%; box-sizing: border-box; }
}
/* Home enrollment: three static cards with bottom-aligned actions. */
.enrollment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.enrollment-card { min-width: 0; display: flex; }
.enrollment-card .cards-19-item__inner,
.enrollment-card .cards-19-item__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  min-width: 0;
}
.enrollment-card .cards-19-item__buttons { margin-top: auto; padding-top: 20px; }
.enrollment-card .cards-19-item__img-container { width: 100%; flex-shrink: 0; }
@media (max-width: 800px) {
  .enrollment-section { padding: 36px 16px; }
  .enrollment-section .section__content { width: 100%; max-width: 560px; padding: 0; margin: 0 auto; }
  .enrollment-section .section__header {
    margin: 0 0 24px;
    font-size: clamp(24px, 6vw, 30px);
    line-height: 1.25;
    text-align: left;
    text-wrap: balance;
  }
  .enrollment-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .enrollment-card {
    background: #f9f9f7;
    border: 1px solid #d5d5d2;
    border-radius: 16px;
  }
  .enrollment-section .enrollment-card .cards-19-item__inner { padding: 0; }
  .enrollment-section .enrollment-card .cards-19-item__img-container {
    aspect-ratio: 16 / 9 !important;
    max-height: 200px;
    margin: 0 0 20px;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
  }
  .enrollment-section .enrollment-card .cards-19-item__img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto !important;
    object-fit: cover;
  }
  .enrollment-section .enrollment-card .cards-19-item__title {
    margin: 0 20px 12px;
    font-size: 19px;
    line-height: 1.4;
    font-weight: 500;
    text-wrap: pretty;
  }
  .enrollment-section .enrollment-card .cards-19-item__text {
    margin: 0 20px;
    font-size: 16px;
    line-height: 1.6;
    color: #414147;
    overflow-wrap: break-word;
  }
  .enrollment-section .enrollment-card .cards-19-item__buttons { padding: 20px; }
  .enrollment-section .enrollment-grid .enrollment-card .cards-19-item__btn1.button {
    display: flex;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: none;
    background: #292a31;
    color: #fff;
    font-size: 16px;
  }
  .enrollment-section .enrollment-grid .enrollment-card .cards-19-item__btn1.button:hover { background: #41424a; color: #fff; box-shadow: none; }
  .enrollment-section .enrollment-grid .enrollment-card .cards-19-item__btn1.button .button__text { color: #fff; }
}
.local-gallery-dialog { border: 0; padding: 48px 20px 20px; max-width: min(90vw, 680px); background: #e8e8e8; }
/* Workshop links form a two-column grid on phones and tablets. */
@media (max-width: 800px) {
  #мастерские { padding: 32px 16px; }
  #мастерские .section__content { width: 100%; padding: 0; }
  #мастерские .cards-07-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    margin: 0;
  }
  #мастерские .cards-07-list__item {
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
  }
  #мастерские .cards-07-item__inner {
    display: flex;
    height: 100%;
    min-height: 210px;
    padding-bottom: 0 !important;
    border-radius: 12px;
  }
  #мастерские .cards-07-item__img,
  #мастерские .cards-07-item__content::before { border-radius: 12px; }
  #мастерские .cards-07-item__content {
    position: relative;
    flex: 1;
    min-width: 0;
    padding: 20px 12px;
    gap: 16px;
  }
  #мастерские .cards-07-item__header {
    width: 100%;
    font-size: clamp(14px, 3.7vw, 18px);
    line-height: 1.4;
    overflow-wrap: anywhere;
    hyphens: auto;
  }
  #мастерские .cards-07-item__caption {
    max-width: 100%;
    margin-top: 0;
    padding: 6px 10px;
    font-size: 14px;
    line-height: 1.4;
  }
  #мастерские .cards-07-item__caption::before { display: none; }
}
.local-gallery-dialog::backdrop { background: #000b; }
.local-gallery-dialog img { display: block; width: min(70vw, 540px); max-height: 70vh; object-fit: contain; }
.local-gallery-dialog button { position: absolute; right: 12px; top: 10px; border: 0; background: transparent; font-size: 25px; cursor: pointer; }
@media (max-width: 800px) {
  /* Override native link underlines and the template's border-based underlines. */
  .page a,
  .page a:hover,
  .page a:focus,
  .page a:active {
    text-decoration: none !important;
    border-bottom-color: transparent !important;
  }
  .menu-02 { display: block !important; }
  .local-menu-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 18px 24px; border: 0; background: #292a31; color: #fff; font: 18px 'Alegreya Sans', sans-serif; cursor: pointer; }
  .menu-02__inner { padding: 0 !important; }
  .menu-02-list { display: none !important; }
  .menu-02-list.is-open { display: flex !important; flex-direction: column; align-items: stretch; padding-bottom: 12px; }
  .menu-02-list__item { width: 100%; }
  .menu-02-item__link { display: block; padding: 10px 24px !important; text-align: left; }
  .menu-02-item__sub { display: none !important; }
  .media-01__img { width: 180px; }
  .cards-19-list { flex-wrap: wrap !important; }
  .cards-19-list > .flexible-list__item { width: 100% !important; max-width: 100%; }
  .cards-19-item { margin-bottom: 32px; }
  .page { overflow-x: clip; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
