/* ============================================================================
   Floral Profit — Kennisbank / Resources
   Styles for the hub (filter bar + tiles) and the video/blog item pages.
   Reuses the customer-story card look from styles.css (.fp-case).
   ============================================================================ */

/* ── Hub layout ──────────────────────────────────────────────────────────── */
.rs-hub {
  max-width: var(--fp-content);
  margin: 0 auto;
  padding: 72px 32px 96px;
}

.rs-head {
  max-width: 760px;
  margin: 0 0 32px;
}

/* ── Filter bar ──────────────────────────────────────────────────────────── */
.rs-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 40px;
}
.rs-chip {
  appearance: none;
  border: 1px solid var(--fp-line-2);
  background: #fff;
  color: var(--fp-ink-2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.rs-chip:hover { border-color: var(--fp-ink); }
.rs-chip.is-active {
  background: var(--fp-accent);
  border-color: var(--fp-accent);
  color: #fff;
}

/* ── Tile grid ───────────────────────────────────────────────────────────── */
.rs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.rs-card {
  background: #fff;
  border: 1px solid var(--fp-line);
  border-radius: var(--fp-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease;
}
.rs-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--fp-shadow-md);
}

.rs-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--fp-bg-2);
  overflow: hidden;
}
.rs-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Customer-story portraits are square, keep the face in view */
.rs-card[data-type="case"] .rs-thumb img { object-position: center 20%; }

.rs-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(20, 24, 28, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  padding-left: 4px;
  transition: background .15s ease, transform .15s ease;
}
.rs-card:hover .rs-play { background: var(--fp-accent); transform: scale(1.05); }

.rs-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.rs-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--fp-ink);
  margin: 0;
  line-height: 1.3;
}
.rs-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--fp-muted);
  margin: 0;
  flex: 1;
}
.rs-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--fp-accent);
  margin-top: 4px;
}
.rs-arrow { transition: transform .15s ease; display: inline-block; }
.rs-card:hover .rs-arrow { transform: translateX(3px); }

.rs-empty {
  color: var(--fp-muted);
  font-size: 15px;
  padding: 24px 0;
}

@media (max-width: 900px) {
  .rs-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .rs-hub { padding: 48px 24px 72px; }
  .rs-grid { grid-template-columns: 1fr; }
}

/* ── Item page (video / blog) ────────────────────────────────────────────── */
.rs-item {
  max-width: 860px;
  margin: 0 auto;
  padding: 56px 32px 88px;
}
.rs-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--fp-muted);
  text-decoration: none;
  margin-bottom: 28px;
}
.rs-back:hover { color: var(--fp-accent); }
.rs-item-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  color: var(--fp-ink);
  line-height: 1.15;
  margin: 0 0 14px;
}
.rs-item-lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--fp-ink-2);
  margin: 0 0 32px;
}

/* Click-to-load YouTube embed (privacy-friendly via youtube-nocookie) */
.rs-video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--fp-radius);
  overflow: hidden;
  background: #000;
  box-shadow: var(--fp-shadow-md);
}
.rs-video img,
.rs-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
}
.rs-video-poster { cursor: pointer; }
.rs-video-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(20, 24, 28, 0.6);
  transition: background .15s ease, transform .15s ease;
}
.rs-video-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 14px 0 14px 24px;
  border-color: transparent transparent transparent #fff;
}
.rs-video-poster:hover .rs-video-play { background: var(--fp-accent); transform: scale(1.05); }

@media (max-width: 640px) {
  .rs-item { padding: 40px 24px 64px; }
}
