/* ==========================================================================
   Hossein Mehrani Official Website - Modern Design System
   Persian Classical Music & Solfège Research Archive
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Outfit:wght@300;400;500;600;700&family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Color Palette */
  --bg-dark: #070d13;
  --bg-card: rgba(14, 24, 36, 0.75);
  --bg-card-hover: rgba(20, 34, 51, 0.9);
  --bg-surface: #0c1722;
  --bg-elevated: #132232;
  --border-subtle: rgba(229, 169, 60, 0.15);
  --border-light: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(229, 169, 60, 0.4);

  /* Gold & Amber Accents (Reflecting Tar & Setar craftsmanship) */
  --gold-primary: #e5a93c;
  --gold-hover: #f5b74c;
  --gold-glow: rgba(229, 169, 60, 0.25);
  --amber-light: #fbbf24;
  --amber-dark: #b45309;

  /* Turquoise & Emerald accents (Iranian decorative arts) */
  --turquoise: #14b8a6;
  --turquoise-glow: rgba(20, 184, 166, 0.25);

  /* Typography Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-gold: #f5c46b;

  /* Fonts */
  --font-fa: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
  --font-en: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-title-en: 'Cinzel', serif;

  /* Spacing & Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 10px 25px -5px rgba(229, 169, 60, 0.25);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-fa);
  line-height: 1.7;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(229, 169, 60, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(20, 184, 166, 0.04) 0%, transparent 40%),
    linear-gradient(to bottom, #070d13 0%, #0a141f 50%, #070d13 100%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* LTR override for English pages */
body.ltr {
  direction: ltr;
  text-align: left;
  font-family: var(--font-en);
}

body:not(.ltr) {
  direction: rtl;
  text-align: right;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 13, 19, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  border: 2px solid var(--gold-primary);
  object-fit: cover;
  box-shadow: 0 0 15px var(--gold-glow);
}

.brand-text h1, .brand-text .title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.brand-text .subtitle {
  font-size: 0.8rem;
  color: var(--gold-primary);
  font-weight: 400;
  letter-spacing: 0.5px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--gold-primary);
  background: rgba(229, 169, 60, 0.08);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.9rem;
  right: 0.9rem;
  height: 2px;
  background: var(--gold-primary);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.03);
  color: var(--gold-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.lang-switch:hover {
  background: var(--gold-primary);
  color: #000;
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-gold);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 0.5rem;
  cursor: pointer;
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80%;
  max-width: 320px;
  background: var(--bg-surface);
  border-inline-end: 1px solid var(--border-subtle);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.ltr .drawer-panel {
  transform: translateX(-100%);
}

.mobile-drawer.open .drawer-panel {
  transform: translateX(0);
}

.drawer-close {
  align-self: flex-end;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.drawer-link {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--text-muted);
}

.drawer-link:hover, .drawer-link.active {
  color: var(--gold-primary);
  background: rgba(229, 169, 60, 0.1);
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 4.5rem 0 3.5rem;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3.5rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(229, 169, 60, 0.1);
  border: 1px solid var(--border-subtle);
  color: var(--gold-primary);
  font-size: 0.85rem;
  font-weight: 600;
  width: fit-content;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1.25;
  color: #fff;
  letter-spacing: -0.5px;
}

.hero-title span {
  background: linear-gradient(135deg, #fff 20%, var(--gold-primary) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-primary) 0%, #d4952c 100%);
  color: #070d13;
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-hover) 0%, var(--gold-primary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(229, 169, 60, 0.35);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-light);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  background: rgba(229, 169, 60, 0.05);
  transform: translateY(-2px);
}

/* Hero Media Card */
.hero-media-wrapper {
  position: relative;
}

.hero-image-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
}

.hero-image-card img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-image-card:hover img {
  transform: scale(1.02);
}

.hero-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 13, 19, 0.9) 0%, rgba(7, 13, 19, 0.2) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
}

.hero-image-badge {
  color: var(--gold-primary);
  font-size: 0.85rem;
  font-weight: 600;
}

.hero-image-caption {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

/* Stats Ribbon */
.stats-ribbon {
  padding: 2rem 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  background: rgba(12, 23, 34, 0.4);
  backdrop-filter: blur(8px);
  margin-bottom: 4rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item .stat-num {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--gold-primary);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat-item .stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Sections General */
.section {
  padding: 4.5rem 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* Cards & Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.card-image-wrap {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 1.25rem;
  aspect-ratio: 16/10;
  background: var(--bg-elevated);
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-image-wrap img {
  transform: scale(1.05);
}

.card-image-wrap.book-ratio {
  aspect-ratio: 3/4.2;
  background: radial-gradient(circle at 50% 30%, #1a2738 0%, #0a111a 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 4px 12px 12px 4px;
  box-shadow: -5px 10px 22px rgba(0, 0, 0, 0.65);
  padding: 0;
}

body.ltr .card-image-wrap.book-ratio {
  border-radius: 4px 12px 12px 4px;
  box-shadow: 5px 10px 22px rgba(0, 0, 0, 0.65);
}

.card-image-wrap.book-ratio img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}


.card-tag {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(229, 169, 60, 0.12);
  color: var(--gold-primary);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  width: fit-content;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.card-link {
  color: var(--gold-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.card-link:hover {
  color: var(--gold-hover);
  text-decoration: underline;
}

/* Audio Player Component */
.player-container {
  background: linear-gradient(145deg, #0d1824 0%, #112233 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7);
  position: relative;
  overflow: hidden;
}

.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.now-playing-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.now-playing-art {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-md);
  border: 2px solid var(--gold-primary);
  object-fit: cover;
  box-shadow: 0 0 20px var(--gold-glow);
}

.now-playing-text h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.25rem;
}

.now-playing-text p {
  color: var(--gold-primary);
  font-size: 0.95rem;
}

.now-playing-text .dastgah-tag {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  background: rgba(20, 184, 166, 0.15);
  color: var(--turquoise);
  border-radius: var(--radius-full);
  margin-top: 0.35rem;
}

.player-controls {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.player-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.control-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  border-radius: var(--radius-full);
  padding: 0.5rem;
}

.control-btn:hover {
  color: var(--gold-primary);
  transform: scale(1.1);
}

.play-main-btn {
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, var(--gold-primary) 0%, #d4952c 100%);
  color: #070d13;
  border-radius: var(--radius-full);
  border: none;
  box-shadow: var(--shadow-gold);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: var(--transition);
}

.play-main-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 25px var(--gold-glow);
}

/* Progress & Seekbar */
.progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.time-stamp {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 45px;
}

.seek-slider {
  flex-grow: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  cursor: pointer;
}

.seek-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold-primary);
  box-shadow: 0 0 8px var(--gold-primary);
  cursor: pointer;
  transition: var(--transition);
}

.seek-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Playlist */
.playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.playlist-header h4 {
  font-size: 1.1rem;
  color: #fff;
}

.playlist-search {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: #fff;
  font-size: 0.9rem;
  width: 220px;
}

.playlist-search:focus {
  outline: none;
  border-color: var(--gold-primary);
}

.playlist-items {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.2);
}

.playlist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: var(--transition);
}

.playlist-item:last-child {
  border-bottom: none;
}

.playlist-item:hover {
  background: rgba(229, 169, 60, 0.08);
}

.playlist-item.active {
  background: rgba(229, 169, 60, 0.15);
  border-inline-start: 4px solid var(--gold-primary);
}

.playlist-item-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.track-number {
  color: var(--text-dim);
  font-size: 0.85rem;
  min-width: 24px;
}

.track-details .track-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.playlist-item.active .track-name {
  color: var(--gold-primary);
}

.track-details .track-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Accordion Component (TOC) */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.accordion-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  overflow: hidden;
  transition: var(--transition);
}

.accordion-item:hover {
  border-color: var(--border-glow);
}

.accordion-header {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 700;
  color: #fff;
  user-select: none;
}

.accordion-header .arrow {
  transition: transform 0.3s ease;
  color: var(--gold-primary);
}

.accordion-item.open .accordion-header .arrow {
  transform: rotate(180deg);
}

.accordion-body {
  padding: 0 1.25rem 1.25rem;
  display: none;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 0.5rem;
  padding-top: 1rem;
}

.accordion-item.open .accordion-body {
  display: block;
}

/* Tabs */
.tabs-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.tab-btn {
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover, .tab-btn.active {
  background: var(--gold-primary);
  color: #070d13;
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-gold);
}

/* Modal Dialog */
dialog.custom-modal {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  color: var(--text-main);
  padding: 2rem;
  max-width: 900px;
  width: 90%;
  margin: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
}

dialog.custom-modal::backdrop {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--gold-primary);
}

/* Video Player Card */
.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.video-wrap {
  position: relative;
  background: #000;
  aspect-ratio: 16/9;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-body {
  padding: 1.25rem;
  flex-grow: 1;
}

.video-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.video-meta {
  font-size: 0.85rem;
  color: var(--gold-primary);
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: #05090e;
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.25rem;
  position: relative;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 0;
  width: 30px;
  height: 2px;
  background: var(--gold-primary);
}

body.ltr .footer-col h4::after {
  right: auto;
  left: 0;
}

.footer-col p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--gold-primary);
  padding-inline-start: 4px;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* Media Queries */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero-media-wrapper {
    max-width: 480px;
    margin: 0 auto;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .mobile-drawer {
    display: block;
  }
  .hero-title {
    font-size: 2.1rem;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .player-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

/* Additional Component Styles: Scores, Gallery, and Detail Pages */

/* Score Cards */
.score-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.score-filter-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.score-filter-btn:hover, .score-filter-btn.active {
  background: var(--gold-primary);
  color: #070d13;
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-gold);
}

.scores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.score-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.score-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.score-card-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.score-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(229, 169, 60, 0.12);
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.score-info h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.score-dastgah {
  font-size: 0.8rem;
  color: var(--turquoise);
  background: rgba(20, 184, 166, 0.12);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  display: inline-block;
}

.score-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 0.85rem;
  margin-top: 0.5rem;
}

.score-size {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.score-btns {
  display: flex;
  gap: 0.5rem;
}

.score-btn-sm {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Gallery Styles */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--bg-surface);
  transition: var(--transition);
}

.gallery-item:hover {
  border-color: var(--border-glow);
  transform: scale(1.02);
  box-shadow: var(--shadow-card);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 13, 19, 0.85) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay span {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

/* Lightbox Dialog */
dialog#galleryLightbox {
  max-width: 95vw;
  max-height: 95vh;
  padding: 0;
  background: transparent;
  border: none;
  overflow: hidden;
}

dialog#galleryLightbox::backdrop {
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
}

.lightbox-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 1000px;
  margin: auto;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 20px 40px rgba(0,0,0,0.8);
}

.lightbox-caption {
  margin-top: 1rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-light);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.lightbox-prev:hover, .lightbox-next:hover {
  background: var(--gold-primary);
  color: #000;
}

.lightbox-prev { left: -60px; }
.lightbox-next { right: -60px; }

@media (max-width: 768px) {
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}


/* Ensure Dialog visibility states */
dialog.custom-modal:not([open]),
dialog#galleryLightbox:not([open]) {
  display: none !important;
}

dialog.custom-modal[open] {
  display: flex !important;
  flex-direction: column;
}

dialog#galleryLightbox[open] {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Book Showcase & 3D Book Mockup Styling
   ========================================================================== */

.book-showcase-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  margin-bottom: 2.5rem;
  transition: var(--transition);
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  align-items: center;
}

body.ltr .book-showcase-card {
  grid-template-columns: 240px 1fr;
}

.book-showcase-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.7);
}

.book-cover-3d {
  position: relative;
  width: 220px;
  height: 310px;
  margin: 0 auto;
  border-radius: 4px 14px 14px 4px;
  background: linear-gradient(135deg, #1b2636 0%, #0c1420 100%);
  box-shadow: 
    -8px 12px 28px rgba(0, 0, 0, 0.75),
    -1px 2px 4px rgba(0, 0, 0, 0.5),
    inset 4px 0 8px rgba(255, 255, 255, 0.15),
    inset -3px 0 8px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

body.ltr .book-cover-3d {
  border-radius: 4px 14px 14px 4px;
  box-shadow: 
    8px 12px 28px rgba(0, 0, 0, 0.75),
    1px 2px 4px rgba(0, 0, 0, 0.5),
    inset -4px 0 8px rgba(255, 255, 255, 0.15),
    inset 3px 0 8px rgba(0, 0, 0, 0.6);
}

.book-showcase-card:hover .book-cover-3d {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 
    -12px 20px 40px rgba(229, 169, 60, 0.3),
    -2px 4px 10px rgba(0, 0, 0, 0.8);
}

body.ltr .book-showcase-card:hover .book-cover-3d {
  transform: translateY(-6px) rotate(1deg);
  box-shadow: 
    12px 20px 40px rgba(229, 169, 60, 0.3),
    2px 4px 10px rgba(0, 0, 0, 0.8);
}

.book-spine-effect {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 14px;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.6), transparent);
  pointer-events: none;
  z-index: 2;
}

body.ltr .book-spine-effect {
  right: auto;
  left: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.6), transparent);
}

.book-cover-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Stylized Book Cover Badge */
.book-cover-styled {
  width: 100%;
  height: 100%;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  position: relative;
  background: radial-gradient(circle at 50% 30%, #1e334a 0%, #0d1724 100%);
  border: 1px solid rgba(229, 169, 60, 0.35);
}

.book-cover-styled::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(229, 169, 60, 0.25);
  border-radius: 2px 8px 8px 2px;
  pointer-events: none;
}

.book-cover-styled .vol-label {
  font-size: 0.8rem;
  color: var(--gold-primary);
  letter-spacing: 1px;
  font-weight: 700;
}

.book-cover-styled .book-title-fa {
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.3;
  margin: 0.5rem 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.book-cover-styled .book-subtitle-fa {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.book-cover-styled .book-author {
  font-size: 0.85rem;
  color: var(--gold-primary);
  font-weight: 600;
}

.book-cover-styled .book-publisher {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Stories & YouTube Video Showcase */
.story-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 3rem;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

.story-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.8);
}

.video-responsive-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 ratio */
  height: 0;
  background: #000;
}

.video-responsive-wrap iframe,
.video-responsive-wrap video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.story-card-body {
  padding: 1.75rem 2rem;
}

.story-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
  margin-top: 1rem;
}

.story-meta a {
  color: var(--gold-primary);
  font-weight: 600;
}

.social-badge-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(229, 169, 60, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  justify-content: space-between;
}

@media (max-width: 850px) {
  .book-showcase-card {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.75rem;
  }
  .book-cover-3d {
    margin: 0 auto;
  }
}


/* Landscape album covers (book + CD packages) */
.card-image-wrap.book-ratio.album-ratio {
  aspect-ratio: 245/171;
}

/* Header fit: keep brand and nav labels on one line; collapse to drawer before they wrap */
.brand { flex-shrink: 0; }
.brand-text .title,
.brand-text .subtitle { white-space: nowrap; }
.main-nav { gap: 0.15rem; flex-wrap: nowrap; }
.nav-link { white-space: nowrap; padding: 0.5rem 0.7rem; font-size: 0.9rem; }
.nav-link.active::after { left: 0.7rem; right: 0.7rem; }
.header-actions { flex-shrink: 0; }

@media (max-width: 1200px) {
  .main-nav { display: none; }
  .menu-toggle { display: block; }
  .mobile-drawer { display: block; }
}
