:root {
    --bg: #f7f4ff;
    --bg-soft: #fcfbff;
    --panel: #ffffff;
    --panel-2: #f6f1ff;
    --line: #e9defd;
    --text: #24163f;
    --muted: #6f6585;
    --primary: #7c3aed;
    --primary-2: #9f67ff;
    --primary-soft: #efe5ff;
    --success: #16a34a;
    --shadow: 0 18px 45px rgba(86, 53, 165, .08);
    --shadow-soft: 0 10px 30px rgba(86, 53, 165, .05);
    --radius: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Cairo', "Segoe UI", Tahoma, Arial, sans-serif;
    background:
      radial-gradient(circle at top right, rgba(159,103,255,.14), transparent 22%),
      radial-gradient(circle at top left, rgba(124,58,237,.08), transparent 20%),
      linear-gradient(180deg, #faf8ff 0%, #f6f2ff 100%);
    color: var(--text);
}
body.ar { font-family: 'Cairo', "Segoe UI", Tahoma, Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
    position: sticky; top: 0; z-index: 20;
    background: rgba(250,248,255,.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.nav-wrap {
    display:flex; align-items:center; justify-content:space-between; min-height: 82px; gap:16px;
}
.brand { display:flex; align-items:center; gap:12px; }
.brand strong { display:block; font-size: 1.1rem; }
.brand small { display:block; color:var(--muted); margin-top:3px; }
.brand-mark {
    width: 48px; height: 48px; border-radius: 16px; display:grid; place-items:center; font-weight:700;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: var(--shadow-soft);
}
.nav-links { display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.nav-links a { color: var(--muted); font-weight: 600; }
.nav-links a:hover { color: var(--primary); }
.lang-switch { display:flex; gap:8px; }
.lang-switch a, .btn {
    border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px;
    display:inline-flex; align-items:center; justify-content:center;
    transition: .25s ease;
}
.lang-switch a { background: #fff; color: var(--text); font-weight: 700; }
.lang-switch a:hover { border-color: rgba(124,58,237,.35); color: var(--primary); }
.btn { cursor:pointer; font-weight:700; }
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 14px 30px rgba(124,58,237,.20);
}
.btn-outline { background: #fff; color: var(--text); }
.btn-outline:hover { border-color: rgba(124,58,237,.35); color: var(--primary); }
.btn-sm { padding: 10px 14px; }
.hero { padding: 64px 0 32px; }
.hero-grid { display:grid; grid-template-columns: 1.08fr .92fr; gap:30px; align-items:center; }
.card, .form-card, .metric, .dashboard-card, .trainer-card, .step-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.hero-copy h1 { font-size: clamp(2.15rem, 5vw, 4.3rem); line-height: 1.08; margin: 14px 0; letter-spacing: -.02em; }
.hero-copy p { font-size: 1.06rem; line-height: 1.95; color: var(--muted); max-width: 650px; }
.pill {
    display:inline-flex; padding:8px 12px; border-radius:999px; background:var(--primary-soft);
    border:1px solid rgba(124,58,237,.16); color: var(--primary); font-size:.95rem; font-weight: 700;
}
.hero-actions { display:flex; gap:12px; flex-wrap:wrap; margin-top:22px; }
.hero-panel { padding:24px; background: linear-gradient(180deg, #fff 0%, #fcfaff 100%); }
.search-grid, .features-grid, .stats-grid, .trainers-grid, .steps-grid, .footer-grid, .dashboard-grid {
    display:grid; gap:18px;
}
.search-grid { grid-template-columns: repeat(2, minmax(0,1fr)); align-items:end; }
.features-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.stats-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.trainers-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.steps-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.footer-grid { grid-template-columns: 1.5fr 1fr 1fr; padding: 38px 0 12px; }
.dashboard-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.section { padding: 28px 0 60px; }
.section-head { margin-bottom: 22px; }
.section-head h2 { font-size: 1.8rem; margin-bottom: 8px; }
.section-head p { color: var(--muted); }
.metric, .dashboard-card, .trainer-card, .step-card, .form-card { padding: 22px; }
.metric strong { display:block; font-size: 2rem; margin-bottom: 8px; color: var(--primary); }
.feature-icon {
    width: 52px; height: 52px; border-radius: 18px; margin-bottom: 12px;
    display:grid; place-items:center; font-size:1.1rem; background: var(--primary-soft); color: var(--primary);
}
.form-card form, .register-grid { display:grid; gap:16px; }
.register-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
label { display:grid; gap:8px; color:var(--text); font-weight:700; font-size:.96rem; }
input, select, textarea {
    width:100%; padding:14px 16px; border-radius: 14px; border:1px solid var(--line);
    background: #fff; color: var(--text); outline:none; font: inherit;
    transition: border-color .2s ease, box-shadow .2s ease;
}
input::placeholder, textarea::placeholder { color: #9a92aa; }
input:focus, select:focus, textarea:focus {
    border-color: rgba(124,58,237,.40);
    box-shadow: 0 0 0 4px rgba(124,58,237,.10);
}
textarea { min-height: 120px; resize: vertical; }
select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #7c3aed 50%), linear-gradient(135deg, #7c3aed 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-inline-end: 42px;
}
html[dir="rtl"] select {
    background-position: 18px calc(50% - 3px), 24px calc(50% - 3px);
    padding-inline-start: 42px;
    padding-inline-end: 16px;
}
.search-grid .btn { width: 100%; min-height: 50px; }
.search-helper { margin: 0 0 16px; color: var(--muted); }
.trainer-card img {
    width: 64px; height: 64px; border-radius: 18px; object-fit: cover; margin-bottom: 12px;
    background: #f2e9ff;
}
.muted { color: var(--muted); }
.site-footer { border-top:1px solid var(--line); margin-top: 40px; background: rgba(255,255,255,.55); }
.site-footer h4, .site-footer h3 { margin-top: 0; }
.site-footer li + li { margin-top: 10px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--primary); }
.footer-bottom {
    display:flex; justify-content:space-between; gap:12px; padding:20px 0 28px; color:var(--muted);
    border-top:1px solid var(--line);
}
.page-header { padding: 56px 0 16px; }
.page-header h1 { font-size: 2.4rem; margin:0 0 10px; }
.dashboard-top {
    display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:22px;
}
.badge { padding: 7px 10px; border-radius: 999px; background: rgba(22,163,74,.12); color: #15803d; font-size: .9rem; font-weight: 700; }
.table-box { overflow:auto; margin-top: 16px; }
table { width:100%; border-collapse: collapse; min-width: 640px; }
th, td { text-align:start; padding: 14px 12px; border-bottom:1px solid #f0ebfb; }
tr:hover { background: #faf8ff; }
.accordion-item { padding:18px 22px; margin-bottom:12px; }
.search-strip {
    display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-top: 16px;
}
.note-card {
    padding: 18px 20px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-soft);
}
@media (max-width: 980px) {
    .hero-grid, .features-grid, .stats-grid, .trainers-grid, .steps-grid, .footer-grid, .dashboard-grid, .search-grid, .register-grid, .search-strip { grid-template-columns: 1fr 1fr; }
    .nav-links { display:none; }
}
@media (max-width: 700px) {
    .hero-grid, .features-grid, .stats-grid, .trainers-grid, .steps-grid, .footer-grid, .dashboard-grid, .search-grid, .register-grid, .search-strip { grid-template-columns: 1fr; }
    .footer-bottom, .dashboard-top, .nav-wrap { flex-direction: column; align-items: flex-start; }
    .hero { padding-top: 40px; }
    .hero-copy h1 { font-size: 2.35rem; }
}