:root {
  --bg: #fffaf3;
  --surface: #ffffff;
  --surface-alt: #f4f6ff;
  --text: #1c2440;
  --muted: #67728a;
  --primary: #4f5de8;
  --primary-dark: #2f3cdf;
  --accent: #ff6b57;
  --success: #1fa971;
  --border: #e8dfd6;
  --shadow: 0 18px 40px rgba(34, 41, 62, 0.08);
}

.iq-preview{background:#f4f5ff}.iq-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.iq-cards article,.typing-panel{background:#fff;border:1px solid #e8e8f2;border-radius:15px;padding:20px}.iq-cards b{font-size:16px}.iq-cards p{color:#888fa5;font-size:12px}.typing-panel{margin-top:18px}.typing-panel h3{margin:0}.typing-panel p{background:#f7f7fc;padding:12px;font-size:13px}.typing-panel input{width:100%;padding:11px;border:1px solid #e5e6ef;border-radius:8px}.typing-panel div{color:#777d93;font-size:11px;margin-top:9px}.typing-panel strong{color:#6058e9}
.iq-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0}.iq-tabs button{border:1px solid #dfdff0;background:#fff;color:#777d93;border-radius:20px;padding:8px 14px;font-size:11px}.iq-tabs button.active,.iq-tabs button:hover{background:#6058e9;color:#fff;border-color:#6058e9}.iq-cards .btn{display:inline-block;margin:4px 3px 0 0;padding:7px 10px;font-size:10px}

body.dark {
  --bg: #101827;
  --surface: #1a2337;
  --surface-alt: #121e2d;
  --text: #edf3ff;
  --muted: #afb9d4;
  --primary: #8c9bff;
  --primary-dark: #6d7ef8;
  --accent: #ff8d78;
  --success: #34c98a;
  --border: #2a354c;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Cairo", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.section {
  padding: 90px 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid var(--border);
}

body.dark .site-header {
  background: rgba(16, 24, 39, 0.7);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.3rem;
}

.brand-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
}

.brand-name {
  display: grid;
  line-height: 1.05;
}

.brand-name strong {
  font-size: 1.18rem;
}

.brand-name small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #8c9bff);
  color: white;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.main-nav a {
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--muted);
  transition: 0.2s ease;
  font-weight: 600;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--primary);
  color: white;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-pill {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(79, 93, 232, 0.1);
  color: var(--primary);
  font-weight: 700;
  border: 1px solid rgba(79, 93, 232, 0.12);
}

.btn {
  border: none;
  background: var(--primary);
  color: white;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 14px 0 7px;
  border: 0;
  border-bottom: 3px solid #ffb648;
  border-radius: 10px;
  background: #1c2440;
  color: #fff;
  box-shadow: 0 5px 14px rgba(28, 36, 64, 0.18);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.language-toggle-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  color: #4f5de8;
  font-size: 1.15rem;
  line-height: 1;
}

.language-toggle:hover,
.language-toggle:focus-visible {
  transform: translateY(-1px);
  background: #303c68;
  box-shadow: 0 7px 18px rgba(28, 36, 64, 0.26);
  outline: 2px solid rgba(255, 182, 72, 0.4);
  outline-offset: 2px;
}

[lang="en"] .pricing-card li::before {
  margin-right: 8px;
  margin-left: 0;
}

.hero {
  padding: 60px 0 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  background: rgba(79, 93, 232, 0.08);
  color: var(--primary);
  border: 1px solid rgba(79, 93, 232, 0.15);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.2;
  margin: 0 0 18px;
}

.hero-copy h1 span {
  color: var(--primary);
}

.hero-copy p {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 18px;
}

.hero-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  color: var(--muted);
  font-weight: 600;
}

.hero-points li::before {
  content: "✓";
  color: var(--success);
  margin-left: 8px;
}

.showcase-card {
  background: linear-gradient(135deg, rgba(79, 93, 232, 0.1), rgba(255, 107, 87, 0.08));
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.showcase-card img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 22px;
}

.stats-grid,
.features-grid,
.courses-grid,
.pricing-grid,
.footer-grid,
.dashboard-grid,
.dashboard-panels {
  display: grid;
  gap: 22px;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-card,
.dashboard-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px 20px;
  box-shadow: var(--shadow);
}

.dashboard-card {
  display: grid;
  gap: 8px;
}

.dashboard-card strong {
  color: var(--text);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  line-height: 1.2;
}

.dashboard-card small,
.dashboard-label {
  color: var(--muted);
  font-weight: 600;
}

.accent-card {
  background: linear-gradient(135deg, rgba(79, 93, 232, 0.08), rgba(255, 107, 87, 0.05));
}

.accent-card .btn {
  margin-top: 8px;
}

.dashboard-panels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 26px;
}

.dashboard-panel h3 {
  margin: 0 0 18px;
  font-size: 1.45rem;
}

.progress-item {
  margin-bottom: 18px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-weight: 700;
}

.progress-bar {
  height: 12px;
  background: rgba(79, 93, 232, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #88a2ff);
}

.task-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
  color: var(--muted);
  font-weight: 600;
}

.task-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.task-dot.success { background: var(--success); }
.task-dot.info { background: var(--primary); }
.task-dot.warning { background: #ffb648; }
.task-dot.danger { background: var(--accent); }

.wide-panel {
  grid-column: 1 / -1;
}

.student-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 16px;
}

.student-table th,
.student-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: right;
}

.student-table thead th {
  background: rgba(79, 93, 232, 0.06);
  color: var(--primary);
}

.status {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.status.complete {
  background: rgba(31, 169, 113, 0.12);
  color: var(--success);
}

.status.active {
  background: rgba(79, 93, 232, 0.12);
  color: var(--primary);
}

.status.pending {
  background: rgba(255, 107, 87, 0.12);
  color: var(--accent);
}

.stat-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 18px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-item strong {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--primary);
}

.stat-item span {
  color: var(--muted);
  font-weight: 600;
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.muted-section {
  background: var(--surface-alt);
}

.courses-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.course-card,
.feature-card,
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px 22px;
  box-shadow: var(--shadow);
}

.course-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.course-card:hover {
  transform: translateY(-4px);
}

.icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-size: 2rem;
  margin-bottom: 18px;
}

.gradient-1 { background: linear-gradient(135deg, #ffd9d6, #fff0ea); }
.gradient-2 { background: linear-gradient(135deg, #ffe8b7, #fff7d8); }
.gradient-3 { background: linear-gradient(135deg, #d7f7e5, #ebfaf3); }
.gradient-4 { background: linear-gradient(135deg, #d9eafc, #eef7ff); }
.gradient-5 { background: linear-gradient(135deg, #dff7ea, #f0fcf5); }
.gradient-6 { background: linear-gradient(135deg, #f2d9ff, #faf3ff); }

.course-card h3,
.feature-card h3,
.pricing-card h3 {
  margin: 0 0 10px;
  font-size: 1.5rem;
}

.plan-tier {
  display: inline-flex;
  align-self: center;
  margin: 0 0 12px;
  padding: 6px 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  box-shadow: 0 4px 12px rgba(32, 37, 67, 0.1);
}

.pricing-starter {
  border-top: 5px solid #42a77b;
  background: linear-gradient(180deg, rgba(66, 167, 123, 0.08), var(--surface) 34%);
}

.pricing-starter .plan-tier {
  border-color: #b9e5d0;
  background: #e8f8ef;
  color: #24784f;
}

.pricing-plus {
  border-top: 5px solid #3299bd;
  background: linear-gradient(180deg, rgba(50, 153, 189, 0.09), var(--surface) 34%);
}

.pricing-plus .plan-tier {
  border-color: #b7e2ed;
  background: #e5f7fb;
  color: #176c8c;
}

.pricing-pro {
  border-top: 5px solid #5865e8;
  background: linear-gradient(180deg, rgba(88, 101, 232, 0.13), var(--surface) 38%);
}

.pricing-pro .plan-tier {
  border-color: #bbc2ff;
  background: linear-gradient(135deg, #5965e8, #8d6bf0);
  color: #fff;
  box-shadow: 0 6px 16px rgba(88, 101, 232, 0.28);
}

.pricing-premium {
  border-top: 5px solid #df6684;
  background: linear-gradient(180deg, rgba(223, 102, 132, 0.11), var(--surface) 34%);
}

.pricing-premium .plan-tier {
  border-color: #f1b5c4;
  background: linear-gradient(135deg, #ef829b, #d95778);
  color: #fff;
  box-shadow: 0 5px 14px rgba(192, 69, 104, 0.2);
}

.pricing-card h3 {
  color: var(--text);
}

.course-card p,
.feature-card p,
.pricing-card ul,
.site-footer p,
.site-footer li {
  color: var(--muted);
}

.badge {
  display: inline-flex;
  margin-top: 18px;
  padding: 6px 12px;
  background: rgba(31, 169, 113, 0.12);
  color: var(--success);
  border-radius: 999px;
  font-weight: 700;
}

.badge-alt {
  background: rgba(79, 93, 232, 0.12);
  color: var(--primary);
}

.features-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(79, 93, 232, 0.08);
  font-size: 2rem;
  margin-bottom: 14px;
}

.pricing-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.pricing-heading > p {
  margin: 8px 0 0;
  color: var(--muted);
}

.pricing-card.featured {
  border-color: rgba(79, 93, 232, 0.4);
  border-top-color: #5865e8;
  transform: translateY(-8px);
}

.popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

.price {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  font-weight: 800;
  color: var(--primary);
  margin: 14px 0 18px;
}

.plan-saving {
  min-height: 46px;
  display: grid;
  place-items: center;
  margin: 8px 0 18px;
  padding: 8px 10px;
  border: 1px solid #ccebdc;
  border-radius: 999px;
  background: #effaf4;
  color: #24784f;
  font-weight: 800;
  font-size: 0.92rem;
}

.price span {
  font-size: 1rem;
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  flex: 1;
  margin: 0 0 20px;
  display: grid;
  gap: 8px;
}

.pricing-card .btn {
  display: block;
  margin-top: auto;
}

.pricing-card .pricing-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 16px 9px 10px;
  border: 1px solid #25a85a;
  border-radius: 999px;
  background: #f0fbf4;
  color: #187a3e;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.pricing-card .pricing-whatsapp:hover,
.pricing-card .pricing-whatsapp:focus-visible {
  background: #168b49;
  border-color: #168b49;
  color: #fff;
  box-shadow: 0 6px 16px rgba(22, 139, 73, 0.22);
}

.pricing-whatsapp-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  border-radius: 50%;
  background: #25a85a;
  color: #fff;
}

.pricing-whatsapp-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.pricing-whatsapp:hover .pricing-whatsapp-icon,
.pricing-whatsapp:focus-visible .pricing-whatsapp-icon {
  background: #fff;
  color: #168b49;
}

.pricing-card li::before {
  content: "•";
  color: var(--success);
  margin-left: 8px;
}

.site-footer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0b1224 0%, #121b36 55%, #1d2450 100%);
  color: white;
  padding: 70px 0 22px;
  border-top: 1px solid rgba(151, 160, 255, .16);
}

.site-footer::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  left: -180px;
  top: -250px;
  background: rgba(99, 91, 255, .16);
  filter: blur(8px);
}

.site-footer::after {
  content: "</>";
  position: absolute;
  right: 7%;
  top: 24px;
  color: rgba(153, 143, 255, .16);
  font: 800 4rem/1 Consolas, monospace;
  transform: rotate(-8deg);
}

.footer-grid {
  position: relative;
  z-index: 1;
  grid-template-columns: 1.35fr .75fr 1fr;
  gap: 60px;
}

.footer-grid > div:first-child { max-width: 380px; }
.site-footer h3 { font-size: 1.35rem; letter-spacing: -.02em; }
.site-footer h3::before { content: "✦"; color: #9b93ff; margin-left: 9px; }
.site-footer h4 { color: #a9a5ff; font-size: .95rem; margin-bottom: 18px; }
.site-footer p, .site-footer li { color: #aeb9d8; line-height: 1.9; }
.site-footer a { color: #dbe0ff; transition: color .2s ease, padding .2s ease; }
.site-footer a:hover { color: #a9a5ff; padding-inline-start: 4px; }
.site-footer li { overflow-wrap: anywhere; }
.site-footer ul { gap: 10px; }
.copyright { position: relative; z-index: 1; margin-top: 50px; padding-top: 20px; color: #8793b6; }

@media (max-width: 720px) {
  .site-footer { padding-top: 48px; }
  .site-footer::after { right: 8%; top: 18px; font-size: 2.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid > div:first-child { max-width: none; }
  .copyright { margin-top: 34px; font-size: .82rem; }
}

.site-footer h3,
.site-footer h4 {
  margin-top: 0;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.copyright {
  text-align: center;
  margin-top: 28px;
  color: rgba(255, 255, 255, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 18px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.58);
  display: none;
  place-items: center;
  align-items: start;
  z-index: 99;
  padding: 16px;
  overflow-y: auto;
}

.modal.open {
  display: grid;
}

.modal-card {
  width: min(480px, 100%);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  margin-block: auto;
  background: var(--surface);
  border-radius: 24px;
  position: relative;
  padding: 28px 24px 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.close-modal {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(79, 93, 232, 0.1);
  color: var(--primary);
  cursor: pointer;
  font-size: 1.5rem;
}

.modal-card h3 {
  margin: 0 0 18px;
  font-size: 1.8rem;
}

.auth-forms {
  display: block;
}

.auth-card {
  align-content: start;
  gap: 14px;
}

.auth-card h4 {
  margin: 0;
  font-size: 1.25rem;
}

.modal-form {
  display: grid;
  gap: 14px;
}

.modal-form [hidden] {
  display: none;
}

.modal-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.modal-form input,
.modal-form select,
.modal-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
}

.modal-form textarea {
  min-height: 84px;
  resize: vertical;
  font: inherit;
}

.admin-login-toggle {
  justify-self: center;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.admin-login-toggle:hover,
.admin-login-toggle:focus-visible {
  text-decoration: underline;
}

.admin-login-form {
  max-width: 420px;
  margin: 8px auto 0;
}

.registration-status {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
  text-align: center;
}

.feedback-form {
  display: grid;
  width: min(820px, 100%);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
  margin-inline: auto;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(145deg, var(--surface), var(--surface-alt));
  box-shadow: 0 24px 60px rgba(32, 43, 91, .15);
}

.feedback-form label:nth-of-type(n + 3),
.feedback-form > button,
.feedback-form > .feedback-status {
  grid-column: 1 / -1;
}

.feedback-form label {
  display: grid;
  gap: 5px;
  color: var(--text);
  font-weight: 700;
}

.feedback-form textarea,
.feedback-form input,
.feedback-form select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 11px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.feedback-form textarea {
  min-height: 108px;
  max-height: 180px;
  resize: vertical;
}

.feedback-form textarea,
.feedback-form input,
.feedback-form select { border-radius: 13px; }
.feedback-form input,
.feedback-form select { min-height: 50px; }
.feedback-form input:focus,
.feedback-form select:focus,
.feedback-form textarea:focus { outline: 3px solid rgba(99, 91, 255, .2); border-color: var(--primary); }
.feedback-form > button { min-height: 52px; }

.feedback-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 47%, rgba(99, 91, 255, .09), transparent 48%);
}
.feedback-section .section-heading {
  max-width: 820px;
  margin: 0 auto 30px;
  text-align: center;
}
.feedback-section .section-heading h2 { margin-top: 4px; }
.feedback-section .section-heading > p { margin: 8px 0 0; color: var(--muted); }

.feedback-status {
  min-height: 1.5em;
  margin: 0;
  color: var(--success);
  font-weight: 700;
}

.feedback-status.is-error,
.feedback-empty.is-error {
  color: var(--accent);
}

.feedback-admin-list {
  display: grid;
  gap: 12px;
}

.feedback-admin-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-alt);
}

.feedback-admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feedback-rating {
  color: #e4a81d;
  letter-spacing: 0.08em;
}

.feedback-admin-card > strong {
  display: block;
  margin-top: 12px;
}

.feedback-admin-card p {
  margin: 10px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.feedback-admin-card time,
.feedback-empty {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.feedback-admin-card time {
  display: block;
}

[hidden] {
  display: none !important;
}

.language-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.language-tab {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.language-tab.active,
.language-tab:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.language-exams {
  display: grid;
  gap: 18px;
}

.exam-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.exam-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.exam-header h3 {
  margin: 0;
  font-size: 1.4rem;
}

.exam-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(79, 93, 232, 0.08);
  color: var(--primary);
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 700;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.question-card {
  background: rgba(79, 93, 232, 0.03);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
}

.question-card h4 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.question-card p {
  margin: 0 0 10px;
  color: var(--text);
  font-weight: 600;
}

.question-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.question-card li::before {
  content: "•";
  color: var(--primary);
  margin-left: 8px;
}

.iq-box {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.iq-box h4 {
  margin: 0 0 12px;
  font-size: 1.08rem;
}

.iq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.iq-item {
  background: rgba(255, 107, 87, 0.04);
  border: 1px solid rgba(255, 107, 87, 0.14);
  border-radius: 14px;
  padding: 12px;
}

.iq-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
}

.iq-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

.language-page-body {
  background: var(--bg);
}

.language-header {
  background: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.language-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
}

.language-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.language-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(79, 93, 232, 0.08);
  color: var(--primary);
  font-weight: 700;
}

.language-main {
  padding: 30px 0 80px;
}

.language-hero {
  background: linear-gradient(135deg, rgba(79, 93, 232, 0.08), rgba(255, 107, 87, 0.05));
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 30px 24px;
  margin-bottom: 24px;
}

.language-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.3rem);
}

.language-section {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px 20px;
  box-shadow: var(--shadow);
}

.language-section .section-heading {
  margin-bottom: 0;
}

.language-section h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.admin-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.admin-sidebar {
  background: #111827;
  color: white;
  padding: 28px 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.admin-brand .brand-logo {
  width: 52px;
  height: 52px;
  flex-basis: 52px;
}

.admin-brand strong {
  display: block;
  font-size: 1.3rem;
}

.admin-brand small {
  color: rgba(255, 255, 255, 0.7);
}

.admin-nav {
  display: grid;
  gap: 10px;
}

.admin-nav a {
  padding: 12px 14px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 700;
  transition: 0.2s ease;
}

.admin-nav a.active,
.admin-nav a:hover {
  background: rgba(79, 93, 232, 0.18);
  color: white;
}

.admin-side-card {
  margin-top: 30px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 18px;
}

.admin-side-card p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
}

.admin-main {
  padding: 28px 28px 40px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.admin-kicker {
  margin: 0 0 6px;
  color: var(--primary);
  font-weight: 700;
}

.admin-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 26px;
}

.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.stats-card {
  padding: 22px 20px;
  display: grid;
  gap: 8px;
}

.stats-card span {
  color: var(--muted);
  font-weight: 700;
}

.stats-card strong {
  font-size: clamp(1.8rem, 2.5vw, 2.5rem);
  line-height: 1.2;
}

.stats-card small {
  color: var(--muted);
}

.accent-card-admin {
  background: linear-gradient(135deg, rgba(79, 93, 232, 0.08), rgba(255, 107, 87, 0.06));
}

.admin-content-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 22px;
}

.admin-panel {
  padding: 22px 20px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.5rem;
}

.small-btn {
  padding: 10px 14px;
  font-size: 0.9rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table th,
.admin-table td {
  text-align: right;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
}

.admin-table thead th {
  color: var(--primary);
  font-size: 0.9rem;
}

.admin-data-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.student-list,
.payment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.student-list li,
.payment-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.student-list li div,
.payment-list li div {
  display: grid;
  gap: 4px;
}

.student-list span,
.payment-list span {
  color: var(--muted);
  font-size: 0.85rem;
}

.chip {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.chip.success {
  background: rgba(31, 169, 113, 0.15);
  color: var(--success);
}

.chip.info {
  background: rgba(79, 93, 232, 0.12);
  color: var(--primary);
}

.chip.warning {
  background: rgba(255, 182, 72, 0.12);
  color: #d99200;
}

.wide-panel {
  grid-column: 1 / -1;
}

.course-progress-list {
  display: grid;
  gap: 16px;
}

.course-progress-item {
  display: grid;
  gap: 8px;
}

@media (max-width: 1000px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    border-left: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .admin-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .admin-overview,
  .admin-content-grid {
    grid-template-columns: 1fr;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 900px) {
  .hero-grid,
  .courses-grid,
  .features-grid,
  .pricing-grid,
  .footer-grid,
  .dashboard-grid,
  .dashboard-panels {
    grid-template-columns: 1fr 1fr;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-wrap {
    flex-wrap: wrap;
    justify-content: center;
    padding: 12px 0;
  }

  .main-nav {
    justify-content: center;
  }

  .courses-grid,
  .features-grid,
  .pricing-grid,
  .footer-grid,
  .stats-grid,
  .dashboard-grid,
  .dashboard-panels {
    grid-template-columns: 1fr;
  }

  .showcase-card img {
    height: 300px;
  }

}

.language-hero p,
.language-section > .section-heading > p {
  color: var(--muted);
  margin: 8px 0 0;
}

.learning-card {
  margin-top: 20px;
  padding: clamp(18px, 4vw, 30px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.exam-intro,
.quiz-topline,
.quiz-actions,
.iq-level-row,
.typing-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.exam-intro strong {
  font-size: 1.2rem;
}

.exam-intro p,
.iq-challenge-heading p {
  margin: 4px 0 0;
  color: var(--muted);
}

.quiz-topline,
.iq-level-row {
  color: var(--muted);
  font-weight: 700;
}

.quiz-progress {
  height: 9px;
  overflow: hidden;
  margin: 16px 0 22px;
  border-radius: 99px;
  background: var(--surface-alt);
}

.quiz-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #8c9bff);
  transition: width 0.25s ease;
}

.question-kind {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: 99px;
  color: var(--primary);
  background: rgba(79, 93, 232, 0.1);
  font-size: 0.88rem;
  font-weight: 800;
}

.quiz-card h3,
.iq-question {
  margin: 15px 0 20px;
  line-height: 1.8;
}

.answer-options,
.iq-answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.answer-option,
.iq-answer {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-alt);
  color: var(--text);
  cursor: pointer;
  text-align: right;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.answer-option:hover,
.iq-answer:hover:not(:disabled) {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.answer-option:has(input:checked),
.iq-answer:hover:not(:disabled) {
  border-color: var(--primary);
  background: rgba(79, 93, 232, 0.1);
}

.answer-option input {
  accent-color: var(--primary);
}

.iq-answer:disabled {
  cursor: default;
  opacity: 0.72;
}

.fill-answer {
  display: grid;
  gap: 8px;
  max-width: 560px;
  font-weight: 700;
}

.fill-answer input,
.typing-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
}

.answer-feedback {
  margin: 16px 0;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
}

.answer-feedback.is-correct {
  color: var(--success);
  background: rgba(31, 169, 113, 0.1);
}

.answer-feedback.is-wrong {
  color: var(--accent);
  background: rgba(255, 107, 87, 0.1);
}

.quiz-actions {
  justify-content: flex-start;
  margin-top: 22px;
}

.exam-result {
  text-align: center;
}

.motion-games-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.motion-game-card {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: start;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.motion-game-card:hover,
.motion-game-card:focus-visible {
  border-color: var(--primary);
  background: var(--surface-alt);
  transform: translateX(-3px);
  outline: none;
}

.motion-game-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-alt);
  font-size: 1.55rem;
}

.motion-game-card strong {
  color: var(--text);
  font-size: 1.08rem;
}

.motion-controls {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.motion-game-description {
  margin: -4px 0 14px;
  color: var(--text-muted);
  text-align: center;
}

.motion-hint {
  margin: 16px 0 8px;
  color: var(--text);
  font-weight: 700;
  text-align: center;
}

.motion-play {
  max-width: 640px;
  margin-inline: auto;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}

.motion-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.motion-heading h3 {
  margin: 4px 0 0;
}

.games-section-link {
  color: inherit;
  text-decoration: none;
}

.games-section-link:hover,
.games-section-link:focus-visible {
  color: var(--primary);
  text-decoration: underline;
}

.motion-back-button {
  display: inline-flex;
  align-items: center;
  margin: -6px 0 12px;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-alt);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.motion-back-button:hover,
.motion-back-button:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
}

.motion-status {
  color: var(--text-muted);
  font-weight: 700;
  text-align: end;
}

.motion-board {
  display: grid;
  grid-template-columns: repeat(var(--motion-columns), minmax(0, 1fr));
  direction: ltr;
  width: min(100%, 430px);
  aspect-ratio: 1;
  gap: 4px;
  margin: 0 auto;
  padding: 7px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-alt);
}

.motion-cell {
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  border-radius: 8px;
  background: var(--surface);
  font-size: clamp(1rem, 4vw, 1.8rem);
}

.motion-cell.motion-wall {
  background: #66718a;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18);
}

.motion-cell.motion-player {
  background: #dff7ef;
}

.motion-cell.motion-goal {
  background: #fff1c9;
}

.motion-cell.motion-star {
  background: #fff6d9;
}

.motion-cell.motion-hazard {
  background: #ffe5e1;
}

.motion-controls {
  margin: 8px 0 0;
  text-align: center;
}

@media (max-width: 600px) {
  .motion-games-grid {
    gap: 7px;
  }

  .motion-game-card {
    min-height: 56px;
    padding: 7px 11px;
    gap: 11px;
  }

  .motion-game-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .motion-play {
    padding: 12px;
  }

  .motion-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .motion-status {
    text-align: start;
  }
}

/* Responsive layout for the language and admin pages. */
@media (max-width: 720px) {
  html, body { overflow-x: hidden; }
  .language-topbar { min-height: 68px; gap: 10px; padding-block: 10px; }
  .language-topbar .brand-name small { display: none; }
  .language-topbar .brand-name strong { font-size: 1rem; }
  .language-topbar .brand-logo { width: 40px; height: 40px; flex-basis: 40px; }
  .language-nav { width: 100%; gap: 7px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .language-nav a { flex: 0 0 auto; padding: 8px 11px; font-size: .78rem; }
  .language-main { padding: 18px 0 48px; }
  .language-hero { padding: 22px 16px; border-radius: 20px; }
  .language-hero h1 { font-size: clamp(1.8rem, 9vw, 2.6rem); line-height: 1.35; }
  .language-section { padding: 18px 14px; border-radius: 18px; }
  .admin-sidebar { padding: 18px 14px; }
  .admin-brand { margin-bottom: 16px; }
  .admin-nav { display: flex; overflow-x: auto; gap: 7px; padding-bottom: 2px; }
  .admin-nav a { flex: 0 0 auto; padding: 9px 11px; font-size: .78rem; }
  .admin-side-card { display: none; }
  .admin-main { padding: 20px 14px 32px; }
  .admin-header { gap: 12px; margin-bottom: 18px; }
  .admin-header h1 { font-size: clamp(1.75rem, 8vw, 2.4rem); }
  .admin-header-actions { width: 100%; }
  .admin-header-actions .btn { flex: 1; min-width: 0; }
  .admin-card, .admin-panel { min-width: 0; overflow: hidden; }
  .admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-table { min-width: 620px; }
}

@media (max-width: 380px) {
  .language-topbar .brand-name { display: none; }
  .admin-header-actions { flex-direction: column; align-items: stretch; }
  .admin-header-actions .btn { width: 100%; }
}

/* Header alignment fix */
@media (min-width: 901px) {
  .nav-wrap { display: grid; grid-template-columns: 145px minmax(0, 1fr) 350px; gap: 8px; }
  .brand { min-width: 0; }
  .brand-logo { width: 46px; height: 46px; flex-basis: 46px; }
  .brand-name strong { font-size: 1rem; }
  .main-nav { justify-content: center; gap: 0; flex-wrap: nowrap; min-width: 0; overflow: hidden; }
  .main-nav a { padding-inline: 7px; white-space: nowrap; font-size: .78rem; }
  .nav-actions { justify-content: flex-end; gap: 6px; flex-wrap: nowrap; white-space: nowrap; }
  .nav-actions .btn { padding: 10px 13px; font-size: .82rem; }
}

@media (min-width: 901px) and (max-width: 1120px) {
  .nav-wrap { gap: 8px; }
  .main-nav a { padding-inline: 7px; font-size: .82rem; }
  .nav-actions { gap: 5px; }
  .nav-actions .btn { padding-inline: 12px; }
  .language-toggle-label { display: none; }
}

.showcase-card img { width: 100%; min-height: 320px; object-fit: contain; padding: 28px; background: linear-gradient(145deg, #f4f1ff, #e2f7ff); }

/* Modern visual refresh — CodeKids Academy */
:root {
  --bg: #f7f9ff;
  --surface: #ffffff;
  --surface-alt: #eef2ff;
  --text: #17213d;
  --muted: #64708b;
  --primary: #635bff;
  --primary-dark: #453de0;
  --accent: #ff7a59;
  --border: #e4e8f5;
  --shadow: 0 22px 60px rgba(49, 61, 120, .12);
}

body {
  background: radial-gradient(circle at 8% 8%, rgba(99,91,255,.10), transparent 28rem), var(--bg);
}

.site-header {
  background: rgba(255,255,255,.82);
  box-shadow: 0 8px 30px rgba(50,64,120,.06);
}

.nav-wrap { min-height: 76px; }
.brand { gap: 10px; }
.brand-logo { filter: drop-shadow(0 7px 10px rgba(99,91,255,.2)); }
.main-nav a { border-radius: 999px; font-size: .92rem; }
.main-nav a:hover, .main-nav a.active { box-shadow: 0 8px 18px rgba(99,91,255,.22); }

.hero { padding: 92px 0 104px; position: relative; overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(2px); }
.hero::before { width: 360px; height: 360px; background: rgba(255,190,92,.18); top: -150px; left: -120px; }
.hero::after { width: 300px; height: 300px; background: rgba(99,91,255,.13); bottom: -160px; right: 5%; }
.hero-grid { gap: 68px; }
.hero-copy h1 { font-size: clamp(2.35rem, 4.4vw, 4.5rem); line-height: 1.15; letter-spacing: -.04em; }
.hero-copy h1 span { color: var(--primary); }
.hero-copy > p { max-width: 620px; font-size: 1.08rem; color: var(--muted); }
.eyebrow { padding: 7px 14px; border-radius: 999px; background: rgba(99,91,255,.10); color: var(--primary); font-weight: 800; }
.hero-actions { gap: 12px; }
.btn { border-radius: 999px; padding: 13px 22px; box-shadow: 0 10px 20px rgba(99,91,255,.18); }
.btn:hover { transform: translateY(-3px); box-shadow: 0 14px 25px rgba(99,91,255,.26); }
.btn-outline { box-shadow: none; }
.showcase-card { padding: 12px; border: 0; border-radius: 30px; background: linear-gradient(145deg, #fff, #e9edff); box-shadow: 0 30px 70px rgba(55,65,130,.20); transform: rotate(2deg); }
.showcase-card img { border-radius: 22px; }

.stats { padding-top: 30px; padding-bottom: 30px; }
.stats-grid { gap: 18px; border: 0; border-radius: 24px; background: transparent; box-shadow: none; }
.stat-item strong { color: var(--primary); }

/* Keep card positions consistent when switching between Arabic and English. */
.stats-grid, .courses-grid, .features-grid, .pricing-grid { direction: ltr; }
.stat-item, .course-card, .feature-card, .pricing-card { direction: rtl; }
html[lang="en"] .course-card,
html[lang="en"] .feature-card,
html[lang="en"] .pricing-card { direction: ltr; text-align: left; }
html[lang="en"] .stat-item { direction: ltr; }

body.dark .stats-grid { background: transparent; }
body.dark .stat-item { background: #1a2238; border-color: #303b5b; box-shadow: 0 18px 36px rgba(0,0,0,.22); }
.section-heading h2 { font-size: clamp(1.8rem, 3vw, 2.7rem); letter-spacing: -.03em; }
.section { padding-top: 70px; padding-bottom: 70px; }
.course-card, .feature-card, .pricing-card, .testimonial-card { border: 1px solid var(--border); border-radius: 24px; box-shadow: 0 12px 30px rgba(50,64,120,.06); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.course-card:hover, .feature-card:hover, .pricing-card:hover, .testimonial-card:hover { transform: translateY(-7px); border-color: rgba(99,91,255,.35); box-shadow: var(--shadow); }
.course-card .icon { border-radius: 18px; box-shadow: 0 12px 22px rgba(50,64,120,.12); }

@media (max-width: 900px) {
  .nav-wrap { flex-wrap: wrap; padding: 10px 0; }
  .main-nav { order: 3; width: 100%; justify-content: center; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; }
  .nav-actions { margin-inline-start: auto; }
  .hero { padding-top: 60px; }
  .hero-grid { gap: 36px; }
}

@media (max-width: 600px) {
  .container { width: min(100% - 24px, 1120px); }
  .nav-actions .btn-outline { display: none; }
  .brand-name { display: none; }
  .hero { padding: 52px 0 70px; }
  .hero-copy h1 { font-size: 2.25rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { text-align: center; }
  .showcase-card { transform: none; }
  .stats-grid { grid-template-columns: 1fr; gap: 12px; padding: 0; }
  .feedback-form { grid-template-columns: 1fr; gap: 14px; padding: 20px; }
  .feedback-form label,
  .feedback-form label:nth-of-type(n + 3),
  .feedback-form > button,
  .feedback-form > .feedback-status { grid-column: 1; }
  .feedback-form textarea { min-height: 96px; }
}

.exam-result .learning-emoji {
  font-size: 3rem;
}

.exam-result h3 {
  margin: 4px 0;
}

.exam-result p {
  color: var(--muted);
}

.iq-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}

.iq-tab {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.iq-tab.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.iq-challenge-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.learning-emoji {
  font-size: 2.2rem;
  line-height: 1.2;
}

.iq-challenge-heading h3 {
  margin: 0;
}

.iq-challenge .iq-level-row {
  margin-top: 24px;
}

.iq-question {
  margin: 20px 0 16px;
  font-size: 1.12rem;
}

.iq-next {
  margin-top: 18px;
}

.iq-complete {
  padding: 12px 0 4px;
  text-align: center;
}

.iq-complete p,
.typing-complete {
  color: var(--success);
  font-weight: 800;
}

.typing-target {
  margin: 18px 0 12px;
  padding: 20px;
  overflow-wrap: anywhere;
  border-radius: 12px;
  background: var(--surface-alt);
  color: var(--primary);
  font-family: Consolas, monospace;
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  font-weight: 700;
  line-height: 2;
  text-align: left;
  white-space: pre-wrap;
}

.typing-target span {
  border-radius: 4px;
}

.typing-target .typed-character {
  color: var(--success);
}

.typing-target .current-character {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 93, 232, 0.2);
}

.typing-input {
  min-height: 100px;
  resize: vertical;
  font-family: Consolas, monospace;
  font-size: 1.05rem;
  text-align: left;
}

.typing-stats {
  justify-content: flex-start;
  margin-top: 12px;
  color: var(--muted);
}

.typing-stats strong {
  color: var(--primary);
}

.typing-feedback {
  min-height: 28px;
  color: var(--muted);
}

.maze-board {
  display: grid;
  gap: 5px;
  width: min(100%, 390px);
  margin: 18px auto;
  padding: 10px;
  border: 2px solid var(--border);
  border-radius: 18px;
  background: var(--surface-alt);
}

.maze-row {
  display: grid;
  grid-template-columns: repeat(var(--maze-columns), minmax(0, 1fr));
  gap: 5px;
}

.maze-tile {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 9px;
  background: var(--surface);
  font-size: clamp(1.1rem, 5vw, 1.8rem);
}

.maze-tile.maze-wall {
  background: #9bd187;
}

.maze-tile.maze-star {
  background: #fff4cd;
}

.maze-tile.maze-goal {
  background: #e9e4ff;
}

.maze-tile.maze-player {
  background: rgba(79, 93, 232, 0.14);
  outline: 2px solid var(--primary);
}

.maze-feedback {
  min-height: 28px;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.maze-controls {
  display: grid;
  grid-template-columns: repeat(3, 56px);
  justify-content: center;
  gap: 7px;
  margin: 16px auto;
}

.maze-control {
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-alt);
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
}

.maze-control:hover {
  border-color: var(--primary);
  background: rgba(79, 93, 232, 0.1);
}

.maze-up {
  grid-column: 2;
}

.maze-up + .maze-control {
  grid-column: 1;
  grid-row: 2;
}

.maze-control[data-maze-move="down"] {
  grid-column: 2;
  grid-row: 2;
}

.maze-control[data-maze-move="right"] {
  grid-column: 3;
  grid-row: 2;
}

body.dark .answer-option,
body.dark .iq-answer,
body.dark .typing-target {
  background: var(--surface-alt);
}

@media (max-width: 600px) {
  .language-section {
    padding: 20px 14px;
  }

  .exam-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .answer-options,
  .iq-answers {
    grid-template-columns: 1fr;
  }

  .iq-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .iq-tabs .iq-tab {
    min-width: 0;
  }

  .iq-tab {
    padding: 9px 8px;
    font-size: 0.83rem;
  }
}
