/* ============================================
   Pockets & Friends: single story page
   Reading column, header, favourites button and
   the "Keep reading" row. Loaded on single posts
   from inc/single-story.php (after main.css).
============================================ */

.pf-single-story {
  --tc: #FF9A3D; /* overridden inline with the story's category colour */
}

/* ---- Header, image, audio, quiz and cards use the full width and share a left edge.
   Story text and the moral box sit centred in a 720px measure for readability. ---- */
.pf-single-narrow {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Header ---- */
.pf-story-header {
  margin-bottom: 1.6rem;
}

.pf-story-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-md);
  text-decoration: none;
  transition: color 0.2s;
}

.pf-story-back:hover {
  color: var(--tc);
}

.pf-story-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0.9rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-md);
}

.pf-story-title {
  margin: 0 0 1.3rem;
  font-family: var(--fh);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
  color: var(--text-hi);
}

/* Favourites: calm outline, fills softly when saved.
   Uses the theme's .pf-single__fav hook so main.js keeps toggling .active. */
.pf-single-story .pf-single__fav {
  padding: 9px 18px;
  border-radius: 100px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: var(--text-hi);
  font-family: var(--fb);
  font-size: 0.9rem;
  font-weight: 800;
  box-shadow: none;
}

.pf-single-story .pf-single__fav:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: none;
  transform: none;
}

.pf-single-story .pf-single__fav.active {
  background: #FFD3E8;
  border-color: #FFD3E8;
  color: #3B1030;
  box-shadow: none;
}

.pf-single-story .pf-single__fav.active .pf-single__fav-heart {
  animation: none;
}

.pf-fav-text--on { display: none; }
.pf-single__fav.active .pf-fav-text--on { display: inline; }
.pf-single__fav.active .pf-fav-text--off { display: none; }

.pf-single-story .pf-single__fav:focus-visible {
  outline: 3px solid #FFFFFF;
  outline-offset: 3px;
}

/* ---- Featured image ---- */
.pf-story-hero {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
}

.pf-story-hero img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---- Story text ---- */
.pf-story-content {
  font-size: 1.2rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
}

.pf-story-content p {
  margin: 0 0 1.2em;
}

.pf-story-content p:last-child {
  margin-bottom: 0;
}

.pf-story-content h2,
.pf-story-content h3 {
  margin: 1.8em 0 0.6em;
  font-family: var(--fh);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-hi);
}

.pf-story-content ul,
.pf-story-content ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
}

.pf-story-content img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
}

/* ---- Keep reading ---- */
.pf-more-stories {
  margin: 3rem 0 2.5rem;
}

.pf-more-stories__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.pf-more-stories__title {
  margin: 0;
  font-family: var(--fh);
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-hi);
}

.pf-more-stories__all {
  font-family: var(--fh);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--hat-orange);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.pf-more-stories__all:hover {
  color: var(--pocket-gold);
}

/* ---- Small screens ---- */
@media (max-width: 600px) {
  .pf-story-content { font-size: 1.1rem; }
  .pf-more-stories__title { font-size: 1.4rem; }
}
