/* ===================================================================
   آکادمی رتبیژن — Stylesheet
   Colors: primary orange #fd881c | secondary cyan #0bd9f6
           bg #ffffff | text-dark #000000
   =================================================================== */

:root {
  /* برند — رنگ‌های ثابت در هر دو حالت */
  --orange: #fd881c;
  --cyan: #0bd9f6;
  --bale: #1aad5b;   /* سبز برند پیام‌رسان بله */
  --white: #ffffff;
  --black: #000000;

  /* اندازه‌ها و ثابت‌ها */
  --radius: 18px;
  --radius-sm: 12px;
  --grad: linear-gradient(120deg, var(--cyan) 0%, var(--orange) 100%);
  --container: 1160px;
  --header-h: 74px;

  /* ===== حالت تاریک (پیش‌فرض سایت) ===== */
  --ink: #e8ecf3;          /* main text */
  --muted: #9aa6b6;        /* secondary text */
  --body-bg: #0b0f17;      /* page background */
  --surface: #141b26;      /* cards / raised surfaces */
  --bg-soft: #10161f;      /* alternating section bg */
  --border: #232d3c;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .6);
  --header-bg: rgba(11, 15, 23, .85);
  --input-bg: #0f141d;
  --input-bg-focus: #141b26;
}

/* ===== حالت روشن (با کلید تغییر می‌کند) ===== */
[data-theme="light"] {
  --ink: #14181f;          /* main text (softer than pure black) */
  --muted: #5b6572;        /* secondary text */
  --body-bg: #ffffff;
  --surface: #ffffff;
  --bg-soft: #f5f8fb;      /* light section bg */
  --border: #e6ebf1;
  --shadow: 0 10px 30px rgba(20, 24, 31, .08);
  --shadow-lg: 0 20px 50px rgba(20, 24, 31, .14);
  --header-bg: rgba(255, 255, 255, .9);
  --input-bg: #fbfcfe;
  --input-bg-focus: #ffffff;
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background: var(--body-bg);
  line-height: 1.9;
  transition: background .3s ease, color .3s ease;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(253, 136, 28, .35);
}
.btn-primary:hover { background: #e9760c; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(253,136,28,.45); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--cyan);
}
.btn-outline:hover { background: var(--cyan); color: var(--white); transform: translateY(-2px); }
.btn-lg { padding: 16px 46px; font-size: 17px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background .3s ease, border-color .3s ease;
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 46px; height: 46px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: var(--shadow);
}
.brand-name { font-weight: 800; font-size: 20px; }
.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a { font-weight: 600; color: var(--muted); transition: color .15s; }
.main-nav a:hover { color: var(--orange); }
.main-nav .nav-cta {
  background: var(--grad);
  color: var(--white);
  padding: 9px 22px;
  border-radius: 999px;
}
.main-nav .nav-cta:hover { color: var(--white); opacity: .92; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 26px; height: 3px;
  background: var(--ink);
  border-radius: 3px;
  transition: .25s;
}

/* ---------- Theme toggle (کلید روشن/تاریک) ---------- */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  margin-inline-start: 4px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .18s ease;
}
.theme-toggle:hover { color: var(--orange); border-color: var(--cyan); transform: translateY(-1px); }
.theme-toggle svg { grid-area: 1 / 1; }
/* پیش‌فرض (تاریک): آیکن ماه نمایش داده می‌شود */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
/* در حالت روشن: آیکن خورشید نمایش داده می‌شود */
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(54px, 8vw, 96px) 0 clamp(48px, 7vw, 84px);
  background:
    radial-gradient(1000px 400px at 85% -10%, rgba(11,217,246,.18), transparent 60%),
    radial-gradient(900px 420px at 10% 10%, rgba(253,136,28,.16), transparent 55%),
    var(--body-bg);
  text-align: center;
}
.hero-inner { max-width: 820px; margin-inline: auto; }
.hero-badge {
  display: inline-block;
  background: rgba(11,217,246,.14);
  color: #0895ab;
  font-weight: 700;
  font-size: 14px;
  padding: 7px 18px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero-title {
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 22px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-text { font-size: clamp(16px, 2vw, 19px); color: var(--muted); margin-bottom: 34px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Stats ---------- */
.stats { padding: 10px 0 clamp(40px, 6vw, 62px); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 720px;
  margin-inline: auto;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 5px;
  background: var(--grad);
}
.stat-number {
  font-size: clamp(38px, 6vw, 56px);
  font-weight: 900;
  color: var(--orange);
  line-height: 1;
}
.stat-label { margin-top: 10px; font-weight: 700; color: var(--muted); font-size: 17px; }

/* ---------- Section head ---------- */
.section-head { text-align: center; max-width: 760px; margin: 0 auto 46px; }
.section-title {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 900;
  line-height: 1.4;
  margin-bottom: 14px;
}
.section-title.light { color: var(--white); }
.section-sub { color: var(--muted); font-size: 17px; }

/* ---------- Why / Features ---------- */
.why { padding: clamp(52px, 8vw, 84px) 0; background: var(--bg-soft); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.feature-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--grad);
  color: var(--white);
  margin-bottom: 18px;
}
.feature-icon svg { width: 30px; height: 30px; }
.feature-title { font-size: 19px; font-weight: 800; margin-bottom: 10px; }
.feature-text { color: var(--muted); font-size: 15px; }

/* ---------- Manager ---------- */
.manager { padding: clamp(56px, 8vw, 94px) 0; }
.manager-inner {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 50px;
  align-items: center;
}
.manager-photo { position: relative; }
.manager-photo img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}
.manager-rank {
  position: absolute;
  bottom: 18px; inset-inline-start: 18px;
  background: var(--orange);
  color: var(--white);
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 15px;
}
.manager-eyebrow { color: var(--cyan); font-weight: 800; margin-bottom: 8px; filter: brightness(.85); }
.manager-name { font-size: clamp(26px, 4vw, 38px); font-weight: 900; }
.manager-role { color: var(--muted); font-weight: 700; margin: 4px 0 22px; }
.manager-body p { color: var(--muted); margin-bottom: 16px; }

/* ---------- Channels ---------- */
.channels {
  padding: clamp(50px, 7vw, 78px) 0;
  background: var(--grad);
  text-align: center;
}
.channels-inner { max-width: 760px; margin-inline: auto; }
.channels-text { color: rgba(255,255,255,.95); font-size: 18px; margin: 8px 0 30px; }
.channels-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-telegram { background: var(--white); color: #229ED9; }
.btn-telegram:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-bale { background: var(--white); color: var(--bale); }
.btn-bale:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ---------- Advisors slider ---------- */
.advisors { padding: clamp(54px, 8vw, 88px) 0; background: var(--bg-soft); overflow: hidden; }
.slider {
  position: relative;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  gap: 10px;
}
.slider-viewport {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;              /* Firefox */
  -ms-overflow-style: none;           /* IE/Edge */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  cursor: grab;
}
.slider-viewport::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.slider-viewport.dragging { cursor: grabbing; scroll-snap-type: none; }
.slider-track {
  display: flex;
  gap: 24px;
  width: max-content;
  padding: 6px 4px;
}
.slider-nav {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: color .2s ease, border-color .2s ease, transform .18s ease, background .2s ease;
}
.slider-nav:hover { color: var(--white); background: var(--orange); border-color: var(--orange); transform: translateY(-2px); }
.slider-nav svg { width: 22px; height: 22px; }
.advisor-card {
  width: 260px;
  flex: 0 0 auto;
  scroll-snap-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
}
.advisor-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--bg-soft);
}
.advisor-noimg {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  background: var(--bg-soft);
  color: var(--border);
}
.advisor-noimg svg {
  width: 62%;
  height: 62%;
}
/* در حالت روشن: پس‌زمینه‌ی روشن‌تر و طرح تیره‌تر برای وضوح */
[data-theme="light"] .advisor-noimg {
  background: #eef2f7;
  color: #c2cdd9;
}
.advisor-info { padding: 18px 14px 22px; }
.advisor-name { font-weight: 800; font-size: 18px; margin-bottom: 6px; }
.advisor-desc { color: var(--muted); font-size: 14px; }

/* ---------- Signup form ---------- */
.signup { padding: clamp(56px, 8vw, 94px) 0; }
.signup-inner { max-width: 860px; margin-inline: auto; }
.signup-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.form-row-single { grid-template-columns: 1fr; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label { font-weight: 700; font-size: 15px; }
.req { color: var(--orange); }
.opt { color: var(--muted); font-weight: 500; font-size: 13px; }
.form-field input {
  font-family: inherit;
  font-size: 15px;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.form-field input::placeholder { color: var(--muted); opacity: 1; }
.form-field input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(11,217,246,.18);
  background: var(--input-bg-focus);
}
.form-field input.invalid { border-color: #e5484d; box-shadow: 0 0 0 3px rgba(229,72,77,.14); }
.hp-field { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }
.form-submit { text-align: center; margin-top: 10px; }
.form-status { text-align: center; margin-top: 16px; font-weight: 700; min-height: 24px; }
.form-status.ok { color: #17915b; }
.form-status.err { color: #e5484d; }

/* ---------- Footer ---------- */
.site-footer { background: #0e1420; color: #cfd6e0; padding-top: 54px; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.1fr;
  gap: 34px;
  align-items: start;
  padding-bottom: 40px;
}
.footer-logo { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; margin-bottom: 14px; }
.footer-tag { color: #9aa5b4; font-size: 15px; max-width: 320px; }
.footer-social-title { display: block; font-weight: 700; color: var(--white); margin-bottom: 14px; }
.social-icons { display: flex; gap: 14px; }
.social-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--white);
  transition: transform .18s, opacity .18s;
}
.social-icon.tg { background: #229ED9; }
.social-icon.bale { background: var(--bale); }
.social-icon:hover { transform: translateY(-3px); opacity: .9; }
.footer-contact { }
.footer-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-weight: 800;
  font-size: 17px;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(253,136,28,.14);
  border: 1px solid rgba(253,136,28,.35);
  transition: background .18s, transform .18s;
}
.footer-phone:hover { background: rgba(253,136,28,.24); transform: translateY(-2px); }
.footer-phone svg { color: var(--orange); }

.footer-symbols {
  display: flex;
  flex-wrap: nowrap;      /* همیشه کنار هم، نه روی هم */
  align-items: flex-start;
  gap: 12px;
}
.footer-enamad, .footer-samandehi { flex: 0 1 auto; min-width: 0; }
.footer-enamad img, .footer-samandehi img { max-width: 100%; height: auto; }
.symbol-placeholder {
  border: 1.5px dashed #3a4557;
  border-radius: 12px;
  padding: 22px 14px;
  text-align: center;
  color: #8b97a8;
  font-size: 14px;
}
.footer-copy {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 18px 0;
  text-align: center;
  color: #8b97a8;
  font-size: 14px;
}

/* ===================================================================
   Responsive — mobile-first refinements + large-screen scaling
   Breakpoints:
     ≥1440px  دسکتاپ بزرگ / مانیتور پهن
     ≤1100px  تبلت افقی
     ≤900px   تبلت
     ≤860px   منوی همبرگری فعال می‌شود
     ≤620px   موبایل
     ≤400px   موبایل کوچک
   =================================================================== */

/* ---------- دسکتاپ بزرگ و مانیتور پهن ---------- */
@media (min-width: 1440px) {
  :root { --container: 1280px; }
  .features-grid { gap: 30px; }
  .stats-grid { max-width: 780px; gap: 30px; }
}
@media (min-width: 1800px) {
  :root { --container: 1440px; }
  body { font-size: 17px; }
  .manager-inner { grid-template-columns: 440px 1fr; gap: 64px; }
}

/* ---------- تبلت افقی ---------- */
@media (max-width: 1100px) {
  .manager-inner { grid-template-columns: 320px 1fr; gap: 40px; }
}

/* ---------- تبلت ---------- */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .manager-inner { grid-template-columns: 1fr; gap: 30px; }
  .manager-photo { max-width: 360px; margin-inline: auto; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-symbols { grid-column: 1 / -1; }
}

/* ---------- تبلت عمودی / موبایل بزرگ ---------- */
@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    top: var(--header-h);
    inset-inline: 0;
    background: var(--surface);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-140%);
    transition: transform .28s ease;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 14px 22px; font-size: 16px; }
  .main-nav .nav-cta { margin: 8px 22px; text-align: center; }
  .nav-toggle { display: flex; }
}

/* ---------- موبایل ---------- */
@media (max-width: 620px) {
  .features-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; max-width: 420px; }
  .form-row { grid-template-columns: 1fr; gap: 16px; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-tag { max-width: none; margin-inline: auto; }
  .footer-logo { margin-inline: auto; }
  .social-icons { justify-content: center; }
  .footer-symbols { max-width: 360px; margin-inline: auto; justify-content: center; }
  .footer-contact { display: flex; flex-direction: column; align-items: center; }
  .signup-form { padding: 24px 18px; }

  /* دکمه‌های تمام‌عرض برای لمس راحت‌تر */
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .channels-btns { flex-direction: column; align-items: stretch; }
  .channels-btns .btn { width: 100%; }

  .advisor-card { width: 220px; }
}

/* ---------- موبایل کوچک ---------- */
@media (max-width: 400px) {
  :root { --header-h: 64px; }
  .brand-name { font-size: 17px; }
  .brand-logo { width: 40px; height: 40px; }
  .theme-toggle { width: 38px; height: 38px; }
  .btn { padding: 12px 20px; font-size: 14px; }
  .btn-lg { padding: 15px 32px; font-size: 16px; }
  .stat-card { padding: 26px 16px; }
  .feature-card { padding: 24px 20px; }
  .advisor-card { width: 200px; }
  .signup-form { padding: 20px 14px; }
}
