/* ====================================
   STYLE.CSS - ملف التنسيقات الرئيسي
   مركز إبداع التعليمي
   ==================================== */

/* ====================================
   CSS VARIABLES - المتغيرات العامة
   ==================================== */
:root {
  /* الألوان الأساسية */
  --primary-pink: #E91E63;
  --primary-orange: #F9A825;
  --primary-blue: #0288D1;
  --primary-dark: #1a1a2e;
  
  /* ألوان الخلفيات */
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  
  /* ألوان النصوص */
  --text-dark: #2c3e50;
  --text-light: #7f8c8d;
  
  /* ألوان إضافية */
  --error-color: #e74c3c;
  
  /* الظلال */
  --shadow-soft: 0 10px 40px rgba(0,0,0,0.08);
  --shadow-hover: 0 20px 60px rgba(0,0,0,0.15);
  
  /* التحولات والانتقالات */
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ====================================
   GLOBAL RESET - إعادة تعيين شاملة
   ==================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ====================================
   BODY - تنسيق الجسم الرئيسي
   ==================================== */
body {
  font-family: 'Tajawal', sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
  color: var(--text-dark);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ====================================
   ANIMATED BACKGROUND - الخلفية المتحركة
   ==================================== */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.floating-shape {
  position: absolute;
  opacity: 0.15;
  animation: float 20s infinite ease-in-out;
}

.shape-1 {
  top: 10%;
  right: 5%;
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, var(--primary-pink), var(--primary-orange));
  border-radius: 50% 40% 60% 50%;
  animation-delay: 0s;
}

.shape-2 {
  bottom: 15%;
  left: 8%;
  width: 250px;
  height: 250px;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
  border-radius: 60% 50% 40% 60%;
  animation-delay: 5s;
}

.shape-3 {
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-blue));
  border-radius: 40% 60% 50% 60%;
  animation-delay: 10s;
}

/* Animation للأشكال العائمة */
@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(30px, -30px) rotate(90deg); }
  50% { transform: translate(-20px, 20px) rotate(180deg); }
  75% { transform: translate(40px, 30px) rotate(270deg); }
}

/* ====================================
   CONTAINER - الحاوية الرئيسية
   ==================================== */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 20px;
  position: relative;
  z-index: 1;
}

/* ====================================
   HEADER - رأس الصفحة
   ==================================== */
.header {
  text-align: center;
  margin-bottom: 60px;
  animation: fadeInDown 0.8s ease;
}

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

/* الشعار */
.logo-container {
  position: relative;
  display: inline-block;
  margin-bottom: 30px;
}

.logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.logo-image {
  width: auto;
  max-width: 500px;
  height: auto;
  max-height: 280px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transition: var(--transition);
  cursor: pointer;
}

.logo-image:hover {
  transform: scale(1.08) translateY(-8px);
  filter: drop-shadow(0 15px 35px rgba(233, 30, 99, 0.25));
}

.logo-note {
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  background: linear-gradient(135deg, rgba(233, 30, 99, 0.1), rgba(249, 168, 37, 0.1));
  padding: 20px;
  border-radius: 15px;
  line-height: 1.8;
  border: 2px dashed var(--primary-pink);
}

/* العناوين */
.header h1 {
  font-family: 'Cairo', sans-serif;
  font-size: 48px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary-pink), var(--primary-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 15px;
  letter-spacing: -1px;
}

.header .subtitle {
  font-size: 20px;
  color: var(--text-light);
  font-weight: 400;
  margin-bottom: 10px;
}

.header .tagline {
  font-size: 16px;
  color: var(--text-light);
  font-style: italic;
}

/* ====================================
   FORM BOX - صندوق النموذج
   ==================================== */
.form-box {
  background: var(--bg-white);
  border-radius: 30px;
  padding: 50px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

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

/* الشريط العلوي الملون */
.form-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-pink), var(--primary-orange), var(--primary-blue));
}

/* ====================================
   PROGRESS CONTAINER - شريط التقدم
   ==================================== */
.progress-container {
  margin-bottom: 40px;
  position: relative;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  position: relative;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  z-index: 2;
}

/* دوائر الخطوات */
.step-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #adb5bd;
  margin-bottom: 8px;
  transition: var(--transition);
  border: 3px solid transparent;
}

.step-circle.active {
  background: linear-gradient(135deg, var(--primary-pink), var(--primary-orange));
  color: white;
  box-shadow: 0 8px 25px rgba(233, 30, 99, 0.4);
  transform: scale(1.15);
  border-color: white;
}

.step-circle.completed {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
  color: white;
  border-color: white;
}

/* تسميات الخطوات */
.step-label {
  font-size: 13px;
  font-weight: 600;
  color: #adb5bd;
  text-align: center;
  transition: var(--transition);
}

.step-label.active {
  color: var(--primary-pink);
  font-weight: 700;
}

/* شريط التقدم الأفقي */
.progress-bar-bg {
  position: absolute;
  top: 25px;
  left: 5%;
  right: 5%;
  height: 4px;
  background: #e9ecef;
  border-radius: 10px;
  z-index: 1;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-pink), var(--primary-orange));
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 10px rgba(233, 30, 99, 0.4);
}

/* ====================================
   FORM STEPS - خطوات النموذج
   ==================================== */
.step {
  display: none;
  animation: stepFade 0.5s ease;
}

.step.active {
  display: block;
}

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

/* ====================================
   FORM ELEMENTS - عناصر النموذج
   ==================================== */
.form-group {
  margin-bottom: 30px;
  position: relative;
}

/* التسميات */
label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-dark);
  margin-bottom: 10px;
  transition: var(--transition);
}

label .required {
  color: var(--error-color);
  margin-right: 3px;
}

/* حقول الإدخال والقوائم */
input, select {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e9ecef;
  border-radius: 15px;
  font-size: 16px;
  font-family: 'Tajawal', sans-serif;
  transition: var(--transition);
  background: #f8f9fa;
  color: var(--text-dark);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary-pink);
  background: white;
  box-shadow: 0 5px 20px rgba(233, 30, 99, 0.15);
  transform: translateY(-2px);
}

input:hover, select:hover {
  border-color: var(--primary-orange);
}

input.error, select.error {
  border-color: var(--error-color);
  animation: shake 0.5s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

/* رسائل الخطأ */
.error-message {
  color: var(--error-color);
  font-size: 13px;
  margin-top: 8px;
  display: none;
  animation: fadeIn 0.3s ease;
}

.error-message.show {
  display: block;
}

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

/* ====================================
   PHONE GROUP - حقل الهاتف المركب
   ==================================== */
.phone-group {
  display: flex;
  gap: 10px;
}

.phone-group select {
  width: 150px;
  flex-shrink: 0;
}

.phone-group input {
  flex: 1;
}

/* ====================================
   BUTTONS - الأزرار
   ==================================== */
.button-group {
  display: flex;
  gap: 15px;
  margin-top: 40px;
}

button {
  flex: 1;
  padding: 18px 35px;
  border: none;
  border-radius: 15px;
  font-size: 17px;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* تأثير الموجة عند النقر */
button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:hover::before {
  width: 300px;
  height: 300px;
}

/* زر التالي */
.btn-next {
  background: linear-gradient(135deg, var(--primary-pink), var(--primary-orange));
  color: white;
  box-shadow: 0 8px 25px rgba(233, 30, 99, 0.3);
}

.btn-next:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(233, 30, 99, 0.4);
}

/* زر السابق */
.btn-prev {
  background: #e9ecef;
  color: var(--text-dark);
}

.btn-prev:hover:not(:disabled) {
  background: #dee2e6;
  transform: translateY(-2px);
}

/* زر الإرسال */
.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
  color: white;
  box-shadow: 0 8px 25px rgba(2, 136, 209, 0.3);
  font-size: 18px;
  padding: 20px;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(2, 136, 209, 0.4);
}

/* ====================================
   THANK YOU PAGE - صفحة الشكر
   ==================================== */
.thankyou-page {
  display: none;
  text-align: center;
  padding: 60px 30px;
  animation: fadeInUp 0.8s ease;
}

.thankyou-page.active {
  display: block;
}

/* أيقونة النجاح */
.success-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 30px;
  background: linear-gradient(135deg, #4caf50, #8bc34a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  color: white;
  animation: successPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 15px 40px rgba(76, 175, 80, 0.3);
}

@keyframes successPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.thankyou-page h2 {
  font-family: 'Cairo', sans-serif;
  font-size: 36px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary-pink), var(--primary-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

.thankyou-page p {
  font-size: 18px;
  color: var(--text-light);
  line-height: 1.8;
}

/* ====================================
   CONTACT FOOTER - قسم التواصل
   ==================================== */
.contact-footer {
  margin-top: 50px;
  padding: 40px;
  background: linear-gradient(135deg, rgba(233, 30, 99, 0.05), rgba(249, 168, 37, 0.05));
  border-radius: 20px;
  text-align: center;
  animation: fadeInUp 0.8s ease 0.4s backwards;
}

.contact-title {
  font-family: 'Cairo', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 25px;
}

.contact-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: var(--transition);
  border: 2px solid;
}

/* زر واتساب */
.contact-btn-whatsapp {
  background: #25D366;
  color: white;
  border-color: #25D366;
}

.contact-btn-whatsapp:hover {
  background: #20ba5a;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
}

/* زر البريد الإلكتروني */
.contact-btn-email {
  background: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
}

.contact-btn-email:hover {
  background: #026a9e;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(2, 136, 209, 0.3);
}

.contact-icon {
  font-size: 20px;
}

/* ====================================
   COPYRIGHT FOOTER - حقوق الملكية
   ==================================== */
.copyright-footer {
  text-align: center;
  padding: 30px 20px;
  margin-top: 30px;
  border-top: 1px solid #e9ecef;
  animation: fadeInUp 0.8s ease 0.6s backwards;
}

.copyright-footer p {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 400;
  margin: 0;
}

/* ====================================
   CONFETTI EFFECT - تأثير المفرقعات
   ==================================== */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--primary-pink);
  opacity: 0;
}

@keyframes confettiFall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* ====================================
   LOADING OVERLAY - شاشة التحميل
   ==================================== */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  z-index: 9998;
  align-items: center;
  justify-content: center;
}

.loading-overlay.active {
  display: flex;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid var(--primary-pink);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ====================================
   RESPONSIVE DESIGN - التصميم المتجاوب
   ==================================== */
@media (max-width: 768px) {
  /* تقليل المسافات على الهواتف */
  .container {
    padding: 30px 15px;
  }

  /* تصغير العناوين */
  .header h1 {
    font-size: 32px;
  }

  /* تقليل padding للصندوق */
  .form-box {
    padding: 30px 20px;
    border-radius: 20px;
  }

  /* تصغير الشعار */
  .logo-image {
    max-width: 350px;
    max-height: 200px;
  }

  /* تصغير ملاحظة الشعار */
  .logo-note {
    font-size: 12px;
    padding: 15px;
  }

  /* عرض الخطوات عمودياً */
  .progress-steps {
    flex-direction: column;
    gap: 15px;
  }

  /* إخفاء شريط التقدم الأفقي */
  .progress-bar-bg {
    display: none;
  }

  /* تصغير دوائر الخطوات */
  .step-circle {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  /* عرض أزرار التواصل عمودياً */
  .contact-buttons {
    flex-direction: column;
  }

  .contact-btn {
    width: 100%;
    justify-content: center;
  }

  /* عرض حقل الهاتف عمودياً */
  .phone-group {
    flex-direction: column;
  }

  .phone-group select {
    width: 100%;
  }
}

/* ====================================
   PRINT STYLES - أنماط الطباعة
   ==================================== */
@media print {
  .animated-bg,
  .loading-overlay,
  .confetti-container,
  .contact-footer,
  .copyright-footer {
    display: none !important;
  }

  .form-box {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
