/* پایه */
* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; }
html, body {
  height: 100%;
  direction: rtl;
  font-family: "Vazirmatn", sans-serif;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* 🎨 متغیرهای رنگ */
:root {
  --bg: #ffffff;
  --text: #111111;
  --brand: #c62828;
  --brand-strong: #b71c1c;
  --surface: #ffffff;
  --surface-2: #ffe6e6;
  --overlay: rgba(198,40,40,0.85);
  --footer: #c62828;
  --border: #e6e6e6;
  --shadow: rgba(0,0,0,0.08);
}
html[data-theme="dark"] {
  --bg: #121212;
  --text: #eeeeee;
  --brand: #ff4d4d;
  --brand-strong: #ff6666;
  --surface: #1f1f1f;
  --surface-2: #2a2a2a;
  --overlay: rgba(255,80,80,0.75);
  --footer: #8b0000;
  --border: #2a2a2a;
  --shadow: rgba(0,0,0,0.35);
}

/* انتقال نرم */
body, .site-header, .article-section, .gallery-section, .about-section, .circle-gallery, .site-footer {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Splash */
#splash { position: fixed; inset: 0; background: #000; z-index: 9999; display: grid; place-items: center; overflow: hidden; }
#splashVideo { position: absolute; width: 100%; height: 100%; object-fit: cover; }
#splashOverlay { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; }
#splashText { color: #fff; font-size: 3rem; font-weight: 900; text-shadow: 0 4px 28px rgba(255,255,255,0.75); opacity: 0; transform: translateY(16px); transition: 0.8s ease; }
#splashText.show { opacity: 1; transform: translateY(0); }

/* انیمیشن ورود */
.site-main { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.site-main.ready { opacity: 1; transform: translateY(0); }

/* هدر */
.site-header {
  position: sticky; top: 0;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  backdrop-filter: blur(6px);
  z-index: 99;
  box-shadow: 0 5px 20px var(--shadow);
}
.header-inner { max-width: 1200px; margin: 0 auto; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; }
.brand { font-weight: 900; font-size: 1.2rem; display: flex; align-items: center; gap: 8px; color: var(--text); }
.brand-mark { color: var(--brand); font-size: 1.3rem; }
.nav .menu-toggle { display: none; font-size: 1.8rem; background: none; border: none; color: var(--text); }
.nav ul { display: flex; gap: 16px; }
.nav ul li a { padding: 6px 8px; border-radius: 6px; transition: background-color 0.2s ease, color 0.2s ease; color: var(--text); }
.nav ul li a:hover { background: var(--brand); color: #fff; }

/* ریسپانسیو هدر */
@media (max-width: 768px) {
  .nav ul {
    position: fixed; top: 0; right: -100%; ; background: var(--surface);
    flex-direction: column; padding: 60px 20px; gap: 20px; transition: right 0.3s ease; z-index: 100;
    box-shadow: -10px 0 25px var(--shadow); border-left: 1px solid var(--border);
  }
  .nav ul.open { right: 0; }
  .nav .menu-toggle { display: block; }
}

/* مقاله */
.article-section { padding: 40px 18px; max-width: 900px; margin: 0 auto; background: var(--surface); border-radius: 10px; }
.article-title { font-size: 2.4rem; color: var(--brand); margin-bottom: 24px; text-align: center; font-weight: 900; }
.long-article { font-size: 1.06rem; line-height: 2; color: var(--text); }
.long-article p { margin-bottom: 18px; }
.subhead { margin: 22px 0 10px; font-size: 1.25rem; color: var(--brand-strong); font-weight: 800; border-right: 4px solid var(--brand); padding-right: 10px; }

/* گالری */
.gallery-section { padding: 40px 18px; max-width: 1000px; margin: 40px auto 0; background: var(--surface); border-radius: 10px; }
.gallery-section h2 { text-align: center; color: var(--brand); margin-bottom: 30px; font-weight: 700; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.gallery-item { position: relative; overflow: hidden; border-radius: 8px; cursor: pointer; background: var(--surface); }
.gallery-item img { width: 100%; height: auto; display: block; transition: transform .4s ease, filter .4s ease; }
.gallery-item:hover img { transform: scale(1.1); filter: brightness(0.9); }
.overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 8px; background: var(--overlay); color: #fff; text-align: center; font-weight: 600; font-size: 1rem; transition: 0.3s; }

/* درباره ما */
.about-section { padding: 60px 18px; background: var(--surface-2); border-radius: 10px; margin-top: 50px; max-width: 1000px; margin-left: auto; margin-right: auto; color: var(--text); }

/* گالری دایره‌ای */
.circle-gallery { padding: 40px 18px; max-width: 800px; margin: 40px auto; text-align: center; background: var(--surface); border-radius: 10px; }
.circle-gallery h2 { font-size: 1.8rem; color: var(--brand); margin-bottom: 24px; font-weight: 800; }
.circle-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; justify-items: center; }
.circle-item { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; border: 4px solid #fff; box-shadow: 0 0 10px var(--shadow); background: var(--surface); }
html[data-theme="dark"] .circle-item { border-color: #ddd; }
.circle-item img { width: 100%; height: 100%; object-fit: cover; }

/* footer */
.site-footer { margin-top: 40px; background: var(--footer); color: #fff; text-align: center; padding: 20px; font-size: 0.9rem; }

/* back-top button */
#backTop {
  position: fixed; bottom: 20px; left: 20px; padding: 12px 16px; background: var(--brand); color: #fff;
  border: none; border-radius: 8px; display: block; z-index: 100; cursor: pointer; font-weight: 700;
  opacity: 0; visibility: hidden; transition: opacity 0.3s ease, transform 0.3s ease; transform: translateY(8px);
}
#backTop.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* reveal animation خفن */
.reveal {
  opacity: 0;
  transform: translateY(60px) scale(0.95);
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* دکمه دارک مود */
/* هدر رو مرجع کنیم */
.site-header {
  position: relative;
}

/* دکمه دارک/لایت زیر هدر */
.theme-toggle {
  position: fixed;
  top: 12%;     /* دقیقا زیر هدر */
  left: 16px;    /* چسبیده به گوشه چپ */
  margin-top: 8px; /* کمی فاصله */
  background: var(--surface);
  border: 2px solid var(--brand);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 18px;
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 98; /* زیر منو ولی بالای محتوا */
}
.theme-toggle::before { content: "☀"; }
.theme-toggle:hover { background: var(--brand); color: #fff; }
html[data-theme="dark"] .theme-toggle { background: #222; border-color: #eee; color: #eee; }
html[data-theme="dark"] .theme-toggle::before { content: "🌙"; }

/* ریسپانسیو تایپوگرافی و گرید */
@media (max-width: 768px) {
  .article-title { font-size: 1.9rem; }
  .long-article { font-size: 1.02rem; }
  .overlay { font-size: 0.94rem; }
  .circle-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .circle-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .circle-item { width: 100px; height: 100px; }
}
/* تایم‌لاین ساده قرمز */
#audioPlayer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 12px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.5s ease, transform 0.5s ease;
  border-top: 2px solid var(--brand); /* خط قرمز ساده */
}

/* وقتی آماده نمایش شد */
#audioPlayer.show {
  opacity: 1;
  transform: translateY(0);
}

/* دکمه پلی/پاز */
#audioPlayer button {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--brand);
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
}
#audioPlayer button:hover {
  background: var(--brand-strong);
}

/* حذف کامل اسلایدر و تایم */
#audioPlayer input,
#audioPlayer span {
  display: none !important;
}/* وسط‌چینی کامل اسپلش و دکمه */
#splashOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* دکمه شروع روایت */
/* اسپلش تمام‌صفحه */
#splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  z-index: 9999;
  overflow: hidden;
}

/* ویدیو انفجار */
#splashVideo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* لایه‌ی متن و دکمه روی ویدیو */
#splashOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: rgba(0, 0, 0, 0.4);
}

/* متن خرمشهر404 */
#splashText {
  font-size: 36px;
  font-weight: 900;
  color: white;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#splashText.show {
  opacity: 1;
}

/* دکمه شروع روایت */
#startExperience {
  margin-top: 24px;
  padding: 10px 24px;
  font-size: 18px;
  font-weight: 600;
  background-color: var(--brand, #000000);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
  
}
#splashOverlay {
  background: rgb(0, 0, 0); /* 👈 پس‌زمینه‌ی قرمز پشت دکمه */
  transition: background 0.5s ease;
}