/* =========================================================
   صفحات قوايم الكورسات
   - Site/course/index.blade.php  (كورسات جامعة معينة / الدورات / كورسات المعلم)
   - student/university_lessons.blade.php  (فلاتر /coursesuniversity)
   ========================================================= */

/* ---------- كارت الفلاتر (بحث + تخصص + جامعة) ---------- */
.cl-filters {
  margin-bottom: 28px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid #E8ECF3;
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 28px -16px rgba(16, 24, 40, .14);
}

.cl-filters__head {
  margin-bottom: 16px;
}

.cl-filters h2.cl-filters__title {
  margin: 0 0 4px;
  color: #1A202C;
  font-size: 22px;
  font-weight: 800;
}

.cl-filters p.cl-filters__hint {
  margin: 0 !important;
  color: #6B7280;
  font-size: 14px;
}

/* خانة البحث */
.cl-filters .search-wrapper {
  position: relative;
  align-items: center;
  margin: 0;
}

.cl-filters .search-wrapper input#searchInput {
  height: 48px;
  padding: 0 46px 0 16px !important;
  border: 1.5px solid #E3E9F3;
  border-radius: 14px;
  background: #F9FBFE;
  color: #1A202C;
  box-shadow: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}

.cl-filters .search-wrapper input#searchInput:focus {
  border-color: #2285FC;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(34, 133, 252, .12);
}

.cl-filters .search-wrapper img {
  position: absolute;
  top: 50%;
  right: 16px;
  left: auto;
  width: 20px;
  height: 20px;
  opacity: .55;
  transform: translateY(-50%);
  pointer-events: none;
}

/* الـ select2 بنفس شكل خانة البحث */
.cl-filters .select2-container {
  width: 100% !important;
}

.cl-filters .select2-container--default .select2-selection--single {
  display: flex;
  align-items: center;
  height: 48px;
  /* فيه ستايل تاني بيصفّر الإطار بـ !important */
  border: 1.5px solid #E3E9F3 !important;
  border-radius: 14px !important;
  background: #F9FBFE;
  transition: border-color .2s, box-shadow .2s;
}

.cl-filters .select2-container--open .select2-selection--single,
.cl-filters .select2-container--focus .select2-selection--single {
  border-color: #2285FC !important;
  box-shadow: 0 0 0 4px rgba(34, 133, 252, .12);
}

.cl-filters .select2-selection__rendered {
  padding: 0 16px 0 40px !important;
  color: #1A202C !important;
  font-size: 14px;
  line-height: 46px !important;
}

.cl-filters .select2-selection__arrow {
  top: 50% !important;
  height: 20px !important;
  transform: translateY(-50%);
  left: 12px !important;
  right: auto !important;
}

/* قايمة select2 المفتوحة (بتتحط برّه الصفحة في body) */
.select2-container--open .select2-dropdown {
  overflow: hidden;
  border: 1px solid #E3E9F3;
  border-radius: 14px;
  box-shadow: 0 20px 40px -18px rgba(16, 24, 40, .25);
}

.select2-container--open .select2-results__option--highlighted[aria-selected] {
  background: #2285FC;
}


/* القوايم العادية (من غير select2) بنفس شكل خانة البحث */
.cl-filters select.form-select {
  height: 48px;
  padding: 0 16px 0 40px !important;
  border: 1.5px solid #E3E9F3 !important;
  border-radius: 14px !important;
  background-color: #F9FBFE;
  background-position: left 14px center !important;
  color: #1A202C;
  font-size: 14px;
  box-shadow: none;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}

.cl-filters select.form-select:focus {
  border-color: #2285FC !important;
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(34, 133, 252, .12);
}

@media (max-width: 767px) {
  .cl-filters {
    padding: 18px 16px;
  }

  .cl-filters h2.cl-filters__title {
    font-size: 20px;
  }
}

/* =========================================================
   صفحة القايمة (index.blade.php): رأس الصفحة + المسافات
   ========================================================= */
.cl-page {
  /* ارتفاع الهيدر الثابت بيتحسب بالـ JS في Layouts/Site.blade.php */
  padding-top: var(--site-header-offset, 100px);
  background: #F7FAFF;
}

.cl-hero {
  position: relative;
  overflow: hidden;
  padding: 28px 0 34px;
  background:
    radial-gradient(50% 120% at 100% 0%, rgba(34, 133, 252, .12), transparent 70%),
    radial-gradient(40% 100% at 0% 100%, rgba(110, 193, 255, .16), transparent 70%),
    #F7FAFF;
}

.cl-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  color: #6B7280;
  font-size: 13px;
}

.cl-breadcrumb a {
  color: #4A5468;
  text-decoration: none;
  transition: color .2s;
}

.cl-breadcrumb a:hover {
  color: #2285FC;
}

.cl-breadcrumb li + li::before {
  content: "\f104"; /* fa-angle-left */
  margin-inline-end: 6px;
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 11px;
  color: #A0A8B8;
}

.cl-breadcrumb li[aria-current] {
  color: #1A202C;
  font-weight: 700;
}

.cl-hero__row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cl-hero__logo,
.cl-hero__icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 14px 30px -16px rgba(16, 24, 40, .25);
}

/* لوجوهات الجامعات أغلبها عريضة، فالمربع أعرض شوية */
.cl-hero__logo {
  width: 136px;
  padding: 10px 14px;
  border: 1px solid #E8ECF3;
}

.cl-hero__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cl-hero__icon {
  background: linear-gradient(135deg, #2285FC, #6EC1FF);
  color: #fff;
  font-size: 34px;
}

.cl-hero__text {
  min-width: 0;
}

.cl-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #EAF3FF;
  color: #2285FC;
  font-size: 12px;
  font-weight: 700;
}

.cl-hero h1.cl-hero__title {
  margin: 0 0 6px;
  color: #1A202C;
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 800;
  line-height: 1.4;
  text-wrap: balance;
}

.cl-hero p.cl-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 0 !important;
  color: #6B7280;
  font-size: 14px;
}

.cl-hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cl-hero__meta i {
  color: #2285FC;
}

/* المقررات تحت الرأس */
#courses.cl-courses {
  margin-top: 0;
  padding: 0 0 64px;
  background: #F7FAFF;
}

@media (max-width: 575px) {
  .cl-hero {
    padding: 20px 0 24px;
  }

  .cl-breadcrumb {
    margin-bottom: 14px;
  }

  .cl-hero__row {
    gap: 14px;
  }

  .cl-hero__logo,
  .cl-hero__icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
  }

  .cl-hero__logo {
    width: 96px;
    padding: 8px 10px;
  }

  .cl-hero__icon {
    font-size: 26px;
  }
}
