/*
 * Баннер-слайдер библиотеки. Написан начисто 17.09.2026 взамен nivoSlider (2011).
 * Старый плагин резал кадр на «слайсы» и оставлял их квадратиками на экране,
 * грузил все картинки сразу, ждал window.load и рисовал пагинацию картинками.
 * Здесь всё своё: переходы только по opacity/transform, ленивая подгрузка,
 * стрелки и точки — CSS и SVG, никакой растровой графики.
 */

.bir-banner {
  --bir-akcent: #b5860f;
  --bir-ramka: #e8e2d4;
  --bir-plavno: cubic-bezier(0.23, 1, 0.32, 1);
  margin: 0 0 20px;
  max-width: 100%;
}

/* рамка задаёт пропорции кадра заранее — страница не дёргается при загрузке */
.bir-banner__ramka {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--bir-ramka);
  background: #f4f1ea;
  height: 0;              /* высоту держит padding-top из inline-стиля */
}

.bir-banner__lenta {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bir-banner__lenta::before,
.bir-banner__lenta::after { content: none; }

.bir-banner__slayd {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  background: none;
  opacity: 0;
  transform: scale(1.015);
  pointer-events: none;
  transition: opacity .28s var(--bir-plavno), transform .5s var(--bir-plavno);
}
.bir-banner__slayd.is-aktiv {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  z-index: 2;
}

.bir-banner__slayd a,
.bir-banner__slayd > img {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: none;
  padding: 0;
}
.bir-banner__slayd img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* ===== стрелки ===== */
/* размеры с !important: старый шаблон и общий стиль кнопок сайта иначе их раздувают */
.bir-banner__strelka {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 40px !important;
  height: 40px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin-top: -20px;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 50%;
  background: rgba(255, 255, 255, .88);
  color: #4a4136;
  cursor: pointer;
  opacity: 0;
  transform: scale(.9);
  transition: opacity .2s var(--bir-plavno), transform .2s var(--bir-plavno),
              background-color .2s var(--bir-plavno);
  -webkit-appearance: none;
  appearance: none;
}
.bir-banner__strelka svg { width: 17px; height: 17px; display: block; }
.bir-banner__strelka--nazad { left: 12px; }
.bir-banner__strelka--vperyod { right: 12px; }

/* на мышином экране стрелки проявляются при наведении, на тач-экране видны всегда */
.bir-banner:hover .bir-banner__strelka,
.bir-banner__strelka:focus-visible { opacity: 1; transform: none; }
@media (hover: none), (pointer: coarse) {
  .bir-banner__strelka { opacity: 1; transform: none; }
}
@media (hover: hover) and (pointer: fine) {
  .bir-banner__strelka:hover { background: #fff; }
}
.bir-banner__strelka:active { transform: scale(.94); }
.bir-banner__strelka:focus-visible { outline: 3px solid var(--bir-akcent); outline-offset: 2px; }

/* ===== точки ===== */
.bir-banner__tochki {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.bir-banner__tochka {
  width: 9px !important;
  height: 9px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0;
  border-radius: 999px;
  background: #d8cdb4;
  cursor: pointer;
  transition: width .24s var(--bir-plavno), background-color .24s var(--bir-plavno),
              transform .16s var(--bir-plavno);
  -webkit-appearance: none;
  appearance: none;
}
.bir-banner__tochka.is-aktiv { width: 26px !important; background: var(--bir-akcent); }
.bir-banner__tochka:active { transform: scale(.9); }
.bir-banner__tochka:focus-visible { outline: 3px solid var(--bir-akcent); outline-offset: 3px; }

/* ===== полоска отсчёта до следующего кадра ===== */
.bir-banner__otschet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 5;
  height: 3px;
  background: var(--bir-akcent);
  transform: scaleX(0);
  transform-origin: left center;
  opacity: .85;
}
.bir-banner__otschet.is-idyot { animation: bir-otschet linear forwards; }
@keyframes bir-otschet { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ===== узкий экран ===== */
@media (max-width: 640px) {
  .bir-banner__ramka { border-radius: 12px; }
  .bir-banner__strelka { width: 34px; height: 34px; margin-top: -17px; }
  .bir-banner__strelka svg { width: 15px; height: 15px; }
  .bir-banner__strelka--nazad { left: 8px; }
  .bir-banner__strelka--vperyod { right: 8px; }
}

/* ===== бережный режим ===== */
@media (prefers-reduced-motion: reduce) {
  .bir-banner__slayd { transition: opacity .01ms; transform: none; }
  .bir-banner__otschet { display: none; }
  .bir-banner__strelka, .bir-banner__tochka { transition: none; }
}
