/* ══ cases.css ══
   Breakpoints: phone ≤767px | tablet 768–1023px | desktop ≥1024px
   ══ */

.case-full--flavium .case-full-photo img {
  object-position: center 18%;
}

/* Hero — compact spacing (sticky header, not fixed) */
body.page-cases .breadcrumbs {
  padding: 8px 0;
  background: var(--deep-purple);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.page-cases .inner-hero {
  padding: 24px 0 32px;
}

body.page-cases .inner-hero-content .section-label {
  margin-bottom: 10px;
}

body.page-cases .inner-hero-title {
  margin-bottom: 14px;
}

@media (max-width: 1023px) {
  body.page-cases .inner-hero {
    padding: 16px 0 24px;
  }
}

@media (max-width: 768px) {
  body.page-cases .breadcrumbs {
    padding: 6px 0;
  }

  body.page-cases .inner-hero {
    padding: 12px 0 20px;
  }

  body.page-cases .inner-hero-title {
    margin-bottom: 10px;
  }
}

.b-filters { background: var(--deep-purple) !important; }
.b-filters .filter-group {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px 20px;
  align-items: center;
  flex-wrap: nowrap;
}
.b-filters .filter-label {
  color: rgba(248,247,244,.45);
  font-size:12px;
  min-width: 0;
  width: 100%;
  text-align: right;
  padding-right: 4px;
}
.b-filters .filter-btns { min-width: 0; }
.b-filters .filter-btn { border-color: rgba(255,255,255,.15); color: rgba(248,247,244,.6); }
.b-filters .filter-btn:hover { border-color:#fff; color:#fff; }
.b-filters .filter-btn.active { background: var(--accent); border-color: var(--accent); color:#fff; }
.b-cases-full { background: #13101e !important; }
.cases-list { display: flex; flex-direction: column; gap: 64px; padding: 64px 0; }
.case-full { background: #1a1528; border-color: rgba(255,255,255,.06); border-radius: 4px; overflow: hidden; position: relative; }
.case-full + .case-full::before {
  content: '';
  display: block;
  position: absolute;
  top: -32px;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08) 20%, rgba(255,255,255,.08) 80%, transparent);
}
.case-full-content { padding: 40px 36px; }
.case-full-tags .case-full-tag { background: rgba(255,255,255,.06); color: rgba(248,247,244,.65); }
.case-full-tags .case-full-tag.done { background: rgba(100,120,100,.2); color: #7fb87f; }
.case-full-tags .case-full-tag.active { background: rgba(72,160,96,.15); color: #5fb87f; }
.case-full-title { color: #fff; font-size: clamp(18px,2vw,26px); }
.case-full-desc { color: rgba(248,247,244,.78) !important; font-size:18px !important; line-height:1.8 !important; }
body.page-cases .case-full-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  border: none;
  align-items: stretch;
}
body.page-cases .cf-stat {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 2px solid rgba(168, 144, 96, 0.45);
  border-radius: 2px;
  box-sizing: border-box;
  overflow: visible;
}
.cf-stat-val {
  color: #fff;
  font-size: clamp(16px, 1.35vw, 22px);
  line-height: 1.25;
  width: 100%;
}
body.page-cases .cf-stat-val {
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  min-height: 1.35em;
}
.cf-stat-val em {
  color: rgba(248, 247, 244, 0.5);
  font-style: normal;
  margin-left: 0;
  font-size: 0.58em;
  white-space: nowrap;
}
.cf-stat-lbl {
  color: rgba(248, 247, 244, 0.58);
  font-size: 13px;
  line-height: 1.45;
  width: 100%;
  margin-top: auto;
}

@media (min-width: 768px) {
  body.page-cases .case-full-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
  }

  body.page-cases .cf-stat {
    height: 100%;
    min-height: 108px;
  }

  body.page-cases .cf-stat-val {
    min-height: 2.75em;
  }
}
.cfc-label { color: var(--gold); font-size:12px; }
.cfc-item p { color: rgba(248,247,244,.75); font-size:17px !important; line-height:1.75 !important; }
.btn-text { color: var(--sand); }
.btn-text:hover { color: #fff; }

.case-full-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-top: 4px;
}

.case-full-read-more {
  width: 100%;
  max-width: 280px;
  text-align: center;
}

@media (min-width: 768px) {
  .case-full-read-more {
    width: auto;
    min-width: 220px;
  }
}

.cases-empty p { color: rgba(248,247,244,.5); }

/* ── Фильтры — мобилка: перенос вместо горизонтального скролла ── */
@media (max-width: 1023px) {
  .b-filters { padding: 24px 0 !important; overflow: visible !important; }
  .b-filters .container { overflow: visible !important; white-space: normal !important; padding-bottom: 0 !important; }
  .filters-wrap { gap: 16px !important; }
  .b-filters .filter-group {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .b-filters .filter-label {
    min-width: 0 !important;
    text-align: left !important;
    padding-right: 0 !important;
  }
  .filter-btns { flex-wrap: wrap !important; gap: 8px !important; width: 100% !important; min-width: 0 !important; }
  .b-filters .filter-btn {
    flex: 1 1 calc(50% - 4px) !important;
    min-width: calc(50% - 4px) !important;
    padding: 11px 8px !important;
    font-size: 10px !important;
    text-align: center !important;
    white-space: normal !important;
    line-height: 1.35 !important;
  }
  .filter-btns[data-filter="status"] .filter-btn {
    flex: 1 1 calc(33.333% - 6px) !important;
    min-width: calc(33.333% - 6px) !important;
  }
  .b-filters .filter-btn[data-value="resort"],
  .b-filters .filter-btn[data-value="krasnaya"] {
    flex: 1 1 100% !important;
    min-width: 100% !important;
  }
}

/* ── Cases мобильная адаптация ── */
@media (max-width: 768px) {
  .case-full { flex-direction: column !important; }
  .case-full-photo { width: 100% !important; height: 220px !important; }
  .case-full-content { padding: 20px 16px !important; }
  body.page-cases .case-full-stats {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  body.page-cases .cf-stat {
    padding: 14px 16px !important;
  }
  .case-full-context { grid-template-columns: 1fr !important; gap: 16px !important; }
  .cases-list { gap: 40px !important; padding: 32px 0 !important; }
}
@media (max-width: 480px) {
  .case-full-title { font-size: 18px !important; }
  .case-full-desc { font-size: 15px !important; }
  .cf-stat-val { font-size: clamp(15px, 4vw, 18px) !important; line-height: 1.25 !important; }
  .cf-stat-lbl { font-size: 12px !important; }
}
