/* ==========================================================================
   Content Fold — сворачивание длинного контента на single-game
   Отдельный файл, подключается только на страницах single-game
   ========================================================================== */

/* --------------------------------------------------------------------------
   Обёртка с ограничением высоты
   -------------------------------------------------------------------------- */
.content-fold {
  position: relative;
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.content-fold.is-open {
  max-height: none; /* JS снимает ограничение после анимации */
  overflow: visible;
}

/* --------------------------------------------------------------------------
   Градиентная маска снизу (намекает что контент обрезан)
   -------------------------------------------------------------------------- */
.content-fold::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 220px;
  background: linear-gradient(
  to bottom,
  rgba(31, 31, 44, 0) 0%,
  #1f1f2c 100%
);
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.content-fold.is-open::after,
.content-fold.no-fold::after {
  display: none;
}

.content-fold.no-fold {
  max-height: none;
  overflow: visible;
}

/* --------------------------------------------------------------------------
   Кнопка «Подробнее / Свернуть»
   -------------------------------------------------------------------------- */
.content-fold-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 16px;
  padding: 12px 24px;
  border-radius: var(--border-radius, 5px);
  border: 1px solid var(--field-border-clr, #323248);
  background: transparent;
  color: var(--text-clr, #efecff);
  font-family: var(--primary-font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  position: relative;
  z-index: 2;
}

.content-fold-btn:hover {
  background: rgba(234, 60, 70, 0.08);
  border-color: rgba(234, 60, 70, 0.4);
  color: var(--primary-clr, #ea3c46);
}

/* Иконка-стрелка */
.content-fold-btn__icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.content-fold-btn.is-open .content-fold-btn__icon {
  transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   Когда контент короче 1000px — кнопку скрываем через JS,
   но добавим CSS-заглушку на случай если JS не загрузился
   -------------------------------------------------------------------------- */
.content-fold-btn[hidden] {
  display: none;
}
