/* ==========================================
Reset
========================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

:root {
  --primary: #f59e0b;
  --primary-dark: #e67e22;
  --primary-light: rgba(245, 158, 11, 0.15);
  --primary-glow: rgba(245, 158, 11, 0.3);

  --bg-dark: #0f172a;
  --bg-card-dark: #1e293b;
  --bg-light: #f8fafc;
  --bg-card-light: #ffffff;

  --text-light: #f1f5f9;
  --text-dark: #0f172a;
  --text-gray-dark: #94a3b8;
  --text-gray-light: #64748b;

  --border-dark: rgba(245, 158, 11, 0.25);
  --border-light: rgba(0, 0, 0, 0.08);

  --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-light: 0 10px 30px rgba(0, 0, 0, 0.08);

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
Keyframes
========================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(-50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes typing-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes cardHoverGlow {
  0% { box-shadow: 0 10px 30px rgba(245, 158, 11, 0.1); }
  50% { box-shadow: 0 20px 50px rgba(245, 158, 11, 0.2); }
  100% { box-shadow: 0 10px 30px rgba(245, 158, 11, 0.1); }
}

@keyframes iconBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes contentSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1.2em;
  background-color: var(--primary);
  margin-right: 4px;
  animation: typing-cursor 0.7s infinite;
}

/* ==========================================
Body
========================================== */
body {
  font-family: 'Cairo', sans-serif;
  line-height: 1.6;
  direction: rtl;
  background: linear-gradient(135deg, #0f172a 0%, #0a0f1c 100%);
  color: var(--text-light);
  overflow-x: hidden;
  transition: var(--transition);
}

body.light-mode {
/* كهرماني أغمق = نصوص مقروءة وأنيقة على الخلفية الفاتحة */
--primary: #d97706;
--primary-dark: #b45309;
--primary-light: rgba(245, 158, 11, 0.12);
--primary-glow: rgba(217, 119, 6, 0.22);

--bg-card-dark: #ffffff;
--text-light: #0f172a;
--text-gray-dark: #475569;
--border-dark: rgba(180, 83, 9, 0.15);
--border-light: rgba(15, 23, 42, 0.08);
--shadow-dark: 0 12px 32px rgba(15, 23, 42, 0.08);
--shadow-light: 0 6px 18px rgba(15, 23, 42, 0.06);

/* خلفية "شروق": قاعدة عاجية دافئة + هالات ضوئية ناعمة ثابتة */
background:
  radial-gradient(900px 480px at 88% -10%, rgba(245, 158, 11, 0.16), transparent 60%),
  radial-gradient(760px 420px at -12% 28%, rgba(59, 130, 246, 0.10), transparent 60%),
  radial-gradient(1000px 620px at 50% 112%, rgba(217, 119, 6, 0.10), transparent 65%),
  linear-gradient(135deg, #fdfcf7 0%, #f6f1e8 100%);
background-attachment: fixed;
}

img {
  max-width: 100%;
  display: block;
}

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

button,
input,
textarea {
  font-family: inherit;
}

section[id] {
 scroll-margin-top: -17px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================
Navbar
========================================== */
.navbar {
position: fixed;
top: 0;
left: 0;
right: 0;
width: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 15px 0;
  transition: var(--transition);
  animation: fadeInDown 0.6s ease-out;
}

body.light-mode .navbar {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.navbar.scrolled {
  padding: 10px 0;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body.light-mode .navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo img {
  height: 40px;
  width: auto;
  vertical-align: middle;
  border-radius: 10px;
}

.logo span {
  color: var(--text-light);
}

.nav-menu {
  display: flex;
  gap: 18px;
  list-style: none;
  align-items: center;
}

.nav-link {
  color: var(--text-gray-dark);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 600;
  font-size: 15px;
  position: relative;
  padding: 5px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.hamburger {
display: none;
cursor: pointer;
flex-shrink: 0;
position: relative;
z-index: 1001;
background: none;
border: none;
padding: 6px;
font: inherit;
color: inherit;
}

.hamburger:focus-visible {
outline: 2px solid var(--primary);
outline-offset: 3px;
border-radius: 6px;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  transition: var(--transition);
  background-color: var(--text-light);
  border-radius: 999px;
}

body.light-mode .hamburger .bar {
  background-color: var(--text-dark);
}

.hamburger.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ==========================================
Theme switch (ثابت لا ينضغط على الشاشات الضيقة)
========================================== */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  flex-shrink: 0;              /* ✅ لا ينضغط داخل شريط التنقل */
}
.theme-switch {
  display: inline-block;
  height: 30px;
  position: relative;
  width: 60px;
  flex-shrink: 0;              /* ✅ سرّ إصلاح المشكلة على بعض الهواتف */
}
.theme-switch input {
  display: none;
}
.slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.4s;
}
body.light-mode .slider {
  background-color: #cbd5e1;
}
.slider i {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  z-index: 1;
  color: #f1f5f9;
  transition: color 0.4s;
}
body.light-mode .slider i {
  color: #0f172a;
}
/* الشمس يسار والهلال يمين (مواضع فيزيائية ثابتة) */
.slider .fa-sun  { left: 15px; }
.slider .fa-moon { left: 45px; }
/* الدائرة البرتقالية: افتراضياً فوق الهلال = الوضع الليلي */
.slider:before {
  content: "";
  position: absolute;
  top: 4px;
  left: 34px;
  width: 22px;
  height: 22px;
  background-color: var(--primary);
  border-radius: 50%;
  z-index: 0;
  transition: transform 0.4s;
}
/* الوضع النهاري (checked): تتحرك الدائرة لتتمركز فوق الشمس */
input:checked + .slider:before {
  transform: translateX(-30px);
}

/* ==========================================
Buttons
========================================== */
.btn {
  padding: 14px 32px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  animation: scaleUp 0.6s ease-out;
}

.btn-primary {
  background: var(--primary);
  color: #0f172a;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-primary:active {
  transform: scale(0.98);
}

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

.btn-outline:hover {
  background: var(--primary);
  color: #0f172a;
  transform: translateY(-3px);
}

.btn-outline:active {
  transform: scale(0.98);
}

.section-cta {
  text-align: center;
  margin-top: 35px;
}

/* ==========================================
Hero
========================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.3;
  /* تأثير الكتابة: يُخفى العنوان حتى يبدأ المؤثر (كالإصدار السابق)
     وnoscript في index.html يضمن ظهوره لمحركات البحث ومن بلا JS */
  min-height: 120px;
  visibility: hidden;
}

.hero-title.typing-started {
  visibility: visible;
}

.highlight {
  color: var(--primary);
  position: relative;
  display: inline-block;
}

.highlight::after {
  content: '';
  position: absolute;
  bottom: 5px;
  right: 0;
  width: 100%;
  height: 8px;
  background: var(--primary-light);
  z-index: -1;
  border-radius: 10px;
}

.hero-description {
  font-size: 18px;
  color: var(--text-gray-dark);
  line-height: 1.8;
  animation: slideInRight 0.8s ease-out 0.1s both;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  margin: 30px 0 40px;
  animation: slideInRight 0.8s ease-out 0.2s both;
}

.hero-stats {
  display: flex;
  gap: 40px;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.stat {
  text-align: center;
  animation: fadeInUp 0.6s ease-out backwards;
}

.stat:nth-child(1) { animation-delay: 0.4s; }
.stat:nth-child(2) { animation-delay: 0.5s; }
.stat:nth-child(3) { animation-delay: 0.6s; }

.stat-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
}

.stat-label {
  font-size: 14px;
  color: var(--text-gray-dark);
}

/* صور الهيرو - نفس المقاسات القديمة */
.hero-images-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

.hero-main-image {
  max-width: 50%;
  height: auto;
  border-radius: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
  margin-right: 29%;
  animation: slideInLeft 0.8s ease-out;
}

.hero-main-image:hover {
  transform: translateY(-8px) scale(1.02);
}

.app-screenshot-feature {
  text-align: center;
  width: 100%;
  margin-top: 20px;
}

.app-screenshot-feature img {
  max-width: 30%;
  height: auto;
  margin: 0 auto;
  border-radius: 25px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  transition: var(--transition);
}

.app-screenshot-feature img:hover {
  transform: scale(1.05);
}

/* ==========================================
Section headers
========================================== */
.section-header {
  text-align: center;
  margin-bottom: 60px;
  animation: fadeInDown 0.8s ease-out;
}

.section-header h1,
.section-header h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 15px;
}

.section-header p {
  font-size: 18px;
  color: var(--text-gray-dark);
}

/* ==========================================
Features
========================================== */
.features,
.courses,
.smart-path,
.ai-speaking,
.notifications,
.gallery,
.contact {
  padding: 80px 0;
}

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

.feature-card {
  background: var(--bg-card-dark);
  border-radius: 24px;
  padding: 25px 15px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--border-dark);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.1), transparent);
  transition: right 0.6s ease;
}

.feature-card:hover::before {
  right: 100%;
}

.feature-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(245, 158, 11, 0.15);
  animation: cardHoverGlow 0.8s ease-in-out;
}

.feature-card:hover .feature-icon i {
  transform: scale(1.15) rotate(-10deg);
  animation: iconBounce 0.6s ease-in-out;
}

.feature-card:hover h3 {
  color: var(--primary);
  animation: contentSlideIn 0.4s ease;
}

.feature-card:hover p {
  animation: contentSlideIn 0.4s ease 0.1s both;
}

.feature-icon {
  width: 65px;
  height: 65px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
}

.feature-icon i {
  font-size: 32px;
  color: var(--primary);
  transition: var(--transition);
}

.feature-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-gray-dark);
  line-height: 1.7;
}

/* ==========================================
Courses
========================================== */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.course-card {
  background: var(--bg-card-dark);
  border-radius: 24px;
  padding: 25px 18px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--border-dark);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.course-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.1), transparent);
  transition: right 0.6s ease;
}

.course-card:hover::before {
  right: 100%;
}

.course-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(245, 158, 11, 0.15);
  animation: cardHoverGlow 0.8s ease-in-out;
}

.course-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: 50%;
}

.course-icon i {
  font-size: 30px;
  color: var(--primary);
}

.course-card h3 {
  font-size: 19px;
  margin-bottom: 10px;
}

.course-card > p {
  color: var(--text-gray-dark);
  line-height: 1.7;
  margin-bottom: 16px;
}

.course-levels {
  list-style: none;
  margin: 0 0 18px;
  display: grid;
  gap: 8px;
  text-align: right;
}

.course-levels li {
  color: var(--text-gray-dark);
  font-size: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.course-levels i {
  color: var(--primary);
  font-size: 13px;
}

.course-card .btn {
  margin-top: auto;
  width: 100%;
}

/* ==========================================
Smart path
========================================== */
.smart-path-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.smart-path-card {
  background: var(--bg-card-dark);
  border-radius: 24px;
  padding: 28px 18px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--border-dark);
  position: relative;
  overflow: hidden;
}

.smart-path-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.1), transparent);
  transition: right 0.6s ease;
}

.smart-path-card:hover::before {
  right: 100%;
}

.smart-path-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 18px 35px rgba(245, 158, 11, 0.12);
}

.smart-path-card i {
  font-size: 42px;
  color: var(--primary);
  margin-bottom: 16px;
  display: inline-block;
}

.smart-path-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.smart-path-card p {
  color: var(--text-gray-dark);
  line-height: 1.7;
}

/* ==========================================
AI Phone Chat - بشكل هاتف حقيقي
========================================== */
.ai-phone {
  width: 375px;
  max-width: 100%;
  height: 760px;
  margin: 0 auto;
  background: #0b1220;
  border: 10px solid #1e293b;
  border-radius: 44px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
}

.ai-phone-notch {
  width: 130px;
  height: 20px;
  background: #1e293b;
  border-radius: 0 0 14px 14px;
  margin: 0 auto;
  flex-shrink: 0;
}

.ai-phone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #0b1220;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
}

.ai-phone-header h3 {
  font-size: 17px;
}

.ai-back,
.ai-call {
  color: var(--primary);
  font-size: 17px;
}

.ai-topics {
  padding: 12px 14px 4px;
  background: #0b1220;
}

.ai-topics-label {
  color: #94a3b8;
  font-size: 12px;
  display: block;
  margin-bottom: 8px;
}

.ai-topics-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.ai-topics-list::-webkit-scrollbar {
  height: 4px;
}

.ai-topic-btn {
  flex-shrink: 0;
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
  color: var(--primary);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.ai-topic-btn:hover,
.ai-topic-btn.active {
  background: var(--primary);
  color: #0f172a;
}

.ai-chat {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #0b1220;
}

.ai-chat::-webkit-scrollbar {
  width: 5px;
}

.ai-chat::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.4);
  border-radius: 10px;
}

.ai-placeholder {
  align-self: center;
  margin: auto;
  color: #64748b;
  font-size: 13px;
  background: #101a2c;
  padding: 10px 18px;
  border-radius: 999px;
  text-align: center;
}

.task-banner {
  align-self: stretch;
  background: #101a2c;
  border: 1px dashed rgba(245, 158, 11, 0.5);
  border-radius: 16px;
  padding: 12px 14px;
  color: #f1f5f9;
  font-size: 13px;
  line-height: 1.8;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  animation: fadeInUp 0.4s ease-out;
}

.task-banner i {
  color: var(--primary);
  margin-top: 3px;
}

.listening-bubble {
  align-self: flex-start;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  animation: fadeInUp 0.3s ease-out;
}

.listening-bubble i {
  color: #ef4444;
  animation: pulse 1s infinite;
}

.chat-bubble {
  max-width: 88%;
  border-radius: 18px;
  padding: 14px 16px;
  line-height: 1.7;
  animation: fadeInUp 0.4s ease-out;
}

.user-bubble {
  align-self: flex-start;
  background: var(--primary);
  color: #0f172a;
  border-top-right-radius: 6px;
}

.user-bubble .en {
  direction: ltr;
  text-align: left;
  font-weight: 600;
}

.user-bubble .ar {
  color: rgba(15, 23, 42, 0.75);
  font-size: 13px;
  margin-top: 6px;
}

.ai-bubble {
  align-self: flex-end;
  background: #1e293b;
  color: #f1f5f9;
  border-top-left-radius: 6px;
}

.ai-bubble .en {
  direction: ltr;
  text-align: left;
}

.ai-bubble .ar {
  color: #94a3b8;
  font-size: 13px;
  margin-top: 6px;
}

.bubble-speak {
  margin-top: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--primary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}

.bubble-speak:hover {
  background: var(--primary);
  color: #0f172a;
}

.ai-suggestion {
  margin-top: 10px;
  background: #0b1220;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 12px;
  color: #facc15;
  cursor: pointer;
  direction: ltr;
  text-align: left;
  transition: var(--transition);
}

.ai-suggestion:hover {
  background: #16233a;
}

.eval-card {
  align-self: stretch;
  background: #101a2c;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 18px;
  padding: 16px;
  color: #f1f5f9;
  animation: fadeInUp 0.4s ease-out;
}

.eval-title {
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.eval-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  text-align: center;
  margin-bottom: 14px;
}

.m-label {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  margin-bottom: 4px;
}

.m-value {
  color: #4ade80;
  font-weight: 800;
}

.eval-block h4 {
  margin: 12px 0 6px;
  font-size: 14px;
}

.eval-block p {
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.8;
}

.eval-block ul {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
}

.eval-notes li {
  color: #cbd5e1;
  direction: rtl;
  text-align: right;
  font-size: 13px;
  line-height: 1.8;
}

.eval-notes li::before {
  content: '• ';
  color: var(--primary);
}

.eval-alts li {
  color: var(--primary);
  direction: ltr;
  text-align: left;
  font-size: 13px;
  line-height: 1.8;
}

.eval-alts li::before {
  content: '• ';
}

.eval-corrected {
  direction: ltr;
  text-align: left;
  color: #4ade80 !important;
  font-weight: 700;
}

.pron-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  direction: ltr;
  justify-content: flex-start;
}

.pron-chip {
  border: 1px solid rgba(74, 222, 128, 0.5);
  color: #4ade80;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 12px;
  text-align: center;
  direction: ltr;
}

.pron-chip small {
  display: block;
  font-size: 10px;
}

.ai-input-bar {
display: flex;
align-items: center;
gap: 10px;
padding: 12px 14px;
margin: 0;            /* ✅ إزالة الهامش السالب الذي يزحزح الشريط لليسار ويقصّ زر الإرسال */
width: 100%;
flex-shrink: 0;
background: #1e293b;
border-top: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 0 0 34px 34px;
}

.ai-input-wrap {
flex: 1;
min-width: 0;              /* ✅ يسمح للحقل بالانكماش فلا يُقصّ زر الإرسال */
display: flex;
align-items: center;
gap: 8px;
  background: #0b1220;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 10px 16px;
}

.ai-input-wrap input {
flex: 1;
min-width: 0;
width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #f1f5f9;
  font-size: 14px;
}

.ai-input-wrap input:disabled {
  opacity: 0.5;
}

.ai-bolt {
  color: var(--primary);
}

.ai-mic {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: #3f3a2d;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.ai-mic:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ai-mic.recording {
  background: #ef4444;
  color: white;
  animation: pulse 1s infinite;
}

.ai-send {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #0f172a;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.ai-send:hover:not(:disabled) {
  background: var(--primary-dark);
}

.ai-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ai-send,
.ai-mic {
display: flex;
align-items: center;
justify-content: center;
}
.ai-send i {
transform: rotate(273deg);
font-size: 21px;
padding: 0;
}

.ai-hint {
  max-width: 560px;
  margin: 30px auto 0;
  text-align: center;
  color: var(--text-gray-dark);
  font-size: 14px;
  line-height: 1.9;
  background: var(--primary-light);
  border: 1px solid var(--border-dark);
  border-radius: 18px;
  padding: 14px 18px;
}

.ai-hint i {
  color: var(--primary);
  margin-left: 6px;
}

/* ==========================================
Notifications
========================================== */
.notifications-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-bottom: 35px;
}

.notification-card {
  background: var(--bg-card-dark);
  border-radius: 24px;
  padding: 28px 18px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--border-dark);
  position: relative;
  overflow: hidden;
}

.notification-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.1), transparent);
  transition: right 0.6s ease;
}

.notification-card:hover::before {
  right: 100%;
}

.notification-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 18px 35px rgba(245, 158, 11, 0.12);
}

.notification-card i {
  font-size: 42px;
  color: var(--primary);
  margin-bottom: 16px;
  display: inline-block;
}

.notification-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.notification-card p {
  color: var(--text-gray-dark);
  line-height: 1.7;
}

.daily-card {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-card-dark);
  border: 1px solid var(--border-dark);
  border-radius: 30px;
  padding: 35px 25px;
}

.daily-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 18px;
}

.daily-word {
  font-size: 46px;
  color: var(--primary);
  margin-bottom: 8px;
}

.daily-word-meaning {
  font-size: 22px;
  color: var(--text-gray-dark);
  margin-bottom: 22px;
}

.daily-sentence {
  background: var(--primary-light);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 24px;
}

.daily-sentence p:first-child {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
  direction: ltr;
}

.daily-sentence p:last-child {
  color: var(--text-gray-dark);
}

/* ==========================================
Levels - نفس الشكل القديم
========================================== */
.levels {
  padding: 80px 0;
  background: rgba(0, 0, 0, 0.3);
}

body.light-mode .levels {
  background: rgba(255, 255, 255, 0.35);
}

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

.level-card {
  background: var(--bg-card-dark);
  border-radius: 24px;
  padding: 20px 15px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.level-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 5px;
  background: var(--primary);
  transition: var(--transition);
}

.level-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(245, 158, 11, 0.1);
}

.level-card:hover .level-icon {
  transform: scale(1.1) rotate(10deg);
  transition: var(--transition);
}

.level-icon {
  font-size: 42px;
  color: var(--primary);
  margin-bottom: 12px;
  transition: var(--transition);
}

.level-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.level-card p {
  color: var(--text-gray-dark);
}

.level-progress {
  margin-top: 20px;
}

.level-lessons-count {
  background: var(--primary-light);
  border-radius: 30px;
  padding: 6px 18px;
  display: inline-block;
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
}

/* ==========================================
Gallery
========================================== */
.gallery-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

.gallery-item {
  flex: 0 1 auto;
  max-width: 17%;
  min-width: 80px;
}

.gallery-item img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
  animation: scaleUp 0.6s ease-out;
}

.gallery-item img:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* ==========================================
Stats
========================================== */
.stats-section {
  padding: 100px 0;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.stats-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  text-align: center;
}

.stats-card {
  color: white;
  animation: countUp 0.6s ease-out;
}

.stats-icon i {
  font-size: 55px;
  margin-bottom: 15px;
  transition: var(--transition);
}

.stats-icon {
  animation: pulse 0.6s ease-in-out 0.3s both;
}

.stats-number {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 10px;
}

.stats-text {
  font-size: 18px;
  font-weight: 600;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* ==========================================
Download - في الوسط
========================================== */
.download {
  padding: 80px 0;
  text-align: center;
}

.download-content h2 {
  font-size: 36px;
  margin-bottom: 20px;
}

.download-content p {
  font-size: 18px;
  color: var(--text-gray-dark);
  margin-bottom: 30px;
}

.download-app-screenshot {
  text-align: center;
  margin-bottom: 30px;
}

.download-app-screenshot img {
  max-width: 19%;
  height: auto;
  margin: 0 auto;
  border-radius: 30px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  transition: var(--transition);
  animation: fadeInUp 0.8s ease-out;
}

.download-app-screenshot img:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
}

.download-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.download-btn {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 28px;
  border-radius: 60px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 600;
  width: auto;
  min-width: 267px;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  animation: scaleUp 0.6s ease-out;
  border: none;
  cursor: pointer;
}

.download-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

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

.download-btn i {
  font-size: 32px;
}

.btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.btn-text span {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.85;
  letter-spacing: 0.5px;
}

.btn-text strong {
  font-size: 18px;
  font-weight: 700;
}

.google-play {
  background: #1a1a1a;
  color: white;
}

.google-play i {
  color: #f9ab00;
}

.app-store {
  background: #000000;
  color: white;
}

.app-store i {
  color: white;
}

.direct {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #0f172a;
}

.direct i {
  color: #0f172a;
}

.qr-code {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.qr-code img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  border-radius: 20px;
  background: white;
  padding: 10px;
  box-shadow: var(--shadow-dark);
}

/* ==========================================
Contact
========================================== */
.contact-wrapper {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px;
}

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

.info-card {
  background: var(--bg-card-dark);
  border-radius: 20px;
  padding: 25px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--border-dark);
}

.info-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.info-card i {
  font-size: 40px;
  color: var(--primary);
  margin-bottom: 15px;
}

.info-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.info-card p {
  font-size: 14px;
  color: var(--text-gray-dark);
  direction: ltr;
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea,
.newsletter input {
  width: 100%;
  padding: 15px 18px;
  background: var(--bg-card-dark);
  border: 1px solid var(--border-dark);
  border-radius: 16px;
  color: var(--text-light);
  font-family: inherit;
  font-size: 15px;
  transition: var(--transition);
}

body.light-mode .contact-form input,
body.light-mode .contact-form textarea,
body.light-mode .newsletter input {
  background: #ffffff;
  color: #0f172a;
}

.contact-form input:focus,
.contact-form textarea:focus,
.newsletter input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.contact-form textarea {
  resize: vertical;
}

/* ==========================================
Footer
========================================== */
.footer {
  background: var(--bg-card-dark);
  padding: 60px 0 25px;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.footer-logo img {
  height: 35px;
  width: auto;
  vertical-align: middle;
  border-radius: 8px;
}

.footer-logo span {
  color: var(--text-light);
}

.footer-section h3 {
  font-size: 18px;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 12px;
}

.footer-section ul li a {
  color: var(--text-gray-dark);
  text-decoration: none;
  transition: var(--transition);
}

.footer-section ul li a:hover {
  color: var(--primary);
  padding-right: 5px;
}

.footer-section p {
  color: var(--text-gray-dark);
  line-height: 1.7;
  margin-bottom: 15px;
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.social-links a {
  width: 38px;
  height: 38px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.newsletter {
  display: flex;
  gap: 10px;
}

.newsletter input {
  flex: 1;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-dark);
  border-radius: 50px;
}

.newsletter button {
  width: 45px;
  height: 45px;
  border: none;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}

.newsletter button:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.newsletter button i {
  color: #0f172a;
  font-size: 18px;
}

.footer-bottom {
  text-align: center;
  padding-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  color: var(--text-gray-dark);
}

/* ==========================================
Modal
========================================== */
/* الانتقال على opacity فقط حتى يصبح visibility فورياً
   وينجح transfer التركيز (focus trap) لحظة فتح النافذة */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2000;
}

.modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.modal-card {
  position: relative;
  width: min(92vw, 560px);
  background: var(--bg-card-dark);
  color: var(--text-light);
  border: 1px solid var(--border-dark);
  border-radius: 24px;
  padding: 35px;
  transform: translateY(25px);
  transition: var(--transition);
  box-shadow: var(--shadow-dark);
  text-align: center;
}

/* محاذاة نص النوافذ المنبثقة حسب اتجاه اللغة */
.modal-card h3,
.modal-card p {
  direction: rtl;
}
body.lang-en .modal-card h3,
body.lang-en .modal-card p {
  direction: ltr;
}

body.light-mode .modal-card {
  background: #ffffff;
  color: #0f172a;
}

.modal.open .modal-card {
  transform: translateY(0);
}

.modal-large {
  width: min(92vw, 760px);
  max-height: 85vh;
  overflow: auto;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--primary);
  color: #0f172a;
}

.modal-card h3 {
  font-size: 28px;
  margin-bottom: 15px;
}

.modal-card p {
  color: var(--text-gray-dark);
  margin-bottom: 20px;
  line-height: 1.9;
  text-align: center;
}

/* ==========================================
Toast
========================================== */
.toast {
  position: fixed;
  bottom: 25px;
  right: 50%;
  transform: translateX(50%) translateY(20px);
  background: #0f172a;
  color: white;
  padding: 14px 22px;
  border-radius: 16px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 3000;
  box-shadow: var(--shadow-dark);
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 90vw;
  text-align: center;
}

body.light-mode .toast {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.toast.show {
  opacity: 1;
  transform: translateX(50%) translateY(0);
}

.toast-success {
  border-color: rgba(34, 197, 94, 0.35);
}

.toast-error {
  border-color: rgba(239, 68, 68, 0.35);
}

/* ==========================================
Selection & scrollbar
========================================== */
::selection {
  background: var(--primary);
  color: #0f172a;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-card-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ==========================================
Smart Path Showcase - المسار الذكي التفاعلي
========================================== */
.sp-showcase {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 50px;
align-items: center;
}
.sp-steps { display: grid; gap: 16px; margin-bottom: 30px; }
.sp-step {
display: flex;
gap: 16px;
align-items: flex-start;
background: var(--bg-card-dark);
border: 1px solid var(--border-dark);
border-radius: 20px;
padding: 18px;
transition: var(--transition);
}
.sp-step:hover { transform: translateX(-6px); border-color: var(--primary); }
.sp-step-num {
flex-shrink: 0;
width: 42px; height: 42px;
border-radius: 50%;
background: var(--primary-light);
color: var(--primary);
border: 2px solid var(--primary);
font-weight: 800; font-size: 18px;
display: flex; align-items: center; justify-content: center;
}
.sp-step-body h3 { font-size: 17px; margin-bottom: 6px; }
.sp-step-body p { color: var(--text-gray-dark); font-size: 14px; line-height: 1.7; }
.sp-cta { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }

/* الهاتف */
.sp-phone {
position: relative;
width: 375px; max-width: 100%;
height: 780px;
margin: 0 auto;
background: #0b1220;
border: 10px solid #1e293b;
border-radius: 44px;
overflow: hidden;
box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
display: flex;
flex-direction: column;
}
.sp-phone-notch { width: 130px; height: 20px; background: #1e293b; border-radius: 0 0 14px 14px; margin: 0 auto; flex-shrink: 0; }
.sp-phone-header { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid rgba(255,255,255,0.06); color: #f1f5f9; }
.sp-phone-header h3 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.sp-phone-header h3 i { color: var(--primary); }
.sp-premium { margin-inline-start: auto; background: linear-gradient(90deg, #f59e0b, #fbbf24); color: #0f172a; font-size: 11px; font-weight: 800; padding: 5px 14px; border-radius: 999px; }

/* الشاشات */
.sp-screens { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.sp-screen { display: none; flex: 1; overflow-y: auto; padding: 16px 14px; color: #f1f5f9; }
.sp-screen.active { display: flex; flex-direction: column; animation: fadeInUp 0.4s ease-out; }
.sp-screen::-webkit-scrollbar { width: 4px; }
.sp-screen::-webkit-scrollbar-thumb { background: rgba(245,158,11,0.4); border-radius: 10px; }

/* أزرار الهاتف */
.sp-btn-gold {
display: flex; align-items: center; justify-content: center; gap: 10px;
width: 100%;
border: none; cursor: pointer;
background: linear-gradient(90deg, #f59e0b, #fbbf24);
color: #0f172a;
font-family: inherit; font-weight: 800; font-size: 15px;
padding: 14px; border-radius: 14px;
transition: var(--transition);
text-decoration: none;
}
.sp-btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(245,158,11,0.35); }
.sp-btn-ghost {
display: flex; align-items: center; justify-content: center; gap: 8px;
background: transparent;
border: 1px solid rgba(255,255,255,0.15);
color: #94a3b8;
border-radius: 14px; padding: 14px 22px;
cursor: pointer; font-family: inherit; font-weight: 700;
transition: var(--transition);
}
.sp-btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* شاشة المقدمة */
.sp-intro { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 15px; }
.sp-intro-orbit { width: 150px; height: 150px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; position: relative; margin-bottom: 8px; }
.sp-intro-orbit::before { content: ''; position: absolute; inset: 18px; border-radius: 50%; background: #101a2c; }
.sp-intro-orbit i { position: relative; font-size: 44px; color: var(--primary); }
.sp-intro h4 { font-size: 24px; font-weight: 800; }
.sp-gold { color: var(--primary); }
.sp-rocket { font-size: 26px; animation: iconBounce 1.6s ease-in-out infinite; }
.sp-intro > p { color: #94a3b8; font-size: 13px; line-height: 1.9; }
.sp-intro-card { background: linear-gradient(135deg, #101a2c, #1e293b); border: 1px solid rgba(245,158,11,0.25); border-radius: 18px; padding: 14px; display: flex; gap: 10px; text-align: right; font-size: 12.5px; line-height: 1.9; }
.sp-intro-card i { color: var(--primary); margin-top: 4px; }

/* شاشة الأقسام */
.sp-sections h4, .sp-path h4 { font-size: 17px; text-align: center; }
.sp-sub { color: #94a3b8; font-size: 12px; text-align: center; margin: 6px 0 16px; }
.sp-section-card { position: relative; background: #1e293b; border: 1px solid rgba(255,255,255,0.06); border-radius: 18px; padding: 16px; margin-bottom: 14px; transition: var(--transition); }
.sp-section-card:hover { border-color: rgba(245,158,11,0.4); transform: translateY(-3px); }
.sp-section-card.sp-pro { cursor: pointer; }
.sp-section-top { display: flex; align-items: center; gap: 12px; }
.sp-section-icon { flex-shrink: 0; width: 52px; height: 52px; border-radius: 14px; background: rgba(245,158,11,0.12); color: var(--primary); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.sp-section-icon i { font-size: 22px; }
.sp-section-title { flex: 1; }
.sp-section-title strong { display: block; font-size: 14px; line-height: 1.6; }
.sp-status { font-size: 11px; color: #f87171; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.sp-section-desc { color: #94a3b8; font-size: 12px; line-height: 1.8; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 10px; margin: 10px 0 12px; }
.sp-pro-badge { position: absolute; top: -9px; left: 14px; background: linear-gradient(90deg, #f59e0b, #fbbf24); color: #0f172a; font-size: 10px; font-weight: 800; padding: 3px 12px; border-radius: 8px; letter-spacing: 0.5px; }

/* شاشة الاختبار */
.sp-quiz { display: flex; flex-direction: column; flex: 1; }
.sp-quiz-progress { height: 6px; background: #1e293b; border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.sp-quiz-bar { height: 100%; width: 0; background: var(--primary); border-radius: 999px; transition: width 0.4s ease; }
.sp-quiz-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sp-quiz-meta span:first-child { font-weight: 800; font-size: 15px; }
.sp-level-badge { background: rgba(245,158,11,0.15); color: var(--primary); font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 8px; }
.sp-quiz-question { font-size: 16px; line-height: 1.8; margin-bottom: 18px; min-height: 58px; }
.sp-quiz-options { display: grid; gap: 12px; margin-bottom: 18px; }
.sp-option { background: #1e293b; border: 2px solid transparent; border-radius: 14px; padding: 14px; text-align: center; color: #cbd5e1; cursor: pointer; font-family: inherit; font-size: 14px; transition: var(--transition); }
.sp-option:hover { border-color: rgba(245,158,11,0.4); }
.sp-option.selected { border-color: var(--primary); background: rgba(245,158,11,0.1); color: #fbbf24; font-weight: 700; }
.sp-quiz-actions { display: flex; gap: 10px; margin-top: auto; }
.sp-quiz-actions .sp-btn-gold { flex: 1; }

/* شاشة التحليل */
.sp-analyzing { position: absolute; inset: 0; background: rgba(11,18,32,0.94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; z-index: 5; color: var(--primary); font-size: 15px; font-weight: 700; }
.sp-analyzing[hidden] { display: none; }
.sp-analyzing i { font-size: 40px; }

/* شاشة النتائج */
.sp-result-head { background: #1e293b; border-radius: 18px; padding: 16px; text-align: center; margin-bottom: 14px; }
.sp-result-head > p { color: #94a3b8; font-size: 12px; margin-bottom: 10px; }
.sp-gauge { position: relative; width: 120px; height: 120px; margin: 0 auto; }
.sp-gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sp-gauge circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.sp-gauge-bg { stroke: #334155; }
.sp-gauge-fill { stroke: var(--primary); stroke-dasharray: 314; stroke-dashoffset: 314; }
.sp-gauge-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.sp-gauge-text strong { color: var(--primary); font-size: 26px; font-weight: 800; }
.sp-gauge-text span { color: #4ade80; font-size: 12px; font-weight: 700; }
.sp-result-card { background: #1e293b; border-radius: 18px; padding: 16px; margin-bottom: 14px; }
.sp-result-card h5 { color: var(--primary); font-size: 14px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.sp-lv-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sp-lv-row:last-child { margin-bottom: 0; }
.sp-lv-name { width: 30px; font-weight: 800; font-size: 13px; }
.sp-lv-bar { flex: 1; height: 6px; background: #334155; border-radius: 999px; overflow: hidden; }
.sp-lv-bar i { display: block; height: 100%; border-radius: 999px; }
.sp-lv-val { width: 55px; text-align: left; }
.sp-lv-val b { display: block; font-size: 12px; }
.sp-lv-val small { display: flex; align-items: center; gap: 3px; font-size: 10px; }
.sp-topic-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.sp-topic-row:last-child { border-bottom: none; padding-bottom: 0; }
.sp-topic-name strong { display: block; font-size: 13px; }
.sp-topic-name small { color: #64748b; font-size: 10px; }
.sp-topic-val { text-align: left; }
.sp-topic-val b { display: block; font-size: 14px; margin-bottom: 3px; }
.sp-topic-badge { font-size: 9.5px; padding: 3px 8px; border-radius: 6px; font-weight: 700; }
.sp-topic-badge.good { background: rgba(74,222,128,0.15); color: #4ade80; }
.sp-topic-badge.mid { background: rgba(245,158,11,0.15); color: #fbbf24; }
.sp-topic-badge.bad { background: rgba(239,68,68,0.15); color: #f87171; }

/* شاشة المسار المخصص */
.sp-lesson { display: flex; align-items: center; gap: 12px; background: #1e293b; border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.sp-lesson-num { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; border: 2px solid; }
.sp-lesson.open .sp-lesson-num { border-color: var(--primary); color: var(--primary); background: rgba(245,158,11,0.08); }
.sp-lesson.locked .sp-lesson-num { border-color: rgba(239,68,68,0.5); color: #f87171; }
.sp-lesson-title { flex: 1; font-size: 13px; font-weight: 600; }
.sp-lesson.locked .sp-lesson-title { color: #94a3b8; }
.sp-lesson-status { font-size: 10.5px; padding: 5px 12px; border-radius: 8px; display: flex; align-items: center; gap: 5px; font-weight: 700; white-space: nowrap; }
.sp-lesson.open .sp-lesson-status { background: rgba(245,158,11,0.15); color: #fbbf24; }
.sp-lesson.locked .sp-lesson-status { background: rgba(239,68,68,0.12); color: #f87171; }
.sp-path .sp-btn-ghost { margin-top: 12px; width: 100%; }

/* الشريط السفلي للهاتف */
.sp-bottom-nav { display: flex; justify-content: space-around; align-items: center; background: #262b36; padding: 10px 6px 12px; border-top: 1px solid rgba(255,255,255,0.06); flex-shrink: 0; }
.sp-nav-item { background: none; border: none; color: #94a3b8; font-family: inherit; font-size: 10px; display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; padding: 4px 10px; border-radius: 12px; transition: var(--transition); }
.sp-nav-item i { font-size: 16px; }
.sp-nav-item.active { color: var(--primary); background: rgba(245,158,11,0.12); }

@media (max-width: 992px) {
.sp-showcase {
grid-template-columns: 1fr;
gap: 35px;
justify-items: center;          /* ✅ توسيط أبناء الشبكة ومنهم الهاتف */
}
.sp-info { order: 2; width: 100%; }
.sp-phone {
order: 1;
height: 740px;
justify-self: center;           /* ✅ إجبار الهاتف على التمركز */
margin: 0 auto;                 /* ✅ تأكيد إضافي للتمركز */
}
}

/* ✅ شاشات صغيرة: هاتف متناسق في الوسط والمحتوى أسفله مرتّب */
@media (max-width: 480px) {
.sp-phone {
width: min(375px, 90vw);
height: calc(min(375px, 90vw) * 2.08);   /* نفس نسبة هاتف المحادثة */
}
.sp-screen { padding: 0 10px; }
.sp-section-top { flex-wrap: wrap; }     /* يمنع سحق عنوان القسم */
.sp-status { white-space: normal; }      /* يمنع بروز نص "متاح في التطبيق" */
.sp-steps { gap: 12px; }
.sp-step { padding: 14px; gap: 12px; }
.sp-step-num { width: 36px; height: 36px; font-size: 16px; }
.sp-cta { flex-direction: column; align-items: stretch; }
.sp-cta .btn { width: 100%; text-align: center;}            /* أزرار ممتدة أنظف من أزرار متزاحمة */
}

/* ✅ الشاشات الضيقة جداً فقط (الشاشة المغلقة لـ Galaxy Z Fold 5 وما شابه) */
@media (max-width: 350px) {
.sp-intro { gap: 10px; }
.sp-intro-orbit { width: 93px; height: 93px; }
.sp-intro-orbit::before { inset: 12px; }
.sp-intro-orbit i { font-size: 20px; }
.sp-screen { padding: 10px 8px; }
.sp-section-icon { width: 44px; height: 44px; }
.sp-section-icon i { font-size: 18px; }
.sp-section-title strong { font-size: 13px; }
.sp-btn-gold { font-size: 13px; padding: 12px; }
.sp-lesson-num { width: 32px; height: 32px; }
.sp-lesson-title { font-size: 12px; }
.sp-lesson-status { padding: 4px 8px; }
}

/* تفاصيل القسم القابلة للفتح */
.sp-section-card { cursor: pointer; }
.sp-section-body { display: none; border-top: 1px solid rgba(255,255,255,0.06); margin-top: 12px; padding-top: 12px; }
.sp-section-card.open .sp-section-body { display: block; animation: fadeInUp 0.3s ease; }
.sp-section-card.open { border-color: rgba(245,158,11,0.5); }
.sp-section-card.open .sp-status { display: none; }

/* بطاقات نقاط القوة والضعف */
.sp-result-card h5.sp-good { color: #4ade80; }
.sp-result-card h5.sp-bad { color: #f87171; }
.sp-sw-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.sp-sw-row:last-child { border-bottom: none; padding-bottom: 0; }
.sp-sw-dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; }
.sp-sw-name strong { display: block; font-size: 13px; }
.sp-sw-name small { color: #64748b; font-size: 10px; }
.sp-empty { color: #64748b; font-size: 12px; text-align: center; padding: 6px 0; }

/* ==========================================
توحيد أبعاد هاتف المحادثة مع هاتف المسار الذكي
========================================== */
  .ai-phone {
position: relative;
width: min(375px, 100%);
max-width: 100%;
height: auto;
aspect-ratio: 375 / 780;   /* ✅ نسبة آيفون حقيقية ثابتة في كل الشاشات */
margin: 0 auto;
margin-inline: auto;
justify-self: center;
  background: #0b1220;
  border: 10px solid #1e293b;
  border-radius: 44px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
}

/* نفس سلوك هاتف المسار الذكي على الشاشات المتوسطة */
@media (max-width: 992px) {
.ai-phone {
height: auto;
}
}

/* على الجوال: نحافظ على نسبة الآيفون (الطول ≈ ضعف العرض) حتى لا يصبح عريضاً وقصيراً */
@media (max-width: 480px) {
.ai-phone {
width: min(375px, 92vw);
height: auto;
}
}

/* ==========================================
زر HUAWEI AppGallery
========================================== */
.huawei-gallery {
  background: #ffffff;
  color: #0f172a;
  position: relative;
  overflow: hidden;
}
.huawei-gallery::before {
  content: '';
  position: absolute;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(207, 10, 44, 0.12), transparent);
  transition: right 0.6s ease;
}
.huawei-gallery:hover::before {
  right: 100%;
}
.huawei-gallery i {
  color: #cf0a2c; /* أحمر هواوي الرسمي */
}
.huawei-gallery:hover {
  background: #f8fafc;
}
/* ==========================================
زر HUAWEI AppGallery - أيقونة المتجر + اللون الرسمي
========================================== */
.huawei-gallery {
  background: linear-gradient(135deg, #e60023, #a80016);
  color: #ffffff;
}
.huawei-gallery:hover {
  background: linear-gradient(135deg, #ff1a3c, #c7000b);
}
.huawei-gallery .hw-icon {
  width: 32px;
  height: 32px;
  color: #ffffff;
  flex-shrink: 0;
}

/* ==========================================
زر اللغة + وضع الإنجليزية (LTR)
========================================== */
.lang-toggle {
border: 1px solid var(--primary);
background: transparent;
color: var(--primary);
font-weight: 800;
font-size: 13px;
padding: 6px 16px;
border-radius: 999px;
cursor: pointer;
transition: var(--transition);
font-family: inherit;
flex-shrink: 0;
}
.lang-toggle:hover { background: var(--primary); color: #0f172a; }
body.lang-en { direction: ltr; }
body.lang-en .ai-phone, body.lang-en .sp-phone,
body.lang-en .ai-phone *, body.lang-en .sp-phone * { direction: rtl; }
body.lang-en .nav-link::after,
body.lang-en .highlight::after,
body.lang-en .footer-section h3::after { right: auto; left: 0; }
body.lang-en .footer-section ul li a:hover { padding-right: 0; padding-left: 5px; }
body.lang-en .footer-logo { flex-direction: row; justify-content: flex-start; }
body.lang-en .course-levels { text-align: left; }
body.lang-en .modal-large { text-align: left; }
/* صورة الهيرو: حُذفت قاعدة الهوامش الخاصة بالإنجليزية —
   كانت تُلغي margin: 0 auto فتلتصق الصورة باليسار في وضع LTR.
   هوامش auto محايدة الاتجاه وتتمركز في العربي والإنجليزي معاً */
body.lang-en .ai-hint i { margin-left: 0; margin-right: 6px; }
body.lang-en .typing-cursor { margin-right: 0; margin-left: 4px; }

/* ===== تجاوب زر الوضع الليلي/النهاري داخل شريط التنقل ===== */
@media (max-width: 550px) {
  .nav-container { gap: 12px; }
}
@media (max-width: 400px) {
.theme-switch { width: 52px; height: 28px; }
.slider { border-radius: 28px; }
.slider i { font-size: 11px; }
.slider .fa-sun  { left: 13px; }
.slider .fa-moon { left: 39px; }
.slider:before { width: 20px; height: 20px; left: 29px; }
input:checked + .slider:before { transform: translateX(-26px); }
.lang-toggle { padding: 5px 12px; font-size: 12px; }
}


/* ===== جاذبية الوضع النهاري: شريط زجاجي وبطاقات دافئة ===== */
body.light-mode .navbar {
background: rgba(255, 255, 255, 0.72);
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

body.light-mode .modal-card,
body.light-mode .notification-card {
background: linear-gradient(180deg, #ffffff 0%, #fdf9f0 100%);
}

body.light-mode .quiz-option {
background: rgba(217, 119, 6, 0.05);
}

/* اختياري: عنوان الهيرو بتدرّج ذهبي بدل لون واحد */
body.light-mode .hero-title {
background: linear-gradient(90deg, #b45309, #f59e0b 50%, #b45309);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
}

/* ==========================================
Accessibility helper
========================================== */
.sr-only {
  position: absolute;
  /* تثبيت داخل حدود الحاوية: بلا إحداثيات، العنصر المطلق في RTL
     يتسرب خارج حافة البداية ويوسّع عرض الصفحة على الجوال */
  top: 0;
  inset-inline-start: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================
Blog teaser (الصفحة الرئيسية)
========================================== */
.feature-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  transition: var(--transition);
}

.feature-link:hover .card-more { gap: 13px; }

.blog-teaser-more {
  text-align: center;
  margin-top: 40px;
}

/* ==========================================
Download page (قواعد كانت ناقصة)
========================================== */
.download-page {
  background: var(--bg-dark);
}

.download-hero {
  padding: 140px 0 70px;
  text-align: center;
}

.download-hero .section-header {
  margin-bottom: 45px;
}

@media (max-width: 768px) {
  .download-hero {
    padding: 115px 0 50px;
  }
}

/* ==========================================
درمانة من التجاوز الأفقي على الجوال (أُضيفت بعد تدقيق ميداني)
أي عنصر أو هامش يتجاوز عرض الشاشة لا يستطيع توسيع الصفحة:
الاقتصاص محلي داخل كل قسم بدل أن ينسكب إلى تخطيط الصفحة كاملة.
overflow-x: clip لا يُنشئ حاوية تمرير ولا يؤثر على القائمة الثابتة.
========================================== */
@media (max-width: 768px) {
  section,
  .container,
  .contact-wrapper,
  .contact-info,
  .contact-form,
  .info-card,
  .footer-content,
  .footer-section,
  .footer-bottom,
  .download-buttons,
  .features-grid,
  .courses-grid,
  .levels-container,
  .stats-wrapper,
  .gallery-grid,
  .sp-showcase,
  .ai-speaking .container {
    max-width: 100%;
    overflow-x: clip;
  }

  .contact-form input,
  .contact-form textarea,
  .newsletter input {
    max-width: 100%;
    min-width: 0;
  }
}
