/* =========================================================================
   Fizika Sales Hub — мобильная читаемость условий + кино-блок проектов
   Подключается ПОСЛЕДНИМ (перед </body>), поэтому переопределяет
   инлайновые стили из index.html без !important.

   Содержание:
     1. Переменные для плотных поверхностей
     2. Вариант C — .offer как спецификация (плитки + details)
     3. Вариант A — .cond-table (не график): подпись сверху на мобильной
     4. Вариант B — .cond-table--schedule: горизонтальный скролл + sticky
     5. Вариант 4 — .project-cinema: постер 16:9 + панель под кадром
   ========================================================================= */

/* ---------- 1. Непрозрачные подложки (нужны для sticky-колонки) --------- */
:root {
  --cond-cell-bg: #15171a;   /* .block на тёмной теме */
  --cond-head-bg: #1c2026;
  --cond-limit: #e07a5f;
}
:root[data-theme="light"] {
  --cond-cell-bg: #faf6ef;
  --cond-head-bg: #f1e9dc;
  --cond-limit: #c2553a;
}
/* внутри .offer поверхность чуть светлее — подгоняем, чтобы sticky не «швом» */
.offer {
  --cond-cell-bg: #202328;
}
:root[data-theme="light"] .offer {
  --cond-cell-bg: #faf6ef;
}
/* таблица из калькулятора живёт на своей подложке */
.calc__result {
  --cond-cell-bg: #1b1f26;
  --cond-head-bg: #222730;
}
:root[data-theme="light"] .calc__result {
  --cond-cell-bg: #faf6ef;
  --cond-head-bg: #f1e9dc;
}

/* ===================== 2. ВАРИАНТ C — спецификация ====================== */
.offer__spec {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
}
.offer__spec-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}
:root[data-theme="light"] .offer__spec-item {
  background: rgba(155, 116, 64, 0.05);
}
.offer__spec-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.offer__spec-value {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
  overflow-wrap: break-word;
  font-variant-numeric: tabular-nums;
}
.offer__spec-value--up    { color: var(--accent); }
.offer__spec-value--good  { color: var(--success); }
.offer__spec-value--limit { color: var(--cond-limit); }

/* длинные значения («ежеквартально или раз в полгода») — шире обычной плитки */
.offer__spec-item--wide { grid-column: span 2; }
.offer__spec-item--wide .offer__spec-value { font-size: 14px; }

/* --- сетка плиток на телефоне: строго 2 колонки, иначе auto-fit даёт одну --- */
@media (max-width: 720px) {
  .offer__spec {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 10px;
  }
  .offer__spec-item { padding: 9px 11px; gap: 2px; }
  .offer__spec-label {
    font-size: 10px;
    letter-spacing: 0.03em;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  .offer__spec-value { font-size: 15px; }
  .offer__spec-item--wide .offer__spec-value { font-size: 13.5px; }
}
/* совсем узкие экраны — одна колонка, подпись слева, значение справа */
@media (max-width: 359px) {
  .offer__spec { grid-template-columns: 1fr; }
  .offer__spec-item {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
  }
  .offer__spec-item--wide { grid-column: span 1; flex-direction: column; }
  .offer__spec-value { text-align: right; }
}

/* ---- раскрывашка с полным исходным текстом ---- */
.offer__details {
  margin-top: 4px;
  border-top: 1px solid var(--border);
}
.offer__summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0;
  list-style: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.offer__summary::-webkit-details-marker { display: none; }
.offer__summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}
.offer__details[open] .offer__summary::after {
  transform: translateY(1px) rotate(-135deg);
}
.offer__summary:hover { color: var(--accent-hover); }
.offer__summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}
.offer__details-body {
  padding-bottom: 4px;
  animation: offer-reveal 0.22s ease;
}
.offer__details-body .offer__meta { margin-bottom: 0; }
@keyframes offer-reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== 3. ВАРИАНТ A — обычные .cond-table: подпись сверху на мобильной == */
@media (max-width: 720px) {
  .cond-table:not(.cond-table--schedule) td {
    flex-wrap: wrap;
    align-items: flex-start;
    row-gap: 3px;
    padding: 10px 14px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
  }
  .cond-table:not(.cond-table--schedule) td::before {
    flex: 0 0 100%;
    max-width: 100%;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .cond-table:not(.cond-table--schedule) td > * {
    flex: 1 1 100%;
    max-width: 100%;
    text-align: left;
  }
  /* объединённые ячейки (Итого) — без подписи, в одну строку */
  .cond-table:not(.cond-table--schedule) td[colspan] {
    flex-wrap: nowrap;
  }
}

/* =========== 4. ГРАФИК ПЛАТЕЖЕЙ НА МОБИЛЬНОЙ — КАРТОЧКИ, БЕЗ СКРОЛЛА ===========
   Скролл вбок убран: строки раскладываются как офферы.
   Каждая строка = один платёж:
       Платёж          50%
       срок
   ============================================================================ */
@media (max-width: 720px) {
  .cond-table--schedule {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin: 4px 0 0;
    table-layout: auto;
    background: transparent;
  }
  .cond-table--schedule thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .cond-table--schedule tbody {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  /* строка-карточка: имя платежа слева, сумма справа, срок под именем */
  .cond-table--schedule tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name amount"
      "term amount";
    align-items: center;
    column-gap: 12px;
    row-gap: 2px;
    margin: 0;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--cond-cell-bg);
  }

  .cond-table--schedule td {
    display: block;
    width: auto;
    min-width: 0;
    padding: 0;
    border: none;
    text-align: left;
    white-space: normal;
    overflow-wrap: break-word;
  }
  /* подписи из thead не нужны — структура карточки читается сама */
  .cond-table--schedule td::before,
  .cond-table--schedule th::before { content: none; }

  /* 1 — название платежа */
  .cond-table--schedule td:nth-child(1) {
    grid-area: name;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
  }
  /* 2 — срок: вторичная строка под названием */
  .cond-table--schedule td:nth-child(2) {
    grid-area: term;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-muted);
  }
  /* 3 — сумма/процент: главный акцент строки */
  .cond-table--schedule td:nth-child(3) {
    grid-area: amount;
    justify-self: end;
    text-align: right;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    white-space: nowrap;
  }

  /* строка «Итого»: две ячейки (colspan=2) — подсвечиваем акцентом */
  .cond-table--schedule .cond-total {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name amount";
    border-color: rgba(201, 168, 106, 0.42);
    background: rgba(201, 168, 106, 0.09);
  }
  .cond-table--schedule .cond-total td[colspan] {
    grid-area: name;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .cond-table--schedule .cond-total td:last-child {
    grid-area: amount;
    color: var(--accent);
  }
  .cond-table--schedule tr:last-child td { border-bottom: none; }

  /* внутри .offer подложка карточки чуть светлее родителя */
  .offer .cond-table--schedule tr { background: rgba(255, 255, 255, 0.05); }
}
:root[data-theme="light"] .offer .cond-table--schedule tr { background: #fff; }

/* совсем узкие экраны — компактнее, но структура та же */
@media (max-width: 359px) {
  .cond-table--schedule tr { padding: 10px 12px; }
  .cond-table--schedule td:nth-child(1) { font-size: 14px; }
  .cond-table--schedule td:nth-child(3) { font-size: 16px; }
}

/* График внутри калькулятора: в index.html у него более специфичные правила
   (.calc__result .cond-table--schedule td) с процентными ширинами —
   перебиваем их такой же специфичностью, иначе сетка карточки ломается. */
@media (max-width: 720px) {
  .calc__result .cond-table--schedule td {
    width: auto;
    padding: 0;
  }
  .calc__result .cond-table--schedule td:nth-child(1) {
    width: auto;
    font-size: 14.5px;
  }
  .calc__result .cond-table--schedule td:nth-child(2) {
    width: auto;
    font-size: 12.5px;
  }
  .calc__result .cond-table--schedule td:nth-child(3) {
    width: auto;
    font-size: 17px;
  }
  .calc__result .cond-table--schedule tr { background: rgba(255, 255, 255, 0.05); }
}
:root[data-theme="light"] .calc__result .cond-table--schedule tr { background: #fff; }

/* ============ 6. КРАТКАЯ СВОДКА — КАРТОЧКИ ПРОЕКТОВ ============
   Было: 6-колоночная таблица, на мобильной превращавшаяся в кашу.
   Стало: карточка проекта = название + статус, две плитки с главными
   цифрами и чипы условий. Таблица остаётся только на десктопе? Нет —
   карточки работают на всех ширинах, на десктопе встают в 2 колонки.
   ============================================================== */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.sum-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 20px 22px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
  transition: border-color 0.2s ease, background 0.2s ease;
}
:root[data-theme="light"] .sum-card { background: #faf6ef; }
.sum-card:hover { border-color: rgba(201, 168, 106, 0.34); }

/* --- шапка карточки: название проекта крупно, статус справа --- */
.sum-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.sum-card__name {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--text);
}
.sum-card__head .tag {
  flex: 0 0 auto;
  margin-top: 2px;
}

/* --- плитки с главными цифрами --- */
.sum-card__tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.sum-tile {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}
:root[data-theme="light"] .sum-tile { background: rgba(155, 116, 64, 0.05); }
.sum-tile__label {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.sum-tile__value {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.sum-tile__note {
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--text-muted);
}
/* комиссия внутри плитки — не 20px, там текст, а не цифра */
.sum-tile__value .comm {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text);
  line-height: 1.35;
}

/* --- чипы условий --- */
.sum-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sum-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-muted);
  background: transparent;
}
.sum-chip--good {
  border-color: rgba(143, 191, 159, 0.34);
  background: rgba(143, 191, 159, 0.1);
  color: var(--success);
}
.sum-chip--up {
  border-color: rgba(201, 168, 106, 0.36);
  background: rgba(201, 168, 106, 0.1);
  color: var(--accent);
}

.sum-card__link {
  margin-top: auto;
  padding-top: 2px;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  /* тач-таргет: ссылка-текст давала всего 23px высоты — мало для пальца */
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  width: fit-content;
  -webkit-tap-highlight-color: transparent;
}
.sum-card__link:hover { color: var(--accent-hover); }
.sum-card__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

/* --- мобильная: одна колонка, но проект «как оффер» --- */
@media (max-width: 900px) {
  .summary-cards { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 720px) {
  .sum-card {
    padding: 16px 15px 15px;
    gap: 11px;
    border-radius: 16px;
    box-shadow: none;
  }
  .sum-card__name { font-size: 21px; }
  .sum-card__tiles { gap: 7px; }
  .sum-tile { padding: 9px 11px; border-radius: 11px; }
  .sum-tile__value { font-size: 19px; }
  .sum-tile__value .comm { font-size: 13px; }
  .sum-tile__note { font-size: 11px; }
  .sum-chip { font-size: 11.5px; padding: 5px 9px; }
}
@media (max-width: 359px) {
  .sum-card__tiles { grid-template-columns: 1fr; }
}

/* --- «Важно» под сводкой --- */
.summary-note { margin-top: 18px; }


/* ============ 7. КИНО-БЛОК — постер 16:9 + панель под кадром ============ */
.project-cinema {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  height: auto;                 /* было 380px */
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--cond-cell-bg);
  color: var(--text);
}

/* --- кадр --- */
.project-cinema__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  background: #11141a;
}
.project-cinema__frame .project-cinema__poster,
.project-cinema__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.project-cinema__frame video {
  opacity: 0;
  transition: opacity 0.35s ease;
}

/* Десктоп: кадр на всю ширину контейнера, но высота ограничена —
   иначе 16:9 на 1180px даёт 664px и видео давит на условия под ним.
   Правило стоит ПОСЛЕ базового, чтобы перебить aspect-ratio. */
@media (min-width: 981px) {
  .project-cinema {
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }
  /* Во всю ширину контейнера, но кинематографические 21:9 вместо 16:9:
     на 1180px это 505px высоты вместо 664 — кадр не давит на условия.
     Пропорция соблюдается целиком, а не через max-height (тот ломал ratio). */
  .project-cinema__frame {
    aspect-ratio: 21 / 9;
  }
}
.project-cinema.is-playing .project-cinema__frame video { opacity: 1; }
.project-cinema.is-playing .project-cinema__poster { opacity: 0; transition: opacity .35s ease; }

/* кадр больше ничем не перекрыт: убираем старый тёмный градиент */
.project-cinema::after { content: none; }

/* --- круглая кнопка play по центру кадра --- */
.cinema-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: rgba(10, 13, 18, 0.46);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  box-shadow:
    0 10px 34px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.22s ease, opacity 0.25s ease, border-color 0.22s ease;
}
.cinema-play:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #11141a;
  transform: translate(-50%, -50%) scale(1.08);
}
.cinema-play:active { transform: translate(-50%, -50%) scale(0.95); }
.cinema-play:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}
.cinema-play[hidden] { display: none; }

/* сама иконка — крупная и контрастная, с мягкой тенью поверх кадра */
.cinema-play svg {
  display: block;
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}
/* треугольник play оптически смещён вправо — иначе кажется, что он левее центра */
.cinema-play .cinema-play__play { transform: translateX(1.5px); }
.cinema-play .cinema-play__pause { display: none; }

.project-cinema.is-playing .cinema-play {
  opacity: 0;
  pointer-events: none;
}
.project-cinema.is-playing:hover .cinema-play,
.project-cinema.is-playing .cinema-play:focus-visible {
  opacity: 1;
  pointer-events: auto;
}
.project-cinema.is-playing .cinema-play .cinema-play__play  { display: none; }
.project-cinema.is-playing .cinema-play .cinema-play__pause { display: block; }

/* --- панель под кадром --- */
.project-cinema__panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 20px;
}
.project-cinema__panel .tag {
  width: fit-content;
  background: rgba(143, 191, 159, 0.12);
  color: var(--success);
  border: none;
}
.project-cinema__panel h3 {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 36px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--text);
}
.project-cinema__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}
/* кнопки в панели — на светлом фоне карточки, а не поверх кадра */
.project-cinema__panel .cinema-button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}
:root[data-theme="light"] .project-cinema__panel .cinema-button {
  background: #fff;
}
.project-cinema__panel .cinema-button:hover {
  border-color: rgba(201, 168, 106, 0.45);
  background: rgba(201, 168, 106, 0.1);
  color: var(--text);
}

/* статус (ошибка загрузки видео) — в углу кадра */
.project-cinema .cinema-status {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  max-width: calc(100% - 24px);
  padding: 7px 11px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 11.5px;
  line-height: 1.3;
}
.project-cinema .cinema-status:empty { display: none; }

/* --- мобильная раскладка кино-блока --- */
@media (max-width: 720px) {
  .project-cinema__panel { padding: 14px 16px 16px; gap: 8px; }
  .project-cinema__panel h3 { font-size: 26px; }
  .project-cinema__controls { margin-top: 4px; }
  .project-cinema__panel .cinema-button {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 140px;
  }
  .cinema-play { width: 64px; height: 64px; border-width: 2px; }
  .cinema-play svg { width: 27px; height: 27px; }
  /* ИСПРАВЛЕНО: на телефоне кнопка play скрывается во время проигрывания */
  .project-cinema.is-playing .cinema-play { opacity: 0; pointer-events: none; }
}

@media (max-width: 380px) {
  .project-cinema__panel h3 { font-size: 23px; }
  .project-cinema__panel .cinema-button { font-size: 13px; padding: 10px 12px; }
}

/* --- бейдж статуса уезжает из-под обложки карточки проекта --- */
.visual-card__cover .project-card__status { display: none; }
.visual-card__cover::after { content: none; }
.visual-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}
.visual-card__head h3 { margin: 0; }
.visual-card__head .project-card__status {
  position: static;
  flex: 0 0 auto;
  background: rgba(143, 191, 159, 0.12);
  color: var(--success);
  border: none;
}
.visual-card > div:not(.visual-card__cover) > p { margin-top: 8px; }

@media (max-width: 720px) {
  .visual-card__head { margin-top: 16px; }
  .visual-card__head h3 { font-size: 22px; }
  .visual-card__head .project-card__status { font-size: 11px; padding: 5px 8px; }
}

/* --- общее: не мельчим текст условий на телефоне --- */
@media (max-width: 720px) {
  .offer__meta { font-size: 14.5px; line-height: 1.55; }
  .block ul li, .project-section ul li { font-size: 14.5px; line-height: 1.55; }
  .offer { padding: 14px; }
  .offer__title { font-size: 16.5px; line-height: 1.25; }
}

@media (prefers-reduced-motion: reduce) {
  .offer__details-body { animation: none; }
  .cinema-play,
  .project-cinema__frame video,
  .offer__summary::after { transition: none; }
}


/* ============ 8. МОБИЛЬНАЯ ПЛОТНОСТЬ: УБИРАЕМ «МАТРЁШКУ» ОТСТУПОВ ============
   На 390px вложенность .project-section > .block > .offer съедала 126px (32%
   ширины экрана) — по 2 рамки и по 2 отступа на каждом уровне. Текст условий
   получал всего 232px, из-за чего строки рвались и всё выглядело тесным.
   Уплотняем все три уровня: содержимому достаётся 272px (+17%).
   ============================================================================ */
@media (max-width: 720px) {
  .project-section { padding: 16px 14px 18px; }
  .project-section .block { padding: 14px; }
  .project-section .offer { padding: 12px; }

  /* заголовки внутри блоков — чуть компактнее, чтобы выигранная ширина
     не ушла в лишнюю вертикаль */
  .project-section .block h4 { margin-bottom: 8px; }
  .project-section .offer__head { gap: 8px; margin-bottom: 8px; }
}

/* На узких экранах карточка оффера выходит в край блока: ещё +24px текста.
   Рамка остаётся — она группирует, но больше не отступает от краёв. */
@media (max-width: 400px) {
  .project-section .offer {
    margin-inline: -14px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .project-section .offer:first-of-type { margin-top: 10px; }
}
