/* ═══════════════════════════════════════════════════════
   Arab Coins Network — Shared Stylesheet
   Editorial magazine feel. Serif headings, generous whitespace.
   Per-site accent via CSS custom properties on :root.
   ═══════════════════════════════════════════════════════ */

:root {
  /* Defaults — overridden per site in index.php */
  --accent: #8B1A1A;
  --accent-dark: #1c0505;
  --accent-muted: #fdf4f4;
  --accent-text: #5a0a0a;
  --gold: #c9a84c;
  --gold-muted: #e8d9a8;
  --surface: #FDFCFA;
  --border: #E8E6E0;
  --text: #1a1a1a;
  --text-secondary: #555;
  --text-muted: #888;
}

/* ─── Reset ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--surface);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ─── Layout ─── */
.container { max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* ═══ HERO ═══ */
.hero {
  background: var(--accent-dark);
  padding: 56px 24px 48px;
  position: relative;
  overflow: hidden;
}
.hero-inner { max-width: 780px; margin: 0 auto; position: relative; z-index: 1; }
.hero-watermark {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  height: 200px;
  opacity: 0.07;
  pointer-events: none;
}
.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
}
.hero-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.hero-nav img { width: 28px; height: 18px; border: 1px solid rgba(255,255,255,0.2); border-radius: 2px; }
.hero-nav span { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); }
.hero h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 2.8rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 6px;
}
.hero h1 small {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  margin-top: 6px;
  font-family: system-ui, sans-serif;
}
.hero-prose {
  margin-top: 24px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  max-width: 600px;
}
.hero-prose p { margin-bottom: 12px; }
.era-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.era-pill {
  font-size: 11px;
  color: var(--gold);
  border: 0.5px solid var(--gold-muted);
  background: rgba(201,168,76,0.08);
  padding: 4px 14px;
  border-radius: 20px;
}

/* ═══ HISTORICAL NOTE (Hejaz) ═══ */
.historical-note {
  background: var(--accent-muted);
  border-left: 3px solid var(--gold);
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ═══ COIN STRIP ═══ */
.coin-strip { padding: 48px 24px; }
.coin-strip .container { max-width: 780px; }
.coin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.coin-card { text-align: center; cursor: pointer; }
.coin-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  margin: 0 auto 12px;
  border: 2px solid var(--accent);
  overflow: hidden;
  position: relative;
}
.coin-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s;
}
.coin-photo img.rev { position: absolute; inset: 0; opacity: 0; }
.coin-card.flipped .coin-photo img.ob { opacity: 0; }
.coin-card.flipped .coin-photo img.rev { opacity: 1; }
.coin-photo-placeholder {
  width: 100%;
  height: 100%;
  background: var(--accent-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
}
.coin-label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.coin-sub { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }
.coin-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 5px;
  color: var(--gold);
  border: 0.5px solid var(--gold-muted);
  background: rgba(201,168,76,0.06);
}

/* ═══ PROSE + MAP ═══ */
.prose-section { padding: 48px 24px; }
.prose-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 40px; max-width: 780px; margin: 0 auto; }
.prose-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.prose-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.75; }
.prose-text p { margin-bottom: 14px; }
.prose-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  border-left: 2px solid var(--gold);
  padding-left: 1rem;
  margin-top: 16px;
  line-height: 1.7;
}
.sidebar-map {
  width: 100%;
  aspect-ratio: 4/3;
  background: #f8f6f2;
  border: 1px solid var(--border);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}
.fact-rows { margin-top: 16px; }
.fact-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}
.fact-row .label { color: var(--text-muted); }
.fact-row .value { font-weight: 500; }
.ruler-card {
  margin-top: 16px;
  background: var(--accent-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ruler-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.ruler-name { font-size: 0.8rem; font-weight: 600; }
.ruler-dates { font-size: 0.75rem; color: var(--text-muted); }

/* ═══ BOOK CARD (Oman) ═══ */
.book-section { padding: 48px 24px; }
.book-card {
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 20px;
}
.book-cover {
  width: 120px;
  height: 160px;
  background: var(--accent-muted);
  border: 1px solid var(--gold);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, serif;
  font-size: 13px;
  color: var(--accent-text);
  text-align: center;
  padding: 8px;
}
.book-title { font-family: Georgia, serif; font-size: 1.1rem; font-weight: 400; margin-bottom: 6px; }
.book-year { display: inline-block; font-size: 0.7rem; background: var(--gold); color: #fff; padding: 2px 8px; border-radius: 10px; margin-bottom: 8px; }
.book-isbn { font-family: monospace; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 10px; }
.book-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.65; margin-bottom: 12px; }
.book-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.book-actions a {
  font-size: 0.8rem;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
  text-decoration: none;
}
.book-actions a:hover { border-color: var(--accent); color: var(--accent); }

/* ═══ RESOURCES ═══ */
.resources { padding: 48px 24px; }
.resources .container { max-width: 780px; }
.resources h2 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.resource-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.resource-num { font-family: Georgia, serif; font-size: 1.4rem; color: var(--gold); min-width: 32px; font-weight: 400; }
.resource-body { flex: 1; }
.resource-title { font-size: 0.9rem; font-weight: 600; }
.resource-title a { color: var(--text); }
.resource-title a:hover { color: var(--accent); }
.resource-desc { font-size: 0.8rem; color: var(--text-muted); margin-top: 3px; }
.resource-url { font-size: 0.7rem; color: var(--text-muted); font-variant: small-caps; margin-top: 2px; }

/* ═══ BOTTOM STRIP ═══ */
.bottom-strip { padding: 32px 24px; max-width: 780px; margin: 0 auto; }
.strip-row {
  padding: 8px 0 8px 12px;
  border-left: 2px solid var(--gold);
  margin-bottom: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.strip-row a { color: var(--accent); }
.strip-tag { font-size: 0.65rem; background: #f0f0f0; padding: 2px 6px; border-radius: 8px; color: #888; margin-left: 4px; }
.ebay-featured {
  background: var(--accent-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 0.8rem;
}
.ebay-featured a { color: var(--accent); font-weight: 500; }

/* ═══ FOOTER ═══ */
.site-footer {
  padding: 20px 24px;
  max-width: 780px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.site-footer a { color: var(--text-muted); }
.sister-links { display: flex; gap: 12px; }
.sister-links a.current { color: var(--accent); font-weight: 600; }

/* ═══ WIP NOTICE ═══ */
.wip-notice { display: block; text-align: center; font-size: 11px; color: #999; padding: 8px; }

/* ═══ MOBILE ═══ */
@media (max-width: 640px) {
  .hero h1 { font-size: 2rem; }
  .coin-grid { grid-template-columns: repeat(2, 1fr); }
  .prose-grid { grid-template-columns: 1fr; }
  .book-card { grid-template-columns: 1fr; }
  .hero { padding: 36px 16px; }
}
