/* styles.css */
/* المتغيرات والألوان */
:root {
  --primary: #5a7acd;
  --secondary: #ffa630;
  --accent: #5a7acd;
  --light: #f0f8ff;
  --dark: #222;
  --success: #284aa7;
  --error: #020202;
  --transition: all 0.3s ease;
  --chat-blue: #25A4F0;
}

/* إعادة الضبط */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* الأنماط الأساسية */
body {
  font-family: 'Cairo', sans-serif;
  background: linear-gradient(135deg, #f9f9f9, #e6f4ff);
  color: var(--dark);
  line-height: 1.7;
  transition: var(--transition);
  scroll-behavior: smooth;
}

/* اللغة الإنجليزية */
body[dir="ltr"] {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body[dir="ltr"] h2:after {
  left: 0;
  right: auto;
}

body[dir="ltr"] li {
  padding-left: 25px;
  padding-right: 0;
}

body[dir="ltr"] li:before {
  left: 0;
  right: auto;
}

/* شاشة التحميل */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s, visibility 0.5s;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  width: 200px;
  height: 200px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  color: var(--primary);
  box-shadow: 0 0 0 15px rgba(255, 255, 255, 0.1),
    0 0 0 30px rgba(255, 255, 255, 0.05),
    0 15px 35px rgba(0, 0, 0, 0.3);
  margin-bottom: 30px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); }
  50% { transform: scale(1.05); }
  100% { transform: scale(0.95); }
}

.loader-img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  animation: pulse 1.5s infinite;
}

.header-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: 50%;
  animation: rotate 15s linear infinite;
}

.loader-text {
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 20px;
}

/* تبديل اللغة */
.language-switcher {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  padding: 8px 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(5px);
}

.lang-btn {
  background: transparent;
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  color: var(--primary);
}

.lang-btn.active {
  background: var(--primary);
  color: white;
}

.lang-btn:hover:not(.active) {
  background: rgba(90, 122, 205, 0.1);
}

/* الهيدر */
header {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 40px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-content {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s forwards 1s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.1;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text x="50%" y="50%" font-family="Arial" font-size="14" fill="white" text-anchor="middle" dominant-baseline="middle">﷽</text></svg>');
  background-repeat: repeat;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.logo {
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--primary);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  animation: rotate 15s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

h1 {
  font-size: 2.8rem;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
  font-size: 1.4rem;
  max-width: 700px;
  margin: 0 auto 20px;
  color: rgba(255, 255, 255, 0.9);
}

/* الأزرار */
.cta-button {
  display: inline-block;
  background: var(--secondary);
  color: var(--primary);
  padding: 15px 40px;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 50px;
  text-decoration: none;
  margin-top: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
  animation: pulse 2s infinite;
}

.cta-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  background: #ffc470;
  animation: none;
}

/* العناوين والنصوص */
h2 {
  color: var(--primary);
  font-size: 2rem;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
}

h2:after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 80px;
  height: 4px;
  background: var(--secondary);
  border-radius: 2px;
}

p {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.video-description {
  text-align: center;
  color: #555;
  font-size: 1.2rem;
  margin-bottom: 30px;
}

ul {
  padding-right: 20px;
  margin-bottom: 20px;
}

li {
  margin-bottom: 12px;
  position: relative;
  padding-right: 25px;
}

li:before {
  content: '✓';
  position: absolute;
  right: 0;
  top: 0;
  width: 22px;
  height: 22px;
  background: var(--secondary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* البطاقات */
.feature-card {
  background: var(--light);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(0, 78, 100, 0.1);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 78, 100, 0.2);
}

.feature-icon {
  font-size: 48px;
  color: var(--primary);
  margin-bottom: 20px;
}

.feature-card h3 {
  color: var(--primary);
  margin-bottom: 15px;
  font-size: 1.4rem;
}

.teacher-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
  border: 1px solid rgba(0, 78, 100, 0.1);
  position: relative;
}

.teacher-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.teacher-img {
  height: 220px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  color: rgba(255, 255, 255, 0.2);
}

.teacher-info {
  padding: 25px;
}

.teacher-info h3 {
  color: var(--primary);
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.teacher-qualifications {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 15px;
  display: block;
}

.rating {
  display: flex;
  margin-top: 10px;
  gap: 3px;
}

.rating i {
  color: #ffc107;
}

/* النموذج */
.form-container {
  background: linear-gradient(135deg, var(--light), #e0f0ff);
  border-radius: 15px;
  padding: 40px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--primary);
}

input, select, textarea {
  width: 100%;
  padding: 14px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 78, 100, 0.1);
}

button {
  background: var(--primary);
  color: white;
  font-weight: bold;
  padding: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
  grid-column: span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0, 78, 100, 0.3);
}

button:hover {
  background: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 78, 100, 0.4);
}

/* الأسئلة الشائعة */
.faq-container {
  margin-top: 30px;
}

.faq-item {
  margin-bottom: 20px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.faq-question {
  background: var(--primary);
  color: white;
  padding: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
}

.faq-answer {
  background: white;
  padding: 25px;
  display: none;
  border-left: 5px solid var(--secondary);
}

/* الشهادات */
.testimonial {
  background: var(--light);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  border: 1px solid rgba(0, 78, 100, 0.1);
}

.testimonial:before {
  content: "";
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 60px;
  color: rgba(0, 78, 100, 0.1);
  font-family: serif;
  line-height: 1;
}

.testimonial-content {
  font-style: italic;
  margin-bottom: 20px;
  color: #444;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 15px;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.author-info h4 {
  color: var(--primary);
  margin-bottom: 5px;
}

.author-info p {
  color: #666;
  margin: 0;
  font-size: 0.9rem;
}

/* شريط التقدم */
.progress-container {
  margin: 30px 0;
}

.progress-bar {
  height: 10px;
  background: #e0e0e0;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 15px;
}

.progress-fill {
  height: 100%;
  background: var(--success);
  width: 0;
  transition: width 1s ease;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #555;
}

/* بطاقات المستويات */
.level-card {
  background: white;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  border-top: 4px solid var(--secondary);
  text-align: center;
}

.level-card h3 {
  color: var(--primary);
  margin-bottom: 15px;
}

/* الأزرار العائمة */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 100;
  transition: var(--transition);
  text-decoration: none;
  animation: pulse-green 2s infinite;
  animation-delay: 1s;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  animation: none;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.chat-float {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: var(--chat-blue);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 100;
  transition: var(--transition);
  text-decoration: none;
  animation: pulse-blue 2s infinite;
}

.chat-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  animation: none;
}

@keyframes pulse-blue {
  0% { box-shadow: 0 0 0 0 rgba(37, 164, 240, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(37, 164, 240, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 164, 240, 0); }
}

/* الفيديو */
.video-section {
  text-align: center;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 800px;
  margin: 40px auto;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  background: #000;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 15px;
}

.video-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border-radius: 15px;
}

.video-placeholder i {
  font-size: 80px;
  margin-bottom: 20px;
  opacity: 0.8;
}

.video-placeholder p {
  font-size: 1.2rem;
  max-width: 80%;
  margin: 0 auto;
}

/* الفوتر */
footer {
  background: var(--primary);
  color: white;
  padding: 50px 20px 30px;
  text-align: center;
}

.footer-section h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-section h3:after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50px;
  height: 3px;
  background: var(--secondary);
}

.contact-info {
  list-style: none;
  padding: 0;
}

.contact-info li {
  padding-right: 0;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-info li:before {
  content: none;
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  transition: var(--transition);
}

.social-icon:hover {
  background: var(--secondary);
  transform: translateY(-5px);
}

.copyright {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* شريط التقدم في الأعلى */
.progress-top {
  position: fixed;
  top: 0;
  left: 0;
  height: 5px;
  background: var(--secondary);
  z-index: 999;
  width: 0%;
  transition: width 0.2s;
}

/* العودة إلى الأعلى */
.back-to-top {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 99;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent);
  transform: translateY(-5px);
}

/* التنقل */
.navigation {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50px;
  padding: 10px 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 15px;
}

.nav-item a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  padding: 8px 15px;
  border-radius: 30px;
  transition: var(--transition);
}

.nav-item a:hover {
  background: rgba(0, 78, 100, 0.1);
}

.nav-item a.active {
  background: var(--primary);
  color: white;
}

/* عناوين الأقسام */
.section-title {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
}

.section-title i {
  background: var(--primary);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

/* العداد */
.counter {
  display: flex;
  justify-content: space-around;
  margin: 40px 0;
  text-align: center;
}

.counter-item {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  min-width: 180px;
}

.counter-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

.counter-text {
  font-weight: 600;
  color: var(--accent);
}

/* الرسائل */
.success-message {
  background: #d4edda;
  color: #155724;
  padding: 20px;
  border-radius: 10px;
  margin: 20px 0;
  display: none;
  text-align: center;
}

.success-message.show {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* مؤشر تحميل النموذج */
.form-loader {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  z-index: 100;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 15px;
}

.form-loader.active {
  display: flex;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(0, 78, 100, 0.1);
  border-top: 5px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* رسائل الخطأ */
.error-message {
  color: var(--error);
  font-size: 0.9rem;
  margin-top: 5px;
  display: none;
}

/* تفاصيل الاتصال */
.contact-details {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 600;
}