/* -------------------------------------------------------- */
/* STORIES / FICTION NAV                                    */
/* -------------------------------------------------------- */

/* ---- Filter buttons (JS-driven, matches blog pattern) -- */
.stories-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 2px solid rgba(28, 12, 1, 0.2);
}

.stories-filter-btn {
  background: var(--btn-800);
  color: var(--text);
  border: 2px solid var(--ink-900);
  border-radius: 10px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 0.95em;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
  box-shadow: 2px 2px 5px 1px rgba(0, 0, 0, 0.3);
}

.stories-filter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 3px 3px 8px 2px rgba(0, 0, 0, 0.35);
}

.stories-filter-btn.active {
  background: var(--ui-800);
  color: #fff;
}

/* Empty state message */
.stories-empty {
  text-align: center;
  padding: 30px;
  color: var(--IB-text);
  opacity: 0.7;
  font-style: italic;
}

/* ---- Story card list ------------------------------------ */
.stories-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---- Individual story card ----------------------------- */
.story-card {
  display: flex;
  gap: 14px;
  align-items: stretch;
  background: var(--btn-background-1);
  border: 2px solid rgba(28, 12, 1, 0.22);
  border-radius: 12px;
  padding: 12px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.story-card:hover {
  border-color: rgba(28, 12, 1, 0.45);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

/* ---- Cover image area ---------------------------------- */
.story-cover {
  flex-shrink: 0;
  width: 110px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(28, 12, 1, 0.3);
  background: var(--IB-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.story-cover-placeholder {
  width: 100%;
  aspect-ratio: 2 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72em;
  font-style: italic;
  color: var(--IB-text);
  opacity: 0.5;
  text-align: center;
  padding: 8px;
  line-height: 1.4;
}

/* ---- Right content area -------------------------------- */
.story-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Title row */
.story-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid rgba(28, 12, 1, 0.15);
  padding-bottom: 8px;
}

.story-title {
  font-family: var(--heading-font);
  font-size: 1.2em;
  font-weight: 700;
  color: var(--IB-text-alt);
  margin: 0;
  line-height: 1.3;
}

/* Summary */
.story-summary {
  font-size: 0.9em;
  color: var(--IB-text);
  line-height: 1.6;
  flex: 1;
}

.story-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 5px;
  font-size: 0.72em;
  font-weight: 600;
  background: rgba(134, 93, 33, 0.12);
  color: var(--IB-text);
  border: 1px solid rgba(134, 93, 33, 0.35);
  letter-spacing: 0.02em;
}


/* ---- Series badge (injected by stories.js) ------------ */
.story-series-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 5px;
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.7;
  border: 1.5px solid;
}

/* Main Series — deep brown, solid and prominent */
.story-series-badge--main {
  background: var(--ui-800);
  color: #f2e8d8;
  border-color: var(--ink-900);
}

/* Secondary Series — warm parchment with a dark border */
.story-series-badge--secondary {
  background: var(--IB-bg-alt-3);
  color: var(--IB-text);
  border-color: var(--IB-primary);
}

/* Mini Series — muted amber, lighter weight */
.story-series-badge--mini {
  background: rgba(54, 20, 2, 0.65);
  color: #f2e8d8;
  border-color: var(--IB-primary);
  border-style: dashed;
}

/* ---- Mobile -------------------------------------------- */
@media (max-width: 600px) {
  .story-card {
    flex-direction: column;
  }

  .story-cover {
    width: 100%;
    max-width: 160px;
    margin: 0 auto;
  }

  .story-cover-placeholder {
    aspect-ratio: 2 / 1;
  }
}