/*
Theme Name:  WriteAPoem Child (Astra)
Theme URI:   https://writeapoem.org
Description: Child theme for WriteAPoem.org — based on Astra
Author:      WriteAPoem.org
Template:    astra
Version:     1.0
*/

/* ═══════════════════════════════════════════
   POETRY SITE — CHILD THEME STYLES
   ═══════════════════════════════════════════ */

:root {
  --ink:       #1a1a1a;
  --mid:       #4a4a4a;
  --muted:     #767676;
  --rule:      #e0d9d0;
  --parchment: #faf8f4;
  --accent:    #8b2c2c;
  --card-bg:   #f4f1ec;
  --white:     #ffffff;
  --radius:    5px;
  --ff-display: 'Georgia', serif;
  --ff-body:    Georgia, 'Times New Roman', serif;
  --ff-ui:      -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ─── ASTRA RESET: remove its default content padding/margins ─── */
.ast-article-single,
.ast-article-post,
.entry-content,
.ast-container,
.site-content .ast-container {
  padding: 0 !important;
  max-width: none !important;
}

/* Remove Astra's default page title when we render our own */
.ast-archive-title,
.entry-title.ast-blog-single-element {
  display: none;
}

/* ─── GLOBAL ─── */
.poet-page, .poem-page, .archive-page {
  font-family: var(--ff-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════
   SINGLE POET PAGE
   ═══════════════════════════════════════ */

.poet-page {
  max-width: 1100px;
  margin: 50px auto;
  padding: 0 24px;
}

/* ── Header ── */
.poet-header {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 20px;
  margin-bottom: 36px;
}
.poet-breadcrumb {
  font-family: var(--ff-ui);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.poet-breadcrumb a { color: var(--accent); text-decoration: none; }
.poet-header h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 6px;
}
.poet-dates {
  font-family: var(--ff-ui);
  font-size: 13px;
  color: var(--muted);
}

/* ── Main grid: [photo+facts] | [biography] ── */
.poet-top {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 48px;
}

/* LEFT column — photo stacked above quick facts */
.poet-left-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.poet-photo img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--rule);
}
.poet-photo-caption {
  font-family: var(--ff-ui);
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  text-align: center;
  line-height: 1.4;
}
.poet-photo-placeholder {
  width: 100%;
  height: 320px;
  background: var(--card-bg);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-ui);
  font-size: 13px;
  color: var(--muted);
}

/* Quick Facts — flush below photo, no gap */
.poet-facts {
  background: var(--card-bg);
  border: 1px solid var(--rule);
  border-top: none;
  padding: 0 16px;
}
.poet-facts-title {
  font-family: var(--ff-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 0 10px;
  border-bottom: 1px solid var(--rule);
  margin: 0;
}
.poet-fact-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.poet-fact-row:last-child { border-bottom: none; }
.poet-fact-key,
dt.poet-fact-key {
  font-family: var(--ff-ui);
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
  margin: 0;
}
.poet-fact-val,
dd.poet-fact-val {
  font-family: var(--ff-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
  white-space: nowrap;
  margin: 0;
}

/* RIGHT column — biography */
.poet-right-col {}
.poet-info { display: none; }
.poet-bio {
  font-size: 17px;
  line-height: 1.85;
  font-weight: 300;
}
.poet-bio p { margin-bottom: 1em; }
.poet-era-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}
.poet-tag {
  font-family: var(--ff-ui);
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 4px 11px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--mid);
  background: var(--white);
}

/* ── Poems List ── */
.poet-poems { margin-bottom: 50px; }
.poet-poems-title {
  font-family: var(--ff-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 10px;
  margin-bottom: 0;
}
.poet-poems ul { list-style: none; padding: 0; margin: 0; }
.poet-poems ul li {
  border-bottom: 1px solid var(--rule);
  padding: 12px 0;
}
.poet-poems ul li a {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 17px;
  color: var(--accent);
  text-decoration: none;
  display: block;
}
.poet-poems ul li a:hover { text-decoration: underline; }
.poet-poems-none {
  font-family: var(--ff-ui);
  font-size: 14px;
  color: var(--muted);
  padding: 16px 0;
}

/* ═══════════════════════════════════════
   SINGLE POEM PAGE
   ═══════════════════════════════════════ */

.poem-page {
  max-width: 780px;
  margin: 40px auto;
  padding: 0 24px;
}

.poem-header {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 20px;
  margin-bottom: 36px;
}
.poem-breadcrumb {
  font-family: var(--ff-ui);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.poem-breadcrumb a { color: var(--accent); text-decoration: none; }
.poem-breadcrumb a:hover { text-decoration: underline; }
.poem-title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.15;
}
.poem-author-line {
  font-family: var(--ff-ui);
  font-size: 15px;
  color: var(--mid);
}
.poem-author-line a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.poem-author-line a:hover { text-decoration: underline; }
.poem-year-tag {
  font-family: var(--ff-ui);
  font-size: 13px;
  color: var(--muted);
  margin-left: 10px;
}

/* ── POEM BODY — core fix ──
   Problem: WordPress wraps every line in <p> tags
   which adds huge top/bottom margins between each line.
   Fix: collapse all paragraph margins to 0 inside
   poem-body, use line-height only for spacing.
   Stanza breaks (empty <p>) get a small top margin
   to visually separate stanzas.
   white-space: pre-line preserves line breaks
   without adding extra blank lines.
── */
.poem-body {
  font-family: var(--ff-display);
  font-size: 19px;
  line-height: 1.9;
  margin-bottom: 56px;
  color: var(--ink);
}

/* Kill ALL paragraph margins inside poem body */
.poem-body p {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 1em;           /* keeps empty <p> visible as stanza break */
}

/* Empty paragraph = stanza break — give it breathing room */
.poem-body p:empty,
.poem-body p br:only-child {
  margin-top: 1.2em !important;
  display: block;
}

/* Astra override — Astra sets its own p margins */
.poem-page .poem-body p,
.entry-content .poem-body p,
.ast-article-single .poem-body p {
  margin: 0 !important;
  padding: 0 !important;
}

/* Each line of the poem */
.poem-line {
  display: block;
  line-height: 1.9;
  min-height: 1em;
  text-align: center;
}

.poem-body {
  text-align: center;
}

/* Blank line between stanzas */
.poem-stanza-break {
  display: block;
  height: 1.4em;    /* visual gap between stanzas */
}

.poem-about-poet {
  border-top: 2px solid var(--rule);
  padding-top: 36px;
  margin-bottom: 50px;
}
.poem-about-title {
  font-family: var(--ff-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.poem-about-box {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.poem-about-photo { width: 160px; flex-shrink: 0; }
.poem-about-photo img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--rule);
}
.poem-about-content { flex: 1; }
.poem-about-poet-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}
.poem-about-bio {
  font-size: 15px;
  line-height: 1.75;
  color: var(--mid);
  margin-bottom: 14px;
}
.poem-read-more {
  font-family: var(--ff-ui);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  transition: opacity .15s;
}
.poem-read-more:hover { opacity: .7; }

.poem-more-poems {
  border-top: 2px solid var(--rule);
  padding-top: 32px;
  margin-bottom: 50px;
}
.poem-more-title {
  font-family: var(--ff-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.poem-more-list { list-style: none; padding: 0; margin: 0; }
.poem-more-list li {
  border-bottom: 1px solid var(--rule);
  padding: 11px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.poem-more-list li::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}
.poem-more-list a {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 17px;
  color: var(--accent);
  text-decoration: none;
}
.poem-more-list a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════
   ARCHIVE: POETS LIST
   ═══════════════════════════════════════ */

.archive-page {
  max-width: 1100px;
  margin: 50px auto;
  padding: 0 24px;
}
.archive-page-title {
  font-size: 2.4rem;
  margin-bottom: 36px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 14px;
}
.poet-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 28px;
}
.poet-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .15s;
}
.poet-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.poet-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}
.poet-card-body { padding: 18px; }
.poet-card h2 { font-size: 22px; margin: 0 0 10px; }
.poet-card h2 a { color: var(--ink); text-decoration: none; }
.poet-card h2 a:hover { color: var(--accent); }
.poet-card-excerpt {
  font-size: 14px;
  line-height: 1.7;
  color: var(--mid);
  margin-bottom: 14px;
}
.read-profile {
  font-family: var(--ff-ui);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: .05em;
}
.read-profile:hover { text-decoration: underline; }

/* ═══════════════════════════════════════
   ARCHIVE: POEMS LIST
   ═══════════════════════════════════════ */

.poem-archive-list { list-style: none; padding: 0; margin: 0; }
.poem-archive-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}
.poem-archive-list .poem-archive-title {
  font-family: var(--ff-display);
  font-size: 22px;
  font-style: italic;
  margin-bottom: 4px;
}
.poem-archive-list .poem-archive-title a {
  color: var(--ink);
  text-decoration: none;
}
.poem-archive-list .poem-archive-title a:hover { color: var(--accent); }
.poem-archive-byline {
  font-family: var(--ff-ui);
  font-size: 13px;
  color: var(--muted);
}
.poem-archive-byline a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.poem-archive-byline a:hover { text-decoration: underline; }

.archive-pagination {
  margin-top: 48px;
  text-align: center;
  font-family: var(--ff-ui);
}

/* ═══════════════════════════════════════
   SHORTCODE: [poets_grid]
   ═══════════════════════════════════════ */

.sc-poets-grid { display: grid; gap: 28px; margin: 32px 0; }
.sc-cols-2 { grid-template-columns: repeat(2, 1fr); }
.sc-cols-3 { grid-template-columns: repeat(3, 1fr); }
.sc-cols-4 { grid-template-columns: repeat(4, 1fr); }

.sc-poet-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 5px;
  overflow: hidden;
  transition: box-shadow .18s, transform .18s;
}
.sc-poet-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.09); transform: translateY(-2px); }
.sc-poet-photo-link { display: block; line-height: 0; }
.sc-poet-photo { width: 100%; height: 260px; object-fit: cover; object-position: center top; display: block; }
.sc-poet-photo-placeholder {
  width: 100%; height: 260px;
  background: var(--card-bg);
  display: flex; align-items: center; justify-content: center;
}
.sc-poet-photo-placeholder span {
  font-family: var(--ff-display);
  font-size: 72px; color: var(--rule); font-weight: 700;
}
.sc-poet-card-body { padding: 18px 18px 20px; }
.sc-poet-name { font-size: 20px; font-weight: 700; margin: 0 0 6px; line-height: 1.2; }
.sc-poet-name a { color: var(--ink); text-decoration: none; }
.sc-poet-name a:hover { color: var(--accent); }
.sc-poet-years { font-family: var(--ff-ui); font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.sc-poet-excerpt { font-size: 14px; line-height: 1.65; color: var(--mid); margin: 0 0 14px; }
.sc-poet-read-more { font-family: var(--ff-ui); font-size: 12px; font-weight: 700; color: var(--accent); text-decoration: none; }
.sc-poet-read-more:hover { text-decoration: underline; }

/* ═══════════════════════════════════════
   SHORTCODE: [poems_list]
   ═══════════════════════════════════════ */

.sc-poems-list { list-style: none; padding: 0; margin: 32px 0; border-top: 2px solid var(--ink); }
.sc-poem-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--rule);
  transition: background .12s;
}
.sc-poem-row:hover { background: var(--parchment); }
.sc-poem-row-left { flex: 1; min-width: 0; }
.sc-poem-title { font-family: var(--ff-display); font-style: italic; font-size: 19px; line-height: 1.3; margin-bottom: 3px; }
.sc-poem-title a { color: var(--ink); text-decoration: none; }
.sc-poem-title a:hover { color: var(--accent); }
.sc-poem-byline { font-family: var(--ff-ui); font-size: 13px; color: var(--muted); }
.sc-poem-byline a { color: var(--accent); text-decoration: none; font-weight: 600; }
.sc-poem-byline a:hover { text-decoration: underline; }
.sc-poem-year { font-family: var(--ff-ui); font-size: 13px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }

/* ═══════════════════════════════════════
   SHORTCODE: [todays_verses] SLIDER
   ═══════════════════════════════════════ */

.sc-tv-wrap { margin: 40px auto; max-width: 780px; text-align: center; }
.sc-tv-header {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 2px solid #1a1a1a; padding-bottom: 12px; margin-bottom: 0; text-align: left;
}
.sc-tv-title {
  font-family: Georgia, serif; font-size: 22px; font-weight: 700;
  margin: 0; color: #1a1a1a; display: flex; align-items: center; gap: 10px;
}
.sc-tv-icon { color: #8b2c2c; font-size: 13px; }
.sc-tv-see-all { font-family: sans-serif; font-size: 12px; font-weight: 700; color: #8b2c2c; text-decoration: none; white-space: nowrap; }
.sc-tv-see-all:hover { text-decoration: underline; }
.sc-tv-slider { position: relative; padding: 0 52px; min-height: 160px; display: flex; align-items: center; }
.sc-tv-track { flex: 1; position: relative; overflow: hidden; }
.sc-tv-slide { display: none; padding: 36px 0 24px; text-align: center; animation: sc-tv-fadein .35s ease; }
.sc-tv-slide.active { display: block; }
@keyframes sc-tv-fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.sc-tv-verse-lines { margin: 0 auto 16px; padding: 0; border: none; max-width: 580px; }
.sc-tv-verse-lines p { font-family: Georgia, serif; font-style: italic; font-size: 19px; line-height: 1.75; color: #1a1a1a; margin: 0; }
.sc-tv-attribution { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; font-family: sans-serif; font-size: 13px; }
.sc-tv-poem-link { color: #4a4a4a; text-decoration: none; font-weight: 600; }
.sc-tv-poem-link:hover { color: #8b2c2c; }
.sc-tv-dash { color: #aaa; }
.sc-tv-poet-link { color: #8b2c2c; font-weight: 700; text-decoration: none; }
.sc-tv-poet-link:hover { text-decoration: underline; }
.sc-tv-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: 2px solid #e0d9d0; border-radius: 50%;
  width: 40px; height: 40px; font-size: 18px; color: #4a4a4a;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, color .15s, background .15s; z-index: 2; padding: 0; line-height: 1;
}
.sc-tv-arrow:hover { border-color: #8b2c2c; color: #8b2c2c; background: #f7f0f0; }
.sc-tv-prev { left: 0; }
.sc-tv-next { right: 0; }
.sc-tv-dots { display: flex; justify-content: center; gap: 8px; padding: 8px 0 4px; }
.sc-tv-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #ddd;
  border: none; cursor: pointer; padding: 0; transition: background .2s, transform .2s;
}
.sc-tv-dot.active { background: #8b2c2c; transform: scale(1.3); }
.sc-tv-dot:hover { background: #8b2c2c; }
.sc-tv-admin-note {
  font-family: sans-serif; font-size: 12px; color: #555;
  margin-top: 16px; padding: 10px 16px;
  background: #fff8e1; border: 1px solid #ffe082; border-radius: 4px; text-align: left;
}

/* ═══════════════════════════════════════
   SHORTCODE: [verses_page]
   ═══════════════════════════════════════ */

.sc-vp-wrap { max-width: 820px; margin: 32px auto; }
.sc-vp-count { font-family: var(--ff-ui); font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.sc-vp-list { border-top: 2px solid var(--ink); }
.sc-vp-card { padding: 28px 0 24px; border-bottom: 1px solid var(--rule); }
.sc-vp-lines { margin: 0 0 14px; padding: 0 0 0 20px; border-left: 3px solid var(--accent); }
.sc-vp-lines p { font-family: var(--ff-display); font-style: italic; font-size: 20px; line-height: 1.7; color: var(--ink); margin: 0; }
.sc-vp-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sc-vp-attribution { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-family: var(--ff-ui); font-size: 13px; }
.sc-vp-poem-link { color: var(--mid); text-decoration: none; font-weight: 600; }
.sc-vp-poem-link:hover { color: var(--accent); }
.sc-vp-dash { color: var(--muted); }
.sc-vp-poet-link { color: var(--accent); text-decoration: none; font-weight: 700; }
.sc-vp-poet-link:hover { text-decoration: underline; }
.sc-vp-read-full { font-family: var(--ff-ui); font-size: 12px; font-weight: 700; color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; }
.sc-vp-read-full:hover { border-bottom-color: var(--accent); }

/* ═══════════════════════════════════════
   SHARED: Pagination + empty
   ═══════════════════════════════════════ */

.sc-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 36px 0; font-family: var(--ff-ui); }
.sc-pagination a, .sc-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border: 1px solid var(--rule); border-radius: 3px;
  font-size: 13px; font-weight: 600; color: var(--ink);
  text-decoration: none; background: var(--white); transition: background .15s, color .15s;
}
.sc-pagination a:hover, .sc-pagination .current { background: var(--accent); color: var(--white); border-color: var(--accent); }
.sc-empty { font-family: var(--ff-ui); color: var(--muted); font-size: 15px; padding: 24px 0; }

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */

@media (max-width: 900px) {
  .sc-cols-3 { grid-template-columns: repeat(2, 1fr); }
  .sc-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .poet-top { grid-template-columns: 1fr; gap: 24px; }
  .poet-left-col { max-width: 280px; }
  .poet-photo img { max-width: 100%; }
  .poem-about-box { flex-direction: column; }
  .poem-about-photo { width: 140px; }
  .poet-archive-grid { grid-template-columns: 1fr 1fr; }
  .sc-tv-slider { padding: 0 44px; }
  .sc-tv-arrow { width: 34px; height: 34px; font-size: 15px; }
  .sc-tv-verse-lines p { font-size: 16px; }
  .sc-vp-footer { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .sc-cols-2, .sc-cols-3, .sc-cols-4 { grid-template-columns: 1fr; }
  .sc-poem-year { display: none; }
}
@media (max-width: 480px) {
  .poet-archive-grid { grid-template-columns: 1fr; }
}