/* Fitness Marka v0.30.0 — мост вёрстки и WordPress.
   Только то, чего нет в styles.css: служебные поля формы, админ-бар, сетка кейсов
   под реальное число карточек, реальный скриншот кейса, баннер cookie в стиле вёрстки. */

/* ---------- Форма заявки: служебные поля темы ---------- */
.lead .fm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.lead .fm-form__status { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.45; }
.lead .fm-form__status[hidden] { display: none; }
.lead .fm-form__status.is-error { background: #FBE9EA; color: #9B1C28; }
.lead .fm-form__status.is-success { background: var(--green-bg, #E3F1E8); color: var(--green, #1F7A48); }
.lead__form.is-loading [type="submit"] { opacity: .7; cursor: progress; }
.lead .smart-captcha { margin: 0 0 14px; }

/* ---------- Админ-бар WordPress (только для вошедших) ---------- */
html body.admin-bar .header { top: 32px; }
@media (max-width: 782px) { html body.admin-bar .header { top: 46px; } }
@media (max-width: 600px) { html body.admin-bar .header { top: 0; } }

/* ---------- Кейсы: сетка малых карточек под фактическое число реальных кейсов ---------- */
@media (min-width: 1200px) {
  .cases__grid[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
  .cases__grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cases__grid[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .cases__grid[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
}
/* Одна избранная карточка — на всю ширину */
.cases__featured[data-count="1"] { grid-template-columns: minmax(0, 1fr); }

/* ---------- Страница кейса: реальный скриншот вместо плейсхолдера ---------- */
.shot.shot--img { min-height: 0; padding: 0; border: 0; background: none; display: flex; flex-direction: column; gap: 10px; align-items: stretch; text-align: left; }
.shot--img img { width: 100%; height: auto; border-radius: 22px; background: #fff; box-shadow: 0 1px 0 var(--line); }
.shot--img figcaption { font-size: 13px; color: var(--muted); }
.cp__task p + p, .ab__card p + p { margin-top: 8px; }

/* ---------- Баннер cookie (разметка темы) в стиле вёрстки ---------- */
body.fm-rd-page .fm-cookie[hidden] { display: none; }
body.fm-rd-page .fm-cookie { position: fixed; inset: auto 0 0; z-index: 220; padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); pointer-events: none; }
body.fm-rd-page .fm-cookie__panel { pointer-events: auto; max-width: 720px; margin: 0 auto; padding: 22px 24px 24px; border-radius: 24px; background: #fff; border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(60, 40, 20, .14); }
body.fm-rd-page .fm-cookie__text { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
body.fm-rd-page .fm-cookie__docs { margin: 0 0 16px; display: grid; gap: 6px; }
body.fm-rd-page .fm-cookie__docs a { font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
body.fm-rd-page .fm-cookie__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
body.fm-rd-page .fm-cookie .fm-btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font: 600 14px/1 var(--sans); cursor: pointer; }
body.fm-rd-page .fm-cookie .fm-btn--primary { background: var(--red); border-color: var(--red); color: #fff; }
body.fm-rd-page .fm-cookie__settings-btn { border: 0; background: none; padding: 0; font: 600 14px var(--sans); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
body.fm-rd-page .fm-cookie__settings-title { margin: 0 0 14px; font-family: var(--serif); font-size: 24px; font-weight: 600; }
body.fm-rd-page .fm-cookie__toggles { margin: 0 0 16px; display: grid; gap: 12px; }
body.fm-rd-page .fm-cookie__toggle-label { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--muted); }
body.fm-rd-page .fm-cookie__toggle-label input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--red); }
body.fm-rd-page .fm-cookie__toggle-label strong { display: block; color: var(--ink); margin-bottom: 2px; }
body.fm-rd-page .fm-cookie__toggle-label small { display: block; font-size: 13px; }
body.fm-rd-page .fm-announce { background: var(--ink); color: #fff; font-size: 13px; text-align: center; padding: 8px 0; }

/* v0.33.23 кейс-статья: обложка, текст, презентации, фото */
.cp__cover { margin: 0; }
.cp__cover img { display: block; width: 100%; height: auto; border-radius: 28px; }
.cp__body { font-size: 18px; line-height: 1.6; color: var(--ink-2); }
.cp__body > * + * { margin-top: 16px; }
.cp__body h2 { font-family: var(--serif); font-weight: 600; font-size: 38px; line-height: 1.05; color: var(--ink); margin-top: 48px; }
.cp__body h3 { font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 1.1; color: var(--ink); margin-top: 40px; }
.cp__body h2 + *, .cp__body h3 + * { margin-top: 14px; }
.cp__body ul { padding-left: 22px; list-style: disc; }
.cp__body ul li + li { margin-top: 6px; }
.cp__body a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.cp-files { display: flex; flex-direction: column; gap: 12px; list-style: none; padding: 0; margin: 0; }
.cp-files__item { display: flex; align-items: center; gap: 16px; padding: 18px 22px; background: #fff; border-radius: 20px; box-shadow: 0 1px 0 var(--line); transition: box-shadow .2s; }
.cp-files__item:hover { box-shadow: 0 10px 28px rgba(20,10,5,.10); }
.cp-files__badge { flex-shrink: 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: #fff; background: var(--red); border-radius: 10px; padding: 8px 10px; }
.cp-files__name { flex: 1; font-weight: 600; line-height: 1.35; }
.cp-files__meta { flex-shrink: 0; font-size: 14px; color: var(--muted); }
.cp-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.cp-photos a { display: block; border-radius: 18px; overflow: hidden; background: #fff; }
.cp-photos img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; transition: transform .3s; }
.cp-photos a:hover img { transform: scale(1.03); }
@media (max-width: 767px) {
  .cp__body { font-size: 16px; }
  .cp__body h2 { font-size: 30px; margin-top: 36px; }
  .cp__body h3 { font-size: 23px; margin-top: 30px; }
  .cp__cover img { border-radius: 22px; }
  .cp-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cp-files__item { flex-wrap: wrap; padding: 16px 18px; }
  .cp-files__meta { width: 100%; padding-left: 0; }
}

/* v0.33.26 карточка кейса-статьи (без суммы эффекта) */
.case-f__cover { display: block; border-radius: 20px; overflow: hidden; }
.case-f__cover img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* v0.33.27 галерея-слайды (презентации) */
.cp__intro { font-size: 18px; color: var(--ink-2); }
.cp-photos--slides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cp-photos--slides img { aspect-ratio: 16 / 9; object-fit: contain; background: #111; }
@media (max-width: 767px) { .cp-photos--slides { grid-template-columns: minmax(0, 1fr); } .cp__intro { font-size: 16px; } }
