/* =========================================================
   Single Pages - صفحات العرض الفردية (الدروس/الفروض/الامتحانات)
   تصميم احترافي ومتناسق مع SEO وأزرار تحميل أنيقة
   ========================================================= */

/* ===== Variables ===== */
:root {
  --single-accent: var(--accent, #2c7be5);
  --single-bg: #ffffff;
  --single-border: #e5e7eb;
  --single-text: #0f172a;
  --single-muted: #6b7280;
  --single-shadow: 0 6px 18px rgba(0,0,0,.06);
  --single-shadow-hover: 0 12px 30px rgba(0,0,0,.12);
}

/* ===== Container ===== */
.mx-single-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 24px);
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .mx-single-container {
    padding: 16px 12px;
  }
}

@media (max-width: 480px) {
  .mx-single-container {
    padding: 12px 10px;
  }
}

/* ===== Header ===== */
.mx-single-header {
  margin-bottom: clamp(20px, 3vw, 32px);
  padding-bottom: clamp(16px, 2.5vw, 24px);
  border-bottom: 2px solid var(--single-border);
}

.mx-single-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900;
  line-height: 1.3;
  color: var(--single-text);
  margin: 0 0 clamp(12px, 2vw, 16px);
}

.mx-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: clamp(12px, 2vw, 16px);
}

.mx-single-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f3f4f6;
  border: 1px solid var(--single-border);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--single-text);
  text-decoration: none;
  transition: all 0.2s;
}

.mx-single-chip:hover {
  background: var(--single-accent);
  color: #fff;
  border-color: var(--single-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.mx-single-chip--primary {
  background: color-mix(in oklab, var(--single-accent) 12%, #fff);
  border-color: color-mix(in oklab, var(--single-accent) 30%, #e5e7eb);
  color: var(--single-accent);
}

.mx-single-chip--primary:hover {
  background: var(--single-accent);
  color: #fff;
}

.mx-single-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f9fafb;
  border: 1px solid var(--single-border);
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--single-muted);
}

.mx-single-date::before {
  content: "📅";
  font-size: 1rem;
}

/* ===== Content ===== */
.mx-single-content {
  background: var(--single-bg);
  border: 1px solid var(--single-border);
  border-radius: 16px;
  padding: clamp(20px, 3vw, 32px);
  margin-bottom: clamp(20px, 3vw, 32px);
  box-shadow: var(--single-shadow);
  line-height: 1.9;
  color: var(--single-text);
}

@media (max-width: 768px) {
  .mx-single-content {
    padding: 20px 16px;
    border-radius: 14px;
  }
}

@media (max-width: 480px) {
  .mx-single-content {
    padding: 16px 12px;
    border-radius: 12px;
  }
}

.mx-single-content p {
  margin-bottom: 1.2rem;
}

.mx-single-content h2,
.mx-single-content h3,
.mx-single-content h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 800;
  color: var(--single-text);
  line-height: 1.4;
}

.mx-single-content h2 {
  font-size: clamp(20px, 3vw, 28px);
}

.mx-single-content h3 {
  font-size: clamp(18px, 2.5vw, 24px);
}

.mx-single-content h4 {
  font-size: clamp(16px, 2vw, 20px);
}

.mx-single-content ul,
.mx-single-content ol {
  margin: 0 0 1.2rem 1.5rem;
  padding: 0;
}

.mx-single-content li {
  margin-bottom: 0.6rem;
}

.mx-single-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.5rem 0;
}

.mx-single-content a {
  color: var(--single-accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.mx-single-content a:hover {
  text-decoration: none;
  background: color-mix(in oklab, var(--single-accent) 10%, #fff);
  padding: 2px 4px;
  border-radius: 4px;
}

/* ===== Files Section ===== */
.mx-single-files {
  background: var(--single-bg);
  border: 1px solid var(--single-border);
  border-radius: 16px;
  padding: clamp(20px, 3vw, 32px);
  margin-bottom: clamp(20px, 3vw, 32px);
  box-shadow: var(--single-shadow);
}

.mx-single-files__title {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 900;
  color: var(--single-text);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mx-single-files__title::before {
  content: "📁";
  font-size: 1.5rem;
}

.mx-single-files__desc {
  color: var(--single-muted);
  font-size: 0.95rem;
  margin: 0 0 clamp(16px, 2.5vw, 24px);
  line-height: 1.6;
}

.mx-single-files__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

@media (max-width: 640px) {
  .mx-single-files__grid {
    grid-template-columns: 1fr;
  }
}

.mx-single-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: #f9fafb;
  border: 2px solid var(--single-border);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s;
  box-sizing: border-box;
}

.mx-single-file:hover {
  background: var(--single-accent);
  border-color: var(--single-accent);
  transform: translateY(-3px);
  box-shadow: var(--single-shadow-hover);
}

.mx-single-file:hover .mx-single-file__icon,
.mx-single-file:hover .mx-single-file__name,
.mx-single-file:hover .mx-single-file__type {
  color: #fff;
}

.mx-single-file__icon {
  font-size: 2rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.mx-single-file:hover .mx-single-file__icon {
  transform: scale(1.1);
}

.mx-single-file__content {
  flex: 1;
  min-width: 0;
}

.mx-single-file__name {
  display: block;
  font-weight: 800;
  font-size: 1rem;
  color: var(--single-text);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mx-single-file__type {
  display: block;
  font-size: 0.85rem;
  color: var(--single-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mx-single-file__arrow {
  font-size: 1.5rem;
  color: var(--single-muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.mx-single-file:hover .mx-single-file__arrow {
  transform: translateX(4px);
  color: #fff;
}

html[dir="rtl"] .mx-single-file:hover .mx-single-file__arrow {
  transform: translateX(-4px);
}

/* File Type Icons */
.mx-single-file--pdf .mx-single-file__icon::before { content: "📄"; }
.mx-single-file--video .mx-single-file__icon::before { content: "🎥"; }
.mx-single-file--image .mx-single-file__icon::before { content: "🖼️"; }
.mx-single-file--doc .mx-single-file__icon::before { content: "📝"; }
.mx-single-file--link .mx-single-file__icon::before { content: "🔗"; }

/* ===== SEO Section ===== */
.mx-single-seo {
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
  border: 1px solid var(--single-border);
  border-radius: 16px;
  padding: clamp(20px, 3vw, 32px);
  margin-bottom: clamp(20px, 3vw, 32px);
  box-shadow: var(--single-shadow);
}

.mx-single-seo__title {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 900;
  color: var(--single-text);
  margin: 0 0 clamp(12px, 2vw, 16px);
}

.mx-single-seo__content {
  color: var(--single-text);
  line-height: 1.9;
  font-size: 1rem;
}

.mx-single-seo__content p {
  margin-bottom: 1rem;
}

.mx-single-seo__content strong {
  color: var(--single-accent);
  font-weight: 800;
}

/* ===== Related Links ===== */
.mx-single-related {
  margin-bottom: clamp(20px, 3vw, 32px);
}

.mx-single-related__title {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 900;
  color: var(--single-text);
  margin: 0 0 clamp(12px, 2vw, 16px);
  display: flex;
  align-items: center;
  gap: 10px;
}

.mx-single-related__title::before {
  content: "🔗";
  font-size: 1.5rem;
}

.mx-single-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 2vw, 16px);
}

/* الشاشات المتوسطة: 2 أزرار في السطر */
@media (max-width: 768px) {
  .mx-single-related__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* الشاشات الصغيرة: زر واحد في السطر */
@media (max-width: 480px) {
  .mx-single-related__grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.mx-single-related__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: clamp(16px, 2.5vw, 22px) clamp(18px, 3vw, 24px);
  min-height: 72px;
  background: #fff;
  border: 2px solid var(--single-border);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s;
  word-wrap: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

.mx-single-related__item:hover {
  background: var(--single-accent);
  border-color: var(--single-accent);
  transform: translateY(-2px);
  box-shadow: var(--single-shadow-hover);
}

.mx-single-related__item:hover .mx-single-related__text,
.mx-single-related__item:hover .mx-single-related__arrow {
  color: #fff;
}

.mx-single-related__text {
  flex: 1;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--single-text);
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  line-height: 1.5;
  hyphens: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-width: 0;
}

.mx-single-related__arrow {
  font-size: 1.2rem;
  color: var(--single-muted);
  transition: transform 0.2s;
}

.mx-single-related__item:hover .mx-single-related__arrow {
  transform: translateX(4px);
}

html[dir="rtl"] .mx-single-related__item:hover .mx-single-related__arrow {
  transform: translateX(-4px);
}

/* ===== Navigation ===== */
.mx-single-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: clamp(20px, 3vw, 32px);
}

@media (max-width: 640px) {
  .mx-single-nav {
    grid-template-columns: 1fr;
  }
}

.mx-single-nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: #fff;
  border: 2px solid var(--single-border);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s;
  box-sizing: border-box;
}

.mx-single-nav__item:hover {
  background: var(--single-accent);
  border-color: var(--single-accent);
  transform: translateY(-2px);
  box-shadow: var(--single-shadow-hover);
}

.mx-single-nav__item:hover .mx-single-nav__text,
.mx-single-nav__item:hover .mx-single-nav__arrow {
  color: #fff;
}

.mx-single-nav__item--prev {
  text-align: right;
}

html[dir="ltr"] .mx-single-nav__item--prev {
  text-align: left;
}

.mx-single-nav__item--next {
  text-align: left;
  flex-direction: row-reverse;
}

html[dir="ltr"] .mx-single-nav__item--next {
  text-align: right;
  flex-direction: row;
}

.mx-single-nav__arrow {
  font-size: 1.5rem;
  color: var(--single-muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.mx-single-nav__item:hover .mx-single-nav__arrow {
  transform: translateX(-4px);
}

.mx-single-nav__item--next:hover .mx-single-nav__arrow {
  transform: translateX(4px);
}

html[dir="rtl"] .mx-single-nav__item:hover .mx-single-nav__arrow {
  transform: translateX(4px);
}

html[dir="rtl"] .mx-single-nav__item--next:hover .mx-single-nav__arrow {
  transform: translateX(-4px);
}

.mx-single-nav__content {
  flex: 1;
  min-width: 0;
}

.mx-single-nav__label {
  display: block;
  font-size: 0.85rem;
  color: var(--single-muted);
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mx-single-nav__title {
  display: block;
  font-weight: 800;
  font-size: 1rem;
  color: var(--single-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mx-single-nav__item--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== Back Button ===== */
.mx-single-back {
  text-align: center;
  margin-bottom: clamp(20px, 3vw, 32px);
}

.mx-single-back__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: #fff;
  border: 2px solid var(--single-accent);
  border-radius: 12px;
  color: var(--single-accent);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,.05);
}

.mx-single-back__btn:hover {
  background: var(--single-accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--single-shadow-hover);
}

.mx-single-back__icon {
  font-size: 1.2rem;
}

/* ===== Empty States ===== */
.mx-single-empty {
  text-align: center;
  padding: clamp(40px, 6vw, 60px) 20px;
  color: var(--single-muted);
}

.mx-single-empty__icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.mx-single-empty__text {
  font-size: 1.1rem;
  font-weight: 600;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
  .mx-single-title {
    font-size: clamp(22px, 5vw, 28px);
  }
  
  .mx-single-meta {
    gap: 8px;
  }
  
  .mx-single-chip,
  .mx-single-date {
    padding: 6px 12px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .mx-single-title {
    font-size: 20px;
  }
  
  .mx-single-chip,
  .mx-single-date {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
  
  .mx-single-file,
  .mx-single-related__item,
  .mx-single-nav__item {
    padding: 12px 14px;
  }
}

/* =========================================================
   Single Lesson Page - صفحة الدرس الفردية
   تصميم نظيف وبسيط متوافق مع talamidi.com
   ========================================================= */

/* Container للتصميم الجديد */
.lesson-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(12px, 2vw, 24px) clamp(12px, 2vw, 24px);
  box-sizing: border-box;
  background: #ffffff;
  min-height: 100vh;
  width: 100%;
}

.mx-single-lesson-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(16px, 2.5vw, 32px) clamp(16px, 2.5vw, 32px);
  box-sizing: border-box;
  background: #ffffff;
  min-height: 100vh;
  width: 100%;
}

/* العنوان الرئيسي */
.mx-single-lesson-header {
  margin-bottom: clamp(24px, 4vw, 32px);
  padding-bottom: clamp(20px, 3vw, 28px);
  border-bottom: 2px solid #e5e7eb;
}

.mx-single-lesson-title {
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 800;
  line-height: 1.4;
  color: #1f2937;
  margin: 0 0 16px;
}

/* الأزرار (Badges) */
.mx-single-lesson-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: clamp(24px, 4vw, 32px);
  align-items: center;
}

.mx-single-lesson-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mx-single-lesson-badge:hover {
  background: var(--single-accent);
  color: #fff;
  border-color: var(--single-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.mx-single-lesson-badge--primary {
  background: var(--single-accent);
  color: #fff;
  border-color: var(--single-accent);
}

.mx-single-lesson-badge--primary:hover {
  background: color-mix(in oklab, var(--single-accent) 90%, #000);
  border-color: color-mix(in oklab, var(--single-accent) 90%, #000);
}

/* الجملة التعريفية */
.mx-single-lesson-intro {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: clamp(20px, 3vw, 28px);
  margin-bottom: clamp(28px, 4vw, 36px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.mx-single-lesson-intro p {
  font-size: clamp(16px, 2vw, 17px);
  line-height: 1.8;
  color: #4b5563;
  margin: 0;
}

.mx-single-lesson-description {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
  font-size: clamp(15px, 2vw, 16px);
  line-height: 1.75;
  color: #4b5563;
}

.mx-single-lesson-description p {
  margin-bottom: 1rem;
}

.mx-single-lesson-description p:last-child {
  margin-bottom: 0;
}

/* عناوين الأقسام */
.mx-single-lesson-section-title {
  font-size: clamp(22px, 3vw, 26px);
  font-weight: 700;
  color: #1f2937;
  margin: clamp(32px, 4vw, 40px) 0 clamp(16px, 2.5vw, 20px);
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}

/* محتوى SEO */
.mx-single-lesson-seo-content {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: clamp(20px, 3vw, 28px);
  margin-bottom: clamp(28px, 4vw, 36px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.mx-single-lesson-seo-content p {
  font-size: clamp(15px, 2vw, 16px);
  line-height: 1.8;
  color: #4b5563;
  margin: 0;
}

.mx-single-lesson-seo-content strong {
  color: var(--single-accent);
  font-weight: 700;
}

/* ملفات الدرس */
.mx-single-lesson-files {
  margin-bottom: clamp(28px, 4vw, 36px);
}

.mx-single-lesson-file-item {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(18px, 2.5vw, 22px);
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.2s ease;
}

.mx-single-lesson-file-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  border-color: #d1d5db;
}

.mx-single-lesson-file-label {
  font-size: clamp(15px, 2vw, 16px);
  font-weight: 600;
  color: #1f2937;
}

.mx-single-lesson-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* التمارين */
.mx-single-lesson-exercises {
  margin-bottom: clamp(28px, 4vw, 36px);
}

.mx-single-lesson-exercise-item {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(18px, 2.5vw, 22px);
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.2s ease;
}

.mx-single-lesson-exercise-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  border-color: #d1d5db;
}

.mx-single-lesson-exercise-label {
  font-size: clamp(15px, 2vw, 16px);
  font-weight: 600;
  color: #1f2937;
}

.mx-single-lesson-exercise-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.mx-single-lesson-exercise-solution {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--single-border);
  margin-top: 8px;
}

/* الأزرار */
.mx-single-lesson-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--single-accent);
  color: #fff;
  border: 1px solid var(--single-accent);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.mx-single-lesson-btn:hover {
  background: color-mix(in oklab, var(--single-accent) 90%, #000);
  border-color: color-mix(in oklab, var(--single-accent) 90%, #000);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  color: #fff;
}

.mx-single-lesson-btn--download {
  background: var(--edu-green, #2e7d32);
  border-color: var(--edu-green, #2e7d32);
}

.mx-single-lesson-btn--download:hover {
  background: color-mix(in oklab, var(--edu-green, #2e7d32) 90%, #000);
  border-color: color-mix(in oklab, var(--edu-green, #2e7d32) 90%, #000);
}

.mx-single-lesson-btn--view {
  background: var(--edu-blue, #1976d2);
  border-color: var(--edu-blue, #1976d2);
}

.mx-single-lesson-btn--view:hover {
  background: color-mix(in oklab, var(--edu-blue, #1976d2) 90%, #000);
  border-color: color-mix(in oklab, var(--edu-blue, #1976d2) 90%, #000);
}

.mx-single-lesson-btn--solution {
  background: var(--edu-orange, #ef6c00);
  border-color: var(--edu-orange, #ef6c00);
}

.mx-single-lesson-btn--solution:hover {
  background: color-mix(in oklab, var(--edu-orange, #ef6c00) 90%, #000);
  border-color: color-mix(in oklab, var(--edu-orange, #ef6c00) 90%, #000);
}

.mx-single-lesson-btn-icon {
  font-size: 1.1rem;
  line-height: 1;
}

/* الدروس الأخرى */
.mx-single-lesson-related {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: clamp(20px, 3vw, 28px);
  margin-bottom: clamp(24px, 3.5vw, 32px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.mx-single-lesson-related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.mx-single-lesson-related-list li {
  margin: 0;
}

.mx-single-lesson-related-link {
  display: block;
  padding: 12px 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #374151;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.mx-single-lesson-related-link:hover {
  background: var(--single-accent);
  border-color: var(--single-accent);
  color: #fff;
  transform: translateX(-4px);
}

/* زر العودة */
.mx-single-lesson-back {
  text-align: center;
  margin-top: clamp(32px, 5vw, 48px);
  padding-top: clamp(24px, 4vw, 32px);
  border-top: 2px solid var(--single-border);
}

.mx-single-lesson-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--single-bg);
  border: 2px solid var(--single-border);
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--single-text);
  cursor: pointer;
  transition: all 0.2s;
}

.mx-single-lesson-back-btn:hover {
  background: var(--single-accent);
  color: #fff;
  border-color: var(--single-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.mx-single-lesson-back-icon {
  font-size: 1.2rem;
}

/* Empty State */
.mx-single-lesson-empty {
  text-align: center;
  padding: clamp(40px, 6vw, 60px) 20px;
  color: var(--single-muted);
}

.mx-single-lesson-empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.mx-single-lesson-empty-text {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .mx-single-lesson-container {
    padding: 12px 12px;
  }
  
  .mx-single-lesson-title {
    font-size: clamp(24px, 6vw, 32px);
  }
  
  .mx-single-lesson-badges {
    gap: 10px;
  }
  
  .mx-single-lesson-badge {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
  
  .mx-single-lesson-section-title {
    font-size: clamp(20px, 4vw, 24px);
  }
  
  .mx-single-lesson-file-actions,
  .mx-single-lesson-exercise-actions,
  .mx-single-lesson-exercise-solution {
    flex-direction: column;
  }
  
  .mx-single-lesson-btn {
    width: 100%;
    justify-content: center;
  }
  
  .mx-single-lesson-related-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .mx-single-lesson-title {
    font-size: 22px;
  }
  
  .mx-single-lesson-badge {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  
  .mx-single-lesson-btn {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
}

/* =========================================================
   تصميم جديد للصفحة - متوافق مع الكود المقدم
   نظام ألوان احترافي ومتناسق
   ========================================================= */

/* متغيرات الألوان - متناسقة مع الموقع */
:root {
  --edu-green: #16a34a;
  --edu-green-dark: #15803d;
  --edu-blue: #1976d2;
  --edu-blue-dark: #1565c0;
  --edu-orange: #ef6c00;
  --edu-orange-dark: #e65100;
  
  --lesson-primary: var(--edu-green, #16a34a);
  --lesson-secondary: var(--edu-green-dark, #15803d);
  --exercise-primary: var(--edu-blue, #1976d2);
  --exercise-secondary: var(--edu-blue-dark, #1565c0);
  --solution-primary: var(--edu-orange, #ef6c00);
  --solution-secondary: var(--edu-orange-dark, #e65100);
  
  --section-bg: #f8fafc;
  --card-bg: #ffffff;
  --border-light: #e5e7eb;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
}

/* العنوان الرئيسي - متناسق مع الموقع */
.lesson-title {
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 900;
  line-height: 1.3;
  color: var(--text-primary);
  margin: 0 0 24px;
  text-align: right;
  position: relative;
  padding-bottom: 20px;
}

.lesson-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, var(--edu-green, #16a34a), var(--edu-blue, #1976d2) 70%, var(--edu-orange, #ef6c00));
  border-radius: 999px;
}

/* Meta Items - الأزرار - متناسقة مع الموقع */
.lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  cursor: default;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: none;
}

.meta-item a {
  color: inherit;
  text-decoration: none;
  pointer-events: none;
}

/* إزالة تأثيرات hover - الأزرار للعرض فقط */
.meta-item:hover {
  transform: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.meta-item.meta-year {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #78350f;
}

.meta-item.meta-year:hover {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #78350f;
}

.meta-item.meta-level {
  background: #e0e7ff;
  border-color: #a5b4fc;
  color: #3730a3;
}

.meta-item.meta-level:hover {
  background: #e0e7ff;
  border-color: #a5b4fc;
  color: #3730a3;
}

.meta-item.meta-stream {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

.meta-item.meta-stream:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

.meta-item.meta-subject {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.meta-item.meta-subject:hover {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.meta-item.meta-kind {
  background: #fce7f3;
  border-color: #f9a8d4;
  color: #831843;
}

.meta-item.meta-kind:hover {
  background: #fce7f3;
  border-color: #f9a8d4;
  color: #831843;
}

.meta-item.meta-sem {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #78350f;
}

.meta-item.meta-sem:hover {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #78350f;
}

/* الجملة التعريفية - متناسقة مع الموقع */
.lesson-intro {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: clamp(16px, 2.5vw, 24px);
  margin-bottom: clamp(16px, 2.5vw, 24px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}

.lesson-intro::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--edu-green, #16a34a), var(--edu-blue, #1976d2) 70%, var(--edu-orange, #ef6c00));
  border-radius: 16px 16px 0 0;
}

.lesson-intro p {
  font-size: clamp(16px, 2vw, 17px);
  line-height: 1.9;
  color: var(--text-secondary);
  margin: 0;
  text-align: right;
  position: relative;
  z-index: 1;
}

.lesson-intro strong {
  color: var(--edu-green, #16a34a);
  font-weight: 700;
}

/* رسالة عدم وجود محتوى */
.no-content-message {
  margin: 30px 0;
}

.no-content-box {
  background: #fffbe6;
  border: 2px dashed #f57f17;
  padding: 25px;
  border-radius: 12px;
  text-align: center;
  margin: 30px auto;
  max-width: 800px;
}

.no-content-box h2 {
  color: #f57f17;
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 700;
  margin: 0 0 16px;
}

.no-content-box p {
  font-size: clamp(16px, 2vw, 18px);
  color: #444;
  line-height: 1.7;
  margin: 0;
}

/* أقسام الملخصات والتمارين - متناسقة مع الموقع */
.lesson-summary-section {
  margin-bottom: clamp(16px, 2.5vw, 24px);
  padding: clamp(12px, 2vw, 20px);
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.lesson-summary-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--edu-orange, #f97316), var(--edu-orange-dark, #ea580c));
  border-radius: 16px 16px 0 0;
}

.lesson-exercises-section {
  margin-bottom: clamp(16px, 2.5vw, 24px);
  padding: clamp(12px, 2vw, 20px);
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.lesson-exercises-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--edu-blue, #1976d2), var(--edu-blue-dark, #1565c0));
  border-radius: 16px 16px 0 0;
}

.lesson-summary-title {
  font-size: clamp(24px, 3.5vw, 28px);
  font-weight: 900;
  color: var(--text-primary);
  margin: 0 0 clamp(16px, 2.5vw, 20px);
  text-align: center;
  position: relative;
  padding-bottom: 16px;
}

.lesson-summary-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, var(--edu-orange, #f97316), var(--edu-orange-dark, #ea580c));
  border-radius: 999px;
}

.lesson-exercises-section .lesson-summary-title::after {
  background: linear-gradient(90deg, var(--edu-blue, #1976d2), var(--edu-blue-dark, #1565c0));
}

.lesson-summary-seo {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: clamp(12px, 2vw, 20px);
  margin-bottom: clamp(12px, 2vw, 20px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  position: relative;
  box-sizing: border-box;
  width: 100%;
}

.lesson-summary-seo p {
  font-size: clamp(15px, 2vw, 16px);
  line-height: 1.85;
  color: #374151;
  margin: 0;
  text-align: right;
}

.lesson-summary-seo p strong {
  color: var(--edu-orange, #f97316);
  font-weight: 700;
}

.lesson-summary-seo p strong u {
  color: var(--edu-blue, #1976d2);
  text-decoration: none;
  font-weight: 800;
}

.lesson-summary-seo strong {
  color: var(--edu-orange, #f97316);
  font-weight: 700;
}

.lesson-exercises-section .lesson-summary-seo strong {
  color: var(--edu-blue, #1976d2);
}

.lesson-summary-seo u {
  text-decoration: none;
  color: var(--edu-blue, #1976d2);
  font-weight: 600;
}

.lesson-exercises-section .lesson-summary-seo u {
  color: var(--edu-blue, #1976d2);
}

/* محتوى الدرس والتمارين - متناسق مع الموقع */
.lesson-content-block {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: clamp(12px, 2vw, 20px);
  margin-bottom: clamp(12px, 2vw, 20px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  box-sizing: border-box;
  width: 100%;
}

.exercise-content-block {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: clamp(12px, 2vw, 20px);
  margin-bottom: clamp(12px, 2vw, 20px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  box-sizing: border-box;
  width: 100%;
}

.lesson-content-block h2 {
  font-size: clamp(20px, 2.5vw, 22px);
  font-weight: 800;
  color: var(--edu-orange, #f97316);
  margin: 0 0 20px;
  text-align: right;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(249, 115, 22, 0.3);
}

.exercise-content-block h2 {
  font-size: clamp(20px, 2.5vw, 22px);
  font-weight: 800;
  color: var(--edu-blue, #1976d2);
  margin: 0 0 20px;
  text-align: right;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(25, 118, 210, 0.3);
}

.lesson-content-block p,
.exercise-content-block p {
  font-size: clamp(15px, 2vw, 16px);
  line-height: 1.75;
  color: #374151;
  margin: 0 0 1rem;
  text-align: right;
}

.lesson-content-block p strong,
.exercise-content-block p strong {
  color: var(--edu-orange, #f97316);
  font-weight: 700;
}

.exercise-content-block p strong {
  color: var(--edu-blue, #1976d2);
}

.lesson-content-block p:last-child,
.exercise-content-block p:last-child {
  margin-bottom: 0;
}

/* ملفات الدرس والتمارين */
.lesson-files {
  margin-bottom: clamp(16px, 2.5vw, 24px);
}

.lesson-files h2 {
  font-size: clamp(22px, 3vw, 24px);
  font-weight: 900;
  color: var(--text-primary);
  margin: clamp(16px, 2.5vw, 24px) 0 clamp(16px, 2.5vw, 20px);
  text-align: center;
  position: relative;
  padding-bottom: 16px;
}

.lesson-files h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: linear-gradient(90deg, var(--edu-orange, #f97316), var(--edu-orange-dark, #ea580c));
  border-radius: 999px;
}

.lesson-exercises-section .lesson-files h2::after {
  background: linear-gradient(90deg, var(--edu-blue, #1976d2), var(--edu-blue-dark, #1565c0));
}

.lesson-files ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lesson-file-row {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: clamp(16px, 2.5vw, 20px);
  margin-bottom: clamp(12px, 2vw, 16px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.lesson-file-row:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  border-color: var(--border-light);
}

.lesson-buttons-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 0;
  padding: 14px 16px;
  background: #f8fafc;
  border-radius: 12px;
  width: 100%;
  box-sizing: border-box;
}

/* الشاشات الكبيرة جداً: النص على اليمين والأزرار على اليسار */
@media (min-width: 1200px) {
  .lesson-buttons-group {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
  }
  
  .lesson-buttons-group .file-label {
    flex: 1 1 auto;
    text-align: right;
    margin-left: auto;
    margin-right: 16px;
    padding: 0;
    min-width: 0;
  }
  
  .lesson-buttons-group .btn-download,
  .lesson-buttons-group .btn-view {
    flex: 0 0 auto;
    min-width: 160px;
    max-width: 200px;
  }
}

/* الشاشات الكبيرة: النص على اليمين والأزرار على اليسار */
@media (min-width: 992px) and (max-width: 1199px) {
  .lesson-buttons-group {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 18px;
    flex-wrap: nowrap;
  }
  
  .lesson-buttons-group .file-label {
    flex: 1 1 auto;
    text-align: right;
    margin-left: auto;
    margin-right: 16px;
    padding: 0;
    min-width: 0;
  }
  
  .lesson-buttons-group .btn-download,
  .lesson-buttons-group .btn-view {
    flex: 0 0 auto;
    min-width: 160px;
    max-width: 200px;
  }
}

/* الشاشات المتوسطة: النص بالأعلى والأزرار بالأسفل */
@media (min-width: 769px) and (max-width: 991px) {
  .lesson-buttons-group {
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
  }
  
  .lesson-buttons-group .file-label {
    text-align: center;
    width: 100%;
    padding: 0;
    margin-bottom: 4px;
  }
  
  .lesson-buttons-group .btn-download,
  .lesson-buttons-group .btn-view {
    flex: 1 1 calc(50% - 6px);
    min-width: 140px;
  }
}

.lesson-buttons-group:last-child {
  margin-bottom: 0;
}

.lesson-buttons-group.solution-buttons {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px dashed rgba(239, 108, 0, 0.25);
  background: #fff3e0;
  padding: 14px 16px;
  border-radius: 12px;
  margin-right: 0;
  margin-left: 0;
}

@media (min-width: 769px) {
  .lesson-buttons-group.solution-buttons {
    margin-top: 20px;
    padding-top: 20px;
    padding: 16px 20px;
  }
}

.file-label {
  font-size: clamp(15px, 1.8vw, 17px);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

.lesson-summary-section .file-label {
  color: var(--text-primary, #0f172a);
}

.lesson-exercises-section .file-label {
  color: var(--text-primary, #0f172a);
}

.lesson-buttons-group.solution-buttons .file-label {
  color: var(--edu-orange, #ef6c00);
}

.btn-download,
.btn-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  flex: 1 1 calc(50% - 6px);
  min-width: 140px;
  box-sizing: border-box;
  white-space: nowrap;
  text-align: center;
}

/* الشاشات الكبيرة جداً: أزرار أصغر */
@media (min-width: 1200px) {
  .btn-download,
  .btn-view {
    flex: 0 1 auto;
    min-width: 160px;
    max-width: 200px;
    padding: 12px 20px;
  }
}

/* الشاشات الكبيرة: أزرار متوسطة */
@media (min-width: 992px) and (max-width: 1199px) {
  .btn-download,
  .btn-view {
    flex: 0 1 auto;
    min-width: 180px;
    max-width: 240px;
    padding: 12px 20px;
  }
}

/* الشاشات المتوسطة: أزرار بجانب بعض */
@media (min-width: 769px) and (max-width: 991px) {
  .lesson-buttons-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .btn-download,
  .btn-view {
    flex: 1 1 calc(50% - 6px);
    min-width: 140px;
    padding: 12px 16px;
  }
}

.btn-download {
  background: linear-gradient(135deg, var(--edu-green, #16a34a) 0%, var(--edu-green-dark, #15803d) 100%);
  color: #fff;
  border-color: var(--edu-green, #16a34a);
}

.btn-download::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 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;
}

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

.btn-download:hover {
  background: linear-gradient(135deg, var(--edu-green-dark, #15803d) 0%, #14532d 100%);
  border-color: var(--edu-green-dark, #15803d);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.3);
  color: #fff;
}

.btn-view {
  background: linear-gradient(135deg, var(--edu-blue, #1976d2) 0%, var(--edu-blue-dark, #1565c0) 100%);
  color: #fff;
  border-color: var(--edu-blue, #1976d2);
}

.btn-view::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 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;
}

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

.btn-view:hover {
  background: linear-gradient(135deg, var(--edu-blue-dark, #1565c0) 0%, #0d47a1 100%);
  border-color: var(--edu-blue-dark, #1565c0);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.3);
  color: #fff;
}

/* أزرار الحلول - متناسقة مع الموقع */
.solution-buttons .btn-download {
  background: linear-gradient(90deg, var(--edu-orange, #ef6c00), var(--edu-orange-dark, #e65100));
  border-color: var(--edu-orange, #ef6c00);
  color: #ffffff;
}

.solution-buttons .btn-download:hover {
  background: linear-gradient(90deg, var(--edu-orange-dark, #e65100), #bf360c);
  border-color: var(--edu-orange-dark, #e65100);
  box-shadow: 0 6px 20px rgba(239, 108, 0, 0.3);
}

.solution-buttons .btn-view {
  background: linear-gradient(135deg, var(--edu-blue, #1976d2) 0%, var(--edu-blue-dark, #1565c0) 100%);
  border-color: var(--edu-blue, #1976d2);
  color: #ffffff;
}

.solution-buttons .btn-view:hover {
  background: linear-gradient(135deg, var(--edu-blue-dark, #1565c0) 0%, #0d47a1 100%);
  border-color: var(--edu-blue-dark, #1565c0);
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.3);
}

/* دروس أخرى */
.related-lessons {
  background: #ffffff;
  border: 2px solid var(--border-light);
  border-radius: 16px;
  padding: clamp(24px, 3vw, 32px);
  margin-bottom: clamp(32px, 4vw, 40px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.related-lessons::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: var(--edu-blue, #1976d2);
}

.related-lessons h2 {
  font-size: clamp(22px, 3vw, 24px);
  font-weight: 800;
  color: var(--edu-blue, #1976d2);
  margin: 0 0 24px;
  text-align: right;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(25, 118, 210, 0.2);
}

.related-lessons ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-lessons li {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.related-lessons li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.related-lessons a {
  display: block;
  padding: 14px 18px;
  background: #ffffff;
  border: 2px solid var(--border-light);
  border-radius: 10px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: clamp(15px, 2vw, 16px);
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: right;
  position: relative;
  overflow: hidden;
}

.related-lessons a::before {
  content: '→';
  position: absolute;
  left: 18px;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s;
  color: #fff;
}

.related-lessons a:hover {
  background: var(--edu-green, #16a34a);
  border-color: var(--edu-green, #16a34a);
  color: #fff;
  transform: translateX(-6px) translateY(-2px);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
  padding-right: 24px;
}

.related-lessons a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* روابط ذات صلة */
.related-links-section {
  background: #ffffff;
  border: 2px solid var(--border-light);
  border-radius: 16px;
  padding: clamp(24px, 3vw, 32px);
  margin-bottom: clamp(32px, 4vw, 40px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.related-links-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: var(--edu-orange, #ef6c00);
}

.related-links-title {
  font-size: clamp(22px, 3vw, 24px);
  font-weight: 800;
  color: var(--edu-orange, #ef6c00);
  margin: 0 0 24px;
  text-align: right;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(239, 108, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.related-links-icon {
  font-size: 1.3em;
  opacity: 0.9;
}

.related-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 992px) {
  .related-links-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .related-links-grid {
    grid-template-columns: 1fr;
  }
}

.related-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #ffffff;
  border: 2px solid var(--border-light);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.related-link-item::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 100%;
  background: var(--edu-green, #16a34a);
  transition: width 0.3s ease;
  z-index: 0;
}

.related-link-item:hover::before {
  width: 100%;
}

.related-link-item:hover {
  border-color: var(--edu-green, #16a34a);
  transform: translateX(-6px) translateY(-2px);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.25);
}

.related-link-text,
.related-link-arrow {
  position: relative;
  z-index: 1;
  transition: color 0.3s;
}

.related-link-item:hover .related-link-text,
.related-link-item:hover .related-link-arrow {
  color: #fff;
}

.related-link-arrow {
  font-size: 1.2rem;
  margin-right: 8px;
  transition: transform 0.3s;
}

.related-link-item:hover .related-link-arrow {
  transform: translateX(-4px);
}

/* التنقل بين الدروس */
.lesson-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: clamp(24px, 3vw, 32px);
}

@media (max-width: 768px) {
  .lesson-navigation {
    grid-template-columns: 1fr;
  }
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: clamp(18px, 2.5vw, 24px);
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border: 2px solid var(--border-light);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 100%;
  background: var(--edu-blue, #1976d2);
  transition: width 0.3s ease;
  z-index: 0;
}

.nav-item:hover::before {
  width: 100%;
}

.nav-item:hover {
  border-color: var(--edu-blue, #1976d2);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.25);
}

.nav-next {
  flex-direction: row-reverse;
}

.nav-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.nav-arrow {
  font-size: 1.5rem;
  position: relative;
  z-index: 1;
  transition: transform 0.3s, color 0.3s;
}

.nav-item:hover .nav-arrow {
  transform: scale(1.2);
  color: #fff;
}

.nav-content {
  flex: 1;
  position: relative;
  z-index: 1;
  transition: color 0.3s;
}

.nav-item:hover .nav-content {
  color: #fff;
}

.nav-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  transition: color 0.3s;
}

.nav-item:hover .nav-label {
  color: rgba(255, 255, 255, 0.9);
}

.nav-title {
  display: block;
  font-size: clamp(15px, 2vw, 16px);
  font-weight: 700;
  color: var(--text-primary);
  transition: color 0.3s;
}

.nav-item:hover .nav-title {
  color: #fff;
}

/* زر العودة */
.lesson-back-section {
  text-align: center;
  margin-bottom: clamp(32px, 4vw, 40px);
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: var(--edu-blue, #1976d2);
  border: 2px solid var(--edu-blue, #1976d2);
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2);
  position: relative;
  overflow: hidden;
}

.back-button::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 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;
}

.back-button:hover::before {
  width: 300px;
  height: 300px;
}

.back-button:hover {
  background: #1565c0;
  border-color: #1565c0;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.3);
  color: #fff;
}

.back-icon {
  font-size: 1.3rem;
  position: relative;
  z-index: 1;
  transition: transform 0.3s;
}

.back-button:hover .back-icon {
  transform: translateX(4px);
}

.back-text {
  position: relative;
  z-index: 1;
}

/* Responsive - الشاشات الصغيرة: النص بالأعلى والأزرار بشكل عمودي */
@media (max-width: 768px) {
  .lesson-container {
    padding: 12px 12px !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  
  .lesson-title {
    font-size: clamp(24px, 6vw, 32px);
  }
  
  .lesson-meta {
    gap: 8px;
  }
  
  .meta-item {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
  
  .lesson-exercises-section,
  .lesson-summary-section {
    padding: 12px !important;
    margin-bottom: 12px !important;
  }
  
  .lesson-summary-seo,
  .exercise-content-block,
  .lesson-content-block {
    padding: 12px !important;
    margin-bottom: 12px !important;
  }
  
  .lesson-file-row {
    padding: 14px;
  }
  
  .file-label {
    text-align: center;
    width: 100%;
    padding: 0;
    margin-bottom: 8px;
    word-wrap: break-word;
  }
  
  .lesson-buttons-group {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }
  
  .btn-download,
  .btn-view {
    width: 100%;
    justify-content: center;
    min-width: 100%;
    max-width: 100%;
    flex: 1 1 100%;
    padding: 12px 16px;
  }
  
  .lesson-buttons-group.solution-buttons {
    padding: 12px;
    margin-top: 12px;
    padding-top: 12px;
  }
}

/* الشاشات الصغيرة جداً */
@media (max-width: 480px) {
  .lesson-container {
    padding: 10px 10px !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  
  .meta-item {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  
  .lesson-exercises-section,
  .lesson-summary-section {
    padding: 10px !important;
    margin-bottom: 10px !important;
  }
  
  .lesson-summary-seo,
  .exercise-content-block,
  .lesson-content-block {
    padding: 10px !important;
    margin-bottom: 10px !important;
  }
  
  .lesson-file-row {
    padding: 12px;
  }
  
  .lesson-buttons-group {
    padding: 10px;
    gap: 8px;
  }
  
  .file-label {
    font-size: 14px;
    line-height: 1.4;
  }
  
  .btn-download,
  .btn-view {
    padding: 11px 14px;
    font-size: 0.9rem;
    width: 100%;
    max-width: 100%;
    flex: 1 1 100%;
  }
  
  .lesson-buttons-group.solution-buttons {
    padding: 10px;
    margin-top: 10px;
    padding-top: 10px;
  }
}

/* =========================================================
   Single Exam Page - صفحة الامتحان الفردية
   تصميم متناسق مع صفحات الدروس والفروض
   ========================================================= */

/* Variables for Exam Page */
.single-exam .lesson-summary-section,
body.single-exam .lesson-summary-section {
  --single-accent: var(--edu-orange, #f97316); /* Main accent for exam section */
}

/* Exam Section Styling */
.single-exam .lesson-summary-section::before,
body.single-exam .lesson-summary-section::before {
  background: linear-gradient(90deg, var(--edu-orange, #f97316), var(--edu-orange-dark, #ea580c));
}

.single-exam .lesson-summary-title::after,
body.single-exam .lesson-summary-title::after {
  background: linear-gradient(90deg, var(--edu-orange, #f97316), var(--edu-orange-dark, #ea580c));
}

.single-exam .lesson-summary-seo strong,
body.single-exam .lesson-summary-seo strong {
  color: var(--edu-orange, #f97316);
}

.single-exam .lesson-summary-seo u,
body.single-exam .lesson-summary-seo u {
  color: var(--edu-orange, #f97316);
}

.single-exam .lesson-content-block h2,
body.single-exam .lesson-content-block h2 {
  color: var(--edu-orange, #f97316);
  border-bottom: 2px solid rgba(249, 115, 22, 0.2); /* Light orange border */
}

.single-exam .lesson-files h2::after,
body.single-exam .lesson-files h2::after {
  background: linear-gradient(90deg, var(--edu-orange, #f97316), var(--edu-orange-dark, #ea580c));
}

/* Solution Content Styling (within the same section) */
.single-exam .exercise-content-block h2,
body.single-exam .exercise-content-block h2 {
  color: var(--edu-blue, #1976d2);
  border-bottom: 2px solid rgba(25, 118, 210, 0.2); /* Light blue border */
}

/* Solution Buttons Styling (within lesson-file-row) */
/* ألوان الحلول في صفحة الامتحانات - موحدة مع الفروض والدروس */
.single-exam .solution-buttons .btn-download,
body.single-exam .solution-buttons .btn-download {
  background: linear-gradient(90deg, var(--edu-orange, #ef6c00), var(--edu-orange-dark, #e65100)) !important;
  border-color: var(--edu-orange, #ef6c00) !important;
  color: #ffffff !important;
}

.single-exam .solution-buttons .btn-download:hover,
body.single-exam .solution-buttons .btn-download:hover {
  background: linear-gradient(90deg, var(--edu-orange-dark, #e65100), #bf360c) !important;
  border-color: var(--edu-orange-dark, #e65100) !important;
  box-shadow: 0 6px 20px rgba(239, 108, 0, 0.3) !important;
}

.single-exam .solution-buttons .btn-view,
body.single-exam .solution-buttons .btn-view {
  background: linear-gradient(135deg, var(--edu-blue, #1976d2) 0%, var(--edu-blue-dark, #1565c0) 100%) !important;
  border-color: var(--edu-blue, #1976d2) !important;
  color: #ffffff !important;
}

.single-exam .solution-buttons .btn-view:hover,
body.single-exam .solution-buttons .btn-view:hover {
  background: linear-gradient(135deg, var(--edu-blue-dark, #1565c0) 0%, #0d47a1 100%) !important;
  border-color: var(--edu-blue-dark, #1565c0) !important;
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.3) !important;
}

/* Ensure all lesson-* classes work for exam pages */
.single-exam .lesson-container,
body.single-exam .lesson-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(12px, 2vw, 24px) clamp(12px, 2vw, 24px);
  box-sizing: border-box;
  background: #ffffff;
  min-height: 100vh;
  width: 100%;
}

.single-exam .lesson-title,
body.single-exam .lesson-title {
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 900;
  line-height: 1.3;
  color: var(--text-primary);
  margin: 0 0 clamp(16px, 2.5vw, 24px);
  text-align: center;
  position: relative;
  padding-bottom: clamp(16px, 2.5vw, 20px);
}

.single-exam .lesson-meta,
body.single-exam .lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-bottom: clamp(20px, 3vw, 28px);
}

.single-exam .lesson-intro,
body.single-exam .lesson-intro {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.05) 0%, rgba(239, 108, 0, 0.02) 100%);
  border: 1px solid rgba(249, 115, 22, 0.15);
  border-top: 3px solid var(--edu-orange, #f97316);
  border-radius: 12px;
  padding: clamp(20px, 3vw, 28px);
  margin-bottom: clamp(28px, 4vw, 36px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* Force CSS loading for exam pages */
body.single-post-type-exam .lesson-container,
body.single-exam .lesson-container {
  display: block;
}

body.single-post-type-exam .lesson-title,
body.single-exam .lesson-title {
  display: block;
}

body.single-post-type-exam .lesson-meta,
body.single-exam .lesson-meta {
  display: flex;
}

body.single-post-type-exam .lesson-summary-section,
body.single-exam .lesson-summary-section {
  display: block;
}

body.single-post-type-exam .lesson-files,
body.single-exam .lesson-files {
  display: block;
}

/* =========================================================
   Force CSS Loading for All Single Pages - إجبار تحميل CSS
   ========================================================= */

/* Global styles for all single pages - تطبيق عام على جميع الصفحات */
.single-lesson .lesson-container,
.single-devoir .lesson-container,
.single-exam .lesson-container,
body.single-lesson .lesson-container,
body.single-devoir .lesson-container,
body.single-exam .lesson-container,
body.single-post-type-lesson .lesson-container,
body.single-post-type-devoir .lesson-container,
body.single-post-type-exam .lesson-container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: clamp(12px, 2vw, 24px) clamp(12px, 2vw, 24px) !important;
  box-sizing: border-box !important;
  background: #ffffff !important;
  min-height: 100vh !important;
  display: block !important;
  width: 100% !important;
}

.single-lesson .lesson-title,
.single-devoir .lesson-title,
.single-exam .lesson-title,
body.single-lesson .lesson-title,
body.single-devoir .lesson-title,
body.single-exam .lesson-title,
body.single-post-type-lesson .lesson-title,
body.single-post-type-devoir .lesson-title,
body.single-post-type-exam .lesson-title {
  font-size: clamp(28px, 5vw, 38px) !important;
  font-weight: 900 !important;
  line-height: 1.3 !important;
  color: var(--text-primary, #0f172a) !important;
  margin: 0 0 24px !important;
  text-align: center !important;
  position: relative !important;
  padding-bottom: 20px !important;
  display: block !important;
}

.single-lesson .lesson-title::after,
.single-devoir .lesson-title::after,
.single-exam .lesson-title::after,
body.single-lesson .lesson-title::after,
body.single-devoir .lesson-title::after,
body.single-exam .lesson-title::after,
body.single-post-type-lesson .lesson-title::after,
body.single-post-type-devoir .lesson-title::after,
body.single-post-type-exam .lesson-title::after {
  content: '' !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 120px !important;
  height: 4px !important;
  background: linear-gradient(90deg, var(--edu-green, #16a34a), var(--edu-blue, #1976d2) 70%, var(--edu-orange, #ef6c00)) !important;
  border-radius: 999px !important;
}

.single-lesson .lesson-meta,
.single-devoir .lesson-meta,
.single-exam .lesson-meta,
body.single-lesson .lesson-meta,
body.single-devoir .lesson-meta,
body.single-exam .lesson-meta,
body.single-post-type-lesson .lesson-meta,
body.single-post-type-devoir .lesson-meta,
body.single-post-type-exam .lesson-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 32px !important;
  padding: 20px !important;
  background: #ffffff !important;
  border-radius: 12px !important;
  border: 1px solid var(--border-light, #e5e7eb) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
}

.single-lesson .lesson-intro,
.single-devoir .lesson-intro,
.single-exam .lesson-intro,
body.single-lesson .lesson-intro,
body.single-devoir .lesson-intro,
body.single-exam .lesson-intro,
body.single-post-type-lesson .lesson-intro,
body.single-post-type-devoir .lesson-intro,
body.single-post-type-exam .lesson-intro {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.05) 0%, rgba(239, 108, 0, 0.02) 100%) !important;
  border: 1px solid rgba(249, 115, 22, 0.15) !important;
  border-top: 3px solid var(--edu-orange, #f97316) !important;
  border-radius: 12px !important;
  padding: clamp(20px, 3vw, 28px) !important;
  margin-bottom: clamp(28px, 4vw, 36px) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
  display: block !important;
}

/* Devoir specific colors */
.single-devoir .lesson-summary-section,
body.single-devoir .lesson-summary-section,
body.single-post-type-devoir .lesson-summary-section {
  --single-accent: var(--edu-orange, #f97316) !important;
  display: block !important;
}

.single-devoir .lesson-summary-section::before,
body.single-devoir .lesson-summary-section::before,
body.single-post-type-devoir .lesson-summary-section::before {
  background: linear-gradient(90deg, var(--edu-orange, #f97316), var(--edu-orange-dark, #ea580c)) !important;
}

.single-devoir .lesson-summary-title::after,
body.single-devoir .lesson-summary-title::after,
body.single-post-type-devoir .lesson-summary-title::after {
  background: linear-gradient(90deg, var(--edu-orange, #f97316), var(--edu-orange-dark, #ea580c)) !important;
}

.single-devoir .lesson-summary-seo strong,
body.single-devoir .lesson-summary-seo strong,
body.single-post-type-devoir .lesson-summary-seo strong {
  color: var(--edu-orange, #f97316) !important;
}

.single-devoir .lesson-summary-seo u,
body.single-devoir .lesson-summary-seo u,
body.single-post-type-devoir .lesson-summary-seo u {
  color: var(--edu-orange, #f97316) !important;
}

.single-devoir .lesson-content-block h2,
body.single-devoir .lesson-content-block h2,
body.single-post-type-devoir .lesson-content-block h2 {
  color: var(--edu-orange, #f97316) !important;
  border-bottom: 2px solid rgba(249, 115, 22, 0.2) !important;
}

.single-devoir .lesson-files h2::after,
body.single-devoir .lesson-files h2::after,
body.single-post-type-devoir .lesson-files h2::after {
  background: linear-gradient(90deg, var(--edu-orange, #f97316), var(--edu-orange-dark, #ea580c)) !important;
}

.single-devoir .exercise-content-block h2,
body.single-devoir .exercise-content-block h2,
body.single-post-type-devoir .exercise-content-block h2 {
  color: var(--edu-blue, #1976d2) !important;
  border-bottom: 2px solid rgba(25, 118, 210, 0.2) !important;
}

/* ألوان الحلول في صفحة الفروض - موحدة مع الامتحانات والدروس */
.single-devoir .solution-buttons .btn-download,
body.single-devoir .solution-buttons .btn-download,
body.single-post-type-devoir .solution-buttons .btn-download {
  background: linear-gradient(90deg, var(--edu-orange, #ef6c00), var(--edu-orange-dark, #e65100)) !important;
  border-color: var(--edu-orange, #ef6c00) !important;
  color: #ffffff !important;
}

.single-devoir .solution-buttons .btn-download:hover,
body.single-devoir .solution-buttons .btn-download:hover,
body.single-post-type-devoir .solution-buttons .btn-download:hover {
  background: linear-gradient(90deg, var(--edu-orange-dark, #e65100), #bf360c) !important;
  border-color: var(--edu-orange-dark, #e65100) !important;
  box-shadow: 0 6px 20px rgba(239, 108, 0, 0.3) !important;
}

.single-devoir .solution-buttons .btn-view,
body.single-devoir .solution-buttons .btn-view,
body.single-post-type-devoir .solution-buttons .btn-view {
  background: linear-gradient(135deg, var(--edu-blue, #1976d2) 0%, var(--edu-blue-dark, #1565c0) 100%) !important;
  border-color: var(--edu-blue, #1976d2) !important;
  color: #ffffff !important;
}

.single-devoir .solution-buttons .btn-view:hover,
body.single-devoir .solution-buttons .btn-view:hover,
body.single-post-type-devoir .solution-buttons .btn-view:hover {
  background: linear-gradient(135deg, var(--edu-blue-dark, #1565c0) 0%, #0d47a1 100%) !important;
  border-color: var(--edu-blue-dark, #1565c0) !important;
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.3) !important;
}

/* Fallback: Apply styles even without body classes */
.lesson-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(12px, 2vw, 24px) clamp(12px, 2vw, 24px);
  box-sizing: border-box;
  background: #ffffff;
  min-height: 100vh;
  width: 100%;
}

.lesson-title {
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 900;
  line-height: 1.3;
  color: var(--text-primary, #0f172a);
  margin: 0 0 24px;
  text-align: center;
  position: relative;
  padding-bottom: 20px;
}

.lesson-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: linear-gradient(90deg, var(--edu-green, #16a34a), var(--edu-blue, #1976d2) 70%, var(--edu-orange, #ef6c00));
  border-radius: 999px;
}

.lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  padding: 20px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--border-light, #e5e7eb);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.lesson-intro {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.05) 0%, rgba(239, 108, 0, 0.02) 100%);
  border: 1px solid rgba(249, 115, 22, 0.15);
  border-top: 3px solid var(--edu-orange, #f97316);
  border-radius: 12px;
  padding: clamp(20px, 3vw, 28px);
  margin-bottom: clamp(28px, 4vw, 36px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* =========================================================
   Exam Files by Region & Province - ملفات الامتحان حسب الجهات والأقاليم
   تصميم احترافي متناسق مع الموقع
   ========================================================= */

/* قسم ملفات الامتحان */
.exam-files-section {
  margin-top: clamp(32px, 4vw, 48px);
  width: 100%;
  box-sizing: border-box;
}

.exam-files-title {
  font-size: clamp(24px, 3.5vw, 30px);
  font-weight: 900;
  color: var(--text-primary, #0f172a);
  text-align: center;
  margin: 0 0 clamp(32px, 4vw, 48px) 0;
  padding-bottom: clamp(16px, 2vw, 24px);
  border-bottom: 3px solid var(--edu-green, #1b5e20);
  position: relative;
}

.exam-files-title::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 3px;
  background: linear-gradient(90deg, var(--edu-green, #1b5e20), var(--edu-blue, #1976d2), var(--edu-orange, #ef6c00));
  border-radius: 2px;
}

/* كرت الجهة */
.exam-region-card {
  background: #ffffff;
  border: 1px solid var(--border-light, #e5e7eb);
  border-radius: 16px;
  padding: clamp(20px, 2.5vw, 28px);
  margin-bottom: clamp(20px, 2.5vw, 28px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.exam-region-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--edu-green, #1b5e20), var(--edu-blue, #1976d2) 70%, var(--edu-orange, #ef6c00));
  border-radius: 16px 16px 0 0;
}

.exam-region-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

/* عنوان الجهة */
.exam-region-title {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  color: var(--edu-green, #1b5e20);
  margin: 0 0 clamp(24px, 3vw, 32px) 0;
  padding: 0 0 clamp(12px, 1.5vw, 16px) 0;
  border-bottom: 3px solid var(--edu-green, #1b5e20);
  line-height: 1.4;
  position: relative;
}

.exam-region-title .region-prefix {
  color: var(--edu-green, #1b5e20);
}

.exam-region-title .region-name-orange {
  color: var(--edu-orange, #ef6c00);
  font-weight: 800;
}

.exam-region-title::after {
  content: '';
  position: absolute;
  bottom: -3px;
  right: 0;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--edu-green, #1b5e20), var(--edu-blue, #1976d2));
  border-radius: 2px;
}

/* مجموعة الإقليم */
.exam-province-group {
  margin-bottom: clamp(20px, 2.5vw, 28px);
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.exam-province-group:last-child {
  margin-bottom: 0;
}

/* عنوان الإقليم */
.exam-province-title {
  font-size: clamp(19px, 2.4vw, 24px);
  font-weight: 700;
  color: var(--edu-blue, #1976d2);
  margin: 0 0 clamp(18px, 2.5vw, 24px) 0;
  padding: 0 0 clamp(10px, 1.2vw, 14px) 0;
  border-bottom: 2px solid var(--border-light, #e5e7eb);
  line-height: 1.4;
  position: relative;
}

.exam-province-title .province-prefix {
  color: var(--edu-blue, #1976d2);
}

.exam-province-title .province-name-orange {
  color: var(--edu-orange, #ef6c00);
  font-weight: 700;
}

.exam-province-title::before {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 0;
  width: 60px;
  height: 2px;
  background: var(--edu-blue, #1976d2);
  border-radius: 2px;
}

/* قائمة الملفات */
.exam-files-list {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vw, 18px);
}

/* عنصر الملف */
.exam-file-item {
  background: var(--section-bg, #f8fafc);
  border: 1px solid var(--border-light, #e5e7eb);
  border-radius: 12px;
  padding: clamp(16px, 2vw, 20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  box-sizing: border-box;
  margin-bottom: clamp(14px, 2vw, 18px);
}

.exam-file-item:hover {
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transform: translateX(-4px);
  border-color: var(--edu-green, #1b5e20);
}

/* تنسيق جديد للأزرار - تنسيق متجاوب حسب حجم الشاشة */
.file-header-with-buttons {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 0;
  padding: 14px 16px;
  background: #f8fafc;
  border-radius: 12px;
  width: 100%;
  box-sizing: border-box;
}

/* الشاشات الكبيرة جداً: النص على اليمين والأزرار على اليسار في نفس السطر */
@media (min-width: 1200px) {
  .file-header-with-buttons {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    flex-wrap: wrap; /* إذا طال العنوان، تنزل الأزرار لسطر جديد */
  }
  
  .file-name {
    flex: 1 1 auto;
    text-align: right;
    margin-left: auto;
    margin-right: 16px;
    padding: 0;
    min-width: 0;
  }
  
  .file-buttons-row {
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 12px;
  }
}

/* الشاشات الكبيرة: النص على اليمين والأزرار على اليسار */
@media (min-width: 992px) and (max-width: 1199px) {
  .file-header-with-buttons {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 18px;
    flex-wrap: wrap; /* يمنع التداخل عند العناوين الطويلة */
  }
  
  .file-name {
    flex: 1 1 auto;
    text-align: right;
    margin-left: auto;
    margin-right: 16px;
    padding: 0;
    min-width: 0;
  }
  
  .file-buttons-row {
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 12px;
  }
}

/* الشاشات المتوسطة: النص بالأعلى والأزرار بالأسفل */
@media (min-width: 769px) and (max-width: 991px) {
  .file-header-with-buttons {
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
  }
  
  .file-name {
    text-align: center;
    width: 100%;
  }
  
  .file-buttons-row {
    justify-content: center;
    width: 100%;
  }
}

.file-name {
  display: block;
  font-weight: 700;
  font-size: clamp(15px, 1.8vw, 17px);
  color: var(--text-primary, #0f172a);
  margin: 0;
  padding: 0;
  line-height: 1.5;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.file-name.solution-label {
  color: var(--edu-orange, #ef6c00);
}

.file-buttons-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap; /* على الشاشات الضيقة تتكسر الأزرار بدل التداخل */
}

.file-buttons-row .btn-download,
.file-buttons-row .btn-view {
  flex: 1 1 160px;
  min-width: 120px;
  max-width: none;
  padding: 12px 16px;
  font-size: 0.95rem;
  justify-content: center;
  white-space: nowrap;
  text-align: center;
  box-sizing: border-box;
}

/* الشاشات الكبيرة جداً: أزرار أصغر */
@media (min-width: 1200px) {
  .file-buttons-row .btn-download,
  .file-buttons-row .btn-view {
    flex: 0 1 auto;
    min-width: 160px;
    max-width: 200px;
    padding: 12px 20px;
  }
}

/* زر تحميل الحل برتقالي */
.file-header-with-buttons.solution-buttons .file-buttons-row .btn-download {
  background: linear-gradient(90deg, var(--edu-orange, #ef6c00), var(--edu-orange-dark, #e65100));
  border-color: var(--edu-orange, #ef6c00);
  color: #ffffff;
}

.file-header-with-buttons.solution-buttons .file-buttons-row .btn-download:hover {
  background: linear-gradient(90deg, var(--edu-orange-dark, #e65100), #bf360c);
  border-color: var(--edu-orange-dark, #e65100);
  box-shadow: 0 6px 20px rgba(239, 108, 0, 0.3);
}

/* تنسيق أزرار الحلول */
.file-header-with-buttons.solution-buttons {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px dashed rgba(239, 108, 0, 0.25);
  background: #fff3e0;
  padding: 14px 16px;
  border-radius: 12px;
  margin-right: 0;
  margin-left: 0;
}

@media (min-width: 769px) {
  .file-header-with-buttons.solution-buttons {
    margin-top: 20px;
    padding-top: 20px;
    padding: 16px 20px;
  }
}

/* Responsive - الشاشات المتوسطة والصغيرة */
@media (max-width: 992px) {
  /* تقليل padding في container للشاشات المتوسطة */
  .single-exam .lesson-container,
  body.single-exam .lesson-container {
    padding: clamp(12px, 2vw, 16px) clamp(12px, 2vw, 16px) !important;
  }
  
  .exam-files-section {
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
  }
  
  .exam-region-card {
    padding: 18px;
    margin-bottom: 20px;
    margin-right: 0;
    margin-left: 0;
    border-radius: 12px;
    width: 100%;
  }
  
  .exam-province-group {
    padding: 0;
    margin-right: 0;
    margin-left: 0;
    margin-bottom: 18px;
    width: 100%;
  }
  
  .exam-file-item {
    margin-right: 0;
    margin-left: 0;
    padding: 14px;
    margin-bottom: 12px;
    width: 100%;
  }
  
  .file-header-with-buttons {
    margin-right: 0;
    margin-left: 0;
    padding: 12px;
    gap: 10px;
    width: 100%;
  }
  
  .file-header-with-buttons.solution-buttons {
    margin-right: 0;
    margin-left: 0;
    padding: 12px;
    margin-top: 12px;
    padding-top: 12px;
    width: 100%;
  }
}

/* الشاشات الصغيرة: النص بالأعلى ثم الزر الأول ثم الزر الثاني */
@media (max-width: 768px) {
  /* تقليل padding في container للشاشات الصغيرة */
  .single-exam .lesson-container,
  body.single-exam .lesson-container {
    padding: clamp(10px, 2vw, 14px) clamp(10px, 2vw, 14px) !important;
  }
  
  .exam-files-section {
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
  }
  
  .exam-region-card {
    padding: 16px;
    margin-bottom: 18px;
    margin-right: 0;
    margin-left: 0;
    border-radius: 12px;
    width: 100%;
  }
  
  .exam-province-group {
    padding: 0;
    margin-right: 0;
    margin-left: 0;
    margin-bottom: 16px;
    width: 100%;
  }
  
  .exam-region-title {
    font-size: 20px;
    margin-bottom: 18px;
  }
  
  .exam-province-title {
    font-size: 18px;
    margin-bottom: 16px;
  }
  
  .exam-file-item {
    padding: 12px;
    margin-bottom: 12px;
    width: 100%;
  }
  
  /* النص بالأعلى والأزرار بشكل عمودي */
  .file-header-with-buttons {
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    margin-right: 0;
    margin-left: 0;
    width: 100%;
    align-items: stretch;
  }
  
  .file-name {
    text-align: center;
    width: 100%;
    white-space: normal;
    padding: 0;
    margin-bottom: 6px;
    word-wrap: break-word;
  }
  
  .file-buttons-row {
    width: 100%;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  
  .file-buttons-row .btn-download,
  .file-buttons-row .btn-view {
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    padding: 12px 16px;
  }
  
  .file-header-with-buttons.solution-buttons {
    margin-right: 0;
    margin-left: 0;
    padding: 12px;
    margin-top: 12px;
    padding-top: 12px;
    width: 100%;
  }
}

/* الشاشات الصغيرة جداً: النص بالأعلى ثم الأزرار بشكل عمودي */
@media (max-width: 480px) {
  /* تقليل padding في container للشاشات الصغيرة جداً */
  .single-exam .lesson-container,
  body.single-exam .lesson-container {
    padding: 10px 10px !important;
  }
  
  .exam-files-section {
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
  }
  
  .exam-region-card {
    padding: 12px;
    border-radius: 10px;
    margin-right: 0;
    margin-left: 0;
    margin-bottom: 14px;
    width: 100%;
  }
  
  .exam-province-group {
    padding: 0;
    margin-right: 0;
    margin-left: 0;
    margin-bottom: 12px;
    width: 100%;
  }
  
  .exam-region-title {
    font-size: 17px;
    margin-bottom: 14px;
    padding-bottom: 8px;
  }
  
  .exam-province-title {
    font-size: 15px;
    margin-bottom: 12px;
    padding-bottom: 6px;
  }
  
  .exam-file-item {
    padding: 10px;
    margin-right: 0;
    margin-left: 0;
    margin-bottom: 10px;
    border-radius: 10px;
    width: 100%;
  }
  
  .file-header-with-buttons {
    padding: 10px;
    margin-right: 0;
    margin-left: 0;
    gap: 8px;
    border-radius: 10px;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  
  .file-name {
    font-size: 14px;
    text-align: center;
    padding: 0;
    margin-bottom: 6px;
    word-wrap: break-word;
    line-height: 1.4;
  }
  
  .file-buttons-row {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  
  .file-buttons-row .btn-download,
  .file-buttons-row .btn-view {
    width: 100%;
    padding: 11px 14px;
    font-size: 0.9rem;
  }
  
  .file-header-with-buttons.solution-buttons {
    margin-right: 0;
    margin-left: 0;
    padding: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-radius: 10px;
    width: 100%;
  }
}

/* =========================================================
   PDF Viewer Modal - Modal لمشاهدة PDF في نفس الصفحة
   ========================================================= */
.pdf-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  display: none;
}

.pdf-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.pdf-modal-container {
  position: relative;
  width: 95%;
  max-width: 1400px;
  height: 95vh;
  max-height: 95vh;
  margin: 2.5vh auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000000;
}

.pdf-modal-header {
  background: linear-gradient(135deg, var(--edu-green, #16a34a) 0%, #15803d 100%);
  color: #ffffff;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  border-radius: 16px 16px 0 0;
}

.pdf-modal-title {
  margin: 0;
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 700;
  text-align: right;
  direction: rtl;
  flex: 1;
}

.pdf-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-right: 16px;
}

.pdf-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.pdf-modal-body {
  flex: 1;
  background: #f5f5f5;
  padding: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.pdf-modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pdf-modal-footer {
  padding: 20px 30px;
  background: #ffffff;
  border-top: 2px solid #e5e7eb;
  text-align: center;
  flex-shrink: 0;
}

.pdf-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #666;
  font-family: 'Almarai', sans-serif;
  z-index: 10;
}

.pdf-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--edu-green, #16a34a);
  border-radius: 50%;
  animation: pdf-spin 1s linear infinite;
  margin-bottom: 20px;
}

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

.pdf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--edu-green, #16a34a) 0%, #15803d 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Almarai', sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: none;
  cursor: pointer;
}

.pdf-download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
}

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

.pdf-download-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Responsive Design for Modal */
@media (max-width: 768px) {
  .pdf-modal-container {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
  }
  
  .pdf-modal-header {
    padding: 15px 20px;
    border-radius: 0;
  }
  
  .pdf-modal-title {
    font-size: 18px;
  }
  
  .pdf-modal-close {
    width: 36px;
    height: 36px;
    font-size: 20px;
    margin-right: 12px;
  }
  
  .pdf-modal-body {
    padding: 10px;
  }
  
  .pdf-modal-footer {
    padding: 15px 20px;
  }
  
  .pdf-download-btn {
    padding: 12px 24px;
    font-size: 14px;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .pdf-modal-header {
    padding: 12px 16px;
  }
  
  .pdf-modal-title {
    font-size: 16px;
  }
  
  .pdf-modal-close {
    width: 32px;
    height: 32px;
    font-size: 18px;
    margin-right: 8px;
  }
  
  .pdf-modal-body {
    padding: 8px;
  }
  
  .pdf-modal-footer {
    padding: 12px 16px;
  }
}

/* دعم الألوان حسب السلك */
body.cycle-primary .pdf-modal-header,
body.cycle-primary .pdf-download-btn {
  background: linear-gradient(135deg, var(--edu-green, #16a34a) 0%, #15803d 100%);
}

body.cycle-college .pdf-modal-header,
body.cycle-college .pdf-download-btn {
  background: linear-gradient(135deg, var(--edu-blue, #1976d2) 0%, #1565c0 100%);
}

body.cycle-lycee .pdf-modal-header,
body.cycle-lycee .pdf-download-btn {
  background: linear-gradient(135deg, var(--edu-orange, #ef6c00) 0%, #e65100 100%);
}

/* ===== Enhanced Related Links Section ===== */
.related-links-section-enhanced {
  background: #ffffff;
  border: 2px solid var(--border-light, #e5e7eb);
  border-radius: 16px;
  padding: clamp(28px, 4vw, 36px);
  margin-bottom: clamp(40px, 5vw, 50px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  position: relative;
}

.related-links-section-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: var(--edu-orange, #ef6c00);
  border-radius: 16px 16px 0 0;
}

.related-links-header {
  text-align: right;
  margin-bottom: clamp(24px, 3vw, 32px);
  padding-bottom: clamp(16px, 2vw, 20px);
  border-bottom: 2px solid var(--border-light, #e5e7eb);
}

.related-links-title-enhanced {
  font-size: clamp(22px, 3vw, 24px);
  font-weight: 800;
  color: var(--edu-blue, #1976d2);
  margin: 0 0 24px;
  text-align: right;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(25, 118, 210, 0.2);
}

.related-links-category {
  margin-bottom: clamp(24px, 3vw, 32px);
}

.related-links-category:last-child {
  margin-bottom: 0;
}

.related-links-category-title {
  font-size: clamp(18px, 2.2vw, 20px);
  font-weight: 700;
  color: var(--single-text, #0f172a);
  margin: 0 0 clamp(14px, 2vw, 18px);
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: right;
  padding: 10px 14px;
  background: #f9fafb;
  border-radius: 10px;
  border-right: 3px solid var(--edu-orange, #ef6c00);
}

.category-icon {
  font-size: 1.2em;
}

.related-links-grid-enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(12px, 1.8vw, 16px);
}

@media (max-width: 992px) {
  .related-links-grid-enhanced {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .related-links-grid-enhanced {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.related-link-item-enhanced {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: clamp(16px, 2vw, 20px) clamp(18px, 2.5vw, 22px);
  background: #ffffff;
  border: 2px solid var(--border-light, #e5e7eb);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary, #0f172a);
  font-size: clamp(15px, 1.8vw, 17px);
  font-weight: 600;
  transition: all 0.25s ease;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.related-link-item-enhanced:hover {
  border-color: var(--edu-orange, #ef6c00);
  background: #fff8f0;
  transform: translateX(-4px);
  box-shadow: 0 4px 12px rgba(239, 108, 0, 0.15);
}

.link-icon,
.link-text {
  position: relative;
  transition: all 0.25s ease;
}

.related-link-item-enhanced:hover .link-text {
  color: var(--edu-orange, #ef6c00);
}

.link-icon {
  font-size: 1.3em;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.related-link-item-enhanced:hover .link-icon {
  transform: scale(1.1);
}

.link-text {
  flex: 1;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: var(--text-primary, #0f172a);
}

