/* ==========================================================================
   مستر آی‌یار — استایل اصلی سایت (قرمز + مشکی)
   ========================================================================== */

:root {
  --black: #ffffff;
  --black-soft: #f5f5f7;
  --black-card: #ffffff;
  --red: #e31b23;
  --red-dark: #b5121a;
  --red-glow: rgba(227, 27, 35, 0.22);
  --white: #16161a;
  --gray: #55555f;
  --gray-dim: #85858f;
  --green: #16a34a;
  --border: rgba(10, 10, 12, 0.1);
  --radius: 16px;
  --max-width: 1180px;
  --font: 'Vazirmatn', Tahoma, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font);
  background: var(--black);
  color: var(--white);
  line-height: 1.85;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* برچسب بخش‌ها — بدون خط تیره، اندازه یکسان در کل سایت */
.section-tag {
  display: inline-block;
  color: var(--red);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.9;
  letter-spacing: 0.3px;
  margin-bottom: 10px;
}

.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head h2,
.gifts-title {
  font-size: clamp(1.7rem, 3.6vw, 2.2rem);
  line-height: 1.6;
  margin-bottom: 12px;
  font-weight: 800;
}
.section-desc { color: var(--gray); font-size: 1rem; }

/* عناوین دارای آیکون یا لوگو — تراز و هم‌اندازه */
.h-with-icon,
.h-with-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.h-icon {
  width: 1.05em; height: 1.05em;
  flex-shrink: 0;
  color: var(--red);
  display: inline-flex;
}
.h-icon svg { width: 100%; height: 100%; }
.title-logo {
  width: 1.5em; height: 1.5em;
  flex-shrink: 0;
  border-radius: 50%;
  display: inline-block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  font-family: var(--font);
}
.btn-primary {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  box-shadow: 0 8px 24px var(--red-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px var(--red-glow); }
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--white);
}
.btn-outline:hover { border-color: var(--red); color: var(--red); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 16px;
  gap: 20px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; }
.logo-text { white-space: nowrap; }
.logo-sep { color: var(--red); font-weight: 400; margin: 0 2px; }
.logo-mark {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border-radius: 10px;
  font-weight: 900;
  font-size: 0.9rem;
  color: #fff;
  flex-shrink: 0;
}
.main-nav { display: flex; gap: 26px; }
.main-nav a { font-size: 0.93rem; color: var(--gray); transition: color 0.2s; white-space: nowrap; }
.main-nav a:hover { color: var(--red); }
.header-cta { flex-shrink: 0; padding: 11px 22px; font-size: 0.9rem; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.nav-toggle span { width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: 0.25s; }

/* ===== Hero ===== */
.hero { position: relative; padding: 90px 0 70px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 20%, var(--red-glow), transparent 45%),
    radial-gradient(circle at 80% 60%, rgba(227,27,35,0.18), transparent 50%);
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 860px; margin: 0 auto; }
.eyebrow {
  display: inline-block;
  color: var(--red);
  font-weight: 700;
  background: rgba(227,27,35,0.1);
  border: 1px solid rgba(227,27,35,0.3);
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.45;
  margin-bottom: 20px;
}
.hero-sub { color: var(--gray); font-size: 1.05rem; max-width: 660px; margin: 0 auto 36px; }
.hero-sub strong { color: var(--white); }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.course-hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); }

/* Brand strip */
.brand-strip { margin-top: 48px; }
.brand-strip-label {
  display: block;
  color: var(--gray-dim);
  font-size: 0.8rem;
  margin-bottom: 18px;
  letter-spacing: 0.5px;
}
.brand-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.brand-logo {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  padding: 11px;
  background: rgba(10,10,12,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--white);
  transition: 0.25s;
}
.brand-logo:hover { border-color: rgba(227,27,35,0.5); background: rgba(227,27,35,0.08); transform: translateY(-3px); }
.brand-logo svg { width: 100%; height: 100%; }

.hero-stats {
  display: flex; justify-content: center; gap: 44px;
  flex-wrap: wrap; margin-top: 48px;
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat-num { font-size: 1.8rem; font-weight: 900; color: var(--red); line-height: 1.2; }
.stat-label { color: var(--gray-dim); font-size: 0.85rem; }

/* ===== About ===== */
.about { padding: 90px 0; background: var(--black-soft); }
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
.about-text h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 800; margin-bottom: 20px; }
.about-text p { color: var(--gray); margin-bottom: 16px; }
.about-text strong { color: var(--red); }
.about-points { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.about-points li {
  position: relative;
  padding-inline-start: 26px;
  color: var(--white);
  font-weight: 500;
}
.about-points li::before {
  content: "✓";
  position: absolute;
  right: 0;
  color: var(--red);
  font-weight: 900;
}
.about-card {
  position: relative;
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  overflow: hidden;
}
.about-card-glow {
  position: absolute; top: -60px; left: -60px;
  width: 180px; height: 180px;
  background: var(--red);
  filter: blur(90px);
  opacity: 0.5;
}
.about-card h3 { position: relative; font-size: 1.3rem; margin-bottom: 12px; font-weight: 800; }
.about-card p { position: relative; color: var(--gray); margin-bottom: 24px; }
.about-card-links { position: relative; display: flex; flex-direction: column; gap: 10px; }

/* ===== Course promo ===== */
.course-promo { position: relative; padding: 100px 0; overflow: hidden; }
.course-promo-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(227,27,35,0.22), transparent 60%);
}
.course-promo .container { position: relative; z-index: 1; }

.chapters-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 56px;
}
.chapter-card {
  display: block;
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: 0.25s;
}
.chapter-card:hover { transform: translateY(-6px); border-color: rgba(227,27,35,0.5); }
.chapter-card.highlight { border-color: rgba(227,27,35,0.45); background: linear-gradient(160deg, rgba(227,27,35,0.12), var(--black-card)); }
.chapter-num {
  display: inline-block;
  font-size: 0.75rem; font-weight: 800;
  color: var(--red);
  background: rgba(227,27,35,0.12);
  border-radius: 999px;
  padding: 3px 14px;
  margin-bottom: 14px;
}
.chapter-card h3 { font-size: 1.12rem; font-weight: 800; margin-bottom: 10px; line-height: 1.6; }
.chapter-card p { color: var(--gray); font-size: 0.9rem; margin-bottom: 14px; }
.chapter-link { color: var(--red); font-size: 0.85rem; font-weight: 700; }

/* Gifts */
.gifts-block { margin-bottom: 48px; }
.gifts-title { text-align: center; margin-bottom: 28px; }
.gifts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.gift {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  font-size: 0.93rem;
  font-weight: 500;
  line-height: 1.9;
  transition: 0.2s;
}
.gift:hover { border-color: rgba(227,27,35,0.45); transform: translateY(-3px); }
.gift-icon {
  width: 22px; height: 22px;
  flex-shrink: 0;
  margin-top: 6px;
  color: var(--red);
  display: inline-flex;
}
.gift-icon svg { width: 100%; height: 100%; }
.gifts-grid.big .gift { padding: 22px 24px; font-size: 0.98rem; }

.course-cta { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* ===== Tools ===== */
.tools { padding: 90px 0; background: var(--black-soft); }
.tools-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tool-card {
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.tool-card:hover { transform: translateY(-6px); border-color: rgba(227,27,35,0.4); }
.tool-icon {
  width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,12,0.04);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 18px;
  padding: 13px;
  color: var(--white);
}
.tool-icon svg { width: 100%; height: 100%; }
.tool-card h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 2px; }
.tool-cat { color: var(--red); font-size: 0.78rem; font-weight: 700; margin-bottom: 10px; }
.tool-card p:not(.tool-cat) { color: var(--gray); font-size: 0.88rem; margin-bottom: 16px; line-height: 1.8; }
.tool-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--red);
  background: rgba(227,27,35,0.1);
  border: 1px solid rgba(227,27,35,0.25);
  padding: 4px 12px;
  border-radius: 999px;
}
.tools-more { text-align: center; margin-top: 48px; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.tools-more p { color: var(--gray); }

/* ===== Why ===== */
.why { padding: 90px 0; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.why-card {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: 0.2s;
}
.why-card:hover { border-color: rgba(227,27,35,0.4); transform: translateY(-3px); }
.why-check {
  width: 22px; height: 22px;
  flex-shrink: 0; margin-top: 6px;
  color: var(--green);
  display: inline-flex;
}
.why-check svg { width: 100%; height: 100%; }
.why-card p { font-size: 0.94rem; font-weight: 500; line-height: 1.9; }

/* ===== Syllabus ===== */
.syllabus { padding: 90px 0; background: var(--black-soft); }
.chapter {
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.chapter[open] { border-color: rgba(227,27,35,0.4); }
.chapter.highlight { border-color: rgba(227,27,35,0.35); }
.chapter summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 26px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  transition: background 0.2s;
}
.chapter summary::-webkit-details-marker { display: none; }
.chapter summary:hover { background: rgba(10,10,12,0.03); }
.chapter summary::after {
  content: "+";
  margin-inline-start: auto;
  color: var(--red);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  flex-shrink: 0;
}
.chapter[open] summary::after { content: "−"; }
.ch-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--red);
  background: rgba(227,27,35,0.12);
  border-radius: 999px;
  padding: 5px 14px;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-icon { width: 15px; height: 15px; display: inline-flex; flex-shrink: 0; }
.badge-icon svg { width: 100%; height: 100%; }
.ch-title { font-size: 1.05rem; font-weight: 800; }
.ch-count { font-size: 0.8rem; color: var(--gray-dim); font-weight: 600; white-space: nowrap; }
.ch-body { padding: 4px 26px 26px; border-top: 1px solid var(--border); }
.ch-intro { color: var(--gray); font-size: 0.94rem; margin: 18px 0 4px; }
.ch-intro strong { color: var(--red); }
.ch-group {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--white);
  margin: 26px 0 12px;
  padding-inline-start: 12px;
  border-inline-start: 3px solid var(--red);
}
.grp-icon { width: 18px; height: 18px; color: var(--red); display: inline-flex; flex-shrink: 0; }
.grp-icon svg { width: 100%; height: 100%; }
.lessons { padding-inline-start: 22px; display: flex; flex-direction: column; gap: 8px; }
.lessons li {
  color: var(--gray);
  font-size: 0.92rem;
  line-height: 1.9;
}
.lessons li::marker { color: var(--red); font-weight: 700; }
.lessons.plain { list-style: none; padding-inline-start: 0; margin-top: 16px; }
.lessons.plain li { position: relative; padding-inline-start: 24px; }
.lessons.plain li::before { content: "▪"; position: absolute; right: 0; color: var(--red); }

/* ===== Gifts section ===== */
.gifts-section { padding: 90px 0; }

/* ===== For who ===== */
.forewho { padding: 90px 0; background: var(--black-soft); }
.forewho-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.fw-card {
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.fw-card h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 20px; }
.fw-card ul { display: flex; flex-direction: column; gap: 14px; }
.fw-card li {
  position: relative;
  padding-inline-start: 30px;
  color: var(--gray);
  font-size: 0.94rem;
  line-height: 1.9;
}
.fw-card li::before {
  position: absolute;
  right: 0; top: 8px;
  width: 18px; height: 18px;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: contain; mask-size: contain;
  content: "";
}
.fw-card.yes { border-color: rgba(74,222,128,0.3); }
.fw-card.yes h3 { color: var(--green); }
.fw-card.yes li::before {
  color: var(--green);
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>");
}
.fw-card.no { border-color: rgba(227,27,35,0.3); }
.fw-card.no h3 { color: var(--red); }
.fw-card.no li::before {
  color: var(--red);
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M18 6 6 18M6 6l12 12'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M18 6 6 18M6 6l12 12'/></svg>");
}

/* ===== Final CTA ===== */
.final-cta { padding: 90px 0; }
.cta-box {
  position: relative;
  text-align: center;
  background: var(--black-card);
  border: 1px solid rgba(227,27,35,0.35);
  border-radius: 24px;
  padding: 56px 32px;
  overflow: hidden;
}
.cta-glow {
  position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
  width: 400px; height: 250px;
  background: var(--red);
  filter: blur(120px);
  opacity: 0.4;
}
.cta-box h2 { position: relative; font-size: clamp(1.5rem, 3.5vw, 2.1rem); font-weight: 800; margin-bottom: 14px; }
.cta-box > p { position: relative; color: var(--gray); margin-bottom: 28px; }
.cta-box .btn { position: relative; }
.cta-alt {
  position: relative;
  margin-top: 32px;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 24px;
}
.cta-alt a { color: var(--gray); font-size: 0.9rem; transition: color 0.2s; }
.cta-alt a:hover { color: var(--red); }

/* ===== Links ===== */
.links { padding: 90px 0; }
.links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; }
.link-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s, transform 0.2s;
}
.link-card:hover { border-color: var(--red); transform: translateY(-4px); }
.link-card.featured { border-color: rgba(227,27,35,0.45); background: linear-gradient(160deg, rgba(227,27,35,0.12), var(--black-card)); }
.link-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,12,0.04);
  border: 1px solid var(--border);
  flex-shrink: 0;
  padding: 11px;
}
.link-icon svg { width: 100%; height: 100%; }
.link-icon.ig { color: #E4405F; }
.link-icon.tg { color: #26A5E4; }
.link-icon.yt { color: #FF0000; }
.link-icon.mail { color: var(--red); }
.link-icon.bale { color: #00a99d; padding: 0; overflow: hidden; }
.link-icon.bale img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 10px; }
.link-icon.rubika { padding: 0; overflow: hidden; }
.link-icon.rubika img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 10px; }
.link-card h3 { font-size: 0.98rem; font-weight: 700; margin-bottom: 0; }
.link-card p { color: var(--gray-dim); font-size: 0.82rem; word-break: break-all; }

/* ===== Contact ===== */
.contact { padding: 90px 0; background: var(--black-soft); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: start; }
.contact-text h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 800; margin-bottom: 20px; }
.contact-text p { color: var(--gray); margin-bottom: 24px; }
.contact-list { display: flex; flex-direction: column; gap: 12px; }
.contact-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.88rem;
  flex-wrap: wrap;
}
.contact-list span { color: var(--gray-dim); }
.contact-list a { color: var(--red); font-weight: 600; word-break: break-all; }

.contact-form {
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row label { font-size: 0.88rem; color: var(--gray); font-weight: 600; }
.form-row input, .form-row textarea {
  background: var(--black-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  color: var(--white);
  font-family: var(--font);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.2s;
}
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--red); }
.form-note { text-align: center; font-size: 0.85rem; color: var(--red); min-height: 18px; }

/* ===== Footer ===== */
.site-footer { padding: 56px 0 24px; border-top: 1px solid var(--border); background: var(--black-soft); }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.3fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.footer-col h4 { font-size: 1rem; font-weight: 800; margin-bottom: 16px; }
.footer-col a { display: block; color: var(--gray); font-size: 0.88rem; margin-bottom: 10px; transition: color 0.2s; }
.footer-col a:hover { color: var(--red); }
.footer-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; margin-bottom: 14px; }
.footer-desc { color: var(--gray); font-size: 0.88rem; }
.footer-bottom { padding-top: 20px; text-align: center; }
.footer-bottom p { color: var(--gray-dim); font-size: 0.82rem; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .tools-grid { grid-template-columns: repeat(3, 1fr); }
  .chapters-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .about-grid, .contact-grid, .forewho-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%; right: 0; left: 0;
    background: var(--black-soft);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 12px 24px 20px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .site-header { position: sticky; }
  .header-inner { position: relative; }
  .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .tools-grid, .chapters-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 28px; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .chapter summary { flex-wrap: wrap; gap: 10px; padding: 18px 20px; }
  .ch-body { padding: 4px 20px 22px; }
  .ch-count { display: none; }
  .brand-logo { width: 40px; height: 40px; padding: 9px; }
  .cta-box { padding: 40px 22px; }
  .btn { padding: 13px 22px; font-size: 0.9rem; }
  .btn-lg { padding: 14px 26px; font-size: 0.95rem; }
}

/* دکمه ثبت‌نام داخل منوی موبایل */
.nav-cta { display: none; }
@media (max-width: 720px) {
  .main-nav .nav-cta {
    display: block;
    margin-top: 14px;
    text-align: center;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff !important;
    font-weight: 800;
    border-radius: 999px;
    border-bottom: none !important;
    padding: 13px 0 !important;
  }
}

/* ===== لوگوی دوره آی‌یار ۳۶۰ در هدر صفحه دوره ===== */
.course-logo {
  width: clamp(150px, 22vw, 210px);
  height: auto;
  margin: 0 auto 22px;
  border-radius: 50%;
  filter: drop-shadow(0 10px 40px rgba(227, 27, 35, 0.45));
  animation: logoFloat 6s ease-in-out infinite;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) {
  .course-logo { animation: none; }
}

/* ===== واکنش‌گرایی لوگوی متنی هدر ===== */
@media (max-width: 1024px) {
  .logo { font-size: 0.95rem; }
  .main-nav { gap: 18px; }
  .main-nav a { font-size: 0.88rem; }
}
@media (max-width: 480px) {
  .logo { font-size: 0.85rem; }
  .logo-mark { width: 34px; height: 34px; font-size: 0.8rem; }
  .h-with-icon, .h-with-logo { gap: 9px; }
}

/* ==========================================================================
   قصه‌های آی‌یار — بخش فایل‌های صوتی
   ========================================================================== */
.stories { position: relative; padding: 90px 0; overflow: hidden; }
.stories-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(227,27,35,0.16), transparent 62%);
}
.stories .container { position: relative; z-index: 1; }

.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.story-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.25s, transform 0.25s;
  overflow: hidden;
}
.story-card:hover { border-color: rgba(227,27,35,0.45); transform: translateY(-5px); }
.story-card.playing { border-color: var(--red); box-shadow: 0 0 0 1px rgba(227,27,35,0.35), 0 12px 40px rgba(227,27,35,0.18); }

.story-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.story-num {
  flex-shrink: 0;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(227,27,35,0.12);
  border: 1px solid rgba(227,27,35,0.3);
  border-radius: 12px;
  color: var(--red);
  font-weight: 900;
  font-size: 1.05rem;
}
.story-meta { flex: 1; min-width: 0; }
.story-meta h3 { font-size: 1.05rem; font-weight: 800; line-height: 1.7; margin-bottom: 2px; }
.story-time {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--gray-dim); font-size: 0.8rem; font-weight: 600;
}
.story-time i { width: 14px; height: 14px; display: inline-flex; }
.story-time svg { width: 100%; height: 100%; }

.story-desc { color: var(--gray); font-size: 0.9rem; line-height: 1.9; margin-bottom: 18px; flex: 1; }

/* موج صوتی تزئینی */
.story-wave {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 4px; height: 34px; margin-bottom: 20px;
  opacity: 0.35;
  transition: opacity 0.3s;
}
.story-card.playing .story-wave { opacity: 1; }
.story-wave span {
  width: 4px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--red), var(--red-dark));
  height: 25%;
}
.story-card.playing .story-wave span { animation: waveBounce 1.1s ease-in-out infinite; }
.story-wave span:nth-child(1)  { animation-delay: 0.00s; }
.story-wave span:nth-child(2)  { animation-delay: 0.09s; }
.story-wave span:nth-child(3)  { animation-delay: 0.18s; }
.story-wave span:nth-child(4)  { animation-delay: 0.27s; }
.story-wave span:nth-child(5)  { animation-delay: 0.36s; }
.story-wave span:nth-child(6)  { animation-delay: 0.45s; }
.story-wave span:nth-child(7)  { animation-delay: 0.54s; }
.story-wave span:nth-child(8)  { animation-delay: 0.63s; }
.story-wave span:nth-child(9)  { animation-delay: 0.72s; }
.story-wave span:nth-child(10) { animation-delay: 0.81s; }
.story-wave span:nth-child(11) { animation-delay: 0.90s; }
.story-wave span:nth-child(12) { animation-delay: 0.99s; }
@keyframes waveBounce {
  0%, 100% { height: 22%; }
  50%      { height: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .story-card.playing .story-wave span { animation: none; height: 55%; }
}

.story-actions { display: flex; flex-direction: column; gap: 9px; }
.story-actions .btn { width: 100%; padding: 12px 18px; font-size: 0.88rem; }
.story-icon { width: 17px; height: 17px; display: inline-flex; flex-shrink: 0; }
.story-icon svg { width: 100%; height: 100%; }

.story-error { margin-top: 12px; color: var(--red); font-size: 0.82rem; text-align: center; }
.story-card.has-error .story-play { opacity: 0.55; }

.stories-empty {
  text-align: center;
  color: var(--gray);
  background: var(--black-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
}

.stories-foot {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; flex-wrap: wrap;
  margin-top: 40px;
  padding: 22px 26px;
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stories-foot-icon { width: 26px; height: 26px; color: var(--red); display: inline-flex; flex-shrink: 0; }
.stories-foot-icon svg { width: 100%; height: 100%; }
.stories-foot p { color: var(--gray); font-size: 0.92rem; margin: 0; }

@media (max-width: 720px) {
  .stories-grid { grid-template-columns: 1fr; }
  .stories-foot { flex-direction: column; text-align: center; gap: 12px; }
  .story-actions .btn { min-width: 0; }
}

/* فاصله‌گذار برای قصه‌های بدون توضیح */
.story-spacer { flex: 1; min-height: 8px; }
