/* ==========================================================================
   Секция «Задачи» — светлая, карточки-лента (по макету)
   ========================================================================== */

.itb-section--tasks {
  background: #f4f5f8;
  color: #1f2025;
}
[data-theme="light"] .itb-section--tasks { background: #f4f5f8; }

/* Заголовок секции — тёмный текст на светлом фоне */
.itb-section--tasks .itb-section__title { color: #16181f; }
.itb-section--tasks .itb-section__subtitle { color: #565c6a; }

/* Топбар: заголовок слева, подзаголовок + стрелки справа */
.itb-tasks__topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 44px;
}
.itb-tasks__title {
  color: #16181f;
  max-width: 620px;
}
.itb-tasks__nav {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 8px;
}
.itb-tasks__subtitle {
  max-width: 260px;
  font-size: 15px;
  line-height: 1.5;
  color: #565c6a;
  text-align: right;
}
.itb-tasks__arrows {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}
.itb-tasks__arrow {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid #d3d6de;
  background: transparent;
  color: #16181f;
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.itb-tasks__arrow:hover { border-color: #16181f; }
.itb-tasks__arrow--active {
  background: #152040;
  border-color: #152040;
  color: #fff;
}
.itb-tasks__arrow--active:hover { background: #1d2c58; border-color: #1d2c58; }

@media (max-width: 760px) {
  .itb-tasks__topbar { flex-direction: column; gap: 20px; }
  .itb-tasks__nav { width: 100%; justify-content: space-between; }
  .itb-tasks__subtitle { text-align: left; }
}

/* Лента карточек с горизонтальным скроллом.
   Прорывает правый край контейнера и уходит за край экрана — видно,
   что карусель продолжается далеко за пределами вьюпорта. */
.itb-cards--tasks {
  display: flex;
  gap: 23px;
  overflow-x: auto;
  /* Full-bleed вправо: правый край ленты дотягивается до края экрана
     независимо от max-width и паддинга контейнера. Внутренний паддинг
     справа даёт «дышащий» отступ после последней карточки при доскролле. */
  margin-right: calc(50% - 50vw);
  padding-right: clamp(20px, 10vw, var(--container-pad));
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
  scroll-padding-left: 0;
  -webkit-overflow-scrolling: touch;
}
.itb-cards--tasks::-webkit-scrollbar { height: 6px; }
.itb-cards--tasks::-webkit-scrollbar-thumb {
  background: rgba(34, 51, 214, 0.2);
  border-radius: 99px;
}

/* Захват мышью (drag-to-scroll) */
.itb-cards--tasks { cursor: grab; }
.itb-cards--tasks.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
  user-select: none;
}
/* Во время драга гасим переходы у карточек, чтобы движение было «липким» к курсору */
.itb-cards--tasks.is-dragging a { pointer-events: none; }

/* Hint-анимация: короткое «дёрганье» влево-вправо — подсказка, что лента скроллится */
.itb-cards--tasks.is-hinting {
  scroll-snap-type: none;
  animation: itb-tasks-hint 0.9s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
@keyframes itb-tasks-hint {
  0%   { transform: translateX(0); }
  22%  { transform: translateX(-46px); }
  55%  { transform: translateX(10px); }
  100% { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .itb-cards--tasks.is-hinting { animation: none; }
}

/* Карточка задачи */
.itb-card--task {
  flex: 0 0 400px;
  width: 400px;
  height: 260px;
  background: #fff;
  border-radius: 14px;
  padding: 39px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scroll-snap-align: start;
  overflow: hidden;
}

.itb-card--task .itb-card__number {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.68px;
  color: #152040;
}
.itb-card--task .itb-card__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 27px;
  line-height: 1.12;
  letter-spacing: -0.54px;
  color: #1f2025;
}
.itb-card--task .itb-card__desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: #444957;
}
.itb-card--task .itb-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: auto;
}
/* Теги внутри белой карточки */
.itb-card--task .itb-tag {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: #152040;
  background: #efeffb;
  border: none;
  border-radius: 99px;
  padding: 6px 14px;
}

/* Выделенная карточка (первая) — синяя */
.itb-card--highlighted {
  background: #2233d6;
}
.itb-card--highlighted .itb-card__number { color: rgba(255, 255, 255, 0.65); }
.itb-card--highlighted .itb-card__title { color: #fff; }
.itb-card--highlighted .itb-card__desc { color: rgba(255, 255, 255, 0.85); }
.itb-card--highlighted .itb-tag {
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* CTA-карточка (последняя) — пунктирная рамка, заголовок + описание + кнопка */
.itb-card--cta {
  flex: 0 0 400px;
  width: 400px;
  height: 260px;
  background: #d9dae2;
  border: 1.5px dashed #9aa0c4;
  border-radius: 14px;
  padding: 34px 36px;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  transition: background 0.2s ease;
}
.itb-card--cta__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 27px;
  line-height: 1.12;
  letter-spacing: -0.54px;
  color: #16181f;
  margin-bottom: 14px;
}
.itb-card--cta__desc {
  font-size: 14.5px;
  line-height: 1.5;
  color: #444957;
  margin-bottom: auto;
}
.itb-card--cta__btn {
  align-self: stretch;
  height: 54px;
  margin-top: 20px;
  background: #1d2fd6;
}
.itb-card--cta__btn:hover { background: #1626b8; }
