:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #eef4ff;
  --text: #122033;
  --muted: #627085;
  --primary: #2563eb;
  --primary-2: #14b8a6;
  --border: #d9e2ef;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.09);
  --radius: 22px;
  --radius-sm: 14px;
  --container: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Tahoma, Arial, sans-serif;
  direction: rtl;
  background: radial-gradient(circle at 15% 0%, #eaf2ff 0, rgba(234,242,255,0) 28%), var(--bg);
  color: var(--text);
  line-height: 1.9;
}

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

img { max-width: 100%; height: auto; }

.container {
  width: min(var(--container), calc(100% - 32px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  right: 12px;
  top: -80px;
  background: var(--text);
  color: white;
  padding: 8px 12px;
  border-radius: 10px;
  z-index: 100;
}

.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(217, 226, 239, 0.72);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo img { width: 172px; }

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: 9px 12px;
  font: inherit;
  cursor: pointer;
}

.nav-menu {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.nav-menu a {
  padding: 8px 12px;
  border-radius: 12px;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
  background: #edf4ff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn,
button.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  box-shadow: 0 12px 30px rgba(37, 99, 235, .24);
}

.btn-secondary {
  background: #eaf2ff;
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border);
}

.hero {
  padding: 72px 0 42px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 38px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  background: #edf4ff;
  border: 1px solid #d8e7ff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
}

h1, h2, h3 { line-height: 1.45; margin: 0 0 12px; }

h1 {
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -1px;
}

h2 { font-size: clamp(26px, 3vw, 38px); }

h3 { font-size: 21px; }

.lead {
  color: var(--muted);
  font-size: 18px;
  max-width: 720px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.stat strong {
  display: block;
  font-size: 24px;
  color: var(--primary);
}

.stat span { color: var(--muted); font-size: 13px; }

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 32px;
  box-shadow: var(--shadow);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.hero-card:before {
  content: "";
  position: absolute;
  inset: -80px auto auto -80px;
  width: 190px;
  height: 190px;
  background: rgba(20,184,166,.15);
  border-radius: 50%;
}

.rate-widget {
  position: relative;
  display: grid;
  gap: 14px;
}

.widget-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid var(--border);
}

.widget-row b { direction: ltr; }

.badge-up { color: #059669; }
.badge-down { color: #dc2626; }

.progress {
  height: 10px;
  border-radius: 99px;
  background: #e2e8f0;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: var(--value, 60%);
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

.section { padding: 62px 0; }
.section.compact { padding: 34px 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 22px;
  margin-bottom: 28px;
}

.section-head p { color: var(--muted); margin: 0; max-width: 720px; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}

.card p { color: var(--muted); margin: 0; }

.icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #edf4ff;
  color: var(--primary);
  font-size: 24px;
  margin-bottom: 14px;
}

.course-toolbar {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.search-box,
.select-box,
.input,
.textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
}

.search-box { max-width: 440px; }
.select-box { max-width: 220px; }

.course-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.tag {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 10px;
  background: #edf4ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.list-clean {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-clean li {
  display: flex;
  align-items: start;
  gap: 10px;
  padding: 8px 0;
  color: var(--muted);
}

.list-clean li:before {
  content: "✓";
  color: #059669;
  font-weight: 900;
}

.cta {
  background: linear-gradient(135deg, #12335f, #1d4ed8 55%, #14b8a6);
  color: white;
  border-radius: 34px;
  padding: 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: center;
  overflow: hidden;
}

.cta p { color: rgba(255,255,255,.82); margin: 0; }
.cta .btn { background: white; color: var(--primary); }

.page-title {
  padding: 56px 0 22px;
}

.breadcrumb {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}

.article h2 { margin-top: 28px; }
.article h2:first-child { margin-top: 0; }
.article p, .article li { color: var(--muted); }
.article code { direction: ltr; display: inline-block; background: #eef2f7; padding: 0 6px; border-radius: 7px; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 18px 20px;
  text-align: right;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  display: none;
  padding: 0 20px 18px;
  color: var(--muted);
}

.faq-item.open .faq-answer { display: block; }

.form {
  display: grid;
  gap: 14px;
}

.textarea { min-height: 140px; resize: vertical; }

.notice {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  padding: 14px;
  font-size: 14px;
}

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  margin-top: 40px;
  padding: 46px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 22px;
}

.site-footer h3 { color: #fff; font-size: 17px; }
.site-footer a { color: #cbd5e1; display: block; padding: 5px 0; }
.site-footer a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 28px;
  padding-top: 18px;
  color: #94a3b8;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.error-page {
  min-height: 72vh;
  display: grid;
  place-items: center;
  text-align: center;
}

@media (max-width: 900px) {
  .hero-grid, .grid-3, .grid-2, .footer-grid, .cta { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .section-head, .course-toolbar, .footer-bottom { align-items: stretch; flex-direction: column; }
  .search-box, .select-box { max-width: none; }
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    display: none;
    position: absolute;
    inset: 74px 16px auto 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 10px;
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
  }
  .nav-menu.open { display: flex; }
  .header-actions .btn { display: none; }
}

@media (max-width: 520px) {
  .hero { padding-top: 44px; }
  .card, .article, .cta, .hero-card { padding: 20px; border-radius: 20px; }
  .logo img { width: 150px; }
}
