/* =========================================================
   CUSTOM — доопрацювання поверх style.css
   (нові компоненти та точкові виправлення)
========================================================= */

/* ---------------------------------------------------------
   1. Кнопка «нагору» (scroll-top)
--------------------------------------------------------- */
.scroll-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  color: var(--white);
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.28), transparent 55%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 34px rgba(238, 57, 55, 0.42);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.9);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0.3s ease,
    box-shadow 0.3s ease;
  pointer-events: none;
}

.scroll-top svg {
  width: 22px;
  height: 22px;
  display: block;
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.scroll-top:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 20px 46px rgba(238, 57, 55, 0.5);
}

.scroll-top:active {
  transform: translateY(0) scale(0.97);
}

@media (max-width: 760px) {
  .scroll-top {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-top {
    transition: opacity 0.2s ease, visibility 0.2s ease;
    transform: none;
  }

  .scroll-top.is-visible {
    transform: none;
  }

  .scroll-top:hover {
    transform: none;
  }
}

/* ---------------------------------------------------------
   3. Перевага на всю ширину — «незалежність від розробника»
--------------------------------------------------------- */
.benefit-card.benefit-card--full {
  grid-column: 1 / -1;
  min-height: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.benefit-card--full .benefit-card__icon {
  flex-shrink: 0;
}

.benefit-card--full .benefit-card__body {
  flex: 1;
  min-width: 0;
}

.benefit-card--full .benefit-card__body h3 {
  margin-top: 0;
}

.benefit-card__body h3 {
  font-family: var(--font);
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text-dark);
}

.benefit-card__body p {
  margin-top: 10px;
  color: rgba(17, 19, 26, 0.68);
  line-height: 1.6;
}

.benefit-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.benefit-card__tags span {
  padding: 6px 14px;
  border-radius: 100px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-dark);
  border: 1px solid var(--line-dark);
  background: rgba(238, 57, 55, 0.06);
}

@media (max-width: 760px) {
  .benefit-card.benefit-card--full {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

/* ---------------------------------------------------------
   4. Мобільні (≤760px): вимикаємо hover-ефекти benefit-card,
      бо translateY та велика тінь обрізаються скрол-контейнером
--------------------------------------------------------- */
@media (max-width: 760px) {
  .benefit-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--line-dark);
  }

  .benefit-card:hover .benefit-card__icon {
    transform: none;
  }
}

/* ---------------------------------------------------------
   5. Фонове зображення для акцентної переваги (.benefit-card--accent)
--------------------------------------------------------- */
.benefit-card.benefit-card--accent {
  background:
    linear-gradient(160deg, rgba(9, 10, 15, 0.55), rgba(9, 10, 15, 0.85)),
    url("../assets/images/61449689293830a88a7bff63849e5875aa2f7a37.jpg") center / cover no-repeat;
  border-color: rgba(255, 122, 69, 0.34);
}

.benefit-card--accent h3 {
  color: var(--white);
}

.benefit-card--accent p {
  color: rgba(255, 255, 255, 0.86);
}

/* ---------------------------------------------------------
   6. CTA-картка в послугах (останній блок) — зображення у фоні
--------------------------------------------------------- */
.services .service-card.service-card--cta {
    grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  background:
    linear-gradient(180deg, rgba(9, 10, 15, 0.2) 0%, rgba(9, 10, 15, 0.55) 55%, rgba(9, 10, 15, 0.86) 100%),
    url("../assets/images/2237f4044723b4fd5a05cd98bfd3a8d398c37a6f.jpg") center / cover no-repeat;
}

.service-card--cta .service-card__cta-badge {
  position: absolute;
  top: 22px;
  left: 22px;
  padding: 8px 16px;
  border-radius: 100px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.service-card--cta .service-card__cta-body {
  position: relative;
  max-width: 640px;
}

.service-card--cta .service-card__cta-body h3 {
  margin-top: 0;
  color: var(--white);
}

.service-card--cta .service-card__cta-body p {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.85);
}

.service-card--cta .service-card__actions {
  margin-top: 22px;
  padding-top: 0;
}

@media (max-width: 760px) {
  .services .service-card.service-card--cta {
      grid-column: 1 / -1;
    min-height: 340px;
    padding: 26px;
  }
}
/* ---------------------------------------------------------
   7. Hero: падаючі бейджі (замість hero-panel)
--------------------------------------------------------- */
.hero-stage {
  min-height: 560px;
}

/* Поле падіння: ширше за колонку вправо, виходить за верх і низ hero
   (секція .hero має overflow: hidden — саме тому бейджі «зникають за блоком») */
.hero-fall {
  position: absolute;
  left: 0;
  right: -10%;
  top: -52vh;
  bottom: -52vh;
  z-index: 2;
  pointer-events: none;
  contain: layout paint style;
}

.fall-badge {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  padding: 14px 24px;
  border-radius: 100px;
  white-space: nowrap;
  font-family: var(--font);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translate3d(0, -200px, 0);
  will-change: transform;
  backface-visibility: hidden;
  transition: opacity 0.5s ease;
}

/* JS розставив позиції — показуємо */
.hero-fall.is-ready .fall-badge {
  opacity: 1;
}

.fall-badge--white {
  background: #ffffff;
  color: #0e1017;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.fall-badge--violet {
  background: #7c3aed;
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(124, 58, 237, 0.38);
}

.fall-badge--red {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(238, 57, 55, 0.38);
}

.fall-badge--orange {
  background: var(--accent-2);
  color: #2b0f06;
  box-shadow: 0 14px 34px rgba(255, 122, 69, 0.34);
}

.fall-badge--gold {
  background: var(--accent-3);
  color: #2a1d02;
  box-shadow: 0 14px 34px rgba(255, 207, 90, 0.3);
}

.fall-badge--pink {
  background: #ec4899;
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(236, 72, 153, 0.38);
}

/* Планшет і нижче: hero__grid стає в одну колонку —
   тримаємо бейджі всередині stage, щоб не лізли на текст */
@media (max-width: 1100px) {
  .hero-stage {
    min-height: 440px;
  }

  .hero-fall {
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    overflow: hidden;
    border-radius: 32px;
  }
}

@media (max-width: 760px) {
  .hero-stage {
    min-height: 360px;
  }
  
  .fall-badge {
    padding: 11px 18px;
    font-size: 15px;
  }
}

/* Зменшений рух: бейджі просто статично розкидані */
@media (prefers-reduced-motion: reduce) {
  .fall-badge {
    transition: none;
  }
}

