/**
 * article.v1.css — GMG Wagtail article page styles
 * Author: Doug Twyman — 2026-04-25
 * Companion to article_page.html
 */

/* ─── Reading progress bar ──────────────────────────────────────── */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: #f86615;
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ─── Page layout ───────────────────────────────────────────────── */
.article-main {
  background: #fff;
  padding: 2rem 0 4rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    display: none;
  }
}

/* ─── Article header ────────────────────────────────────────────── */
.article-header {
  margin-bottom: 1.5rem;
}

.article-meta-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.section-badge {
  display: inline-block;
  background: #f86615;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  text-decoration: none;
}
.section-badge:hover { background: #e5500a; }

.kicker {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #f86615;
}

.article-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: #111;
  margin: 0 0 0.5rem;
}

.article-subhead {
  font-size: 1.1rem;
  color: #444;
  font-style: italic;
  margin: 0 0 1rem;
  line-height: 1.5;
}

.article-byline-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  font-size: 0.85rem;
  color: #555;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
  padding: 0.5rem 0;
  margin-bottom: 1.25rem;
}

.byline { font-weight: 600; color: #222; }
.pub-date { color: #666; }
.pub-time { color: #888; }
.updated-date { color: #888; font-style: italic; }

/* ─── Lead photo ────────────────────────────────────────────────── */
.article-lead-photo {
  margin: 0 0 1.75rem;
}
.article-lead-photo .lead-photo-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
}
.photo-credit {
  font-size: 0.75rem;
  color: #888;
  margin-top: 0.35rem;
}

/* ─── Tease / summary block ─────────────────────────────────────── */
.article-tease {
  font-size: 1.1rem;
  line-height: 1.65;
  color: #333;
  font-weight: 500;
  border-left: 4px solid #f86615;
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}
.article-tease p { margin: 0; }

/* ─── Editor's analysis callout ─────────────────────────────────── */
.editor-analysis {
  background: #f9f5e8;
  border: 1px solid #e8d9a0;
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
}
.editor-analysis-headline {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7a6010;
  margin: 0 0 0.5rem;
}
.editor-analysis-body p { margin: 0; font-size: 0.95rem; color: #444; }

/* ─── Article body (StreamField) ────────────────────────────────── */
.article-streamfield {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #3c3c3c;
}

.article-streamfield p { margin: 0 0 1.4em; }
.article-streamfield h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #111;
  margin: 2rem 0 0.75rem;
}
.article-streamfield h3 {
  font-family: 'Raleway', 'Lucida Grande', Verdana, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #222;
  margin: 1.5rem 0 0.5rem;
}
.article-streamfield ul,
.article-streamfield ol {
  margin: 0 0 1.4em 1.5rem;
}
.article-streamfield li { margin-bottom: 0.4em; }
.article-streamfield a { color: #f86615; text-decoration: underline; }
.article-streamfield a:hover { color: #e5500a; }
.article-streamfield blockquote {
  border-left: 4px solid #f86615;
  margin: 1.5rem 0 1.5rem 0;
  padding: 0.5rem 1.25rem;
  color: #444;
  font-style: italic;
  font-size: 1.15rem;
}
.article-streamfield img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border-radius: 3px;
}

/* ─── Tags ──────────────────────────────────────────────────────── */
.article-tags {
  margin: 2rem 0 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.tags-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #888;
  letter-spacing: 0.05em;
}
.tag {
  display: inline-block;
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 0.2rem 0.75rem;
  font-size: 0.8rem;
  color: #555;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.tag:hover { border-color: #f86615; color: #f86615; }

/* ─── Categories ────────────────────────────────────────────────── */
.article-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.category-tag {
  background: #f0f0f0;
  color: #555;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
}

/* ─── AP wire credit ────────────────────────────────────────────── */
.ap-credit {
  font-size: 0.8rem;
  color: #888;
  border-top: 1px solid #eee;
  padding-top: 1rem;
  margin-top: 2rem;
  font-style: italic;
}

/* ─── Sidebar ───────────────────────────────────────────────────── */
.article-sidebar {
  position: sticky;
  top: 1.5rem;
}

.ad-zone.ad-rail-sticky {
  background: #f8f8f8;
  border: 1px dashed #ccc;
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.75rem;
  color: #aaa;
  margin-bottom: 1.5rem;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.author-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.author-name {
  display: block;
  font-size: 0.9rem;
  color: #111;
}
.author-title {
  display: block;
  font-size: 0.78rem;
  color: #777;
}
