/* ================ الأساسيات ================ */
:root {
  /* نظام الألوان */
  --primary-color: #0071e3;
  --primary-dark: #0062c4;
  --primary-light: #e6f0fa;
  --secondary-color: #86868b;
  --secondary-dark: #75757a;
  --secondary-light: #f5f5f7;
  --dark-color: #1d1d1f;
  --light-color: #f5f5f7;
  --success-color: #34c759;
  --danger-color: #ff3b30;
  --warning-color: #ffcc00;
  --info-color: #5ac8fa;
  
  /* ألوان النص */
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --text-light: #a1a1a6;
  --text-on-primary: #ffffff;
  
  /* الظلال */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
  
  /* الزوايا */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 50px;
  
  /* الانتقالات */
  --transition-fast: all 0.2s ease;
  --transition-normal: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-slow: all 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
  
  /* المسافات */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
}

/* ================ إعادة الضبط ================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--light-color);
  direction: rtl;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================ الطباعة ================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  letter-spacing: -0.5px;
}

h1 {
  font-size: 3.5rem;
  line-height: 1.1;
}

h2 {
  font-size: 2.75rem;
}

h3 {
  font-size: 2rem;
}

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

/* ================ المكونات العامة ================ */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

section {
  padding: var(--space-3xl) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-lg);
}

.section-title span {
  color: var(--primary-color);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  right: 50%;
  transform: translateX(50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), var(--info-color));
  border-radius: 2px;
}

.section-subtitle {
  max-width: 700px;
  margin: 0 auto;
  color: var(--text-light);
  font-size: 1.2rem;
}

.section-footer {
  text-align: center;
  margin-top: var(--space-2xl);
}

/* ================ الأزرار ================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 1.05rem;
  transition: var(--transition-normal);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  gap: var(--space-sm);
}

.btn i {
  font-size: 0.9em;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--text-on-primary);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--text-on-primary);
}

.btn-secondary:hover {
  background-color: var(--secondary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--text-on-primary);
  box-shadow: var(--shadow-md);
}

.btn-small {
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.9rem;
}

/* تأثير الأزرار */
.btn::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
  transform: translateX(100%);
  transition: var(--transition-normal);
}

.btn:hover::after {
  transform: translateX(0);
}

/* ================ شريط التنقل ================ */
.navbar {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  padding: var(--space-md) 0;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition-normal);
}

.navbar.scrolled {
  padding: var(--space-sm) 0;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark-color);
  gap: var(--space-sm);
}

.logo svg {
  width: 24px;
  height: 24px;
}

.logo span {
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: var(--space-lg);
}

.nav-links a {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 1.05rem;
  padding: var(--space-sm) 0;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition-normal);
}

.nav-links a:hover::after {
  width: 100%;
  left: 0;
}

.nav-links a.active {
  color: var(--primary-color);
}

.nav-links a.active::after {
  width: 100%;
}

.nav-cta .btn {
  margin-right: var(--space-md);
}

.hamburger {
  display: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--dark-color);
  margin: 5px 0;
  transition: var(--transition-normal);
}

/* ================ قسم البطل ================ */
.hero {
  position: relative;
  padding: 180px 0 100px;
  margin-top: 70px;
  background: linear-gradient(to bottom, #f5f5f7 0%, #ffffff 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 200%;
  background: radial-gradient(circle at 70% 50%, rgba(0, 113, 227, 0.1) 0%, transparent 50%);
  z-index: 0;
}

.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  gap: var(--space-2xl);
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: var(--space-md);
  line-height: 1.1;
  background: linear-gradient(to right, #0071e3, #00a1e4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: var(--space-xl);
  color: var(--text-light);
  max-width: 90%;
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.hero-stats {
  display: flex;
  gap: var(--space-xl);
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background-color: white;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  font-weight: 500;
}

.stat-badge i {
  color: var(--primary-color);
}

.hero-image {
  flex: 1;
  position: relative;
}

.image-wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
}

.main-image {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px rgba(0, 113, 227, 0.2);
  transform: perspective(1000px) rotateY(-10deg);
  animation: float 6s ease-in-out infinite;
}

.floating-element {
  position: absolute;
  animation: float 6s ease-in-out infinite;
}

.element-1 {
  top: -20px;
  left: -20px;
  width: 120px;
  animation-delay: 1s;
}

.element-2 {
  bottom: -20px;
  right: -20px;
  width: 100px;
  animation-delay: 2s;
}

.hero-wave {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100px;
  z-index: 1;
}

.hero-wave svg {
  width: 100%;
  height: 100%;
}

/* ================ كروت الكويزات ================ */
.quizzes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-2xl);
  margin-top: var(--space-xl);
}

.quiz-card {
  position: relative;
  background-color: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.quiz-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.quiz-badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  background-color: var(--primary-color);
  color: white;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 2;
}

.quiz-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.quiz-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-normal);
}

.quiz-card:hover .quiz-image img {
  transform: scale(1.05);
}

.quiz-overlay {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-normal);
}

.quiz-card:hover .quiz-overlay {
  opacity: 1;
}

.play-button {
  width: 60px;
  height: 60px;
  background-color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.5rem;
  transition: var(--transition-normal);
}

.play-button:hover {
  transform: scale(1.1);
  background-color: var(--primary-color);
  color: white;
}

.quiz-content {
  padding: var(--space-xl);
}

.quiz-category {
  display: inline-block;
  margin-bottom: var(--space-sm);
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
}

.quiz-description {
  margin-bottom: var(--space-lg);
  color: var(--text-secondary);
}

.quiz-meta {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.9rem;
  color: var(--text-light);
}

.meta-item i {
  color: var(--primary-color);
}

.quiz-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quiz-rating {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--text-light);
  font-size: 0.9rem;
}

.quiz-rating i {
  color: var(--warning-color);
}

/* ================ كروت المقالات ================ */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--space-2xl);
  margin-top: var(--space-xl);
}

.article-card {
  background-color: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.article-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-normal);
}

.article-card:hover .article-image img {
  transform: scale(1.05);
}

.article-badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  background-color: var(--primary-color);
  color: white;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 2;
}

.article-content {
  padding: var(--space-xl);
}

.article-category {
  display: inline-block;
  margin-bottom: var(--space-sm);
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
}

.article-excerpt {
  margin-bottom: var(--space-lg);
  color: var(--text-secondary);
}

.article-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.author-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.author-info img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.9rem;
  color: var(--text-light);
}

.read-more {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--primary-color);
  font-weight: 600;
  position: relative;
}

.read-more::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition-normal);
}

.read-more:hover::after {
  width: 100%;
  left: 0;
}

/* ================ قسم الإحصائيات ================ */
.stats {
  position: relative;
  padding: 100px 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--info-color) 100%);
  color: white;
  overflow: hidden;
}

.stats::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 L0,100 Z" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>');
  background-size: 50px 50px;
  opacity: 0.3;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-2xl);
  text-align: center;
  position: relative;
  z-index: 1;
}

.stat-item {
  padding: var(--space-xl);
}

.stat-icon {
  width: 60px;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  font-size: 1.5rem;
}

.stat-item h3 {
  font-size: 3.5rem;
  margin-bottom: var(--space-sm);
  font-weight: 700;
  position: relative;
}

.stat-item h3::after {
  content: '+';
  position: absolute;
  top: 0;
  right: -20px;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.7);
}

.stat-item p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stats-wave {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100px;
}

.stats-wave svg {
  width: 100%;
  height: 100%;
}

/* ================ النشرة البريدية ================ */
.newsletter {
  padding: var(--space-3xl) 0;
  background-color: var(--light-color);
}

.newsletter .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xl);
}

.newsletter-content {
  flex: 1;
  max-width: 500px;
}

.newsletter h2 {
  margin-bottom: var(--space-md);
}

.newsletter p {
  margin-bottom: var(--space-xl);
}

.newsletter-stats {
  display: flex;
  gap: var(--space-xl);
  margin-top: var(--space-lg);
}

.newsletter-form {
  flex: 1;
  max-width: 500px;
}

.form-group {
  position: relative;
  margin-bottom: var(--space-md);
}

.form-group i {
  position: absolute;
  top: 50%;
  right: var(--space-lg);
  transform: translateY(-50%);
  color: var(--text-light);
}

.newsletter-form input {
  width: 100%;
  padding: var(--space-md) var(--space-lg) var(--space-md) var(--space-xl);
  border: 1px solid #ddd;
  border-radius: var(--radius-full);
  font-family: 'Tajawal', sans-serif;
  font-size: 1rem;
  transition: var(--transition-normal);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2);
}

/* ================ قسم التطبيق ================ */
.app-section {
  padding: var(--space-3xl) 0;
  background: linear-gradient(to right, #f5f5f7 0%, #ffffff 100%);
}

.app-section .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xl);
}

.app-content {
  flex: 1;
  max-width: 500px;
}

.app-content h2 {
  margin-bottom: var(--space-md);
}

.app-content h2 span {
  color: var(--primary-color);
}

.app-content p {
  margin-bottom: var(--space-xl);
}

.app-features {
  list-style: none;
  margin-bottom: var(--space-xl);
}

.app-features li {
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.app-features i {
  color: var(--success-color);
  font-size: 1.2rem;
}

.app-buttons {
  display: flex;
  gap: var(--space-md);
}

.app-store-btn,
.play-store-btn {
  display: inline-block;
  height: 50px;
}

.app-store-btn img,
.play-store-btn img {
  height: 100%;
  border-radius: var(--radius-md);
}

.app-image {
  flex: 1;
  max-width: 500px;
  text-align: center;
}

.app-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* ================ تذييل الصفحة ================ */
.footer {
  background-color: var(--dark-color);
  color: white;
  padding: var(--space-3xl) 0 var(--space-xl);
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-col {
  padding: var(--space-md);
}

.footer-logo {
  margin-bottom: var(--space-lg);
}

.footer-about {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-lg);
}

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.footer-social a {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: var(--transition-normal);
}

.footer-social a:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

.footer-title {
  color: white;
  margin-bottom: var(--space-lg);
  position: relative;
  padding-bottom: var(--space-sm);
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transition: var(--transition-normal);
}

.footer-links a:hover {
  color: white;
  padding-right: var(--space-sm);
}

.footer-contact {
  list-style: none;
}

.footer-contact li {
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: rgba(255, 255, 255, 0.7);
}

.footer-contact i {
  color: var(--primary-color);
  width: 20px;
}

.footer-newsletter {
  margin-top: var(--space-xl);
}

.footer-newsletter h4 {
  margin-bottom: var(--space-md);
  font-size: 1rem;
}

.footer-newsletter form {
  display: flex;
}

.footer-newsletter input {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  border: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  font-family: 'Tajawal', sans-serif;
}

.footer-newsletter button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0 var(--space-md);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  cursor: pointer;
  transition: var(--transition-normal);
}

.footer-newsletter button:hover {
  background-color: var(--primary-dark);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.footer-payments {
  display: flex;
  gap: var(--space-sm);
}

.footer-payments img {
  height: 24px;
}

/* ================ زر العودة للأعلى ================ */
.back-to-top {
  position: fixed;
  bottom: var(--space-xl);
  left: var(--space-xl);
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-5px);
}

/* ================ شريط التقدم ================ */
.progress-bar {
  position: fixed;
  top: 0;
  right: 0;
  width: 0;
  height: 4px;
  background-color: var(--primary-color);
  z-index: 1001;
  transition: width 0.1s linear;
}

/* ================ تأثيرات التمرير ================ */
[data-scroll] {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-scroll="in"] {
  opacity: 1;
  transform: translateY(0);
}

/* ================ الرسوم المتحركة ================ */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================ التصميم المتجاوب ================ */
@media (max-width: 1200px) {
  .hero-content h1 {
    font-size: 3rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
}

@media (max-width: 992px) {
  .hero .container {
    flex-direction: column;
    text-align: center;
  }
  
  .hero-content {
    margin-bottom: var(--space-2xl);
    max-width: 100%;
  }
  
  .hero-subtitle {
    max-width: 100%;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .hero-image {
    margin-top: var(--space-xl);
  }
  
  .main-image {
    transform: none;
  }
  
  .newsletter .container,
  .app-section .container {
    flex-direction: column;
    text-align: center;
  }
  
  .newsletter-content,
  .app-content {
    max-width: 100%;
  }
  
  .newsletter-form,
  .app-image {
    max-width: 100%;
  }
  
  .app-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  :root {
    --space-xl: 24px;
    --space-3xl: 48px;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .navbar .container {
    padding: 0 var(--space-md);
  }
  
  .nav-links {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 80%;
    height: calc(100vh - 70px);
    background-color: white;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: var(--space-xl);
    transition: var(--transition-normal);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links li {
    margin: 0 0 var(--space-lg) 0;
  }
  
  .hamburger {
    display: block;
  }
  
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
  }
}

@media (max-width: 576px) {
  :root {
    --space-xl: 16px;
    --space-3xl: 40px;
  }
  
  .container {
    padding: 0 var(--space-md);
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .section-title::after {
    width: 60px;
  }
  
  .quizzes-grid,
  .articles-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .app-buttons {
    flex-direction: column;
  }
  
  .app-store-btn,
  .play-store-btn {
    width: 100%;
  }
  
  .back-to-top {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    bottom: var(--space-md);
    left: var(--space-md);
  }
}