/* ============================================================
   ZenFriend — Comics Page Styles
   Comic-book style panel grid with images that fill their boxes
   ============================================================ */

.comic-hero {
  text-align: center;
  padding: 4rem 1.5rem 2.5rem;
}

.comic-eyebrow {
  display: inline-block;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  opacity: 0.6;
  margin-bottom: 0.5rem;
}

.comic-hero h1 {
  font-family: "Fredoka", sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0.25rem 0 0.75rem;
}

.comic-hero-tagline {
  font-family: "Nunito", sans-serif;
  font-size: 1.05rem;
  opacity: 0.75;
  max-width: 480px;
  margin: 0 auto;
}

/* ─────────── Episode tabs ─────────── */
.episode-nav {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 auto 2.5rem;
  padding: 0 1.5rem;
}

.episode-tab {
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.episode-tab.active {
  background: #2d2d2d;
  color: #fff;
  border-color: #2d2d2d;
}

.episode-tab.locked {
  opacity: 0.45;
  cursor: not-allowed;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.soon-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.08);
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
}

/* ─────────── Episode section ─────────── */
.comic-episode {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.episode-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.episode-header h2 {
  font-family: "Fredoka", sans-serif;
  font-size: 1.75rem;
  margin-bottom: 0.35rem;
}

.episode-subtitle {
  font-family: "Nunito", sans-serif;
  opacity: 0.65;
  font-size: 0.95rem;
}

/* ─────────── Comic grid (the actual page layout) ─────────── */
/* Single straight column — every panel same width, stacked in order. */
.comic-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.panel-wide,
.panel-wide-short,
.panel-square,
.panel-tall,
.panel-landscape {
  width: 100%;
  max-width: 700px;
  aspect-ratio: 3 / 2;
}

/* ─────────── Panel box + image fit ─────────── */
.panel {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  border: 3px solid #1f1f1f;
  background: #f4f2ee;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.15);
}

.panel {
  background: #0d0d0d;
}

.panel img {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* shows the full image, nothing cropped */
  object-position: center;
  display: block;
}

.panel-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Fredoka", sans-serif;
  font-size: 2rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.25);
  background: repeating-linear-gradient(
    45deg,
    #f4f2ee,
    #f4f2ee 10px,
    #ece9e3 10px,
    #ece9e3 20px
  );
}

/* ─────────── Responsive breakpoints ─────────── */
@media (max-width: 720px) {
  .comic-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 130px;
  }
  .panel-wide,
  .panel-wide-short { grid-column: span 2; }
  .panel-square      { grid-column: span 1; grid-row: span 2; }
  .panel-tall        { grid-column: span 1; grid-row: span 3; }
}

@media (max-width: 420px) {
  .comic-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }
  .panel-wide,
  .panel-wide-short,
  .panel-square,
  .panel-tall {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* ─────────── Episode footer / CTA ─────────── */
.episode-footer {
  text-align: center;
  margin-top: 2.5rem;
  font-family: "Nunito", sans-serif;
}

.episode-footer p {
  opacity: 0.7;
  margin-bottom: 0.75rem;
}

.comic-cta,
.comic-cta-secondary {
  display: inline-block;
  margin: 0 0.4rem;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
  transition: transform 0.15s ease;
}

.comic-cta {
  background: #2d2d2d;
  color: #fff;
}

.comic-cta-secondary {
  background: transparent;
  color: #2d2d2d;
  border: 2px solid rgba(0, 0, 0, 0.15);
}

.comic-cta:hover,
.comic-cta-secondary:hover {
  transform: translateY(-2px);
}
