* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #0052cc;
  --primary-light: #3b82f6;
  --primary-dark: #003a99;
  --secondary-color: #f3f4f6;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --bg-color: #ffffff;
  --card-bg: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

body.dark-mode {
  --text-primary: #f3f4f6;
  --text-secondary: #d1d5db;
  --secondary-color: #1f2937;
  --border-color: #374151;
  --bg-color: #111827;
  --card-bg: #1f2937;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  background-color: var(--bg-color);

  transition: background-color 0.3s ease;

  background-image: url("../images/background.jpg");
  /* مسار الصورة */
  background-size: cover;
  /* تملى الشاشة */
  background-position: center;
  /* في المنتصف */
  background-repeat: no-repeat;
  /* بدون تكرار */
  background-attachment: fixed;
  /* ثابتة مع الاسكرول */
}

/***********************/

.social-media a:hover {
  background: var(--main-color);
  color: var(--second-bg-color);
  box-shadow: 0 0 1rem var(--main-color);
}

.btn {
  display: inline-block;
  padding: 1rem 2.8rem;
  background: var(--main-color);
  border-radius: 4rem;
  box-shadow: none;
  font-size: 1.6rem;
  color: var(--second-bg-color);
  letter-spacing: 0.1rem;
  font-weight: 600;
  transition: 0.5s;
}

.btn:hover {
  box-shadow: 0 0 1rem var(--main-color);
}

/***************8*88*/

.navbar {
  background: var(--card-bg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 30px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-menu a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  cursor: pointer;
}

.nav-menu a:hover {
  color: var(--primary-color);
}

.theme-toggle {
  background: none;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
}

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

.btn-login {
  background: var(--primary-color);
  color: white !important;
  padding: 10px 25px;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.3s;
}

.btn-login:hover {
  background: var(--primary-dark);
}

/* PROFILE SIDEBAR - Modern */
.profile-sidebar {
  position: fixed;
  left: -350px;
  top: 0;
  width: 350px;
  height: 100vh;
  background: var(--card-bg);
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.15);
  z-index: 999;
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border-color);
  overflow-y: auto;
}

.profile-sidebar.show {
  left: 0;
}

.profile-header {
  padding: 30px 20px;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  position: relative;
}

.profile-header .close {
  position: absolute;
  left: 15px;
  top: 15px;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
  background: none;
  border: none;
  transition: color 0.3s;
}

.profile-header .close:hover {
  color: var(--text-primary);
}

.profile-avatar {
  width: 100px;
  height: 100px;
  margin: 0 auto 15px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary-color);
  box-shadow: var(--shadow-md);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-header h3 {
  color: var(--text-primary);
  margin-bottom: 5px;
  font-size: 18px;
}

.profile-header p {
  color: var(--text-secondary);
  font-size: 13px;
}

.profile-menu {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  background: var(--secondary-color);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.profile-menu-item:hover {
  background: var(--primary-light);
  color: white;
  transform: translateX(-5px);
  box-shadow: var(--shadow-md);
}

.profile-menu-item.logout {
  color: var(--danger-color);
  margin-top: auto;
}

.profile-menu-item.logout:hover {
  background: var(--danger-color);
  color: white;
}

.profile-menu-item span:first-child {
  font-size: 20px;
}

/* CART SIDEBAR */
.cart-sidebar {
  position: fixed;
  right: -400px;
  top: 0;
  width: 400px;
  height: 100vh;
  background: var(--card-bg);
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.15);
  z-index: 999;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.show {
  right: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.cart-header h3 {
  color: var(--text-primary);
  font-size: 18px;
}

.cart-header .close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.cart-header .close:hover {
  color: var(--text-primary);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.empty-cart {
  text-align: center;
  color: var(--text-secondary);
  padding: 40px 20px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: var(--secondary-color);
  border-radius: 8px;
  margin-bottom: 10px;
  transition: all 0.3s;
}

.cart-item:hover {
  background: rgba(0, 82, 204, 0.1);
}

.cart-item-remove {
  background: var(--danger-color);
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s;
}

.cart-item-remove:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.cart-total {
  font-weight: bold;
  font-size: 18px;
  color: var(--text-primary);
}

/* HERO SECTION */
.hero {
  background: linear-gradient(135deg, #57c0f375 0%, #77c9e885 100%);
  padding: 100px 20px;
  text-align: center;
  max-width: 1400px;
  margin: 0 auto;
}

body.dark-mode .hero {
  background: linear-gradient(4deg, #1e3a8a57 0%, #1e7dafb5 100%);
}

.hero-content h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.highlight {
  color: var(--primary-color);
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  color: var(--text-primary);
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* BUTTONS - Modern */
.btn {
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active {
  transform: translateY(0);
}

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

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* FEATURES SECTION */
.features {
  padding: 80px 20px;
  background: var(--bg-color);
  max-width: 1400px;
  margin: 0 auto;
}

.features-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.feature-card {
  background: var(--card-bg);
  padding: 40px 30px;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.feature-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.feature-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--text-primary);
  font-weight: 600;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.feature-icon {
  width: 60px;
  /* حجم الدائرة */
  height: 60px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  background: rgba(33, 103, 214, 0.08);
  /* خلفية ناعمة */
  color: #2d4f81;
  /* لون الأيقونة */
  font-size: 34px;
  /* حجم الأيقونة داخل الدائرة */
  transition:
    background 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease;
  flex-shrink: 0;
}

/* تأثّر عند hover (يتناسق مع hover للكارت) */
.feature-card:hover .feature-icon {
  background: linear-gradient(135deg, #2c4670 0%, #155fcf7f 100%);
  color: #fff;
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 8px 18px rgba(23, 101, 216, 0.12);
}

.feature-card--accent2 .feature-icon {
  background: rgba(250, 180, 20, 0.08);
  color: #f5a623;
}

.feature-card--accent3 .feature-icon {
  background: rgba(34, 197, 94, 0.08);
  color: #16a34a;
}

.feature-card--accent4 .feature-icon {
  background: rgba(156, 36, 255, 0.06);
  color: #8b5cf6;
}

/* نص العنوان والوصف — يتماشى مع كودك الأصلي */
.feature-card h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: var(--text-primary, #0f1724);
  /* يحترم المتغير إن موجود */
  font-weight: 600;
}

.feature-card p {
  margin: 0;
  color: var(--text-secondary, #6b7280);
  font-size: 14px;
  line-height: 1.6;
  max-width: 260px;
  margin-left: auto;
  margin-right: auto;
}

/* COURSES SECTION */
.courses {
  padding: 80px 20px;
  background: var(--secondary-color);
  max-width: 1400px;
  margin: 0 auto;
}

.courses h2 {
  font-size: 40px;
  text-align: center;
  margin-bottom: 15px;
  color: var(--text-primary);
  font-weight: 700;
}

.courses-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-size: 16px;
}

/* FILTERS */
.filters-container {
  margin-bottom: 40px;
}

.search-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  gap: 10px;
}

.search-bar input {
  width: 100%;
  max-width: 500px;
  padding: 12px 20px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 16px;
  background: var(--card-bg);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

.search-btn {
  padding: 12px 20px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
}

.search-btn:hover {
  background: var(--primary-dark);
}

.advanced-filters {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 10px 15px;
  border: 2px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-primary);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.filter-select:hover {
  border-color: var(--primary-light);
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

/* COURSES GRID */
.courses-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

.course-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.course-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(
    135deg,
    var(--primary-light),
    var(--primary-color)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
  background-size: cover;
  background-position: center;
}

.course-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: white;
}

.course-badge.beginner {
  background: #10b981;
}

.course-badge.intermediate {
  background: #f59e0b;
}

.course-badge.advanced {
  background: #ef4444;
}

.course-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-category-tag {
  display: inline-block;
  background: rgba(0, 82, 204, 0.1);
  color: var(--primary-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
  width: fit-content;
}

.course-content h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.4;
}

.course-description {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 15px;
  line-height: 1.5;
}

.course-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.course-instructor {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 15px;
}

.course-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
  margin-bottom: 15px;
}

.course-price {
  font-weight: bold;
  color: var(--primary-color);
  font-size: 18px;
}

.course-rating {
  color: var(--text-secondary);
  font-size: 14px;
}

.view-details-btn {
  width: 100%;
  padding: 10px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

.view-details-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* MODALS */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal.show {
  display: flex;
}

.modal-content {
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

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

.course-details {
  max-width: 600px;
}

.checkout-modal {
  max-width: 500px;
}

.dashboard-modal {
  max-width: 900px;
}

.user-profile-modal {
  max-width: 500px;
}

.purchases-modal {
  max-width: 700px;
}

.close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 28px;
  font-weight: bold;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  background: none;
  border: none;
}

.close:hover {
  color: var(--text-primary);
  transform: scale(1.2);
}

.modal-content h2 {
  margin-bottom: 25px;
  text-align: center;
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 700;
}

/* AUTH FORMS */
.auth-form {
  display: block;
}

.auth-form.hidden {
  display: none;
}

.role-selection {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.role-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.role-option:hover {
  border-color: var(--primary-light);
}

.role-option input[type="radio"] {
  cursor: pointer;
}

.role-option input[type="radio"]:checked + .role-label {
  color: var(--primary-color);
}

.role-option:has(input:checked) {
  border-color: var(--primary-color);
  background: rgba(0, 82, 204, 0.05);
}

.role-label {
  flex: 1;
  text-align: center;
  font-weight: 600;
}

.auth-form form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.auth-form input {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: var(--card-bg);
  color: var(--text-primary);
}

.auth-form input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

.auth-form .btn {
  width: 100%;
}

.auth-form p {
  text-align: center;
  margin-top: 15px;
  color: var(--text-secondary);
  font-size: 14px;
}

.auth-form a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.auth-form a:hover {
  text-decoration: underline;
}

.oauth-section {
  margin: 20px 0;
}

.divider {
  text-align: center;
  color: var(--text-secondary);
  margin: 15px 0;
  font-size: 14px;
  position: relative;
}

.divider::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background: var(--border-color);
  z-index: -1;
}

.divider {
  background: var(--card-bg);
  padding: 0 10px;
}

.oauth-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
  background: white;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.oauth-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

/* COURSE DETAILS MODAL */
.course-detail-header {
  text-align: center;
  margin-bottom: 30px;
}

.course-detail-header .course-image {
  width: 100%;
  height: 250px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.course-detail-header h2 {
  color: var(--text-primary);
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: 700;
}

.price-rating {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 15px 0;
}

.progress-tracker {
  background: var(--secondary-color);
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.progress-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  gap: 10px;
}

.progress-week {
  font-weight: 600;
  color: var(--primary-color);
  min-width: 60px;
  font-size: 13px;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--success-color),
    var(--primary-light)
  );
  transition: width 0.3s ease;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

/* CHECKOUT */
.checkout-items {
  max-height: 300px;
  overflow-y: auto;
  margin: 20px 0;
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
}

.checkout-summary {
  background: var(--secondary-color);
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--text-primary);
  font-size: 14px;
}

.summary-row.total {
  font-weight: 700;
  font-size: 18px;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  margin-top: 10px;
  color: var(--primary-color);
}

/* DASHBOARD */
.dashboard-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.dashboard-section {
  background: var(--secondary-color);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.dashboard-section h3 {
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
}

.add-course-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

.add-course-form input,
.add-course-form select {
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text-primary);
  font-family: inherit;
}

/* USER PROFILE FORM */
.user-profile-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-form-group label {
  font-weight: 600;
  color: var(--text-primary);
}

.profile-form-group input {
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text-primary);
  font-family: inherit;
}

/* PURCHASES GRID */
.purchases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.purchased-course-card {
  background: var(--secondary-color);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.3s;
}

.purchased-course-card:hover {
  box-shadow: var(--shadow-md);
}

.purchased-course-card h4 {
  color: var(--text-primary);
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 600;
}

.purchased-course-card p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 8px;
}

/* FOOTER */
.footer {
  background: var(--secondary-color);
  padding: 60px 20px 30px;
  margin-top: 100px;
  border-top: 1px solid var(--border-color);
  transition: background-color 0.3s ease;
}

body.dark-mode .footer {
  background: #0f172a;
  border-top-color: #1e293b;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 60px;
}

.contact-card {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.contact-icon {
  font-size: 32px;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: rgba(0, 82, 204, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-content h4 {
  color: var(--text-primary);
  margin-bottom: 5px;
  font-size: 16px;
  font-weight: 600;
}

.contact-content p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.contact-content a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.contact-content a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.footer-middle {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 12px;
  margin-bottom: 60px;
  border: 1px solid var(--border-color);
}

.payment-section h4 {
  color: var(--text-primary);
  font-size: 18px;
  margin-bottom: 25px;
  text-align: center;
  font-weight: 600;
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
}

.payment-method {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--secondary-color);
  border-radius: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid var(--border-color);
}

.payment-method:hover {
  transform: scale(1.05);
  background: rgba(0, 82, 204, 0.1);
  border-color: var(--primary-light);
}

.payment-method span {
  font-size: 32px;
  margin-bottom: 10px;
}

.payment-method p {
  color: var(--text-secondary);
  font-size: 12px;
  text-align: center;
  font-weight: 500;
}

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

.footer-column h3 {
  color: var(--text-primary);
  font-size: 16px;
  margin-bottom: 20px;
  font-weight: 600;
}

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

.footer-column li {
  margin-bottom: 12px;
}

.footer-column a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.footer-column a:hover {
  color: var(--primary-color);
  padding-right: 5px;
}

.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 20px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

.social-footer {
  width: 100%;
  text-align: center;
  padding: 25px 0;
  margin-top: 20px;
}

/* الأزرار الصغيرة */
.social-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;

  width: 40px;
  /* كان 55 */
  height: 40px;
  /* كان 55 */
  margin: 0 6px;
  /* فراغ أصغر */

  border-radius: 50%;
  font-size: 20px;
  /* كان 28 */
  color: #fff;
  text-decoration: none;

  transition: 0.3s ease;
}

/* ألوان العلامات */
.tiktok {
  background: #000;
}

.youtube {
  background: #ff0000;
}

.linkedin {
  background: #0077b5;
}

.instagram {
  background: linear-gradient(
    45deg,
    #f09433,
    #e6683c,
    #dc2743,
    #cc2366,
    #bc1888
  );
}

.facebOok {
  background: #1877f2;
}

/* حركة بسيطة بدون مبالغة */
.social-btn:hover {
  transform: translateY(-4px) scale(1.07);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.footer-copyright {
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
}

.footer-copyright p {
  margin: 0;
}

.hidden {
  display: none !important;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
  .navbar-container {
    flex-wrap: wrap;
  }

  .nav-menu {
    gap: 10px;
    font-size: 13px;
  }

  .hero-content h1 {
    font-size: 32px;
  }

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

  .hero {
    padding: 60px 20px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .modal-content {
    width: 90%;
    padding: 25px 20px;
    max-width: none;
  }

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

  .cart-sidebar {
    width: 100%;
    right: -100%;
  }

  .profile-sidebar {
    width: 80%;
    left: -80%;
  }

  .role-selection {
    grid-template-columns: 1fr;
  }

  .dashboard-content {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .advanced-filters {
    flex-direction: column;
  }

  .filter-select {
    width: 100%;
  }

  .courses h2 {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .navbar-logo {
    font-size: 18px;
  }

  .nav-menu {
    gap: 8px;
    font-size: 12px;
  }

  .hero-content h1 {
    font-size: 24px;
  }

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

  .courses h2 {
    font-size: 22px;
  }

  .modal-content {
    padding: 20px;
  }

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

  .feature-card {
    padding: 25px 20px;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .payment-methods {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* html 2 */
/* SEO Description Section */
.seo-description {
  direction: rtl;
  max-width: 1100px;
  margin: 80px auto;
  padding: 60px 70px;
  background: linear-gradient(135deg, #0f2a44, #153d63);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
  position: relative;
  overflow: hidden;
}

/* Decorative subtle pattern */
.seo-description::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
}

.seo-description::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 260px;
  height: 260px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
}

/* Title */
.seo-description h1 {
  font-size: 2.6rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 28px;
  line-height: 1.3;
  letter-spacing: 0.3px;
}

/* Paragraphs */
.seo-description p {
  font-size: 1.15rem;
  line-height: 1.9;
  color: #e3ecf5;
  margin-bottom: 22px;
  max-width: 900px;
}

/* Highlight keywords */
.seo-description p strong {
  color: #ffd36a;
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
  .seo-description {
    padding: 40px 30px;
    margin: 50px 16px;
  }

  .seo-description h1 {
    font-size: 2rem;
  }

  .seo-description p {
    font-size: 1.05rem;
  }
}

/* Overlay */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Modal Box */
#modal-content {
  background: #ffffff;
  max-width: 900px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 18px;
  padding: 40px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  animation: modalFade 0.35s ease;
}

/* Animation */
@keyframes modalFade {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }

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

/*                                  */
/* Splash Screen Base */
#splash-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, #0b2a44, #020b14);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  overflow: hidden;
}

/* Animated Light Background */
.light-bg {
  position: absolute;
  width: 140%;
  height: 140%;
  background: conic-gradient(
    from 0deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0)
  );
  animation: rotateLight 10s linear infinite;
}

/* Content */
.splash-content {
  position: relative;
  text-align: center;
  color: #fff;
  animation: fadeInUp 1.2s ease forwards;
}

.splash-content h1 {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-shadow: 0 0 25px rgba(255, 255, 255, 0.35);
}

.splash-content p {
  margin-top: 12px;
  font-size: 1.2rem;
  color: #cfd8e3;
  letter-spacing: 1px;
}

/* Loader */
.loader {
  margin: 40px auto 0;
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top: 3px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Animations */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes rotateLight {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }

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

/* Fade out effect */
#splash-screen.fade-out {
  animation: fadeOut 1s ease forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}
