/* /features catalogue + /features/:slug detail. Loaded on the EJS pages
   (which use styles.css via _header), so these rules are self-contained and
   NOT scoped to .index-landing. */

/* ── Catalogue grid ──────────────────────────────────────────────────────── */
.fpage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  align-items: stretch;
  margin-bottom: 2rem;
}
.fcard {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e1e8f0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(31, 42, 58, 0.08);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}
.fcard:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(31, 42, 58, 0.16); color: inherit; text-decoration: none; }
.fcard__media {
  position: relative;
  width: 100%;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #f2f5f9 0%, #e6edf5 100%);
  color: #c43c3d;
  font-size: 3.2rem;
}
.fcard__media img, .fcard__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
.fcard__body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; flex-grow: 1; }
.fcard__title { font-size: 1.12rem; font-weight: 800; line-height: 1.3; margin-bottom: 0.5rem; color: #1c2530; }
.fcard__desc { font-size: 0.93rem; color: #4a5563; line-height: 1.45; margin: 0 0 0.9rem; flex-grow: 1; }
.fcard__date { font-size: 0.8rem; color: #8a93a0; }
.fcard__date i { margin-right: 0.35rem; }

/* ── Detail page ─────────────────────────────────────────────────────────── */
.fdetail { max-width: 760px; margin: 0 auto; }
.fdetail__back { display: inline-block; margin-bottom: 1rem; font-weight: 600; color: #c63c2f; }
.fdetail__cover {
  width: 100%;
  height: 340px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f2f5f9 0%, #e6edf5 100%);
  color: #c43c3d; font-size: 4.5rem;
}
.fdetail__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fdetail__date { font-size: 0.88rem; color: #8a93a0; margin-bottom: 1.2rem; }
.fdetail__body { font-size: 1rem; color: #2b333d; line-height: 1.6; }
.fdetail__body h1 { font-size: 1.7rem; font-weight: 800; margin: 0 0 1rem; color: #1c2530; }
.fdetail__body h2 { font-size: 1.25rem; font-weight: 700; margin: 1.6rem 0 0.7rem; color: #1c2530; }
.fdetail__body h3 { font-size: 1.08rem; font-weight: 700; margin: 1.2rem 0 0.5rem; color: #1c2530; }
.fdetail__body p { margin: 0 0 0.9rem; }
.fdetail__body ul { margin: 0 0 1rem; padding-left: 1.3rem; }
.fdetail__body li { margin: 0.25rem 0; }
.fdetail__body a { color: #c63c2f; font-weight: 600; }
.fdetail__cta { margin-top: 2rem; text-align: center; display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
/* .btn-cta is styled only on the landing (.index-landing in index.css); style
   it locally for the detail-page CTA. */
.fdetail__cta .btn-cta {
  background: linear-gradient(135deg, rgb(241, 49, 51) 0%, rgb(196, 60, 61) 50%, rgb(178, 52, 53) 100%);
  color: #fff;
  border: none;
  padding: 0.75rem 1.6rem;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(178, 52, 53, 0.32);
  transition: transform 0.15s ease, filter 0.2s ease;
}
.fdetail__cta .btn-cta:hover { color: #fff; transform: translateY(-1px); filter: brightness(1.05); }
/* Secondary CTA — «Попробовать Demo» */
.fdetail__cta .btn-cta-ghost {
  background: #fff;
  color: #c63c2f;
  border: 1px solid #e2c0bc;
  padding: 0.75rem 1.6rem;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}
.fdetail__cta .btn-cta-ghost:hover { color: #c63c2f; border-color: #c63c2f; background: #fff5f4; transform: translateY(-1px); }

/* Prev / next navigation between feature pages */
.fdetail__nav {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e7eaef;
}
.fdetail__nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1 1 0;
  min-width: 0;
  padding: 0.85rem 1.1rem;
  border: 1px solid #e2e6ec;
  border-radius: 12px;
  text-decoration: none;
  color: #2b333d;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.fdetail__nav-link.is-empty { border: none; background: none; pointer-events: none; }
.fdetail__nav-link:hover {
  border-color: #c63c2f;
  box-shadow: 0 8px 20px rgba(178, 52, 53, 0.12);
  transform: translateY(-1px);
  color: #2b333d;
}
.fdetail__nav-prev { text-align: left; }
.fdetail__nav-next { text-align: right; }
.fdetail__nav-dir { font-size: 0.8rem; font-weight: 600; color: #c63c2f; }
.fdetail__nav-title {
  font-weight: 700;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 992px) {
  .fpage-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .fpage-grid { grid-template-columns: 1fr; }
  .fdetail__cover { height: 220px; }
  .fdetail__nav { flex-direction: column; }
  .fdetail__nav-next { text-align: left; }
  .fdetail__nav-link.is-empty { display: none; }
}
