/* Courses Page Styling - Modern Darsely Theme */

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  text-align: right !important;
  font-family: "Cairo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: normal;
}

body > #footer {
  margin-top: auto;
}

/* ─── Courses Page Section ─── */
.courses-home.courses {
  padding-top: 130px;
  padding-bottom: 70px;
  flex: 1;
}

@media (max-width: 768px) {
  .courses-home.courses {
    padding-top: 100px;
    padding-bottom: 40px;
  }
}

/* ─── Section Heading Overrides ─── */
.courses-home .speacial-heading {
  margin-bottom: 35px;
}

/* ─── Course Card Outer ─── */
.card-course {
  margin-bottom: 30px;
  display: flex;
}

.course {
  background: #ffffff;
  border-radius: 24px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  direction: rtl;
  border: 1px solid rgba(67, 99, 126, 0.12);
  box-shadow: 0 10px 30px rgba(50, 30, 72, 0.05);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  position: relative;
  overflow: hidden;
}

.course:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(50, 30, 72, 0.12);
  border-color: #ffb703;
}

/* ─── Course Thumbnail & Badge ─── */
.course-thumb-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background: #0f172a;
  flex-shrink: 0;
}

.course img,
.course-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 18px;
  display: block;
  transition: transform 0.4s ease;
}

.course:hover .course-thumb-wrap img,
.course:hover img:not(.icon) {
  transform: scale(1.04);
}

.course-badge-status {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(16, 185, 129, 0.9);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  z-index: 2;
}

/* ─── Course Body & Content ─── */
.content-course {
  padding: 16px 6px 4px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.content-course h4 {
  font-family: "Cairo", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #003666;
  text-align: right;
  margin: 0 0 10px;
  line-height: 1.45;
  transition: color 0.25s ease;
}

.course:hover .content-course h4 {
  color: #ff9d00;
}

.number-lect {
  font-size: 0.88rem;
  color: #64748b;
  margin: 0 0 16px;
  line-height: 1.6;
  text-align: right;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

/* ─── Data & Meta Row ─── */
.data-course {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(67, 99, 126, 0.08);
  margin-top: auto;
}

.you-subscription {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1.5px solid rgba(16, 185, 129, 0.25);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.info-course {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: #64748b;
  text-align: left;
}

.date-course,
.update-course {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-weight: 600;
}

.date-course i {
  color: #321e48;
}

.update-course i {
  color: #ff9d00;
}

/* ─── Action Button (Open Course) ─── */
.course-subscription {
  margin-top: 14px;
}

.check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 20px;
  border-radius: 50px;
  background: linear-gradient(135deg, #321e48 0%, #43637e 100%);
  color: #ffffff !important;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(50, 30, 72, 0.25);
  transition: all 0.28s ease;
}

.check:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(50, 30, 72, 0.35);
  filter: brightness(1.1);
}

/* ─── Skeleton Loading ─── */
.skeleton-item .course {
  pointer-events: none;
}

.skeleton-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  margin-bottom: 12px;
}

/* ─── Empty State Card ─── */
.empty-courses-wrapper {
  background: #ffffff;
  border-radius: 24px;
  padding: 50px 30px;
  text-align: center;
  border: 1px solid rgba(67, 99, 126, 0.1);
  box-shadow: 0 10px 30px rgba(50, 30, 72, 0.05);
  max-width: 580px;
  margin: 30px auto;
  transition: all 0.3s ease;
}

.empty-icon-circle {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(255, 157, 0, 0.12);
  color: #ff9d00;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 22px;
}

.empty-courses-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 12px;
}

.empty-courses-desc {
  font-size: 1rem;
  color: #64748b;
  line-height: 1.7;
  margin-bottom: 25px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.btn-browse-courses {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #321e48 0%, #43637e 100%);
  color: #ffffff !important;
  padding: 12px 32px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none !important;
  box-shadow: 0 6px 18px rgba(50, 30, 72, 0.25);
  transition: all 0.3s ease;
}

.btn-browse-courses:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(50, 30, 72, 0.35);
}

/* ─── Error Alert ─── */
.error-courses-wrapper {
  background: #ffffff;
  border-radius: 20px;
  padding: 35px 25px;
  text-align: center;
  border: 1px solid rgba(239, 68, 68, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  max-width: 520px;
  margin: 30px auto;
}

.error-icon {
  font-size: 40px;
  color: #ef4444;
  margin-bottom: 15px;
}

.btn-retry {
  background: #ef4444;
  color: #ffffff !important;
  border: none;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.25s ease;
}

.btn-retry:hover {
  opacity: 0.9;
}
