/* ============================================================
   YIDDISH SCRIPTURE MUSEUM — Shared Stylesheet
   Aesthetic: Refined museum dark — deep charcoal walls,
   warm parchment text, gold-leaf accents, manuscript feel.
   Fonts: Playfair Display (headings) + EB Garamond (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=Cinzel:wght@400;600&display=swap');

/* ── CSS Variables ── */
:root {
  --bg-dark:       #0f0e0c;
  --bg-room:       #181610;
  --bg-panel:      #201e18;
  --bg-card:       #252219;
  --gold:          #c9a84c;
  --gold-light:    #e2c47a;
  --gold-dim:      #7a6228;
  --parchment:     #f0e6cc;
  --parchment-dim: #b8a98a;
  --white:         #faf7f0;
  --rule:          rgba(201,168,76,0.25);
  --shadow:        rgba(0,0,0,0.7);
  --radius:        4px;
  --max-width:     860px;
  --transition:    0.35s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-dark);
  color: var(--parchment);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.8;
  min-height: 100vh;
}

/* ── Top Navigation Bar ── */
.museum-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(15,14,12,0.96);
  border-bottom: 1px solid var(--rule);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(8px);
}

.museum-nav .nav-title {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
}

.museum-nav .nav-room-label {
  font-family: 'EB Garamond', serif;
  font-size: 0.85rem;
  color: var(--parchment-dim);
  letter-spacing: 0.06em;
}

.museum-nav .nav-progress {
  display: flex;
  gap: 6px;
  align-items: center;
}

.museum-nav .nav-progress .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold-dim);
  transition: background var(--transition);
}

.museum-nav .nav-progress .dot.active {
  background: var(--gold);
}

/* ── Page Hero ── */
.room-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 7rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.room-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(201,168,76,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.room-hero .ornament {
  font-size: 1.5rem;
  color: var(--gold);
  letter-spacing: 0.3em;
  margin-bottom: 1.5rem;
  opacity: 0.7;
}

.room-hero .room-number {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}

.room-hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  max-width: 720px;
  margin-bottom: 1.5rem;
}

.room-hero h1 em {
  font-style: italic;
  color: var(--gold-light);
}

.room-hero .hero-subtitle {
  font-size: 1.15rem;
  color: var(--parchment-dim);
  max-width: 560px;
  font-style: italic;
}

.room-hero .scroll-cue {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
  text-transform: uppercase;
  animation: pulse 2.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ── Gold Divider ── */
.gold-rule {
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 2.5rem auto;
}

.gold-rule.wide {
  width: 80%;
  max-width: var(--max-width);
}

/* ── Content Sections ── */
.content-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem;
}

.content-section h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.content-section h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--parchment);
  margin: 2rem 0 0.75rem;
}

.content-section p {
  margin-bottom: 1.25rem;
  color: var(--parchment);
}

.content-section p:last-child {
  margin-bottom: 0;
}

/* ── Pull Quote ── */
.pull-quote {
  border-left: 3px solid var(--gold);
  margin: 2.5rem 0;
  padding: 1.25rem 2rem;
  background: var(--bg-card);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.pull-quote p {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--gold-light);
  line-height: 1.6;
  margin: 0;
}

/* ── Image Placeholder / Exhibit Frame ── */
.exhibit-frame {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 2rem 0;
}

.exhibit-frame .frame-image-slot {
  width: 100%;
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  border-bottom: 1px solid var(--rule);
  min-height: 260px;
  text-align: center;
}

.exhibit-frame .frame-image-slot .slot-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.4;
}

.exhibit-frame .frame-image-slot .slot-label {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.exhibit-frame .frame-image-slot .slot-desc {
  font-size: 0.85rem;
  color: var(--parchment-dim);
  margin-top: 0.5rem;
  font-style: italic;
}

/* When a real image is placed here */
.exhibit-frame .frame-image-slot img {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  display: block;
}

.exhibit-frame .frame-caption {
  padding: 1rem 1.5rem;
}

.exhibit-frame .frame-caption .caption-title {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

.exhibit-frame .frame-caption p {
  font-size: 1.2rem;
  color: var(--parchment-dim);
  font-style: normal;
  margin: 0;
}

/* ── Two-Column Exhibit ── */
.exhibit-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (max-width: 640px) {
  .exhibit-two-col { grid-template-columns: 1fr; }
}

/* ── Fact Panel ── */
.fact-panel {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}

.fact-panel .fact-label {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.fact-panel .fact-row {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(201,168,76,0.1);
  font-size: 0.95rem;
}

.fact-panel .fact-row:last-child { border-bottom: none; }

.fact-panel .fact-key {
  color: var(--parchment-dim);
  min-width: 130px;
  flex-shrink: 0;
}

.fact-panel .fact-val {
  color: var(--parchment);
}

/* ── Interlinear / Triglot Demo ── */
.triglot-demo {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2rem 0;
  overflow-x: auto;
}

.triglot-demo .triglot-label {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  text-align: center;
}

.triglot-row {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(201,168,76,0.1);
  padding: 0.6rem 0;
}

.triglot-row:last-child { border-bottom: none; }

.triglot-cell {
  flex: 1;
  padding: 0 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.triglot-cell:first-child { padding-left: 0; }
.triglot-cell:last-child { padding-right: 0; }

.triglot-cell.hebrew {
  font-family: 'Times New Roman', serif;
  direction: rtl;
  text-align: right;
  color: var(--gold-light);
}

.triglot-cell.yiddish {
  direction: rtl;
  text-align: right;
  color: var(--parchment);
}

.triglot-cell.romanized {
  font-style: italic;
  color: var(--parchment-dim);
}

.triglot-cell.english {
  color: var(--parchment-dim);
}

.triglot-cell.label {
  flex: 0 0 90px;
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dim);
  padding-top: 0.1rem;
}

/* ── Room Navigation Footer ── */
.room-nav-footer {
  border-top: 1px solid var(--rule);
  background: var(--bg-dark);
  padding: 2.5rem 2rem;
}

.room-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.room-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  color: var(--gold);
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: transparent;
  transition: all var(--transition);
}

.room-nav-btn:hover {
  background: var(--gold);
  color: var(--bg-dark);
  border-color: var(--gold);
}

.room-nav-btn.primary {
  background: var(--gold);
  color: var(--bg-dark);
  border-color: var(--gold);
  font-weight: 600;
}

.room-nav-btn.primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
}

.room-nav-btn.disabled {
  opacity: 0.3;
  pointer-events: none;
}

.room-nav-center {
  font-family: 'EB Garamond', serif;
  font-size: 0.85rem;
  color: var(--parchment-dim);
  text-align: center;
}

/* ── Lobby-specific ── */
.lobby-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 3rem auto;
  max-width: var(--max-width);
}

@media (max-width: 640px) {
  .lobby-grid { grid-template-columns: 1fr; }
}

.lobby-room-link {
  background: var(--bg-panel);
  padding: 1.5rem;
  text-decoration: none;
  transition: background var(--transition);
  display: block;
}

.lobby-room-link:hover {
  background: var(--bg-card);
}

.lobby-room-link .lr-num {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.lobby-room-link .lr-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  color: var(--parchment);
  line-height: 1.3;
}

/* ── Entrance Hero (Lobby) ── */
.lobby-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

.lobby-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(201,168,76,0.07) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 60%, rgba(201,168,76,0.04) 0%, transparent 55%);
  pointer-events: none;
}

.lobby-hero .museum-tagline {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2rem;
}

.lobby-hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  max-width: 800px;
  margin-bottom: 0.5rem;
}

.lobby-hero h1 em {
  display: block;
  font-style: italic;
  color: var(--gold-light);
  font-size: 0.75em;
}

.lobby-hero .lobby-intro {
  max-width: 600px;
  font-size: 1.1rem;
  color: var(--parchment-dim);
  margin: 2rem 0 3rem;
  line-height: 1.8;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--parchment-dim);
}

.site-footer a {
  color: var(--gold);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--gold-light);
}

/* ── Animations ── */
.fade-in {
  animation: fadeIn 0.8s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in-delay-1 { animation-delay: 0.15s; }
.fade-in-delay-2 { animation-delay: 0.3s; }
.fade-in-delay-3 { animation-delay: 0.45s; }
.fade-in-delay-4 { animation-delay: 0.6s; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .museum-nav { padding: 0.6rem 1rem; }
  .museum-nav .nav-progress { display: none; }
  .content-section { padding: 2rem 1.25rem; }
  .room-nav-inner { flex-direction: column; text-align: center; }
  .pull-quote { padding: 1rem 1.25rem; }
}
/* ── Forced Caption Updates ── */

/* 1. Main Captions: Normal weight, larger size */
body .exhibit-frame .frame-caption p {
  font-size: 1.35rem !important;   /* Increased for visibility */
  font-style: normal !important;   /* Forces italic to normal */
  line-height: 1.6 !important;
  color: #f0e6cc !important;       /* Using the parchment variable value directly */
}

/* 2. Placeholder Descriptions: Normal weight, larger size */
body .exhibit-frame .frame-image-slot .slot-desc {
  font-size: 1.1rem !important;
  font-style: normal !important;
  color: #b8a98a !important;       /* Using parchment-dim value directly */
  margin-top: 0.8rem !important;
}

/* 3. Caption Titles: Ensuring they stay distinct */
body .exhibit-frame .frame-caption .caption-title {
  font-size: 0.8rem !important;
  letter-spacing: 0.22em !important;
  margin-bottom: 0.6rem !important;
}