/* Bristol-Zhiguli / Events block v4 (1500px wide) — Figma 1285:480.
   Scoped under #main-events: does not change other Bitrix blocks. */
#main-events, #main-events * { box-sizing: border-box; }
#main-events {
  background: #fff;
  padding: 72px 24px 78px;
}
#main-events .bze-events__container {
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
}
#main-events .bze-events__hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 600px;
  border-radius: 10px;
  background: #3c3731;
  color: #fff;
}
#main-events .bze-events__slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}
#main-events .bze-events__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transition: opacity .4s ease;
}
#main-events .bze-events__photo.is-active { opacity: 1; }

/* The Figma left pane is approximately 610/1200 of the banner,
   with a blurred hall visible beneath it. The right half stays clear. */
#main-events .bze-events__shade {
  position: absolute;
  z-index: 1;
  inset: 0 auto 0 0;
  width: 50.833333%;
  background: linear-gradient(180deg, rgba(42,40,28,.26) 0%, rgba(15,11,7,.40) 46%, rgba(8,5,3,.78) 100%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  pointer-events: none;
}
#main-events .bze-events__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: 50.833333%;
  min-height: 600px;
  padding: 43px 35px 38px 70px;
  color: #fff;
  text-align: left;
}
/* High specificity is intentional: global Bitrix theme h2/p rules
   were shrinking the title and making the subtitle dark. */
#main-events h2.bze-events__title {
  width: 100%;
  max-width: none;
  margin: 0 0 7px !important;
  padding: 0 !important;
  font-family: 'Gogol', 'Cormorant Garamond', Georgia, cursive !important;
  font-size: 65px !important;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-align: left !important;
  color: #fff !important;
}
#main-events p.bze-events__subtitle {
  width: 100%;
  max-width: 490px;
  margin: 0 0 20px !important;
  padding: 0 !important;
  font-family: 'Open Sans', Arial, sans-serif !important;
  font-size: 18px !important;
  font-style: normal !important;
  font-weight: 600 !important;
  line-height: 1.43 !important;
  text-transform: none !important;
  text-align: left !important;
  color: #fff !important;
}
#main-events .bze-events__description {
  width: 100%;
  max-width: 468px;
}
#main-events .bze-events__description p {
  margin: 0 0 22px !important;
  padding: 0 !important;
  font-family: 'Open Sans', Arial, sans-serif !important;
  font-size: 18px !important;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  text-align: left !important;
  color: #fff !important;
}
#main-events .bze-events__description p:last-child { margin-bottom: 0 !important; }
#main-events .bze-events__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 30px;
  margin-top: 24px;
}
#main-events a.bze-events__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 119px;
  margin: 0 !important;
  padding: 9px 24px !important;
  border: 0;
  border-radius: 5px;
  background: #dfc16b !important;
  font-family: 'Open Sans', Arial, sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
  color: #191919 !important;
  transition: background-color .2s ease, transform .2s ease;
}
#main-events a.bze-events__button:hover,
#main-events a.bze-events__button:focus-visible {
  background: #efda9d !important;
  transform: translateY(-1px);
}
#main-events .bze-events__arrows {
  position: absolute;
  z-index: 3;
  top: 70px;
  right: 70px;
  display: flex;
  gap: 15px;
}
#main-events .bze-events__arrow {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}
#main-events .bze-events__arrow img { display: block; width: 40px; height: 40px; }
#main-events .bze-events__arrow:hover { filter: brightness(1.25); }
#main-events .bze-events__arrow:focus-visible,
#main-events .bze-events__button:focus-visible { outline: 2px solid white; outline-offset: 3px; }

@media (max-width: 1100px) {
  #main-events .bze-events__content { width: 65%; padding-left: 42px; padding-right: 30px; }
  #main-events .bze-events__shade { width: 65%; }
  #main-events h2.bze-events__title { font-size: 58px !important; }
  #main-events .bze-events__arrows { right: 30px; top: 30px; }
}
@media (max-width: 767px) {
  #main-events { padding: 42px 16px 50px; }
  #main-events .bze-events__hero { min-height: 0; }
  #main-events .bze-events__shade {
    width: 100%;
    background: linear-gradient(180deg, rgba(15,12,9,.68) 0%, rgba(5,4,3,.82) 100%);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
  }
  #main-events .bze-events__content {
    width: 100%;
    min-height: 0;
    padding: 74px 24px 34px;
  }
  #main-events h2.bze-events__title {
    font-size: clamp(41px, 10.6vw, 55px) !important;
    margin-bottom: 10px !important;
  }
  #main-events p.bze-events__subtitle {
    font-size: 16px !important;
    line-height: 1.4 !important;
    margin-bottom: 20px !important;
  }
  #main-events .bze-events__description p {
    font-size: 15px !important;
    line-height: 1.55 !important;
    margin-bottom: 18px !important;
  }
  #main-events .bze-events__actions { gap: 12px; margin-top: 24px; }
  #main-events a.bze-events__button { min-width: 0; font-size: 13px !important; padding: 10px 16px !important; }
  #main-events .bze-events__arrows { right: 22px; top: 20px; gap: 8px; }
  #main-events .bze-events__arrow, #main-events .bze-events__arrow img { width: 36px; height: 36px; }
}

/* =============================================================
   Лёгкая анимация блока «Мероприятия» при прокрутке
   JS добавляет класс bze-motion-init до появления HTML-блока;
   если JS не загрузился, содержимое остаётся видимым.
   По просьбе владельца сайта анимация не отключается через
   prefers-reduced-motion.
   ============================================================= */
html.bze-motion-init #main-events .bze-events__hero {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition:
    opacity 1.55s cubic-bezier(.45, 0, .55, 1),
    transform 1.65s cubic-bezier(.22, 1, .36, 1);
}
html.bze-motion-init #main-events.bze-motion-visible .bze-events__hero {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
/* Фон чуть-чуть отдаляется, без резких движений. */
html.bze-motion-init #main-events .bze-events__photo {
  transform: scale(1.035);
  transition:
    opacity .65s ease,
    transform 2.65s cubic-bezier(.45, 0, .55, 1);
}
html.bze-motion-init #main-events.bze-motion-visible .bze-events__photo {
  transform: scale(1);
}
/* Надпись въезжает справа, остальные элементы мягко поднимаются. */
html.bze-motion-init #main-events .bze-events__title,
html.bze-motion-init #main-events .bze-events__subtitle,
html.bze-motion-init #main-events .bze-events__description,
html.bze-motion-init #main-events .bze-events__actions,
html.bze-motion-init #main-events .bze-events__arrows {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition:
    opacity 1.25s cubic-bezier(.45, 0, .55, 1),
    transform 1.3s cubic-bezier(.22, 1, .36, 1);
}
html.bze-motion-init #main-events h2.bze-events__title {
  transform: translate3d(36px, 0, 0);
  transition-delay: .15s;
}
html.bze-motion-init #main-events .bze-events__subtitle { transition-delay: .36s; }
html.bze-motion-init #main-events .bze-events__description { transition-delay: .53s; }
html.bze-motion-init #main-events .bze-events__actions { transition-delay: .7s; }
html.bze-motion-init #main-events .bze-events__arrows { transition-delay: .55s; }
html.bze-motion-init #main-events.bze-motion-visible .bze-events__title,
html.bze-motion-init #main-events.bze-motion-visible .bze-events__subtitle,
html.bze-motion-init #main-events.bze-motion-visible .bze-events__description,
html.bze-motion-init #main-events.bze-motion-visible .bze-events__actions,
html.bze-motion-init #main-events.bze-motion-visible .bze-events__arrows {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
