/* ════════════════════════════════════════════════════════════════════════
   pov-shared.css
   Shared styling for the "PoV" (Point of View) article pages:
   pov-board.html, pov-ai-economy.html, pov-fde.html, pov-gemini.html.

   All four share the same 70/30 two-pane layout: article (.opmodel-text)
   on the left, a sticky right rail (.opmodel-side) on the right holding
   the thumbnail, an optional video, and related-PoV cards. The rail's
   content is populated at runtime by pov-shared.js, driven by the same
   sheet that drives pov.html.

   Each PoV page keeps only a small inline <style> block of its own for its
   accent color trio (--accent-color / --accent-light / --accent-rgb) and
   any one-off content styling (e.g. pov-ai-economy.html's abstract box). */

/* ── Hero banner ─────────────────────────────────────────────────────── */
.opmodel-hero {
  background: var(--hero-bg);
  padding: 2.5rem 2rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.opmodel-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  color: #ffffff;
  margin-bottom: 0.5rem;
  font-weight: bold;
}
.opmodel-hero .tagline {
  font-size: 0.95rem;
  color: rgba(255,255,255,.7);
  max-width: 720px;
  margin: 0 auto;
}

/* ── Download button ─────────────────────────────────────────────────────
   Used in two spots on a page that has a PDF: the hero (.download-buttons)
   and a CTA row after the closing paragraph (.pov-cta-row). Always a plain
   <a href="https://drive.google.com/uc?export=download&id=..."> — never a
   data-dl-key/data-url gated button — so PoV downloads never require the
   Netlify Identity login that gated site downloads use. */
.download-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.pov-cta-row { margin: 1.2rem 0; }
.btn-download {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s ease;
  text-transform: uppercase;
  border: none;
  background: #10222E;
  color: #ffffff;
}
.btn-download:hover {
  background: #1c3a4d;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 34, 46, .35);
}
/* .opmodel-text a already sets a color for body links — this beats it so
   the download button's text stays white inside the article too. */
.opmodel-text .btn-download,
.opmodel-text .btn-download:hover {
  color: #ffffff;
}

/* ── Article body — shared 70/30 two-pane layout ─────────────────────────
   Every PoV page uses this: article text (70%) + a sticky right rail (30%)
   holding the thumbnail, an optional video, and related-PoV cards. Only a
   page's accent color trio stays in its own inline <style> block. */
.opmodel-main {
  display: grid;
  grid-template-columns: 70% 30%;
  gap: 2.5rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
  align-items: start;
  background: #ffffff;
}

/* ── Right rail: thumbnail / video / related PoVs ───────────────────────── */
.opmodel-side {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.opmodel-image-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  background: #f5f5f5;
  border: 1px solid var(--border);
}
.opmodel-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .2s ease;
}
.opmodel-image-wrapper:hover img { transform: scale(1.02); }
.image-expand-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0,0,0,.6);
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 3px;
  font-size: 0.7rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .2s ease;
}
.opmodel-image-wrapper:hover .image-expand-hint { opacity: 1; }

/* Video card — absent from the layout entirely (not just visually hidden)
   until the sheet confirms a video exists; see pov-shared.js. No "coming
   soon" placeholder — a PoV with no video simply shows no video slot. */
.opmodel-video-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  background: #000;
}
.opmodel-video-trigger {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
}
.opmodel-video-trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .2s ease;
  opacity: .92;
}
.opmodel-video-trigger:hover img { transform: scale(1.02); opacity: 1; }
.opmodel-video-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(0,0,0,.65); color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; line-height: 1; padding-left: 4px;
  transition: background .2s ease, transform .2s ease;
}
.opmodel-video-trigger:hover .opmodel-video-play {
  background: rgba(200, 0, 0, .85);
  transform: translate(-50%, -50%) scale(1.08);
}
.opmodel-video-embed { display: none; width: 100%; aspect-ratio: 16 / 9; }
.opmodel-video-embed iframe { width: 100%; height: 100%; display: block; border: none; }
.opmodel-video-expand {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 2;
  width: 28px; height: 28px;
  border-radius: 4px;
  background: rgba(0,0,0,.65);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  transition: background .2s ease;
}
.opmodel-video-expand:hover { background: rgba(0,0,0,.85); }
.opmodel-video-caption {
  display: block;
  padding: 8px 12px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(0,0,0,.75);
}

/* ── Related PoVs — reuses the shared .sidebar-card component (same one
   blueprints.html uses), stacked (thumbnail over text) to fit the narrow
   rail. Absent entirely when the sheet has no other Live PoV to show. */
.opmodel-related {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.opmodel-related__label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.opmodel-related .sidebar-card {
  flex-direction: column;
  align-items: stretch;
  padding: 12px;
}
.opmodel-related .sidebar-card__thumbnail {
  width: 100%;
  height: auto;
  max-height: 120px;
}
.opmodel-related .sidebar-card__title { font-size: .92rem; }
.opmodel-related .sidebar-card__desc { font-size: .76rem; -webkit-line-clamp: 3; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Lightbox modal (image or embedded video) ────────────────────────────── */
#image-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 9000;
  padding: 2rem;
}
#image-lightbox.active { display: flex; align-items: center; justify-content: center; }
#image-lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 6px; }
.lightbox-video-wrap { display: none; width: 90vw; max-width: 960px; aspect-ratio: 16 / 9; }
.lightbox-video-wrap iframe { width: 100%; height: 100%; border-radius: 6px; }
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 2rem;
  cursor: pointer;
  z-index: 9001;
  transition: color .2s ease;
}
.lightbox-close:hover { color: #ffd966; }

.opmodel-text {
  line-height: 1.8;
  color: var(--text);
  font-size: 0.95rem;
}
/* No divider line between sections — spacing only */
.opmodel-text h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--navy);
  margin: 2.2rem 0 1rem;
  font-weight: normal;
}
.opmodel-text p { margin-bottom: 1rem; color: #2a2a2a; text-align: justify; }
.opmodel-text ul { margin: 0 0 1rem 1.4rem; }
.opmodel-text ul li { margin-bottom: .5rem; }
.opmodel-text a { color: var(--accent-color); }
/* Tinted with the page's own accent (--accent-rgb) so each PoV's pull-quote
   stays on-brand without every page repeating its own blockquote rule. */
.opmodel-text blockquote {
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #3a3a3a;
  background: rgba(var(--accent-rgb), .06);
}
.opmodel-text .closing-line { font-style: italic; }

/* ── Embedded figure (chart / thumbnail placed inline in the article) ──── */
.pov-figure {
  margin: 0 0 1.6rem;
}
.pov-figure img {
  width: 100%;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.pov-figure figcaption {
  margin-top: .6rem;
  font-size: .8rem;
  font-style: italic;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}
.pov-figure figcaption strong { font-style: normal; color: var(--navy); }

/* ── Comparison / reference tables ───────────────────────────────────── */
.pov-table-wrap { max-width: 100%; overflow-x: auto; margin: 1rem 0 1.4rem; }
.pov-table {
  border-collapse: collapse;
  font-size: .82rem;
  width: 100%;
}
.pov-table th {
  text-align: left;
  padding: 9px 14px;
  background: var(--sage-glow);
  color: var(--navy);
  font-weight: 700;
  text-transform: uppercase;
  font-size: .64rem;
  letter-spacing: .04em;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.pov-table td {
  padding: 9px 14px;
  border: 1px solid var(--border);
  color: #2a2a2a;
  vertical-align: top;
}
.pov-table td:first-child { font-weight: 700; color: var(--navy); white-space: nowrap; }

/* ── Responsive ──────────────────────────────────────────────────────────
   Grid/side-rail column widths step down first; hero and text-size rules
   apply at the same breakpoints for every PoV page. */
@media (max-width: 1024px) {
  .opmodel-main { grid-template-columns: 1.5fr 1fr; gap: 2rem; padding: 2.5rem 1.5rem; }
  .opmodel-side { top: 60px; }
}
@media (max-width: 768px) {
  .opmodel-hero { padding: 2rem 1.5rem; }
  .opmodel-hero h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
  .download-buttons { flex-direction: column; }
  .download-buttons .btn-download { width: 100%; text-align: center; }
  .opmodel-main { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 1.5rem; }
  .opmodel-text { font-size: 0.9rem; }
  .opmodel-side { position: relative; top: auto; flex-direction: row; order: -1; flex-wrap: wrap; }
  .opmodel-side > * { flex: 1; min-width: 220px; }
}
@media (max-width: 600px) {
  .opmodel-side { flex-direction: column; }
}
@media (max-width: 480px) {
  .opmodel-hero { padding: 1.5rem 1rem; }
  .opmodel-main { padding: 1.5rem 1rem 2rem; gap: 1.5rem; }
  .opmodel-text { font-size: 0.88rem; }
}
