/* CSS Color System */
:root {
  /* Primary Red Color System */
  --primary-color: #3d5f21;
  --primary-color-light: hsl(from var(--primary-color) h 85% 80%);
  --primary-color-lighter: hsl(from var(--primary-color) h 90% 95%);
  --primary-color-dark: hsl(from var(--primary-color) h 45% 35%);
  --primary-color-bg: hsl(from var(--primary-color) h 90% 95%);
  --primary-color-select: hsl(from var(--primary-color) h 90% 95%);
  --primary-color-shadow-light: hsl(from var(--primary-color) h 90% 95%);
  --primary-color-shadow-medium: hsl(from var(--primary-color) h 90% 95%);
  --primary-color-shadow-dark: hsl(from var(--primary-color) h 90% 95%);

  /* Secondary Orange Color System */
  --secondary-color: #e94e1b;
  --secondary-color-light: hsl(from var(--secondary-color) h 85% 80%);
  --secondary-color-lighter: hsl(from var(--secondary-color) h 90% 95%);
  --secondary-color-dark: hsl(from var(--secondary-color) h 45% 35%);
  --secondary-color-bg: rgba(233, 78, 27, 0.1);
  --secondary-color-select: rgba(233, 78, 27, 0.06);

  /* Blue Color System */
  --blue-color: #60a5fa;
  --blue-color-light: hsl(from var(--blue-color) h 85% 80%);
  --blue-color-lighter: hsl(from var(--blue-color) h 90% 95%);
  --blue-color-dark: hsl(from var(--blue-color) h 45% 35%);
  --blue-color-bg: rgba(96, 165, 250, 0.1);

  /* Green (WhatsApp) Color System */
  --whatsapp-color: #25d366;
  --whatsapp-color-light: hsl(from var(--whatsapp-color) h 85% 80%);
  --whatsapp-color-lighter: hsl(from var(--whatsapp-color) h 90% 95%);
  --whatsapp-color-dark: hsl(from var(--whatsapp-color) h 45% 35%);
  --whatsapp-color-bg: rgba(37, 211, 102, 0.1);
  --whatsapp-color-select: rgba(37, 211, 102, 0.05);

  /* Neutral Color System - Light Theme */
  --text-primary: #1a202c;
  --text-secondary: #333333;
  --text-muted: #6b7280;
  --text-light: #595c5e;
  --bg-primary: #fff;
  --bg-secondary: #f7fafc;
  --bg-muted: #f8f9fa;
  --bg-light: #f5f5f5;
  --border-light: #f0f0f0;
  --bg-dark: #212526;

  /* White/Black with transparency */
  --white-alpha-10: rgba(255, 255, 255, 0.1);
  --white-alpha-30: rgba(255, 255, 255, 0.3);
  --white-alpha-60: rgba(255, 255, 255, 0.6);
  --black-alpha-05: rgba(0, 0, 0, 0.05);
  --black-alpha-10: rgba(0, 0, 0, 0.1);
  --black-alpha-15: rgba(0, 0, 0, 0.15);
  --black-alpha-17: rgba(0, 0, 0, 0.17);
  --black-alpha-20: rgba(0, 0, 0, 0.2);
  --black-alpha-50: rgba(0, 0, 0, 0.5);
}

/* Dark Theme Variables */
[data-theme="dark"] {
  /* Neutral Color System - Dark Theme */
  --text-primary: #ffffff;
  --text-secondary: #e2e8f0;
  --text-muted: #a0aec0;
  --text-light: #cbd5e0;
  --bg-primary: #1a1a1a;
  --bg-secondary: #1c1c1c;
  --bg-muted: #2d3748;
  --bg-light: #383838;
  --border-light: #4a5568;
  --bg-dark: #f7fafc;

  /* Adjusted transparency for dark theme */
  --white-alpha-10: rgba(255, 255, 255, 0.05);
  --white-alpha-30: rgba(255, 255, 255, 0.1);
  --white-alpha-60: rgba(255, 255, 255, 0.2);
  --black-alpha-05: rgba(0, 0, 0, 0.2);
  --black-alpha-10: rgba(0, 0, 0, 0.3);
  --black-alpha-15: rgba(0, 0, 0, 0.4);
  --black-alpha-17: rgba(0, 0, 0, 0.4);
  --black-alpha-20: rgba(0, 0, 0, 0.5);
  --black-alpha-50: rgba(0, 0, 0, 0.8);
}

/* Very obvious dark theme styling */
[data-theme="dark"] body {
  background-color: #1a1a1a !important;
  color: #ffffff !important;
}

[data-theme="dark"] .hero {
  background-color: #1a1a1a !important;
}

[data-theme="dark"] .title-main,
[data-theme="dark"] .title-secondary {
  color: #ffffff !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .hero-subtitle {
  color: #e2e8f0 !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

/* CSS Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Animation Base Classes */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.animate {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-left.animate {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right.animate {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in.animate {
  opacity: 1;
  transform: scale(1);
}

/* Enhanced Section Title Animations */
.section-title-bounce {
  opacity: 0;
  transform: translateY(-50px) scale(0.8);
  transition: all 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.section-title-bounce.animate {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.section-title-zoom {
  opacity: 0;
  transform: scale(0.3) rotate(-10deg);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section-title-zoom.animate {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.section-title-slide-up {
  opacity: 0;
  transform: translateY(100px);
  transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section-title-slide-up.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .slide-in-left,
  .slide-in-right,
  .scale-in,
  .section-title-bounce,
  .section-title-zoom,
  .section-title-slide-up {
    transition: none;
  }

  #teacher-hero-image {
    animation: none;
  }

  .testimonial-left-svg,
  .testimonial-right-svg {
    animation: none;
  }

  .section-title h2 {
    animation: none;
  }

  .section-title:hover {
    transform: none;
    filter: none;
  }

  /* Disable math icon animations for reduced motion */
  .math-animated-icon,
  .icon-bg,
  .math-symbol,
  .hero-icon::before,
  .hero-icon::after {
    animation: none !important;
  }

  /* Disable hero image animations for reduced motion */
  .hero-image-ar,
  .hero-image-en,
  .hero-image-container svg:last-child {
    animation: none !important;
  }

  .hero-icon::before,
  .hero-icon::after {
    opacity: 0.3;
    transform: none;
  }

  .math-animated-icon:hover {
    transform: none;
    filter: none;
  }
}

body {
  font-family: "Almarai", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: all 0.3s ease;
}

/* English font for LTR layout */
[dir="ltr"] body {
  font-family: "Poppins", sans-serif;
}

/* Language switcher styles */
.language-switcher {
  cursor: pointer;
  transition: all 0.3s ease;
}

.language-switcher:hover {
  background-color: var(--bg-secondary);
}

.language-toggle {
  font-weight: bold;
  color: var(--primary-color);
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.language-switcher:hover .language-toggle {
  background-color: var(--primary-color);
  color: white;
}

/* RTL/LTR layout adjustments */
[dir="ltr"] .header-content {
  flex-direction: row-reverse;
}

[dir="ltr"] .hero-content {
  /* flex-direction: row-reverse; */
}

[dir="ltr"] .hero-text-content {
  text-align: left;
  margin-right: 0;
  margin-left: 200px;
}

@media (max-width: 1024px) {
  [dir="ltr"] .hero-text-content {
    margin-left: 0;
    margin-right: 0;
    padding: 0 24px;
  }
}

[dir="rtl"] .hero-text-content {
  text-align: right;
}

/* Button spacing adjustments for different directions */
[dir="ltr"] .flex.items-center.gap-8 {
  flex-direction: row-reverse;
}

[dir="ltr"] .btn {
  flex-direction: row-reverse;
}

/* Text alignment for course cards */
[dir="ltr"] .course-info {
  text-align: left;
}

[dir="rtl"] .course-info {
  text-align: right;
}

/* Feature cards text alignment */
[dir="ltr"] .feature-content {
  text-align: left;
  gap: 0px;
}

[dir="rtl"] .feature-content {
  text-align: right;
}

/* User Dropdown Styles */
.user-dropdown-container {
  position: relative;
  display: flex;
  align-items: center;
  z-index: 9999;
}

.user-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
  background-color: var(--bg-primary);
  border: 2px solid var(--border-light);
  position: relative;
  z-index: 10000;
  pointer-events: auto;
}

.user-dropdown-trigger:hover {
  background-color: var(--bg-secondary);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(217, 49, 72, 0.1);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(217, 49, 72, 0.3);
}

.dropdown-arrow {
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.user-dropdown-trigger:hover .dropdown-arrow {
  transform: translateY(-1px);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: var(--bg-primary);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-light);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 99999;
  max-height: 400px;
  overflow-y: auto;
}

.user-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 1px solid var(--border-light);
  position: relative;
  z-index: 10001;
  pointer-events: auto;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background-color: var(--bg-secondary);
  color: var(--primary-color);
  padding-left: 20px;
}

.dropdown-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.dropdown-item:hover svg {
  transform: scale(1.1);
  color: var(--primary-color);
}

.dropdown-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--border-light),
    transparent
  );
  margin: 8px 0;
}

.logout-item {
  color: var(--primary-color);
  font-weight: 600;
}

.logout-item:hover {
  background-color: var(--primary-color-bg);
  color: var(--primary-color-dark);
}

.logout-item svg {
  color: var(--primary-color);
}

/* RTL adjustments for dropdown */
[dir="rtl"] .user-dropdown-menu {
  right: auto;
  left: 0;
}

[dir="rtl"] .dropdown-item:hover {
  padding-left: 16px;
  padding-right: 20px;
}

/* LTR adjustments for dropdown */
[dir="ltr"] .user-dropdown-menu {
  right: auto;
  left: 0;
  /* z-index: 99999; */
}

[dir="ltr"] .dropdown-item {
  text-align: left;
  direction: ltr;
}

[dir="ltr"] .dropdown-item:hover {
  padding-left: 20px;
  padding-right: 16px;
}

/* English font for dropdown items */
[dir="ltr"] .dropdown-item span {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
}

[dir="ltr"] .user-avatar,
[dir="ltr"] .mobile-user-avatar {
  font-family: "Poppins", sans-serif;
}

/* Ensure dropdown appears above hero content */
[dir="ltr"] .user-dropdown-container {
  z-index: 99999;
  position: relative;
}

[dir="ltr"] .user-dropdown-menu {
  position: absolute;
  z-index: 99999;
}

/* Dark theme dropdown styles */
[data-theme="dark"] .user-dropdown-trigger {
  background-color: var(--bg-secondary);
  border-color: var(--border-light);
}

[data-theme="dark"] .user-dropdown-trigger:hover {
  background-color: var(--bg-light);
  border-color: var(--primary-color);
}

[data-theme="dark"] .user-dropdown-menu {
  background-color: var(--bg-secondary);
  border-color: var(--border-light);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .dropdown-item {
  color: var(--text-primary);
  border-bottom-color: var(--border-light);
}

[data-theme="dark"] .dropdown-item:hover {
  background-color: var(--bg-light);
}

/* Animation for dropdown arrow */
.user-dropdown-menu.show ~ .user-dropdown-trigger .dropdown-arrow {
  transform: rotate(180deg);
}

/* Mobile optimizations for dropdown */
@media (max-width: 768px) {
  .user-dropdown-menu {
    width: 260px;
    max-height: 350px;
  }

  .dropdown-item {
    padding: 14px 16px;
    font-size: 15px;
  }

  .user-avatar {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }
}

/* Smooth scrollbar for dropdown menu */
.user-dropdown-menu::-webkit-scrollbar {
  width: 4px;
}

.user-dropdown-menu::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 2px;
}

.user-dropdown-menu::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 2px;
}

.user-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color-dark);
}

/* Mobile User Dropdown Styles */
.mobile-user-dropdown-container {
  display: flex;
  align-items: center;
}

.mobile-user-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  transition: all 0.3s ease;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-light);
}

.mobile-user-dropdown-trigger:hover {
  background-color: var(--bg-secondary);
  border-color: var(--primary-color);
  transform: scale(1.02);
}

.mobile-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 11px;
  box-shadow: 0 2px 6px rgba(217, 49, 72, 0.3);
}

.mobile-dropdown-arrow {
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.mobile-user-dropdown-trigger:hover .mobile-dropdown-arrow {
  transform: rotate(180deg);
}

/* Mobile Navigation User Items */
.mobile-user-nav-items {
  display: none;
}

.mobile-regular-nav-items {
  display: block;
}

/* Mobile nav divider */
.mobile-nav-divider {
  height: 1px;
  background: var(--border-color);
  margin: 16px 20px;
  opacity: 0.5;
}

/* Mobile user dropdown items */
.mobile-user-dropdown-items {
  display: none;
}

.mobile-user-menu-toggle {
  position: relative;
  cursor: pointer;
  background: var(--primary-color-bg) !important;
  border-radius: 8px;
  margin-bottom: 8px;
}

.mobile-user-menu-toggle .mobile-dropdown-arrow {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s ease;
}

[dir="ltr"] .mobile-user-menu-toggle .mobile-dropdown-arrow {
  right: auto;
  left: 20px;
}

.mobile-user-menu-items {
  padding-left: 16px;
  border-left: 2px solid var(--primary-color-bg);
  margin-left: 20px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, var(--primary-color-bg), transparent);
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.mobile-user-menu-items[style*="block"] {
  display: block !important;
}

.mobile-user-menu-items .mobile-nav-item {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s ease;
  margin-bottom: 4px;
}

.mobile-user-menu-items .mobile-nav-button {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-primary);
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[dir="ltr"] .mobile-user-menu-items {
  padding-left: 0;
  padding-right: 16px;
  border-left: none;
  border-right: 2px solid var(--primary-color-bg);
  margin-left: 0;
  margin-right: 20px;
}

.mobile-user-dropdown-items .mobile-nav-item {
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary-color-bg),
    transparent
  );
  margin-bottom: 2px;
  border-radius: 8px;
  border-bottom: none;
}

.mobile-user-dropdown-items .mobile-nav-button {
  padding: 16px 20px;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.mobile-user-dropdown-items .mobile-nav-button:hover {
  background: var(--primary-color-bg);
  transform: translateX(8px);
  color: var(--primary-color);
}

.mobile-user-dropdown-items .logout-item {
  color: var(--danger-color);
}

.mobile-user-dropdown-items .logout-item:hover {
  background: var(--danger-bg);
  transform: translateX(12px);
  color: var(--danger-color);
}

/* Enhanced mobile nav items for logged in users */
.mobile-user-nav-items .mobile-nav-item {
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary-color-bg),
    transparent
  );
  margin-bottom: 2px;
  border-radius: 8px;
  border-bottom: none;
}

/* LTR mobile dropdown adjustments */
[dir="ltr"] .mobile-user-nav-items .mobile-nav-button,
[dir="ltr"] .mobile-user-dropdown-items .mobile-nav-button {
  text-align: left;
  direction: ltr;
  font-family: "Poppins", sans-serif;
}

[dir="ltr"] .mobile-user-nav-items .mobile-nav-button:hover,
[dir="ltr"] .mobile-user-dropdown-items .mobile-nav-button:hover {
  transform: translateX(-8px);
}

[dir="ltr"] .mobile-user-nav-items .logout-item:hover,
[dir="ltr"] .mobile-user-dropdown-items .logout-item:hover {
  transform: translateX(-12px);
}

.mobile-user-nav-items .mobile-nav-button {
  padding: 16px 20px;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.mobile-user-nav-items .mobile-nav-button:hover {
  background: var(--primary-color-bg);
  color: var(--primary-color);
  transform: translateX(8px);
  border-radius: 8px;
}

.mobile-user-nav-items .logout-item {
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary-color-bg),
    transparent
  );
  color: var(--primary-color);
  font-weight: 700;
  border-top: 2px solid var(--primary-color-light);
  margin-top: 16px;
  padding-top: 16px;
}

.mobile-user-nav-items .logout-item:hover {
  background: var(--primary-color);
  color: white;
  transform: translateX(12px);
}

/* Hero Image Language Switching */
.hero-image-container {
  position: relative;
}

.hero-image-ar,
.hero-image-en {
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
  animation: heroImageFloat 6s ease-in-out infinite,
    heroImageGlowPulse 4s ease-in-out infinite;
  cursor: pointer;
  /* Default state - both hidden initially */
  opacity: 0;
  transform: scale(0.8);
  position: absolute;
  top: 0;
  left: 0;
}

/* Hover effects for hero images */
.hero-image-ar:hover,
.hero-image-en:hover {
  transform: scale(1.02) translateY(-5px);
  filter: drop-shadow(0 10px 30px var(--primary-color-shadow-medium));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.hero-image-container svg:last-child {
  cursor: pointer;
  /* Initial state for animation */
  opacity: 0;
  transform: scale(0.3);
}

.hero-image-container svg:last-child:hover {
  transform: scale(1.05) translateY(-8px);
  filter: drop-shadow(0 15px 35px var(--primary-color-shadow-medium));
  transition: transform 0.3s ease, filter 0.3s ease;
}

/* Initial animation for hero images */
.hero-image-ar.animate {
  animation: heroImageSlideInLeft 1.2s ease-out forwards,
    heroImageFloat 6s ease-in-out 1.2s infinite,
    heroImageGlowPulse 4s ease-in-out 1.2s infinite;
}

.hero-image-en.animate {
  animation: heroImageSlideIn 1.2s ease-out forwards,
    heroImageFloat 6s ease-in-out 1.2s infinite,
    heroImageGlowPulse 4s ease-in-out 1.2s infinite;
}

/* Hero Image for Small Screens Only */
.hero-image-container svg:last-child {
  display: none;
}

/* Small screen hero image animations */
@media (max-width: 1024px) {
  .hero-image-container svg:last-child {
    display: block;
    animation: heroImageBounceIn 1.5s ease-out forwards,
      heroImageFloat 8s ease-in-out 1.5s infinite,
      heroImageGlowPulse 5s ease-in-out 1.5s infinite;
  }

  .hero-image-ar,
  .hero-image-en {
    display: none;
  }
}

/* Show AR image for RTL (Arabic) */
[dir="rtl"] .hero-image-ar {
  opacity: 0;
  /* Start invisible for animation */
  transform: translateX(0) scale(0.8);
  position: relative;
  z-index: 2;
}

[dir="rtl"] .hero-image-ar.animate {
  opacity: 1;
  animation: heroImageSlideInLeft 1.2s ease-out forwards,
    heroImageFloat 6s ease-in-out 1.2s infinite,
    heroImageGlowPulse 4s ease-in-out 1.2s infinite;
}

[dir="rtl"] .hero-image-en {
  opacity: 0 !important;
  transform: translateX(50px);
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
  display: none;
}

/* Show EN image for LTR (English) */
[dir="ltr"] .hero-image-en {
  opacity: 0;
  /* Start invisible for animation */
  transform: translateX(0) scale(0.8);
  position: relative;
  z-index: 2;
}

[dir="ltr"] .hero-image-en.animate {
  opacity: 1;
  animation: heroImageSlideIn 1.2s ease-out forwards,
    heroImageFloat 6s ease-in-out 1.2s infinite,
    heroImageGlowPulse 4s ease-in-out 1.2s infinite;
}

[dir="ltr"] .hero-image-ar {
  opacity: 0 !important;
  transform: translateX(-50px);
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
  display: none;
}

/* Utility Classes */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--white-alpha-10);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
  z-index: 0;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn > * {
  position: relative;
  z-index: 1;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

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

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

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--primary-color-shadow-medium);
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-4 {
  gap: 16px;
}

.gap-8 {
  gap: 32px;
}

.mb-8 {
  margin-bottom: 32px;
}

.mb-16 {
  margin-bottom: 64px;
}

.py-16 {
  padding-top: 64px;
  padding-bottom: 64px;
}

.py-20 {
  padding-top: 80px;
  padding-bottom: 80px;
}

.px-6 {
  padding-left: 24px;
  padding-right: 24px;
}

.rounded-lg {
  border-radius: 8px;
}

.rounded-2xl {
  border-radius: 16px;
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.min-h-screen {
  min-height: 100vh;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.overflow-hidden {
  overflow: hidden;
}

/* Header Styles */
.header {
  position: absolute;
  top: 15px;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 9000;
}

/* Dark theme header styling */
[data-theme="dark"] .header-content {
  background-color: var(--bg-secondary);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .icon-box {
  background-color: var(--bg-light);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* Mobile Header Styles */
.mobile-header {
  position: absolute;
  top: 0px;
  left: 16px;
  right: 16px;
  z-index: 10;
  display: none;
}

.mobile-header-content {
  display: flex;
  width: 100%;
  max-width: 343px;
  height: 56px;
  padding: 0 11px;
  justify-content: space-between;
  align-items: center;
  border-radius: 12px;
  background: var(--bg-primary);
  box-shadow: 0 4px 15px 0 var(--black-alpha-17);
  margin: 0 auto;
}

.mobile-login-btn {
  display: flex;
  width: 88.614px;
  height: 24px;
  padding: 11.077px 13.846px;
  justify-content: center;
  align-items: center;
  gap: 4.615px;
  border-radius: 2.769px;
  background: var(--primary-color);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-login-btn:hover {
  background: var(--primary-color-dark);
  transform: scale(1.05);
}

.mobile-login-text {
  width: 48.105px;
  color: var(--bg-primary);
  font-family: "Almarai", -apple-system, Roboto, Helvetica, sans-serif;
  font-size: 7.385px;
  font-weight: 700;
  line-height: normal;
  text-transform: uppercase;
  white-space: nowrap;
}

.mobile-login-icon {
  width: 14.769px;
  height: 14.769px;
  flex-shrink: 0;
}

.mobile-center-content {
  display: flex;
  width: 193px;
  justify-content: space-between;
  align-items: center;
}

.mobile-logo {
  width: 82px;
  height: 22.726px;
  object-fit: contain;
}

.mobile-menu-btn {
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
  opacity: 0.7;
  transform: scale(1.1);
}

/* Mobile Navigation Menu Styles */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  transform: translateY(-100%);
}

.mobile-nav.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-nav-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  min-height: 100vh;
  padding: 24px 16px;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.mobile-nav.active .mobile-nav-content {
  transform: translateY(0);
}

.mobile-nav-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.mobile-nav-close:hover {
  background: #f5f5f5;
  transform: scale(1.1);
}

.mobile-nav-items {
  margin-top: 80px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-nav-item {
  border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-item:last-child {
  border-bottom: none;
  margin-top: 20px;
}

.mobile-nav-button {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px 0;
  background: transparent;
  border: none;
  text-decoration: none;
  color: #27272a;
  font-family: "Almarai", -apple-system, Roboto, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-nav-button:hover {
  background: #f8f9fa;
  padding-left: 10px;
}

.mobile-nav-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.mobile-nav-primary {
  background: var(--primary-color) !important;
  color: white !important;
  border-radius: 12px;
  padding: 16px 20px !important;
  margin-top: 10px;
  justify-content: center;
}

.mobile-nav-primary:hover {
  background: var(--primary-color);
  padding-left: 20px !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(217, 49, 72, 0.3);
}

.language-switcher .language-toggle {
  background: var(--primary-color);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  min-width: 40px;
  text-align: center;
}

.header-content {
  height: 80px;
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-box {
  background-color: white;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.icon-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px -1px rgba(0, 0, 0, 0.15);
}

.icon-box:hover .icon {
  transform: scale(1.1);
}

.icon {
  width: 20px;
  height: 20px;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

.theme-toggle {
  display: flex;
  align-items: center;
  height: 40px;
  width: 80px;
  background-color: #60a5fa;
  border-radius: 20px;
  padding: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  border: none;
  outline: none;
  /* Remove default button styling */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.theme-toggle:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.theme-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(96, 165, 250, 0.3);
}

.theme-dot {
  height: 28px;
  width: 28px;
  background-color: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Dark theme toggle styling */
[data-theme="dark"] .theme-toggle {
  background-color: #2d3748;
}

[data-theme="dark"] .theme-toggle .theme-dot {
  transform: translateX(40px);
  background-color: #1a202c;
}

/* Fix for RTL direction - move dot in opposite direction */
[dir="rtl"][data-theme="dark"] .theme-toggle .theme-dot {
  transform: translateX(-40px);
}

/* Ensure LTR dark theme works properly */
[dir="ltr"][data-theme="dark"] .theme-toggle .theme-dot {
  transform: translateX(40px);
}

/* Sun/Moon icons */
.theme-dot::before {
  content: "☀️";
  font-size: 16px;
  transition: all 0.3s ease;
}

[data-theme="dark"] .theme-dot::before {
  content: "🌙";
  transform: rotate(180deg);
}

/* RTL should respect theme, not override it */
[dir="rtl"] .theme-dot::before {
  content: "☀️";
}

[dir="rtl"][data-theme="dark"] .theme-dot::before {
  content: "🌙";
  transform: rotate(180deg);
}

/* Mobile enhancements for theme toggle */
@media (max-width: 768px) {
  .theme-toggle {
    height: 36px;
    width: 72px;
    border-radius: 18px;
    padding: 3px;
    /* Add touch-friendly tap area */
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Improve touch feedback */
    -webkit-tap-highlight-color: transparent;
    position: relative;
  }

  .theme-toggle::after {
    content: "";
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 22px;
    /* Invisible tap area extension */
    background: transparent;
  }

  .theme-dot {
    height: 26px;
    width: 26px;
    /* Better visual feedback on mobile */
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
  }

  .theme-dot::before {
    font-size: 14px;
  }

  /* Enhanced hover/active states for mobile */
  .theme-toggle:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(96, 165, 250, 0.4);
  }

  .theme-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
  }

  [data-theme="dark"] .theme-toggle:active {
    box-shadow: 0 2px 8px rgba(45, 55, 72, 0.6);
  }

  [data-theme="dark"] .theme-toggle:focus {
    outline-color: var(--primary-color);
  }

  /* Adjust translation for smaller toggle */
  [data-theme="dark"] .theme-toggle .theme-dot {
    transform: translateX(36px);
  }

  [dir="rtl"][data-theme="dark"] .theme-toggle .theme-dot {
    transform: translateX(-16px);
  }

  [dir="ltr"][data-theme="dark"] .theme-toggle .theme-dot {
    transform: translateX(16px);
  }

  /* Smooth animation for mobile */
  .theme-toggle .theme-dot {
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
}

/* Extra small screens (320px and below) */
@media (max-width: 320px) {
  .theme-toggle {
    height: 32px;
    width: 64px;
    border-radius: 16px;
    padding: 2px;
  }

  .theme-dot {
    height: 24px;
    width: 24px;
  }

  .theme-dot::before {
    font-size: 12px;
  }

  /* Adjust translation for extra small toggle */
  [data-theme="dark"] .theme-toggle .theme-dot {
    transform: translateX(32px);
  }

  [dir="rtl"][data-theme="dark"] .theme-toggle .theme-dot {
    transform: translateX(-32px);
  }

  [dir="ltr"][data-theme="dark"] .theme-toggle .theme-dot {
    transform: translateX(32px);
  }
}

/* Accessibility: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .theme-toggle,
  .theme-dot,
  .theme-dot::before {
    transition: none !important;
    animation: none !important;
  }

  .theme-toggle:hover {
    transform: none !important;
  }

  .theme-toggle:active {
    transform: none !important;
  }
}

/* Enhanced focus indicators for keyboard navigation */
.theme-toggle:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(49, 192, 217, 0.2);
}

[data-theme="dark"] .theme-toggle:focus-visible {
  box-shadow: 0 0 0 6px rgba(49, 192, 217, 0.3);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .theme-toggle {
    border: 2px solid currentColor;
  }

  .theme-dot {
    border: 1px solid currentColor;
  }
}

.logo {
  height: 64px;
  width: auto;
}

/* Animated Math Icon Styles */
.math-animated-icon {
  animation: iconFloat 3s ease-in-out infinite;
}

.math-animated-icon:hover {
  animation-play-state: paused;
  transform: scale(1.1);
}

.icon-bg {
  transition: all 0.5s ease;
  animation: bgPulse 4s ease-in-out infinite;
}

.math-symbol {
  opacity: 0;
  animation: symbolAppear 0.8s ease-out forwards;
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  animation: symbolDraw 2s ease-out forwards,
    symbolFloat 3s ease-in-out infinite;
}

.plus-symbol {
  animation-delay: 0.2s;
}

.equals-symbol {
  animation-delay: 0.4s;
}

.pi-symbol {
  animation-delay: 0.6s;
}

.sqrt-symbol {
  animation-delay: 0.8s;
}

.sigma-symbol {
  animation-delay: 1s;
}

.infinity-symbol {
  animation-delay: 1.2s;
}

/* Dark theme math icon adjustments */
[data-theme="dark"] .icon-bg {
  fill: var(--primary-color);
  opacity: 0.2;
  filter: drop-shadow(0 0 10px rgba(217, 49, 72, 0.3));
}

[data-theme="dark"] .math-symbol {
  stroke: var(--primary-color-light);
  filter: drop-shadow(0 0 5px rgba(239, 178, 186, 0.5));
}

/* Light theme math icon adjustments */
[data-theme="light"] .icon-bg,
:root .icon-bg {
  opacity: 0.1;
  filter: none;
}

[data-theme="light"] .math-symbol,
:root .math-symbol {
  stroke: var(--primary-color);
  filter: none;
}

/* Keyframe animations */
@keyframes iconFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  25% {
    transform: translateY(-5px) rotate(1deg);
  }

  50% {
    transform: translateY(-3px) rotate(-0.5deg);
  }

  75% {
    transform: translateY(-7px) rotate(0.5deg);
  }
}

@keyframes bgPulse {
  0%,
  100% {
    opacity: 0.1;
    transform: scale(1);
  }

  50% {
    opacity: 0.15;
    transform: scale(1.02);
  }
}

@keyframes symbolDraw {
  0% {
    stroke-dashoffset: 20;
    opacity: 0;
  }

  50% {
    opacity: 0.7;
  }

  100% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes symbolFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  33% {
    transform: translateY(-2px) rotate(1deg);
  }

  66% {
    transform: translateY(1px) rotate(-1deg);
  }
}

/* Dark theme math symbols */
[data-theme="dark"] .hero-icon::before {
  color: var(--primary-color-light);
  text-shadow: 0 0 15px rgba(239, 178, 186, 0.6),
    0 0 25px rgba(217, 49, 72, 0.4);
  filter: drop-shadow(0 0 10px rgba(239, 178, 186, 0.5));
}

[data-theme="dark"] .hero-icon::after {
  color: var(--primary-color-light);
  text-shadow: 0 0 12px rgba(239, 178, 186, 0.5),
    0 0 20px rgba(217, 49, 72, 0.3);
  filter: drop-shadow(0 0 8px rgba(239, 178, 186, 0.4));
}

/* Keyframes for mathematical symbols animations */
@keyframes mathSymbolsFloat {
  0%,
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8) rotate(0deg);
  }

  25% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(1) rotate(5deg);
  }

  50% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1.1) rotate(-3deg);
  }

  75% {
    opacity: 0.4;
    transform: translate(-50%, -50%) scale(0.9) rotate(2deg);
  }
}

@keyframes mathSymbolsFloat2 {
  0%,
  100% {
    opacity: 0;
    transform: translateY(0) scale(0.7) rotate(0deg);
  }

  20% {
    opacity: 0.2;
    transform: translateY(-10px) scale(0.9) rotate(-8deg);
  }

  40% {
    opacity: 0.5;
    transform: translateY(-5px) scale(1.2) rotate(4deg);
  }

  60% {
    opacity: 0.3;
    transform: translateY(-15px) scale(0.8) rotate(-2deg);
  }

  80% {
    opacity: 0.1;
    transform: translateY(-8px) scale(1) rotate(6deg);
  }
}

/* Hero Section */
.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--bg-primary);
  transition: all 0.3s ease;
}

/* Dark theme hero styling */
[data-theme="dark"] .hero {
  background-color: var(--bg-primary);
  position: relative;
}

[data-theme="dark"] .hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(26, 26, 26, 0.7);
  z-index: 1;
  pointer-events: none;
}

[data-theme="dark"] .hero-content {
  position: relative;
  z-index: 2;
}

.hero-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* gap: 92px; */
  width: 100%;
}

.hero-visual {
  position: relative;
  flex-shrink: 0;
}

.hero-circle {
  position: relative;
  width: 1057px;
  height: 1057px;
  border-radius: 50%;
  background: #e95353;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.circle-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.hero-person-image {
  position: absolute;
  width: 1171px;
  height: 781px;
  left: 158px;
  top: 295px;
  object-fit: cover;
  z-index: 2;
}

.hero-text-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-left: auto;
  margin-right: auto;
  width: 695px;
}

#teacher-hero-image {
  animation: heroImageFloat 6s ease-in-out infinite;
  transition: transform 0.3s ease;
}

#teacher-hero-image:hover {
  transform: scale(1.02);
}

.hero-icon {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 44px;
  position: relative;
}

/* Mathematical symbols overlay */
.hero-icon::before {
  content: "+ = π √ Σ ∞";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  opacity: 0;
  animation: mathSymbolsFloat 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
  text-shadow: 0 0 10px rgba(217, 49, 72, 0.3);
  letter-spacing: 8px;
}

.hero-icon::after {
  content: "∆ ∑ ∫ ∴ ∈ ∅";
  position: absolute;
  top: 20%;
  right: -10%;
  font-size: 18px;
  font-weight: bold;
  color: var(--primary-color);
  opacity: 0;
  animation: mathSymbolsFloat2 5s ease-in-out infinite;
  animation-delay: 2s;
  pointer-events: none;
  z-index: 1;
  text-shadow: 0 0 8px rgba(217, 49, 72, 0.2);
  letter-spacing: 6px;
}

.math-icon {
  width: 116px;
  height: 116px;
  object-fit: contain;
}

/* Math animated icon hover effects */
.math-animated-icon:hover {
  transform: scale(1.1) rotate(5deg);
  filter: drop-shadow(0 0 20px rgba(217, 49, 72, 0.4));
  transition: all 0.3s ease;
}

.hero-icon:hover::before {
  animation-play-state: paused;
  opacity: 0.8 !important;
  transform: translate(-50%, -50%) scale(1.3) rotate(10deg) !important;
  text-shadow: 0 0 20px rgba(217, 49, 72, 0.6) !important;
}

.hero-icon:hover::after {
  animation-play-state: paused;
  opacity: 0.6 !important;
  transform: translateY(-10px) scale(1.4) rotate(-10deg) !important;
  text-shadow: 0 0 15px rgba(217, 49, 72, 0.5) !important;
}

/* Dark theme hover effects */
[data-theme="dark"] .math-animated-icon:hover {
  filter: drop-shadow(0 0 25px rgba(239, 178, 186, 0.6));
}

[data-theme="dark"] .hero-icon:hover::before {
  text-shadow: 0 0 25px rgba(239, 178, 186, 0.8),
    0 0 40px rgba(217, 49, 72, 0.6) !important;
}

[data-theme="dark"] .hero-icon:hover::after {
  text-shadow: 0 0 20px rgba(239, 178, 186, 0.7),
    0 0 35px rgba(217, 49, 72, 0.5) !important;
}

.hero-title {
  font-family: "Almarai", sans-serif;
  font-size: 50px;
  font-weight: 700;
  line-height: 1.48;
  letter-spacing: -2.19px;
  text-align: right;
  margin: 0;
}

[dir="ltr"] .hero-title {
  text-align: left;
}

.title-main {
  color: #333333;
}

.title-secondary {
  color: #333333;
}

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

.hero-name-svg {
  position: absolute;
  bottom: -16px;
  left: 45%;
  transform: translateX(-50%) rotate(-1.067deg);
  z-index: -1;
}

@media (max-width: 1024px) {
  .hero-name-svg {
    bottom: -15px;
    left: 35%;
    /* transform: translateX(-38%) rotate(-15.067deg); */
    width: 50%;
  }

  /* Responsive math icon animations */
  .hero-icon::before {
    font-size: 18px;
    letter-spacing: 4px;
    animation-duration: 3s;
  }

  .hero-icon::after {
    font-size: 14px;
    letter-spacing: 3px;
    animation-duration: 4s;
    right: -5%;
  }

  .math-animated-icon {
    animation-duration: 2.5s;
  }
}

@media (max-width: 768px) {
  /* Mobile optimizations for math animations */
  .hero-icon::before {
    font-size: 14px;
    letter-spacing: 2px;
    animation-duration: 2.5s;
  }

  .hero-icon::after {
    font-size: 12px;
    letter-spacing: 2px;
    animation-duration: 3.5s;
    right: 0%;
  }

  .math-animated-icon {
    animation-duration: 2s;
  }

  .hero-icon:hover::before,
  .hero-icon:hover::after {
    transform: none !important;
    animation-play-state: running;
  }
}

.hero-name-path {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  opacity: 0;
  filter: drop-shadow(0 0 5px rgba(217, 49, 72, 0.3));
  animation: brushStroke 2.8s ease-out 0.6s forwards;
}

@keyframes brushStroke {
  0% {
    stroke-dashoffset: 400;
    opacity: 0;
    transform: translateY(10px) skewX(-15deg);
    stroke-width: 15;
    filter: drop-shadow(0 0 10px rgba(217, 49, 72, 0.6)) blur(3px);
  }

  15% {
    opacity: 0.4;
    transform: translateY(5px) skewX(-10deg);
    stroke-width: 8;
    filter: drop-shadow(0 0 8px rgba(217, 49, 72, 0.5)) blur(2px);
  }

  30% {
    stroke-dashoffset: 300;
    opacity: 0.6;
    transform: translateY(2px) skewX(-5deg);
    stroke-width: 12;
    filter: drop-shadow(0 0 6px rgba(217, 49, 72, 0.4)) blur(1px);
  }

  50% {
    stroke-dashoffset: 200;
    opacity: 0.8;
    transform: translateY(-2px) skewX(2deg);
    stroke-width: 10;
    filter: drop-shadow(0 0 4px rgba(217, 49, 72, 0.3)) blur(0.5px);
  }

  70% {
    stroke-dashoffset: 100;
    opacity: 0.9;
    transform: translateY(-1px) skewX(1deg);
    stroke-width: 11;
    filter: drop-shadow(0 0 3px rgba(217, 49, 72, 0.2));
  }

  85% {
    stroke-dashoffset: 20;
    transform: translateY(1px) skewX(-1deg);
    stroke-width: 9;
  }

  100% {
    stroke-dashoffset: 0;
    opacity: 1;
    transform: translateY(0) skewX(0deg);
    stroke-width: 10;
    filter: drop-shadow(0 0 2px rgba(217, 49, 72, 0.2));
  }
}

.hero-subtitle {
  font-family: "Almarai", sans-serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 52px;
  color: #595c5e;
  text-align: right;
  width: 621px;
  margin: 0;
}

[dir="ltr"] .hero-subtitle {
  text-align: left;
}

.hero-cta {
  position: relative;
  width: 359.826px;
  height: 94.572px;
  margin-top: 15px;
}

.cta-scribble {
  position: absolute;
  top: 0;
  left: 0;
  width: 358px;
  height: 88px;
  transform: rotate(1.075deg);
}

.cta-button {
  position: absolute;
  left: 47px;
  top: 14px;
  width: 287px;
  height: 62px;
  background-color: var(--primary-color);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 30px;
  transform: rotate(0.993deg);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.cta-button:hover {
  background-color: var(--primary-color);
  transform: rotate(0.993deg) scale(1.05) translateY(-2px);
  box-shadow: 0 10px 30px var(--primary-color-shadow-light);
}

.cta-button:active {
  transform: rotate(0.993deg) scale(1.02);
}

.cta-text {
  color: white;
  font-family: "Almarai", sans-serif;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

[dir="ltr"] .cta-text {
  font-size: 12px;
}

.cta-icon {
  width: 38px;
  height: 38px;
  transform: rotate(-0.993deg);
  flex-shrink: 0;
}

/* Features Section */
.features {
  padding: 80px 0;
}

.section-title {
  margin: 0 auto 64px;
  width: 377px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: center center;
  transition: all 0.3s ease;
}

.section-title:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.section-title h2 {
  position: absolute;
  bottom: 10px;
  font-size: 30px;
  font-weight: bold;
  color: white;
  text-align: center;
  animation: titleGlow 2s ease-in-out infinite alternate;
}

[dir="ltr"] .section-title h2 {
  font-size: 18px;
}

@keyframes titleGlow {
  0% {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  }

  100% {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.6),
      0 0 30px rgba(255, 255, 255, 0.4);
  }
}

@media (max-width: 1024px) {
  .section-title {
    width: 100%;
    padding: 0 20px;
  }
}

.features-grid {
  display: flex;
  justify-content: end;
  align-items: center;
  gap: 16px;
  height: 240px;
}

.feature-card {
  position: relative;
  width: 425px;
  height: 237px;
  flex-shrink: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.feature-card:hover {
  transform: translateY(-8px) scale(1.02);
  filter: drop-shadow(0 15px 35px rgba(217, 49, 72, 0.15));
}

.feature-card:hover .feature-bg {
  transform: rotate(0.891deg) scale(1.05);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
  background-color: rgba(217, 49, 72, 0.3);
}

@media (max-width: 1024px) {
  .feature-card {
    width: 100%;
  }
}

.feature-content {
  position: absolute;
  left: 62px;
  top: 36px;
  width: 313px;
  height: 162px;
  padding: 32px 0px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
  transform: rotate(0.764deg);
}

.feature-bg {
  position: absolute;
  left: 0;
  top: 0;
  width: 422px;
  height: 228px;
  transform: rotate(0.891deg);
  transition: all 0.4s ease;
}

.feature-icon {
  width: 67px;
  height: 67px;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  background-color: rgba(217, 49, 72, 0.2);
  transition: all 0.3s ease;
}

.feature-icon-img {
  width: 41px;
  height: 41px;
  transform: rotate(-0.764deg);
  transition: transform 0.3s ease;
}

.feature-title {
  font-size: 27px;
  font-family: "Almarai", sans-serif;
  font-weight: 800;
  text-align: right;
  transition: color 0.3s ease;
}

[dir="ltr"] .feature-title {
  text-align: left;
}

/* Testimonial Section */
.testimonial {
  position: relative;
  width: 100%;
  height: 496px;
  background-color: var(--primary-color);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: testimonialFadeIn 1s ease-out forwards;
}

.testimonial-shape {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
}

[dir="rtl"] .testimonial-shape {
  left: auto;
  right: 0;
}

@media (max-width: 1024px) {
  .testimonial {
    height: auto;
    padding: 40px 0;
  }

  .testimonial-image {
    display: none;
  }
}

.testimonial-image {
  opacity: 0;
  transform: scale(0.8) rotate(-5deg);
  animation: testimonialImageIn 1s ease-out 0.4s forwards;
}

.testimonial-image img {
  transition: all 0.3s ease;
  animation: testimonialImageFloat 4s ease-in-out infinite;
}

.testimonial-image:hover img {
  transform: scale(1.05) rotate(2deg);
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

.testimonial-left-svg {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  animation: floatLeft 6s ease-in-out infinite;
}

@media (max-width: 1024px) {
  .testimonial-left-svg {
    display: none;
  }
}

.testimonial-right-svg {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  animation: floatRight 5s ease-in-out infinite;
}

/* SVG Path Animation */
.testimonial-left-svg path,
.testimonial-right-svg path {
  stroke: var(--primary-color-light);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: drawLine 3s ease-in-out infinite alternate;
}

/* Staggered animation for multiple paths */
.testimonial-left-svg path:nth-child(1) {
  animation-delay: 0s;
}

.testimonial-left-svg path:nth-child(2) {
  animation-delay: 0.5s;
}

.testimonial-left-svg path:nth-child(3) {
  animation-delay: 1s;
}

.testimonial-left-svg path:nth-child(4) {
  animation-delay: 1.5s;
}

.testimonial-left-svg path:nth-child(5) {
  animation-delay: 2s;
}

.testimonial-left-svg path:nth-child(6) {
  animation-delay: 2.5s;
}

.testimonial-right-svg path:nth-child(1) {
  animation-delay: 0.3s;
}

.testimonial-right-svg path:nth-child(2) {
  animation-delay: 0.8s;
}

.testimonial-right-svg path:nth-child(3) {
  animation-delay: 1.3s;
}

.testimonial-right-svg path:nth-child(4) {
  animation-delay: 1.8s;
}

.testimonial-right-svg path:nth-child(5) {
  animation-delay: 2.3s;
}

.testimonial-right-svg path:nth-child(6) {
  animation-delay: 2.8s;
}

.testimonial-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80%;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(50px);
  animation: testimonialSlideUp 1.2s ease-out 0.3s forwards;
}

.testimonial-content {
  position: relative;
  font-family: "Almarai", sans-serif;
  font-size: 43px;
  font-weight: bold;
  color: white;
  line-height: 71px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: scale(0.8) translateY(30px);
  animation: testimonialContentIn 1s ease-out 0.6s forwards;
}

.testimonial-content-text {
  animation: testimonialTextGlow 3s ease-in-out infinite;
  transition: all 0.3s ease;
}

.testimonial-content-text:hover {
  transform: scale(1.02);
  text-shadow: 0 0 25px rgba(255, 255, 255, 0.8);
}

@media (max-width: 1024px) {
  .testimonial-content {
    font-size: 18px;
    line-height: 48px;
    width: 90%;
  }
}

.testimonial-cta {
  position: relative;
  width: 360px;
  height: 95px;
  flex-shrink: 0;
  opacity: 0;
  transform: translateY(20px) rotate(-5deg);
  animation: testimonialCtaIn 0.8s ease-out 1s forwards;
}

.testimonial-scribble {
  position: absolute;
  left: 0;
  top: 0;
  width: 358px;
  height: 88px;
  transform: rotate(1.075deg);
  flex-shrink: 0;
  transition: all 0.3s ease;
  animation: testimonialScribbleFloat 6s ease-in-out infinite;
}

.testimonial-cta:hover .testimonial-scribble {
  transform: rotate(2deg) scale(1.02);
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.1));
}

.testimonial-btn {
  position: absolute;
  left: 47px;
  top: 14px;
  display: flex;
  width: 287px;
  height: 62px;
  transform: rotate(0.993deg);
  padding: 24px 30px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  border-radius: 6px;
  background: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.testimonial-btn:hover {
  transform: rotate(0.993deg) scale(1.08) translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
}

.testimonial-btn:active {
  transform: rotate(0.993deg) scale(1.02);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.testimonial-btn-text {
  font-family: "Almarai", -apple-system, Roboto, Helvetica, sans-serif;
  font-size: 25px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  text-transform: uppercase;
  position: relative;
  text-transform: uppercase;
  color: var(--primary-color);
  text-align: center;
}

/* Course Section */
.courses {
  padding: 80px 0;
}

.courses-grid {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.courses-row {
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

.course-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.4s ease;
  cursor: pointer;
}

.course-card:hover {
  transform: translateY(-10px);
}

.course-card:hover .course-image {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.course-card:hover .course-info {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.course-image {
  height: 384px;
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  transition: all 0.4s ease;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .course-card {
    width: 100%;
  }

  .course-image {
    height: 250px;
    object-fit: contain;
  }
}

.course-info {
  margin-top: -80px;
  width: 83.33%;
  border-radius: 16px;
  background-color: var(--bg-primary);
  padding: 24px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
}

/* Dark theme course info styling */
[data-theme="dark"] .course-info {
  background-color: #ffffff;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

@media (max-width: 1024px) {
  .course-info {
    width: 100%;
  }
}

.course-title {
  margin-bottom: 16px;
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-align: center;
}

@media (max-width: 1024px) {
  .course-title {
    font-size: 18px;
  }
}

.course-description {
  font-size: 18px;
  font-weight: bold;
  color: #6b7280;
  text-align: center;
}

@media (max-width: 1024px) {
  .course-description {
    font-size: 16px;
  }
}

/* Footer */
.footer {
  background-color: #212526;
  min-height: 660px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-container {
  max-width: 1440px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 46px;
  padding: 112px 20px 68px;
}

.footer-logo-section {
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-logo {
  width: auto;
  max-height: 100px;
}

.footer-contact {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 37px;
}

.contact-social-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 43px;
}

.contact-info-svg {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-info-svg text {
  font-display: swap;
  text-rendering: optimizeLegibility;
}

.contact-info-svg text[direction="rtl"] {
  unicode-bidi: bidi-override;
  direction: rtl;
}

.social-icons-group {
  display: flex;
  align-items: center;
  gap: 37px;
}

.whatsapp-contact {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 1024px) {
  .whatsapp-contact img {
    width: 32px;
    height: 32px;
  }
}

.whatsapp-contact p {
  color: #fff;
  font-family: "Almarai", -apple-system, Roboto, Helvetica, sans-serif;
  font-size: 21px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  margin: 0;
}

@media (max-width: 1024px) {
  .whatsapp-contact p {
    font-size: 12px;
  }
}

.social-icon {
  width: 76.296px;
  height: 76.318px;
  display: block;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-icon:hover {
  transform: scale(1.1) translateY(-3px);
  filter: drop-shadow(0 8px 16px rgba(217, 49, 72, 0.3));
}

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

.social-icon svg {
  width: 100%;
  height: 100%;
}

.footer-slogan {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 7px;
  width: 603px;

  height: 71px;
}

.slogan-icon {
  width: 50px;
  height: 50px;
}

.slogan-text {
  color: #fff;
  text-align: center;
  font-family: "Almarai", -apple-system, Roboto, Helvetica, sans-serif;
  font-size: 21px;
  font-style: normal;
  font-weight: 700;
  line-height: 71px;
  margin: 0;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: #bcbcbc;
  margin: 27px 0 0 0;
}

.footer-copyright {
  color: #e94e1b;
  text-align: center;
  font-family: "Poppins", -apple-system, Roboto, Helvetica, sans-serif;
  font-size: 24px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  text-transform: capitalize;
  margin: 0;
}

.copyright-text {
  color: #fff;
  font-weight: 400;
}

.copyright-brand {
  color: #e94e1b;
  font-weight: 400;
}

/* Footer Responsive Design */
@media (max-width: 1024px) {
  .footer-contact {
    gap: 30px;
  }

  .contact-social-wrapper {
    gap: 35px;
  }

  .social-icons-group {
    gap: 30px;
  }

  .social-icon {
    width: 65px;
    height: 65px;
  }

  .footer-slogan {
    width: 500px;
    gap: 6px;
  }

  .slogan-text {
    font-size: 19px;
    line-height: 60px;
  }

  .footer-copyright {
    font-size: 22px;
  }
}

@media (max-width: 768px) {
  .footer-container {
    padding: 80px 15px 50px;
    gap: 35px;
  }

  .footer-contact {
    flex-direction: column;
    gap: 25px;
  }

  .contact-social-wrapper {
    /* flex-direction: column; */
    gap: 25px;
  }

  .contact-info-svg {
    width: 40px;
    height: auto;
  }

  .social-icons-group {
    gap: 25px;
  }

  .social-icon {
    width: 34px;
    height: 34px;
  }

  .footer-slogan {
    width: 90%;
    /* flex-direction: column; */
    align-items: center;
    height: auto;
    gap: 10px;
  }

  .slogan-icon {
    width: 40px;
    height: 40px;
  }

  .slogan-text {
    font-size: 17px;
    line-height: 1.4;
    text-align: center;
  }

  .footer-copyright {
    font-size: 18px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer-container {
    padding: 60px 10px 40px;
    gap: 25px;
  }

  .contact-info-svg {
    width: 50px;
  }

  .social-icon {
    width: 34px;
    height: 34px;
  }

  .social-icons-group {
    gap: 20px;
  }

  .slogan-icon {
    width: 35px;
    height: 35px;
  }

  .slogan-text {
    font-size: 15px;
  }

  .footer-copyright {
    font-size: 16px;
  }
}

.text-gray-800 {
  color: #1f2937;
}

.text-brand-red {
  color: var(--primary-color);
}

.text-dark-gray {
  color: #000;
}

[data-theme="dark"] .text-dark-gray {
  color: #fff;
}

.red-fill {
  fill: var(--primary-color);
}

/* SVG Styling */
.title-svg {
  height: 64px;
  width: 384px;
  fill: var(--primary-color);
}

/* Header Responsive Design */
@media (max-width: 768px) {
  .desktop-header {
    display: none;
  }

  .mobile-header {
    display: block;
  }

  .hero {
    padding-top: 120px;
    /* Adjust for mobile header height */
  }
}

@media (min-width: 769px) {
  .mobile-header {
    display: none;
  }

  .desktop-header {
    display: block;
  }
}

/* Responsive Design */
@media (max-width: 1400px) {
  .hero-content {
    /* gap: 60px;
    margin-top: 60px; */
    margin-top: 100px !important;
  }

  .hero-circle {
    width: 800px;
    height: 800px;
  }

  .hero-person-image {
    width: 888px;
    height: 592px;
    left: 120px;
    top: 224px;
  }

  .hero-text-content {
    width: 500px;
    padding: 0 20px;

    /* margin: 0; */
  }

  .hero-title {
    font-size: 60px;
  }

  .hero-subtitle {
    font-size: 26px;
    width: 500px;
  }
}

@media (max-width: 1024px) {
  .hero-content {
    flex-direction: column;
    align-items: center;
    gap: 40px;
    text-align: center;
  }

  .hero-circle {
    width: 600px;
    height: 600px;
  }

  .hero-person-image {
    width: 702px;
    height: 468px;
    left: 95px;
    top: 177px;
  }

  .hero-text-content {
    width: 100%;
    align-items: center;
    margin-top: 20px;
  }

  .hero-title {
    font-size: 48px;
    text-align: center;
  }

  .hero-subtitle {
    font-size: 22px;
    width: 90%;
    text-align: center;
  }

  .hero-icon {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 80vh;
    padding: 20px 0;
  }

  .hero-content {
    gap: 30px;
  }

  .hero-circle {
    width: 400px;
    height: 400px;
  }

  .hero-person-image {
    width: 468px;
    height: 312px;
    left: 63px;
    top: 118px;
  }

  .math-icon {
    width: 80px;
    height: 80px;
  }

  .hero-title {
    font-size: 36px;
    line-height: 1.3;
  }

  .hero-subtitle {
    font-size: 18px;
    line-height: 1.5;
    width: 95%;
  }

  .hero-cta {
    width: 300px;
    height: 80px;
  }

  .cta-scribble {
    width: 300px;
    height: 74px;
  }

  .cta-button {
    left: 0px;
    top: 12px;
    width: 260px;
    height: 52px;
    padding: 20px 24px;
  }

  .cta-text {
    font-size: 16px;
  }

  .cta-icon {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 480px) {
  .hero-circle {
    width: 300px;
    height: 300px;
  }

  .hero-person-image {
    width: 351px;
    height: 234px;
    left: 47px;
    top: 89px;
  }

  .math-icon {
    width: 60px;
    height: 60px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-cta {
    width: 250px;
    height: 70px;
  }

  .cta-scribble {
    width: 250px;
    height: 65px;
  }

  .cta-button {
    left: 0px;
    top: 10px;
    width: 260px;
    height: 45px;
    padding: 16px 20px;
  }

  .cta-text {
    font-size: 14px;
  }

  .cta-icon {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 1024px) {
  .features {
    padding: 60px 0;
  }

  .features-grid {
    flex-direction: column;
    height: auto;
    gap: 32px;
    justify-content: center;
  }

  .feature-card {
    width: 100%;
    max-width: 400px;
    height: 200px;
    margin: 0 auto;
  }

  .feature-bg {
    width: 100%;
    height: 100%;
    transform: rotate(0deg);
  }

  .feature-content {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    width: 280px;
    height: 140px;
    padding: 20px 0;
    gap: 16px;
  }

  .feature-title {
    font-size: 22px;
    text-align: center;
    line-height: 1.3;
  }

  .feature-icon {
    width: 55px;
    height: 55px;
  }

  .feature-icon-img {
    width: 35px;
    height: 35px;
    transform: rotate(0deg);
  }

  .courses-row {
    flex-direction: column;
  }

  .course-card {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .features {
    padding: 40px 0;
  }

  .section-title {
    margin-bottom: 40px;
    width: 90%;
  }

  .section-title h2 {
    font-size: 24px;
    padding: 20px;
  }

  .features-grid {
    gap: 24px;
    padding: 0 16px;
  }

  .feature-card {
    max-width: 350px;
    height: 180px;
  }

  .feature-bg {
    width: 100%;
    height: 100%;
    transform: rotate(0deg);
    border-radius: 12px;
  }

  .feature-content {
    width: 250px;
    height: 120px;
    padding: 16px 0;
    gap: 12px;
  }

  .feature-title {
    font-size: 18px;
  }

  .feature-icon {
    width: 45px;
    height: 45px;
    padding: 8px;
  }

  .feature-icon-img {
    width: 30px;
    height: 30px;
    transform: rotate(0deg);
  }
}

@media (max-width: 480px) {
  .features {
    padding: 30px 0;
  }

  .section-title {
    margin-bottom: 30px;
    width: 95%;
  }

  .section-title h2 {
    font-size: 20px;
    padding: 16px;
  }

  .features-grid {
    gap: 20px;
    padding: 0 12px;
  }

  .feature-card {
    max-width: 300px;
    height: 160px;
  }

  .feature-bg {
    width: 100%;
    height: 100%;
    transform: rotate(0deg);
    border-radius: 12px;
  }

  .feature-content {
    width: 220px;
    height: 100px;
    padding: 12px 0;
    gap: 8px;
  }

  .feature-title {
    font-size: 16px;
    line-height: 1.2;
  }

  .feature-icon {
    width: 40px;
    height: 40px;
    padding: 6px;
  }

  .feature-icon-img {
    width: 25px;
    height: 25px;
    transform: rotate(0deg);
  }
}

/* Floating animations for testimonial SVGs */
@keyframes floatLeft {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  25% {
    transform: translateY(-10px) rotate(1deg);
  }

  50% {
    transform: translateY(-5px) rotate(0deg);
  }

  75% {
    transform: translateY(-15px) rotate(-1deg);
  }
}

@keyframes floatRight {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  30% {
    transform: translateY(-8px) rotate(-1deg);
  }

  60% {
    transform: translateY(-12px) rotate(1deg);
  }

  80% {
    transform: translateY(-4px) rotate(0deg);
  }
}

/* SVG Line Drawing Animation */
@keyframes drawLine {
  0% {
    stroke-dashoffset: 300;
    opacity: 0.3;
  }

  50% {
    stroke-dashoffset: 0;
    opacity: 1;
  }

  100% {
    stroke-dashoffset: -300;
    opacity: 0.3;
  }
}

/* Hero Image Float Animation */
@keyframes heroImageFloat {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  25% {
    transform: translateY(-8px) rotate(0.5deg);
  }

  50% {
    transform: translateY(-4px) rotate(0deg);
  }

  75% {
    transform: translateY(-12px) rotate(-0.5deg);
  }
}

/* Enhanced Hero Image Animations */
@keyframes heroImageSlideIn {
  0% {
    opacity: 0;
    transform: translateX(100px) scale(0.8);
    filter: blur(10px);
  }

  50% {
    opacity: 0.7;
    transform: translateX(20px) scale(0.9);
    filter: blur(2px);
  }

  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
}

@keyframes heroImageSlideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-100px) scale(0.8);
    filter: blur(10px);
  }

  50% {
    opacity: 0.7;
    transform: translateX(-20px) scale(0.9);
    filter: blur(2px);
  }

  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
}

@keyframes heroImageBounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(-10deg);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.1) rotate(2deg);
  }

  70% {
    opacity: 0.9;
    transform: scale(0.9) rotate(-1deg);
  }

  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes heroImageGlowPulse {
  0% {
    filter: drop-shadow(0 0 5px var(--primary-color-shadow-light));
  }

  50% {
    filter: drop-shadow(0 0 20px var(--primary-color-shadow-medium))
      drop-shadow(0 0 35px var(--primary-color-shadow-light));
  }

  100% {
    filter: drop-shadow(0 0 5px var(--primary-color-shadow-light));
  }
}

/* Pulse Animation for Icons */
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

/* Fade In Up Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide In Left Animation */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Slide In Right Animation */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ====================================
   BUTTON ICON ANIMATIONS ON HOVER
==================================== */

/* Header Login/Create Account Button Icon Animations */
.btn img {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover img {
  transform: scale(1.15) rotate(5deg);
  filter: brightness(1.1);
}

.btn-primary:hover img {
  filter: brightness(1.3);
}

.btn-outline:hover img {
  filter: brightness(0.9) contrast(1.2);
}

/* Mobile Login Button Icon Animation */
.mobile-login-icon {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-login-btn:hover .mobile-login-icon {
  transform: translateX(3px) scale(1.1);
  filter: brightness(1.2);
}

/* Mobile Menu Button Icon Animation */
.mobile-menu-btn svg {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-btn:hover svg {
  transform: rotate(90deg) scale(1.1);
}

.mobile-menu-btn:hover svg path {
  stroke: var(--primary-color);
}

/* CTA Button Icon Animation */
.cta-icon {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-button:hover .cta-icon {
  transform: rotate(-0.993deg) scale(1.2) translateX(3px);
  animation: pulse-glow 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    filter: brightness(1) drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
  }

  50% {
    filter: brightness(1.3) drop-shadow(0 0 15px rgba(255, 255, 255, 0.6));
  }
}

/* Social Media Icons Animations */
.social-icon svg {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-icon:hover svg {
  animation: bounce-rotate 0.6s ease-in-out;
}

.youtube-icon:hover svg path {
  fill: #ff4444;
  filter: drop-shadow(0 0 8px rgba(255, 68, 68, 0.5));
}

.facebook-icon:hover svg path {
  fill: #4267b2;
  filter: drop-shadow(0 0 8px rgba(66, 103, 178, 0.5));
}

@keyframes bounce-rotate {
  0% {
    transform: scale(1) rotate(0deg);
  }

  25% {
    transform: scale(1.15) rotate(-5deg);
  }

  50% {
    transform: scale(1.2) rotate(5deg);
  }

  75% {
    transform: scale(1.15) rotate(-3deg);
  }

  100% {
    transform: scale(1.1) rotate(0deg);
  }
}

/* Icon Box (Header Icons) Enhanced Animation */
.icon-box .icon {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-box:hover .icon {
  transform: scale(1.2) rotate(10deg);
  filter: drop-shadow(0 0 8px rgba(217, 49, 72, 0.4));
}

/* Additional hover effect for WhatsApp contact icon */
.contact-info-svg {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-contact:hover .contact-info-svg {
  transform: scale(1.1) rotate(-5deg);
  filter: drop-shadow(0 0 10px rgba(37, 211, 102, 0.4));
}

/* Math icons in footer animation */
.slogan-icon {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-slogan:hover .slogan-icon {
  transform: scale(1.1) rotate(360deg);
  filter: drop-shadow(0 0 8px rgba(217, 49, 72, 0.3));
}

/* Footer Logo Hover Animation */
.footer-logo {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.footer-logo:hover {
  transform: scale(1.05) translateY(-5px);
  filter: drop-shadow(0 8px 20px var( --primary-color-light));
}

/* Enhanced WhatsApp Contact Animation */
.whatsapp-contact {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border-radius: 8px;
  padding: 5px;
}

.whatsapp-contact:hover {
  transform: translateY(-3px);
  background-color: rgba(37, 211, 102, 0.1);
}

.contact-info-text {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-contact:hover .contact-info-text {
  color: #25d366;
  transform: translateX(5px);
}

/* Footer Slogan Text Animation */
.slogan-text {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-slogan:hover .slogan-text {
  color: var(--primary-color);
  text-shadow: 0 0 10px var(--primary-color-light);
  transform: scale(1.02);
}

/* Responsive adjustments for animations */
@media (max-width: 768px) {
  /* Reduce animation intensity on mobile for better performance */
  .btn:hover img,
  .mobile-login-btn:hover .mobile-login-icon,
  .mobile-menu-btn:hover svg,
  .cta-button:hover .cta-icon,
  .footer-logo:hover {
    transform: scale(1.05) !important;
  }

  .social-icon:hover svg {
    animation: none;
    transform: scale(1.05);
  }

  .whatsapp-contact:hover {
    transform: none;
    background-color: rgba(37, 211, 102, 0.05);
  }
}

/* ====================================
   TESTIMONIAL SECTION ANIMATIONS
==================================== */

/* Main testimonial section fade in */
@keyframes testimonialFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Testimonial wrapper slide up */
@keyframes testimonialSlideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Testimonial content entrance */
@keyframes testimonialContentIn {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
  }

  60% {
    opacity: 0.8;
    transform: scale(1.02) translateY(-5px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Testimonial CTA entrance */
@keyframes testimonialCtaIn {
  0% {
    opacity: 0;
    transform: translateY(20px) rotate(-5deg);
  }

  70% {
    opacity: 0.9;
    transform: translateY(-3px) rotate(2deg);
  }

  100% {
    opacity: 1;
    transform: translateY(0) rotate(1.075deg);
  }
}

/* Testimonial image entrance */
@keyframes testimonialImageIn {
  0% {
    opacity: 0;
    transform: scale(0.8) rotate(-5deg);
  }

  60% {
    opacity: 0.8;
    transform: scale(1.05) rotate(2deg);
  }

  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* Testimonial image floating animation */
@keyframes testimonialImageFloat {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  25% {
    transform: translateY(-8px) rotate(1deg);
  }

  50% {
    transform: translateY(-4px) rotate(-0.5deg);
  }

  75% {
    transform: translateY(-12px) rotate(1.5deg);
  }
}

/* Enhanced testimonial text glow effect */
@keyframes testimonialTextGlow {
  0%,
  100% {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  }

  50% {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.6),
      0 0 30px rgba(255, 255, 255, 0.4);
  }
}

/* Testimonial scribble floating animation */
@keyframes testimonialScribbleFloat {
  0%,
  100% {
    transform: rotate(1.075deg) translateY(0px);
  }

  33% {
    transform: rotate(0.5deg) translateY(-2px);
  }

  66% {
    transform: rotate(1.5deg) translateY(-1px);
  }
}

/* Accessibility: Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .btn img,
  .mobile-login-icon,
  .mobile-menu-btn svg,
  .cta-icon,
  .social-icon svg,
  .icon-box .icon,
  .contact-info-svg,
  .slogan-icon,
  .footer-logo,
  .contact-info-text,
  .slogan-text,
  .testimonial,
  .testimonial-wrapper,
  .testimonial-content,
  .testimonial-cta,
  .testimonial-image,
  .testimonial-content-text,
  .testimonial-scribble {
    transition: none !important;
    animation: none !important;
  }

  .btn:hover img,
  .mobile-login-btn:hover .mobile-login-icon,
  .mobile-menu-btn:hover svg,
  .cta-button:hover .cta-icon,
  .social-icon:hover svg,
  .icon-box:hover .icon,
  .whatsapp-contact:hover .contact-info-svg,
  .footer-slogan:hover .slogan-icon,
  .footer-logo:hover,
  .whatsapp-contact:hover,
  .whatsapp-contact:hover .contact-info-text,
  .footer-slogan:hover .slogan-text,
  .testimonial-content-text:hover,
  .testimonial-btn:hover,
  .testimonial-cta:hover .testimonial-scribble,
  .testimonial-image:hover img {
    transform: none !important;
    filter: none !important;
    animation: none !important;
    background-color: transparent !important;
    color: inherit !important;
    text-shadow: none !important;
    box-shadow: none !important;
  }
}
