/* ============================================================
   Core Group — Surface page styles
   Used by polemos.php, statecraft.php, source-files.php, maimonides.php
   Does NOT modify shared.css. Page-specific tweaks remain inline.
   ============================================================ */

:root {
  --pill-loc-bg:   #E5E8DE;
  --pill-loc-fg:   #3F4A35;
  --pill-topic-bg: #EDE5C7;
  --pill-topic-fg: #5A4308;
  --border-tertiary: rgba(43,48,56,0.10);
  --border-secondary: rgba(43,48,56,0.18);
}

/* ── Surface intro (page header tagline + filter row) ─────── */
.surface-intro {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 5% 0;
}
.surface-tagline {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-style: italic;
  color: rgba(43,48,56,0.65);
  max-width: 720px;
  margin: 0;
  line-height: 1.55;
}

/* ── Tag filter ───────────────────────────────────────────── */
.tag-filter {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 5% 0;
}
.tag-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.tag-filter-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(43,48,56,0.55);
  margin-right: 4px;
}
.tag-filter-pill {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--white);
  text-transform: lowercase;
  letter-spacing: 0.2px;
  background: var(--slate);
  opacity: 0.55;
}
.tag-filter-pill[data-type="location"] { background: var(--pill-loc-bg);   color: var(--pill-loc-fg);   border-color: var(--pill-loc-bg); }
.tag-filter-pill[data-type="topic"]    { background: var(--pill-topic-bg); color: var(--pill-topic-fg); border-color: var(--pill-topic-bg); }
.tag-filter-pill[data-type="all"]      { background: var(--slate); color: var(--white); border-color: var(--slate); }
.tag-filter-pill:hover { opacity: 1; }
.tag-filter-pill.active { opacity: 1; box-shadow: 0 0 0 2px rgba(139,105,20,0.5); }

/* ── Featured slot (image above tight text) ───────────────── */
.surface-featured {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 5% 12px;
}
.featured-card {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.featured-image {
  width: 100%;
  max-width: 800px;
  aspect-ratio: 20 / 9;
  background: var(--parchment);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-tertiary);
  text-decoration: none;
}
.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.featured-image-empty {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--parchment) 0%, #F2EBDB 100%);
  pointer-events: none;
}
.featured-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(43,48,56,0.55);
  margin: 4px 0 0;
}
.featured-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  font-weight: 500;
  color: var(--slate);
  line-height: 1.25;
  margin: 2px 0 0;
}
.featured-title a { color: inherit; text-decoration: none; }
.featured-title a:hover { color: var(--gold); }
.featured-abstract {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: rgba(43,48,56,0.70);
  line-height: 1.55;
  margin: 0;
}
.featured-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 6px 0 0;
}
.featured-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s;
  border: 1px solid var(--slate);
  background: var(--slate);
  color: var(--white);
}
.featured-btn:hover { background: var(--black); border-color: var(--black); }
.featured-btn-ghost {
  background: transparent;
  color: var(--slate);
}
.featured-btn-ghost:hover {
  background: var(--slate);
  color: var(--white);
}

/* ── Share dropdown on featured ───────────────────────────── */
.share-wrap { position: relative; display: inline-block; }
.share-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--white);
  border: 1px solid var(--border-tertiary);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(43,48,56,0.16);
  padding: 6px 0;
  z-index: 9999;
  display: none;
}
.share-wrap.open .share-menu {
  display: block;
  animation: share-menu-in 0.18s ease;
}
@keyframes share-menu-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.share-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--slate);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  box-sizing: border-box;
}
.share-menu-item:hover { background: rgba(139,105,20,0.08); color: var(--gold); }
.share-menu-item svg { width: 16px; height: 16px; flex-shrink: 0; color: currentColor; }
.share-menu-divider { height: 1px; background: rgba(43,48,56,0.08); margin: 4px 0; }

/* ── Tag pills (location + topic, inside cards) ───────────── */
.tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
}
.tag-pill {
  display: inline-block;
  padding: 2px 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  border-radius: 3px;
  line-height: 1.6;
  border: none;
}
.tag-pill[data-type="location"] { background: var(--pill-loc-bg);   color: var(--pill-loc-fg);   }
.tag-pill[data-type="topic"]    { background: var(--pill-topic-bg); color: var(--pill-topic-fg); }

/* ── Grid + card ──────────────────────────────────────────── */
.surface-grid-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 5% 60px;
}
.surface-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.analysis-card {
  background: var(--white);
  border: 0.5px solid var(--border-tertiary);
  border-radius: 6px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}
.analysis-card:hover {
  border-color: var(--border-secondary);
  box-shadow: 0 2px 10px rgba(43,48,56,0.06);
  transform: translateY(-1px);
}
.analysis-card[hidden] { display: none !important; }
.card-meta {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(43,48,56,0.55);
}
.card-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--slate);
  line-height: 1.35;
  margin: 0;
}
.card-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: rgba(43,48,56,0.65);
  line-height: 1.5;
  margin: 0;
}

/* ── Pagination (load more) ───────────────────────────────── */
.surface-load-more-wrap {
  text-align: center;
  margin-top: 28px;
}
.surface-load-more {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  padding: 12px 24px;
  border-radius: 4px;
  border: 1px solid var(--border-secondary);
  background: transparent;
  color: var(--slate);
  cursor: pointer;
  transition: all 0.2s;
}
.surface-load-more:hover {
  border-color: var(--slate);
  background: var(--slate);
  color: var(--white);
}
.surface-load-more[hidden] { display: none; }
.surface-empty-filter {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: rgba(43,48,56,0.55);
  text-align: center;
  margin: 32px 0;
  font-style: italic;
}

/* ── Empty state (no articles in series yet) ──────────────── */
.surface-empty {
  max-width: 720px;
  margin: 32px auto 80px;
  padding: 40px 32px;
  background: var(--parchment);
  border: 1px solid var(--border-tertiary);
  border-radius: 8px;
  text-align: left;
}
.surface-empty-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.surface-empty p {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--slate);
  line-height: 1.7;
  margin: 0 0 14px;
}
.surface-empty p:last-child { margin-bottom: 0; }
.surface-empty a { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--gold); }
.surface-empty a:hover { color: var(--olive); border-bottom-color: var(--olive); }

/* ── Maimonides surface specifics ─────────────────────────── */
.maimonides-platforms {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 5% 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.maimonides-platform-pill {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(43,48,56,0.18);
  color: var(--slate);
  text-decoration: none;
  transition: all 0.2s;
}
.maimonides-platform-pill:hover { border-color: var(--gold); color: var(--gold); }
.maimonides-section-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--slate);
  margin: 32px 0 6px;
  letter-spacing: 0.3px;
}
.maimonides-section-subhead {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: rgba(43,48,56,0.62);
  margin-bottom: 16px;
  font-style: italic;
}
.maimonides-host {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 5% 0;
  display: flex;
  gap: 16px;
  align-items: center;
}
.maimonides-host img {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-tertiary);
}
.maimonides-host-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--slate);
}
.maimonides-host-team {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: rgba(43,48,56,0.55);
  margin-top: 2px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .surface-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .surface-grid { grid-template-columns: 1fr; }
  .surface-featured { padding: 16px 5% 12px; }
  .featured-title { font-size: 22px; }
  .featured-card { gap: 10px; }
  .tag-filter { padding: 16px 5% 0; }
}
