/* ==========================================================================
   disshelp.su — redesign layer (этап 1, ревизия 2)
   Загружается ПОСЛЕ style.css, включая слой "MODERN 2026" (style.css:1640+).
   Не пересобирает тёмный визуал, а точечно чинит баги поверх него.
   ========================================================================== */

:root {
  --ds-primary: #8363f9;
  --ds-primary-2: #ee70e9;
  --ds-indigo: #6366f1;
  --ds-violet: #a855f7;
  --ds-pink: #ec4899;
  --ds-ink: #0f0038;
  --ds-muted: #a9a3c4;
  --ds-ease: cubic-bezier(.22, 1, .36, 1);
}

html { scroll-behavior: smooth; }

/* --------------------------------------------------------------------------
   1. Схема сотрудничества — чиним конфликт emoji ::after × SVG
   -------------------------------------------------------------------------- */

/* Глушим старый ghost-номер внутри scheme_item_text (дублёр цифрового бейджа) */
.work_scheme > div > div.row > div .scheme_item_text:before {
  content: none !important;
}

/* Убираем emoji ::after из MODERN-слоя — у нас теперь inline SVG внутри div */
.work_scheme .scheme_item_icon::after,
.work_scheme .scheme_item_icon::before {
  content: none !important;
  display: none !important;
}

/* SVG внутри иконки — белый штрих, ровный размер, поверх градиентного круга */
.work_scheme .scheme_item_icon {
  overflow: visible !important;
  padding: 0 !important;
}
.work_scheme .scheme_item_icon svg {
  width: 34px !important;
  height: 34px !important;
  stroke: #ffffff !important;
  color: #ffffff !important;
  fill: none !important;
  stroke-width: 1.9 !important;
  position: relative !important;
  z-index: 2 !important;
  margin: 0 !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  display: block !important;
}
.work_scheme .scheme_item_icon img { display: none !important; }

/* Бейдж шага — розовый градиент, над карточкой */
.work_scheme .scheme_item .scheme_item_step {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 30px;
  height: 30px;
  padding: 0 10px;
  background: linear-gradient(135deg, var(--ds-pink) 0%, var(--ds-violet) 100%);
  color: #fff;
  border-radius: 999px;
  font: 700 13px/30px 'Merriweather Sans', system-ui, sans-serif;
  letter-spacing: .02em;
  box-shadow: 0 6px 18px rgba(236, 72, 153, .45);
  z-index: 5;
}

/* Убиваем старый chevron '›' из MODERN-слоя — он висит в центре карточки,
   не попадает по центру иконки, выглядит неровно */
.work_scheme .scheme_item__wrapper::after {
  content: '' !important;
  display: none !important;
}

/* Рисуем новую стрелку через mask-SVG на :before — по центру иконки (72px icon,
   30px padding-top карточки у MODERN, значит центр ≈ 30 + 36 = 66px) */
@media (min-width: 1321px) {
  .work_scheme .scheme_item .scheme_item__wrapper {
    overflow: visible !important;
  }
  .work_scheme .scheme_item .scheme_item__wrapper::before {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: 60px !important;
    right: -24px !important;
    width: 32px !important;
    height: 14px !important;
    background-color: rgba(255, 255, 255, .55) !important;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 14' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M2 7h26'/><path d='m23 2 5 5-5 5'/></svg>") no-repeat center / contain !important;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 14' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M2 7h26'/><path d='m23 2 5 5-5 5'/></svg>") no-repeat center / contain !important;
    z-index: 3 !important;
    animation: ds-arrow-pulse 2.4s var(--ds-ease) infinite !important;
    pointer-events: none !important;
  }
  .work_scheme .scheme_item:last-child .scheme_item__wrapper::before {
    display: none !important;
  }
}

@keyframes ds-arrow-pulse {
  0%, 100% { transform: translateX(0);  opacity: .45; }
  50%      { transform: translateX(5px); opacity: .95; }
}

/* --------------------------------------------------------------------------
   2. Блок ВУЗов — заголовок, плавный marquee (десктоп), нативный скролл +
      swipe-hint (мобайл)
   -------------------------------------------------------------------------- */
.universities {
  position: relative;
  padding: 50px 0 30px;
  background: #fff;
}
.universities__heading {
  text-align: center;
  font: 700 1.75rem/1.25 'Merriweather', serif;
  color: var(--ds-ink);
  max-width: 860px;
  margin: 0 auto 28px;
  padding: 0 16px;
  letter-spacing: .01em;
}
.universities__heading span {
  background: linear-gradient(135deg, var(--ds-pink), var(--ds-violet), var(--ds-indigo));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

.universities > .container {
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  position: relative;
  margin-top: 10px !important;
  text-align: left !important;
  white-space: nowrap;
}
.universities > .container::before,
.universities > .container::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}
.universities > .container::before { left: 0;  background: linear-gradient(90deg, #fff, rgba(255,255,255,0)); }
.universities > .container::after  { right: 0; background: linear-gradient(270deg, #fff, rgba(255,255,255,0)); }

.universities > .container > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  height: 80px;
  vertical-align: middle;
  animation: ds-univ-marquee 60s linear infinite;
  transition: transform .35s var(--ds-ease);
}
.universities:hover > .container > span { animation-play-state: paused; }
.universities > .container > span:hover { transform: scale(1.08); }
.universities > .container > span > img {
  max-height: 60px;
  width: auto;
  opacity: .82;
  filter: grayscale(10%);
  transition: opacity .3s var(--ds-ease), filter .3s var(--ds-ease);
}
.universities > .container > span:hover > img {
  opacity: 1;
  filter: none;
}

@keyframes ds-univ-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-100vw); }
}

.universities__swipe-hint { display: none; }

@media (max-width: 992px) {
  .universities { padding: 30px 0 20px; }
  .universities__heading { font-size: 1.2rem; padding: 0 12px; }

  .universities > .container {
    overflow-x: auto !important;
    max-height: none !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .universities > .container::-webkit-scrollbar { display: none; }
  .universities > .container > span {
    max-width: none !important;
    width: auto !important;
    animation: none;
    padding: 0 14px;
    height: 64px;
    margin-bottom: 0 !important;
  }
  .universities > .container > span > img {
    max-height: 48px;
    width: auto !important;
  }

  .universities__swipe-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 14px auto 0;
    font: 500 12px/1 'PT Sans Narrow', sans-serif;
    color: var(--ds-muted);
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .universities__swipe-hint svg {
    width: 20px; height: 20px;
    animation: ds-swipe 1.6s var(--ds-ease) infinite;
  }
}

@keyframes ds-swipe {
  0%   { transform: translateX(-6px); opacity: .3; }
  50%  { transform: translateX(6px);  opacity: 1;  }
  100% { transform: translateX(-6px); opacity: .3; }
}

/* --------------------------------------------------------------------------
   3. Блок отзывов — аватар на мобайле устойчиво по центру, без «съезда»
   -------------------------------------------------------------------------- */

/* Упрощаем структуру на десктопе: row внутри rev_item уже flex, но Bootstrap
   col-5/col-7 ломает пропорции когда аватар крупнее. Центруем и фиксим. */
.reviews .rev_item {
  align-items: center;
}
.reviews .rev_item .rev_item__avatar {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.reviews .rev_item .rev_item__avatar img {
  width: 120px !important;
  height: 120px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  outline: 3px solid var(--ds-violet) !important;
  outline-offset: 3px !important;
  max-width: 100% !important;
}

@media (max-width: 992px) {
  /* MODERN 2026 уже делает flex-direction:column и 100% ширину — мы
     усиливаем: аватар крупнее, центр, полный текст, отступы ровные */
  .reviews .rev_items .rev_item {
    flex-direction: column !important;
    align-items: center !important;
    padding: 24px 18px !important;
    margin: 0 10px 18px !important;
  }
  .reviews .rev_items .rev_item > .rev_item__avatar,
  .reviews .rev_items .rev_item > .rev_item__meta {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .reviews .rev_items .rev_item .rev_item__avatar {
    margin-bottom: 14px !important;
  }
  .reviews .rev_items .rev_item .rev_item__avatar img {
    width: 110px !important;
    height: 110px !important;
  }
  .reviews .rev_items .rev_item .rev_item__meta {
    text-align: center !important;
  }
  .reviews .rev_items .rev_item .rev_item__meta_title {
    font-size: 18px !important;
    margin-bottom: 6px !important;
  }
  .reviews .rev_items .rev_item .rev_item__meta_rating {
    display: flex !important;
    justify-content: center !important;
    gap: 2px;
  }
  .reviews .rev_items .rev_item .rev_item__meta_text {
    font-size: 14px !important;
    line-height: 1.55 !important;
    text-align: left !important;
    padding: 4px 6px 0 !important;
  }
}

/* --------------------------------------------------------------------------
   4. Варианты оплаты — отдаём вёрстку слою MODERN (grid на мобайле),
      ничего не переопределяем. Оставили блок здесь как anchor для этапа 2,
      когда заменим логотипы на marquee-Swiper.
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   5. Мягкие SVG-переходы между секциями — видимы и на мобайле
   -------------------------------------------------------------------------- */

/* 5.1 Переход из under_header (фиолетовый градиент) в advanced (фото-фон).
       У .under_header background не трогаем — кладём wave в под-слой. */
.under_header {
  position: relative;
}
.under_header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 56px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 56' preserveAspectRatio='none'><path fill='%23ffffff' d='M0 28 C240 60 480 0 720 22 C960 44 1200 10 1440 30 L1440 56 L0 56 Z'/></svg>") no-repeat bottom / 100% 100%;
  pointer-events: none;
  z-index: 3;
}

/* 5.2 Переход advanced → universities. Убираем отдельную белую волну:
       фон universities уже белый — достаточно мягкого fade сверху. */
.advanced {
  position: relative;
}
.advanced::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 70px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #ffffff 100%);
  pointer-events: none;
  z-index: 1;
}

/* 5.3 Переход universities → works (works — цветной блок ниже) */
.universities::after {
  content: '';
  display: block;
  height: 28px;
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0) 100%);
  margin-top: 6px;
}

/* 5.4 Переход reviews (светло-лавандовый у MODERN) → call_action (пурпур) */
.reviews {
  position: relative;
  z-index: 1;
}
.reviews + .call_action::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: -40px;
  height: 60px;
  background: linear-gradient(180deg, rgba(248,244,255,0) 0%, rgba(131,99,249,.12) 100%);
  pointer-events: none;
  z-index: 0;
}

/* 5.5 Переход call_action → pay (оба тёмные, но разной яркости) */
.call_action {
  position: relative;
}
.call_action::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 50px;
  background: linear-gradient(180deg, rgba(30,27,75,0) 0%, #1e1b4b 100%);
  pointer-events: none;
  z-index: 2;
}

/* --------------------------------------------------------------------------
   6. Focus-ring для клавиатурной навигации + reduced-motion
   -------------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(168, 85, 247, .55);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .universities > .container > span,
  .universities__swipe-hint svg,
  .work_scheme .scheme_item .scheme_item__wrapper::before {
    animation: none !important;
  }
  html { scroll-behavior: auto; }
}
