/* پایه */
* { 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: #f7f7f7;
  --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;
  --footer: #8b0000;
  --border: #2a2a2a;
  --shadow: rgba(0,0,0,0.35);
}

/* انتقال نرم */
body, .site-header, .custom-section, .about-section, .site-footer {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Splash ساده */
#splash {
  position: fixed; inset: 0;
  background: #000;
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease;
}
#splashText {
  color: #fff;
  font-size: 2.2rem;
  font-weight: 900;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
}
#splashText.show { opacity: 1; transform: translateY(0); }

/* هدر */
.site-header {
  position: sticky; top: 0;
  background: var(--surface);
  z-index: 99;
  box-shadow: 0 2px 10px 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: var(--text); }
.nav ul li a:hover { background: var(--brand); color: #fff; }

/* ریسپانسیو هدر */
@media (max-width: 768px) {
  .nav ul {
    position: fixed; top: 0; right: -100%; height: 100%; width: 220px; 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);
  }
  .nav ul.open { right: 0; }
  .nav .menu-toggle { display: block; }
}

/* سکشن عمومی */
.custom-section {
  max-width: 1000px;
  margin: 40px auto;
  padding: 20px;
  background: var(--surface);
  border-radius: 10px;
  box-shadow: 0 4px 12px var(--shadow);
  text-align: center;
}
.section-desc { font-size: 1.05rem; color: var(--text); }

/* عکس افقی */
.image-box.wide img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  box-shadow: 0 4px 12px var(--shadow);
}

/* سه عکس عمودی */
.vertical-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.image-box.tall {
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 12px var(--shadow);
}
.image-box.tall img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  transition: transform 0.3s ease;
}
.image-box.tall img:hover { transform: scale(1.05); }

/* درباره ما */
.about-section {
  padding: 40px 20px;
  background: var(--surface-2);
  border-radius: 10px;
  margin-top: 50px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text);
}
.about-section h2 {
  color: var(--brand);
  margin-bottom: 16px;
  font-weight: 800;
  text-align: center;
}

/* فوتر */
.site-footer {
  margin-top: 40px;
  background: var(--footer);
  color: #fff;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
}

/* دکمه بازگشت به بالا */
#backTop {
  position: fixed; bottom: 20px; left: 20px;
  padding: 10px 14px;
  background: var(--brand); color: #fff;
  border: none; border-radius: 6px;
  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); }



.site-header {
  position: relative;
  height: auto; /* اطمینان از مرجع درست */
}

.theme-toggle {
  position: absolute;
  top: 12%;           /* از پایین هدر شروع کن */
  left: 13px;          /* گوشه چپ */
  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: 100;
}
.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: "🌙"; }
.custom-section a {
  color: blue;
  text-decoration: underline;
  font-weight: bold;
}

.custom-section a:hover {
  color: darkblue;
}





