/* ============================================================
   FARSI-POEMS.COM — SHARED DESIGN SYSTEM
   Modern & Minimal | Persian Geometric Accents
   All pages link to this file: <link rel="stylesheet" href="farsi-poems.css">
   ============================================================ */

/* ── GOOGLE FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;1,400;1,600&family=Source+Sans+3:wght@300;400;600&family=Vazirmatn:wght@300;400;500;700&display=swap');

/* ── DESIGN TOKENS ── */
:root {
  /* Colours */
  --cream:        #FFFDF7;
  --cream-2:      #F7F3EA;
  --cream-3:      #EDE7D9;
  --gold:         #C9922A;
  --gold-light:   #E8B84B;
  --gold-pale:    #F9F1DE;
  --indigo:       #3D4B7A;
  --indigo-mid:   #2E3860;
  --indigo-dark:  #1E2440;
  --charcoal:     #1C1A17;
  --text:         #2D2A24;
  --text-light:   #5C5649;
  --text-muted:   #8C8476;
  --white:        #FFFFFF;
  --border:       #E5DDD0;
  --border-light: #F0EBE0;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Sans 3', sans-serif;
  --font-farsi:   'Vazirmatn', 'Tahoma', sans-serif;

  /* Spacing & Shape */
  --radius:    6px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(28,26,23,.06);
  --shadow-md: 0 6px 24px rgba(28,26,23,.10);
  --shadow-lg: 0 16px 48px rgba(28,26,23,.14);

  --transition: 0.25s ease;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ── PERSIAN GEOMETRIC PATTERN (SVG background) ──
   Use as: background-image: var(--pattern-geo);
   ── */
:root {
  --pattern-geo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg fill='none' stroke='%23C9922A' stroke-width='0.5' opacity='0.18'%3E%3Cpolygon points='30,4 38,14 50,14 42,22 46,34 30,28 14,34 18,22 10,14 22,14'/%3E%3Ccircle cx='30' cy='30' r='6'/%3E%3Cline x1='30' y1='4' x2='30' y2='56'/%3E%3Cline x1='4' y1='30' x2='56' y2='30'/%3E%3C/g%3E%3C/svg%3E");
}

/* ── UTILITY ── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 32px; }

.section-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.gold-rule {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
  margin: 14px 0;
}
.gold-rule.center { margin: 14px auto; }

/* ── BUTTONS ── */
.btn-gold {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  background: var(--gold);
  padding: 12px 28px;
  border-radius: var(--radius);
  border: 2px solid var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.btn-gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201,146,42,.3);
}

.btn-indigo {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  background: var(--indigo);
  padding: 12px 28px;
  border-radius: var(--radius);
  border: 2px solid var(--indigo);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.btn-indigo:hover {
  background: var(--indigo-mid);
  border-color: var(--indigo-mid);
  transform: translateY(-2px);
}

.btn-outline {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--charcoal);
  background: transparent;
  padding: 12px 28px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color var(--transition), transform var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.btn-outline-white {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  background: transparent;
  padding: 12px 28px;
  border-radius: var(--radius);
  border: 2px solid rgba(255,255,255,.35);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.btn-outline-white:hover {
  border-color: rgba(255,255,255,.7);
  color: var(--white);
  transform: translateY(-2px);
}

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,253,247,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow var(--transition);
}
.nav.scrolled { box-shadow: var(--shadow-sm); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
}

.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand-icon {
  width: 38px; height: 38px;
  background: var(--indigo);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-brand-icon svg { width: 22px; height: 22px; }
.nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.nav-brand-en {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: 0.01em;
}
.nav-brand-fa {
  font-family: var(--font-farsi);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gold);
  direction: rtl;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}
.nav-links > li { position: relative; }
.nav-links > li > a {
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-light);
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  display: block;
}
.nav-links > li > a:hover,
.nav-links > li > a.active { color: var(--charcoal); background: var(--cream-2); }

/* Dropdown styles removed — flat nav used instead */

.nav-cta {
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--white);
  background: var(--gold);
  padding: 8px 18px;
  border-radius: var(--radius);
  transition: background var(--transition), transform var(--transition);
}
.nav-cta:hover { background: var(--gold-light); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--charcoal); border-radius: 2px; }

/* ── PAGE HEADER (inner pages) ── */
.page-header {
  padding-top: 100px;
  padding-bottom: 56px;
  background: var(--indigo-dark);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--pattern-geo);
  opacity: 0.4;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.page-header-inner { position: relative; z-index: 1; }
.page-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}
.page-header h1 em { font-style: italic; color: var(--gold-light); }
.page-header-fa {
  font-family: var(--font-farsi);
  font-size: 1.3rem;
  font-weight: 500;
  color: rgba(255,255,255,.6);
  direction: rtl;
  margin-top: 6px;
}
.page-header p {
  font-size: 1rem;
  color: rgba(255,255,255,.6);
  line-height: 1.7;
  max-width: 520px;
  margin: 14px auto 0;
}

/* ── BILINGUAL TAB WIDGET ── */
.poem-widget {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.poem-tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--cream-2);
}
.poem-tab {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 12px 20px;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  transition: color var(--transition), background var(--transition);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.poem-tab.active {
  color: var(--gold);
  background: var(--white);
  border-bottom-color: var(--gold);
}
.poem-tab:hover:not(.active) { color: var(--charcoal); }

.poem-pane { display: none; padding: 32px 36px; }
.poem-pane.active { display: block; }

/* English poem pane */
.poem-en {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  line-height: 2;
  color: var(--text);
}
.poem-en .verse { margin-bottom: 20px; }
.poem-en .verse-line { display: block; }
.poem-en .couplet-num {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
  display: block;
}

/* Farsi poem pane */
.poem-fa {
  font-family: var(--font-farsi);
  font-size: 1.15rem;
  line-height: 2.1;
  color: var(--text);
  direction: rtl;
  text-align: right;
}
.poem-fa .verse { margin-bottom: 20px; }
.poem-fa .verse-line { display: block; }
.poem-fa .couplet-num {
  font-family: var(--font-farsi);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  display: block;
}

/* ── POET CARD ── */
.poet-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.poet-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background-image: var(--pattern-geo);
  opacity: 0.5;
}
.poet-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--gold);
}
.poet-card-era {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.poet-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1.2;
}
.poet-card-fa {
  font-family: var(--font-farsi);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-light);
  direction: rtl;
}
.poet-card p {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.7;
  flex: 1;
}
.poet-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--gold);
  transition: gap var(--transition);
  margin-top: 4px;
}
.poet-card:hover .poet-card-link { gap: 10px; }
.poet-card-link svg { width: 14px; height: 14px; }

/* ── BOOK CARD ── */
.book-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.book-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.book-cover {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--cream-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover-placeholder {
  width: 100%;
  height: 100%;
  background-color: #2D6A4F;
  background-image: var(--pattern-geo), linear-gradient(145deg, #2D6A4F, #40916C);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
.bcp-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
  line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.bcp-fa {
  font-family: var(--font-farsi);
  font-size: 0.95rem;
  color: var(--gold-light);
  direction: rtl;
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.book-info { padding: 18px 20px; }
.book-info h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 4px;
  line-height: 1.3;
}
.book-info .book-poet {
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 10px;
}
.book-info p {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 14px;
}
.btn-amazon {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--charcoal);
  background: #FFD814;
  padding: 8px 16px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition), transform var(--transition);
}
.btn-amazon:hover { background: #F7CA00; transform: translateY(-1px); }

/* ── VERSE HIGHLIGHT BOX ── */
.verse-box {
  background: var(--gold-pale);
  border: 1px solid var(--cream-3);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 20px 24px;
  margin: 24px 0;
}
.verse-box .vb-en {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.8;
}
.verse-box .vb-fa {
  font-family: var(--font-farsi);
  font-size: 1rem;
  color: var(--text-light);
  direction: rtl;
  text-align: right;
  margin-top: 10px;
  line-height: 1.9;
  padding-top: 10px;
  border-top: 1px solid var(--cream-3);
}
.verse-box .vb-source {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 10px;
}

/* ── DECORATIVE DIVIDER ── */
.geo-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 48px 0;
}
.geo-divider-line { flex: 1; height: 1px; background: var(--border); }
.geo-divider-icon {
  width: 24px; height: 24px;
  flex-shrink: 0;
  color: var(--gold);
  opacity: 0.6;
}

/* ── SECTION HEADERS ── */
.section-heading {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}
.section-heading h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1.2;
  margin-bottom: 12px;
}
.section-heading h2 em { font-style: italic; color: var(--gold); }
.section-heading p {
  font-size: 0.97rem;
  color: var(--text-light);
  line-height: 1.75;
}
.section-heading .section-fa {
  font-family: var(--font-farsi);
  font-size: 1rem;
  color: var(--text-muted);
  direction: rtl;
  margin-top: 8px;
}

/* ── FOOTER ── */
.footer {
  background: var(--indigo-dark);
  padding: 64px 0 32px;
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--pattern-geo);
  opacity: 0.15;
}
.footer-inner { position: relative; z-index: 1; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand-text {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: rgba(255,255,255,.45);
  line-height: 1.75;
  margin-top: 14px;
  max-width: 280px;
}
.footer-brand-fa {
  font-family: var(--font-farsi);
  font-size: 0.85rem;
  color: rgba(255,255,255,.35);
  direction: rtl;
  margin-top: 8px;
  line-height: 1.7;
}
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  opacity: 0.8;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  font-size: 0.86rem;
  color: rgba(255,255,255,.5);
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,.3);
}
.footer-bottom a {
  font-size: 0.8rem;
  color: rgba(255,255,255,.4);
  transition: color var(--transition);
}
.footer-bottom a:hover { color: var(--white); }
.footer-gold-rule {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin-bottom: 40px;
  opacity: 0.4;
}

/* ── SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ── SHARED SCRIPTS helper class ── */
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .container { padding: 0 20px; }
  .container-narrow { padding: 0 20px; }
  .poem-pane { padding: 24px 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .section-heading { margin-bottom: 32px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .poem-tab { font-size: 0.78rem; padding: 10px 12px; }
}

/* Mobile nav open state */
.nav-links.mobile-open {
  display: flex !important;
  flex-direction: column;
  position: absolute;
  top: 70px; left: 0; right: 0;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 12px 20px 20px;
  gap: 2px;
  z-index: 99;
}
.nav-links.mobile-open > li > a { padding: 10px 14px; font-size: 0.9rem; }
