/* =========================
   SITE WAVE (двойная аура)
   ========================= */
body.site-wave{
  position: relative;
  overflow-x: hidden;
}

body.site-wave::before,
body.site-wave::after{
  content: "";
  position: fixed;
  inset: -260px;
  pointer-events: none;
  z-index: 0 !important;
  transform: translateZ(0);
  will-change: background;
  opacity: 0.9;
  transition: opacity .25s ease;
}

body.site-wave::before{
  background:
    radial-gradient(
      340px circle at var(--mx, 50%) var(--my, 30%),
      rgba(60,130,255,0.12),
      rgba(60,130,255,0.05) 45%,
      rgba(60,130,255,0.00) 72%
    );
  filter: blur(22px);
}

body.site-wave::after{
  background:
    radial-gradient(
      420px circle at calc(var(--mx, 50%) + 6%) calc(var(--my, 30%) + 8%),
      rgba(150,90,255,0.10),
      rgba(150,90,255,0.04) 50%,
      rgba(150,90,255,0.00) 76%
    );
  filter: blur(30px);
  opacity: 0.75;
}

/* Поднимаем контент над волной */
body.site-wave > *:not(#siteNavbar):not(.modal):not(.modal-backdrop){
  position: relative;
  z-index: 1;
}

@media (max-width: 768px){
  body.site-wave::before,
  body.site-wave::after{
    display: none;
  }
}

/* =========================
   MODALS
   ========================= */
.modal{ z-index: 20050; position: fixed !important; }
.modal-backdrop{ z-index: 20040; }
body.modal-open{ overflow: hidden !important; }

/* =========================
   SCROLL OFFER MODAL
   ========================= */
#scrollOfferModal .modal-dialog{ max-width: 520px; }
#scrollOfferModal .modal-content{
  max-height: 90vh;
  overflow: auto;
  border-radius: 16px;
}
#scrollOfferModal .scroll-offer-img{
  display: block;
  width: 100%;
  height: auto;
  max-height: 45vh;
  object-fit: contain;
  border-radius: 12px;
}

/* =========================
   NAVBAR
   ========================= */
#siteNavbar{
  z-index: 1030;
  transition: transform .25s ease, box-shadow .25s ease;
  will-change: transform;
  transform: translateY(0);
  display: flex !important;
}

#siteNavbar.navbar--hidden{
  transform: translateY(-110%) !important;
}

#siteNavbar.navbar--scrolled{
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}


/* =========================
   PREMIUM GLASS SCROLL TOP (v3) — видно на белом и тёмном
   ========================= */

.scroll-top-glass{
  position: fixed !important;
  right: 28px !important;
  left: auto !important;
  bottom: 28px !important;

  width: 54px;
  height: 54px;
  border-radius: 50%;

  /* Контраст на белом: чуть темнее стекло */
  background: rgba(31, 60, 136, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  /* Двойная рамка: видимость на белом + премиум */
  border: 1px solid rgba(31, 60, 136, 0.22);
  box-shadow:
    0 10px 26px rgba(0,0,0,0.14),
    0 0 0 1px rgba(255,255,255,0.55) inset;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(.95);
  transition: all .35s cubic-bezier(.22,.61,.36,1);
  z-index: 12000;
}

/* Иконка — тёмно-синяя, чтобы читалась на белом */
.scroll-top-glass svg{
  stroke: #1f3c88;
  opacity: 0.95;
}

/* Появление */
.scroll-top-glass.show{
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Hover — чуть насыщеннее */
.scroll-top-glass:hover{
  background: rgba(31, 60, 136, 0.28);
  box-shadow:
    0 16px 38px rgba(0,0,0,0.18),
    0 0 0 1px rgba(255,255,255,0.65) inset;
  transform: translateY(-3px) scale(1.05);
}

/* Active */
.scroll-top-glass:active{
  transform: scale(.95);
}

/* Мобильная адаптация */
@media (max-width: 768px){
  .scroll-top-glass{
    right: 18px !important;
    left: auto !important;
    bottom: 18px !important;
    width: 46px;
    height: 46px;
  }
}

#scrollOfferModal .modal-dialog{ max-width: 520px; }
#scrollOfferModal .modal-content{ max-height: 90vh; overflow: auto; border-radius: 16px; }

#scrollOfferModal .scroll-offer-media{ width: 100%; }
#scrollOfferModal .scroll-offer-img{
  display:block;
  width:100%;
  height:auto;
  max-height:45vh;
  object-fit:contain;
  border-radius:12px;
}

/* ===== Countdown blocks (как в архиве) ===== */
.scroll-countdown-wrap{ margin: 14px 0 18px; }
.scroll-countdown{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
}
.cd-item{
  min-width:72px;
  padding:10px 10px;
  border-radius:14px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.20);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align:center;
  box-shadow: 0 10px 22px rgba(0,0,0,0.14);
}
.cd-num{
  position: relative;
  display:inline-block;
  min-width: 2ch;
  font-weight: 800;
  font-size: 22px;
  line-height: 1.1;
  color: #1f3c88;
  letter-spacing: .5px;
  transform-origin: 50% 60%;
}
.cd-lbl{
  margin-top:4px;
  font-size:12px;
  color: rgba(0,0,0,0.55);
}
.cd-sep{
  font-weight: 800;
  font-size: 18px;
  color: rgba(31,60,136,0.55);
  transform: translateY(-6px);
}
.cd-expired{
  margin-top:10px;
  text-align:center;
  font-weight:600;
  color: rgba(0,0,0,0.60);
}

/* ===== Flip animation (премиум) ===== */
@keyframes cdFlip{
  0%   { transform: rotateX(0deg) translateY(0); opacity: 1; }
  35%  { transform: rotateX(-70deg) translateY(-2px); opacity: .65; }
  70%  { transform: rotateX(20deg) translateY(1px); opacity: 1; }
  100% { transform: rotateX(0deg) translateY(0); opacity: 1; }
}
.cd-num.is-flipping{
  animation: cdFlip 320ms cubic-bezier(.22,.61,.36,1);
}
.cd-num.is-flipping::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:10px;
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0));
  pointer-events:none;
  opacity:.9;
}