:root {
  --bg: #0b1220;
  --bg-panel: #10192c;
  --bg-card: #131f36;
  --border: #24314a;
  --gold: #d8a13a;
  --purple: #6b46c1;
  --text: #e7ecf5;
  --text-dim: #8b97ab;
  --accent-orange: #e0672a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }

/* Topbar */
.topbar {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
}
.topbar-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.social-icons { display: flex; gap: 12px; color: var(--text-dim); }
.search-box {
  flex: 1;
  max-width: 360px;
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 8px 36px 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}
.search-icon { position: absolute; left: 12px; top: 8px; color: var(--text-dim); }
.brand { display: flex; align-items: center; gap: 8px; }
.brand-bolt { font-size: 28px; color: var(--accent-orange); }
.brand-text { display: flex; flex-direction: column; align-items: flex-start; }
.brand-title { font-size: 22px; font-weight: 800; color: var(--accent-orange); }
.brand-sub { font-size: 11px; color: var(--text-dim); }

/* Layout */
.layout {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  /* در RTL، ستون اول (اینجا سایدبار ۲۲۰px) سمت راست صفحه قرار می‌گیرد و ستون
     دوم (محتوای اصلی) سمت چپ — دقیقاً مطابق طرح مرجع (منو/لوگو سمت راست). */
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 24px;
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
}

.sidebar {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
}
.sidebar a.active, .sidebar a:hover {
  background: var(--purple);
  color: #fff;
}

.content { min-width: 0; }

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin: 32px 0 16px;
  color: var(--text);
}
.section-title.gold { color: var(--gold); }
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.see-all { color: var(--gold); font-size: 13px; }

/* Featured */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 16px;
}
@media (max-width: 700px) { .featured-grid { grid-template-columns: 1fr; } }
.featured-list { display: flex; flex-direction: column; gap: 12px; }
.mini-card {
  display: flex;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
}
.mini-card img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.mini-card .title { font-size: 13px; font-weight: 600; }
.mini-card .date { font-size: 11px; color: var(--text-dim); }

.featured-hero {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  min-height: 280px;
  background: linear-gradient(180deg, rgba(11,18,32,0) 30%, rgba(11,18,32,.95)), center/cover no-repeat;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}
.featured-hero .badge {
  position: absolute; top: 14px; right: 14px;
  background: var(--purple); color: #fff; font-size: 11px;
  padding: 4px 10px; border-radius: 20px;
}
.featured-hero h3 { font-size: 20px; margin: 0 0 6px; }
.featured-hero p { font-size: 13px; color: var(--text-dim); margin: 0; }

/* Articles */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 700px) { .articles-grid { grid-template-columns: 1fr; } }
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.article-card img { width: 100%; height: 150px; object-fit: cover; }
.article-card .body { padding: 12px; }
.article-card .tag { font-size: 11px; color: var(--gold); }
.article-card h3 { font-size: 15px; margin: 6px 0; }
.article-card p { font-size: 13px; color: var(--text-dim); margin: 0 0 8px; }
.article-card .date { font-size: 11px; color: var(--text-dim); }

/* Loved grid */
.loved-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 700px) { .loved-grid { grid-template-columns: repeat(2, 1fr); } }
.loved-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.loved-card img { width: 100%; height: 110px; object-fit: cover; }
.loved-card .body { padding: 10px; }
.loved-card h4 { font-size: 13px; margin: 0 0 8px; }
.loved-card .pill { display: inline-block; font-size: 11px; padding: 3px 10px; border-radius: 14px; }
.loved-card .pill.theories { background: #3a2a50; color: #c9a6ff; }
.loved-card .pill.articles { background: #123a2e; color: #7ee0b8; }
.loved-card .pill.quiz { background: #3a2a12; color: #f0c078; }

/* Videos row */
.videos-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.video-card { flex: 0 0 200px; }
.video-thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  height: 130px;
  background: var(--bg-card);
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb .duration {
  position: absolute; bottom: 6px; left: 6px;
  background: rgba(0,0,0,.7); font-size: 11px; padding: 2px 6px; border-radius: 4px;
}
.video-card .title { font-size: 13px; margin: 8px 0 2px; }
.video-card .label { font-size: 11px; color: var(--text-dim); }

/* Experience cards */
.experience-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 700px) { .experience-grid { grid-template-columns: repeat(2, 1fr); } }
.experience-card {
  border-radius: 12px;
  padding: 18px;
  color: #fff;
}
.experience-card h3 { font-size: 15px; margin: 0 0 8px; }
.experience-card p { font-size: 12px; opacity: .85; margin: 0 0 14px; }
.experience-card.wands { background: linear-gradient(160deg, #7a3ab0, #4a1f80); }
.experience-card.creatures { background: linear-gradient(160deg, #1f7a4a, #123a2e); }
.experience-card.potions { background: linear-gradient(160deg, #1f5a7a, #123048); }
.experience-card.sorting { background: linear-gradient(160deg, #b06a1f, #7a3a12); }
.btn-outline {
  display: inline-block;
  border: 1px solid rgba(255,255,255,.6);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
}

/* Shop */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .shop-grid { grid-template-columns: repeat(2, 1fr); } }
.shop-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.shop-card img { width: 100%; height: 100px; object-fit: contain; margin-bottom: 8px; }
.shop-card h4 { font-size: 13px; margin: 0 0 6px; }
.shop-card .price { font-size: 12px; color: var(--gold); margin-bottom: 8px; }
.shop-card button {
  width: 100%;
  background: transparent;
  border: 1px solid var(--accent-orange);
  color: var(--accent-orange);
  padding: 6px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}

/* Podcasts */
.podcasts-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.podcast-item { text-align: center; width: 90px; }
.podcast-circle {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px;
  font-size: 24px;
  color: #10192c;
}
.podcast-item .label { font-size: 12px; color: var(--text-dim); }

/* Footer */
.site-footer {
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 32px 24px 16px;
}
.footer-grid {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
  gap: 24px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-col h4, .footer-newsletter h4 { font-size: 14px; margin-bottom: 12px; }
.footer-col a { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.footer-brand p { font-size: 12px; color: var(--text-dim); margin-top: 10px; }
.newsletter-form { display: flex; gap: 8px; }
.newsletter-form input {
  flex: 1; padding: 8px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text);
}
.newsletter-form button {
  background: var(--accent-orange); border: none; color: #fff;
  padding: 8px 16px; border-radius: 8px; cursor: pointer; font-family: inherit;
}
.footer-dmca { max-width: 640px; margin: 10px auto 0; font-size: 11px; line-height: 1.7; opacity: .55; }
.footer-dmca a { color: inherit; text-decoration: underline; opacity: .9; }
.footer-bottom {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
