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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: "Tajawal", "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
  background: #FFFFFF;
  color: #2c3e50;
  line-height: 1.7;
  direction: rtl;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

/* Navigation */
.navbar {
  background: rgba(118, 110, 153, 0.95);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo h2 {
  color: white;
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin: 0;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #f8f9fa;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #766E99 0%, #9B9B9B 100%);
  padding: 120px 0 80px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.hero-section h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: -1px;
  line-height: 1.1;
}

.hero-section p {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  opacity: 0.95;
  font-weight: 500;
}

.hero-subtitle {
  font-size: 1.1rem !important;
  opacity: 0.85 !important;
  margin-bottom: 2rem !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
}

.cta-button {
  display: inline-block;
  background: #766E99;
  color: white;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(42, 42, 42, 0.2);
  border: 2px solid white;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(42, 42, 42, 0.3);
}

.hero-decoration {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
  opacity: 0.5;
}

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

.features h2 {
  text-align: center;
  font-size: 2.5rem;
  color: #2c3e50;
  margin-bottom: 3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: #766E99;
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(42, 42, 42, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 3px solid #9B9B9B;
  will-change: transform;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(42, 42, 42, 0.15);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.feature-card p {
  color: white;
  line-height: 1.6;
}

/* Courses Section */
.courses-section {
  padding: 80px 0;
  background: #766E99;
}

.courses-section h2 {
  text-align: center;
  font-size: 2.5rem;
  color: white;
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.section-subtitle {
  text-align: center;
  color: white;
  font-size: 1.1rem;
  margin-bottom: 3rem;
  font-weight: 400;
  line-height: 1.4;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.course-card {
  background: #FFFFFF;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 25px rgba(42, 42, 42, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid #9B9B9B;
  will-change: transform;
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(42, 42, 42, 0.15);
}

.course-image {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.course-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.course-card:hover .course-image img {
  transform: scale(1.05);
}

.course-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #ef4444;
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.course-content {
  padding: 1.5rem;
}

.course-content h3 {
  color: #2c3e50;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.course-content > p {
  color: #2c3e50;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.course-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.course-features span {
  background: #766E99;
  color: white;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.85rem;
}

.course-pricing {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.original-price {
  text-decoration: line-through;
  color: #94a3b8;
  font-size: 0.9rem;
}

.current-price {
  color: #ef4444;
  font-weight: 700;
  font-size: 1.2rem;
}

.discount {
  background: #dcfce7;
  color: #16a34a;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: #766E99;
  border-radius: 20px;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(42, 42, 42, 0.3);
}

.modal-content h2 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.modal-content p {
  color: white;
  line-height: 1.6;
  margin-bottom: 2rem;
  text-align: right;
}

.register-btn {
  display: inline-block;
  background: linear-gradient(135deg, #766E99 0%, #9B9B9B 100%);
  color: white;
  padding: 12px 30px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.register-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.close {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 30px;
  color: #9B9B9B;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover {
  color: #766E99;
}

/* FAQ Section */
.faq-section {
  padding: 80px 0;
  background: #FFFFFF;
}

.faq-section h2 {
  text-align: center;
  font-size: 2.5rem;
  color: #2c3e50;
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 1rem;
  background: #766E99;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(42, 42, 42, 0.05);
}

.faq-question {
  width: 100%;
  text-align: right;
  background: #766E99;
  color: white;
  padding: 1.5rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.faq-question::after {
  content: "▼";
  position: absolute;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s ease;
  color: #9B9B9B;
}

.faq-question.active {
  background: #9B9B9B;
  color: white;
}

.faq-question.active::after {
  transform: translateY(-50%) rotate(180deg);
  color: white;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 2rem;
  background: #766E99;
  transition: all 0.4s ease;
  color: white;
  line-height: 1.6;
}

.faq-answer.show {
  max-height: 200px;
  padding: 1.5rem 2rem;
}

/* Contact Section */
.contact-section {
  padding: 60px 0;
  background: linear-gradient(135deg, #766E99 0%, #9B9B9B 100%);
  text-align: center;
  color: white;
}

.contact-section h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.contact-section p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.contact-btn {
  display: inline-block;
  background: #766E99;
  color: white;
  padding: 15px 30px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid white;
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(42, 42, 42, 0.2);
}

/* Footer */
.footer {
  background: #FFFFFF;
  color: #2c3e50;
  padding: 50px 0 20px;
  border-top: 2px solid #9B9B9B;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 1rem;
  color: #2c3e50;
}

.footer-section p {
  color: #6c757d;
  line-height: 1.6;
}

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

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: #6c757d;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #766E99;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.footer-bottom {
  border-top: 1px solid #9B9B9B;
  padding-top: 2rem;
  text-align: center;
  color: #6c757d;
}

/* Responsive Design */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
  .container {
    padding: 0 15px;
  }

  .hero-section h1 {
    font-size: 3.5rem;
  }

  .courses-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }
}

/* Tablets */
@media (max-width: 768px) {
  .nav-container {
    padding: 0 15px;
  }

  .nav-links {
    display: none;
  }

  .hero-section {
    padding: 100px 0 70px;
  }

  .hero-section h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
  }

  .hero-section p {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
  }

  .hero-subtitle {
    font-size: 1rem !important;
  }

  .cta-button {
    padding: 12px 25px;
    font-size: 1rem;
  }

  .features,
  .courses-section,
  .faq-section {
    padding: 60px 0;
  }

  .features h2,
  .courses-section h2,
  .faq-section h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
  }

  .features-grid {
    gap: 1.5rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .courses-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
  }

  .course-content {
    padding: 1.2rem;
  }

  .modal-content {
    margin: 15px;
    padding: 1.5rem;
    max-width: 90%;
  }

  .faq-question {
    padding: 1.2rem 1.5rem;
    font-size: 1.05rem;
  }

  .faq-answer.show {
    padding: 1.2rem 1.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }

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

  .contact-section {
    padding: 50px 0;
  }
}

/* Mobile phones */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .container {
    padding: 0 10px;
  }

  .nav-container {
    padding: 0 10px;
  }

  .nav-logo h2 {
    font-size: 1.5rem;
  }

  .hero-section {
    padding: 90px 0 50px;
  }

  .hero-section h1 {
    font-size: 2.2rem;
    line-height: 1.1;
  }

  .hero-section p {
    font-size: 1rem;
  }

  .hero-subtitle {
    font-size: 0.9rem !important;
  }

  .cta-button {
    padding: 10px 20px;
    font-size: 0.95rem;
  }

  .features,
  .courses-section,
  .faq-section {
    padding: 40px 0;
  }

  .features h2,
  .courses-section h2,
  .faq-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }

  .section-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .feature-card {
    padding: 1.2rem;
  }

  .feature-card h3 {
    font-size: 1.1rem;
  }

  .feature-icon {
    font-size: 2.5rem;
  }

  .courses-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .course-card {
    margin: 0;
  }

  .course-image {
    height: 180px;
  }

  .course-content {
    padding: 1rem;
  }

  .course-content h3 {
    font-size: 1.1rem;
  }

  .course-features {
    flex-direction: column;
    align-items: flex-start;
  }

  .course-features span {
    font-size: 0.8rem;
  }

  .course-pricing {
    flex-wrap: wrap;
  }

  .modal-content {
    margin: 10px;
    padding: 1rem;
    max-height: 90vh;
  }

  .modal-content h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }

  .modal-content p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .register-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .faq-question {
    padding: 1rem;
    font-size: 0.95rem;
  }

  .faq-question::after {
    left: 1rem;
  }

  .faq-answer {
    padding: 0 1rem;
  }

  .faq-answer.show {
    padding: 1rem;
  }

  .contact-section {
    padding: 40px 0;
  }

  .contact-section h2 {
    font-size: 1.8rem;
  }

  .contact-section p {
    font-size: 1rem;
  }

  .contact-btn {
    padding: 12px 25px;
    font-size: 0.95rem;
  }

  .footer {
    padding: 30px 0 15px;
  }

  .footer-section h3,
  .footer-section h4 {
    font-size: 1.1rem;
  }

  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 15px;
    left: 15px;
  }
}

/* Extra small screens */
@media (max-width: 360px) {
  .hero-section h1 {
    font-size: 2rem;
  }

  .features h2,
  .courses-section h2,
  .faq-section h2 {
    font-size: 1.6rem;
  }

  .modal-content {
    margin: 5px;
    padding: 0.8rem;
  }

  .course-image {
    height: 160px;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  body {
    -webkit-font-smoothing: subpixel-antialiased;
  }
}

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

.course-card {
  animation: fadeInUp 0.6s ease forwards;
}

.feature-card {
  animation: fadeInUp 0.6s ease forwards;
}

/* Back to top button styles */
.back-to-top {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: #766E99;
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(118, 110, 153, 0.3);
}

.back-to-top:hover {
  background: #9B9B9B;
  transform: translateY(-2px);
}