/* ==========================================================================
   CP-EXPLORE (2026-09-25) - Edraak-style reskin of /explore/coursecategory
   for theme 33 (udemy_theme / brandseducation) ONLY.

   Loaded by theme_page/abha_diploma_theme/category_filtercourse_page.blade.php
   only when institute_master.theme_select_id == 33, and every rule is scoped
   under .cp-explore (the page wrapper gets that class only for theme 33).
   Other tenants never load this file. Visual only - no behaviour lives here.

   Logical properties (inset-inline / margin-inline / padding-inline) throughout
   so the same rules serve the Arabic (RTL) page.
   ========================================================================== */

/* ---------- Phase 1: design tokens ---------- */
.cp-explore {
  --font: "Open Sans", "Noto Sans Arabic", Helvetica, sans-serif; /* Open Sans has no Arabic glyphs -> Noto Sans Arabic */
  --text-strong: #0F1820;
  --text-body: #4C6373;
  --text-muted: #7B7B7B;
  --primary-teal: #0E5A5D;
  --accent-blue: #002ED6;
  --cta-blue: #0033E6;
  --pill-teal-bg: #E9F6FB;
  --pill-blue-bg: #EFF2FF;
  --pill-purple-bg: #F1EAFE;
  --pill-purple-text: #5B2A9E;
  --star: #F5A623;
  --card-shadow: 0 0 8px rgba(0, 0, 0, .15);
  --card-shadow-hover: 0 8px 24px rgba(0, 0, 0, .16);
  --section-shadow: 0 3px 10px rgba(0, 0, 0, .08);
  --radius-card: 8px;
  --radius-btn: 12px;
  --radius-pill: 24px;
  --sticky-top: 120px; /* theme 33 sticky header is 104px + 16px */

  background: #FFFFFF;
  color: var(--text-body);
  font-family: var(--font);
  padding-top: 32px;
}
/* The theme styles headings/links with its own font; make them follow the token.
   Font Awesome icons (.fa) keep their icon font. */
.cp-explore :is(h1, h2, h3, h4, h5, h6, p, a, span, strong, li, button):not(.fa) { font-family: inherit; }

/* ---------- Phase 2: layout ---------- */
/* master.css forces `.detiCourseCatego.newThemeAbha .container { max-width:100% !important;
   padding:0 35px !important }` (and 1280px/100% !important rules by breakpoint), so the
   1300px container needs !important at a higher specificity to win. */
.detiCourseCatego.newThemeAbha.cp-explore > .container {
  width: 100% !important; max-width: 1300px !important; margin-inline: auto !important;
  padding: 0 24px !important; box-sizing: border-box;
}
.cp-explore .cp-explore__title {
  margin: 0 0 24px; font-size: 32px; line-height: 1.25; font-weight: 700; color: var(--text-strong);
}
/* Materialize .row / .col s3 / .col s9 -> two-column grid */
.cp-explore .detiCategoInner > .row {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; margin: 0;
}
.cp-explore .detiCategoInner > .row::after { content: none; }
.cp-explore .detiCategoInner > .row > .col {
  float: none; width: auto; min-width: 0; margin: 0; padding: 0; left: auto; right: auto;
}

/* Sidebar */
.cp-explore .sideFilter { position: sticky; top: var(--sticky-top); padding: 0; background: none; box-shadow: none; }
.cp-explore .sideFilterTitle {
  margin: 0 0 16px; padding: 0; border: 0; font-size: 16px; line-height: 1.4; font-weight: 700; color: var(--text-strong);
}
.cp-explore .filterItems { margin: 0; padding: 0; list-style: none; }
.cp-explore .filterItems .sideFilterItem { margin: 0 0 12px; padding: 0; border: 0; background: none; list-style: none; }
.cp-explore .filterItems .sideFilterItem > a {
  display: block; padding: 0; background: none; border: 0;
  font-size: 14px; line-height: 1.45; font-weight: 600; color: var(--text-muted); text-decoration: none;
  transition: color .15s ease;
}
/* master.css: `.filterItems li a:hover { background:#C69A47 !important; color:#fff }` and a
   pale-blue active background - both replaced with text-only states. */
.cp-explore .filterItems li.sideFilterItem > a:hover { color: var(--text-strong); background: none !important; }
.cp-explore .filterItems li.sideFilterItem.active > a { color: var(--primary-teal); font-weight: 700; background: none; border: 0; border-radius: 0; }
.cp-explore .filterItems .sideFilterItem > a:focus-visible { outline: 2px solid var(--primary-teal); outline-offset: 2px; border-radius: 4px; }

/* "Top Courses" row (h2 + the selected-filter chips) */
.cp-explore .col.s9 > .headerContainer { margin: 0 0 24px; padding: 0; border: 0; }
.cp-explore .col.s9 > .headerContainer .sectionTitle {
  margin: 0 0 12px; font-size: 20px; line-height: 1.4; font-weight: 700; color: var(--text-strong);
}
.cp-explore #clickedCategoryNamescourse .childtablinks {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; margin-inline-end: 8px;
  padding: 6px 12px; border: 1px solid var(--primary-teal); border-radius: var(--radius-pill);
  background: var(--pill-teal-bg); color: var(--primary-teal); font-size: 13px; font-weight: 600; line-height: 1.4;
}
.cp-explore #clickedCategoryNamescourse .remove-btn { cursor: pointer; font-size: 16px; line-height: 1; }

/* Sections: title on the start side, "View All" on the end side of the SAME line.
   The header's display is toggled inline by the page JS (none/block), so the layout
   must not depend on display:flex - the link is positioned instead. */
.cp-explore .speclcorsingMainBoxing { margin: 0 0 40px; padding: 0; background: none; box-shadow: none; }
.cp-explore .speclcorsingMain { margin: 0; padding: 0; }
.cp-explore .speclcorsingMain > .headerContainer.categoryname {
  position: relative; margin: 0 0 16px; padding: 0; padding-inline-end: 120px; min-height: 32px; border: 0;
}
.cp-explore .speclcorsingMain > .headerContainer .sectionTitle {
  margin: 0; font-size: 24px; line-height: 1.33; font-weight: 600; color: var(--text-strong);
}
.cp-explore .speclcorsingMain > .headerContainer .ctaText {
  position: absolute; top: 50%; inset-inline-start: auto; inset-inline-end: 0;
  transform: translateY(-50%); margin: 0; padding: 0; float: none;
  font-size: 14px; line-height: 1.4; font-weight: 600; color: var(--text-strong); white-space: nowrap; text-decoration: none;
}
.cp-explore .speclcorsingMain > .headerContainer .ctaText:hover { color: var(--primary-teal); text-decoration: underline; }

/* ---------- Phase 3: course card ---------- */
/* Owl clips its stage; give the shadow and the hover lift room, and make the
   cards in one row equal height. */
.cp-explore .exploCenter .owl-stage-outer { padding: 8px 6px 14px; margin: -8px -6px -14px; }
.cp-explore .exploCenter .owl-stage { display: flex; }
.cp-explore .exploCenter .owl-item { display: flex; float: none; }
.cp-explore .exploCenter .owl-item > .item,
.cp-explore .exploCenter .owl-item > .item > div { display: flex; flex-direction: column; width: 100%; }

.cp-explore .stm_lms_courses__single {
  display: flex; flex-direction: column; width: 100%; height: 100%; margin: 0;
  background: #fff; border-radius: var(--radius-card); box-shadow: var(--card-shadow); overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.cp-explore .stm_lms_courses__single:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); }
.cp-explore .stm_lms_courses__single__inner {
  position: relative; display: flex; flex-direction: column; flex: 1 1 auto; height: 100%; margin: 0; padding: 0;
  border: 0; box-shadow: none; background: none;
}

/* Thumbnail 16:9 */
.cp-explore .stm_lms_courses__single--image {
  position: relative; flex: 0 0 auto; width: 100%; height: auto; aspect-ratio: 16 / 9; margin: 0; overflow: hidden;
  border-radius: var(--radius-card) var(--radius-card) 0 0; background: #F1F3F5;
}
.cp-explore .stm_lms_courses__single--image > a,
.cp-explore .stm_lms_courses__single--image > a > div,
.cp-explore .stm_lms_courses__single--image .stm_lms_lazy_image { display: block; width: 100%; height: 100%; margin: 0; }
.cp-explore .stm_lms_courses__single--image img {
  display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .3s ease;
}

/* Overlay: info (start/top), duration (end/top), type pills (end/bottom) */
.cp-explore .cp-card__overlay { position: absolute; inset: 0; pointer-events: none; }
.cp-explore .cp-card__info {
  position: absolute; top: 12px; inset-inline-start: 12px; pointer-events: auto; cursor: help;
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; color: var(--primary-teal); box-shadow: 0 0 2px rgba(0, 0, 0, .15);
}
.cp-explore .cp-card__info svg { width: 14px; height: 14px; display: block; }
.cp-explore .cp-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--radius-pill);
  font-size: 12px; line-height: 1; font-weight: 700; white-space: nowrap; box-shadow: 0 0 2px rgba(0, 0, 0, .15);
}
.cp-explore .cp-pill svg { width: 12px; height: 12px; flex: 0 0 12px; display: block; }
.cp-explore .cp-pill--time { position: absolute; top: 12px; inset-inline-end: 12px; background: #fff; color: var(--text-strong); }
.cp-explore .cp-card__tags { position: absolute; bottom: 12px; inset-inline-end: 12px; display: flex; gap: 6px; }
.cp-explore .cp-pill--type { background: var(--pill-blue-bg); color: var(--accent-blue); }
.cp-explore .cp-pill--level { background: var(--pill-teal-bg); color: var(--primary-teal); }

/* Body */
/* master.css: `.exploCenter .owl-carousel.owl-theme .stm_lms_courses__single--inner
   { display:inline-block; padding:5px 10px 20px !important }` - matched and beaten here. */
.cp-explore .stm_lms_courses__single--inner,
.cp-explore .exploCenter .owl-carousel.owl-theme .stm_lms_courses__single--inner {
  display: flex; flex-direction: column; flex: 1 1 auto; gap: 8px; width: auto; padding: 24px !important; margin: 0; text-align: start;
}
.cp-explore .stm_lms_courses__single--title { margin: 0; padding: 0; min-height: 0; }
.cp-explore .stm_lms_courses__single--title a { text-decoration: none; }
.cp-explore .stm_lms_courses__single--title h5 {
  margin: 0; font-size: 18px; line-height: 1.4; font-weight: 700; color: var(--text-strong);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  min-height: calc(18px * 1.4 * 2);
}
.cp-explore .stm_lms_courses__single--terms { margin: 0; padding: 0; }
.cp-explore .stm_lms_courses__single--term { margin: 0; padding: 0; font-size: 13px; line-height: 1.4; color: var(--text-body); }
.cp-explore .stm_lms_courses__single--meta { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; }
.cp-explore .average-rating-stars__top,
.cp-explore .star-rating { margin: 0; padding: 0; line-height: 1; }
.cp-explore .star-rating > span { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--text-body); }
.cp-explore .star-rating a { color: var(--text-strong); font-weight: 700; text-decoration: none; margin-inline-end: 4px; }
.cp-explore .star-rating a:has(.fa) { margin: 0; }
.cp-explore .star-rating .fa { color: var(--star); font-size: 13px; }
.cp-explore .star-rating .rating { margin-inline-start: 4px; font-weight: 400; color: var(--text-muted); font-size: 13px; }
.cp-explore .stm_lms_courses__single--price { margin: 0; padding: 0; display: flex; align-items: baseline; gap: 8px; }
.cp-explore .stm_lms_courses__single--price strong,
.cp-explore .exploCenter .stm_lms_courses__single--price.heading_font strong { /* beats master.css 20px / display:contents */
  display: inline; margin: 0; font-size: 16px; line-height: 1.3; font-weight: 700; color: var(--accent-blue);
}
.cp-explore .stm_lms_courses__single--price .sale_price_ing { font-size: 13px; color: var(--text-muted); text-decoration: line-through; }
.cp-explore .bsbtsno { margin: 0; }
.cp-explore .bsbtsno span { display: inline-block; border-radius: var(--radius-pill); padding: 4px 10px !important; font-size: 12px; font-weight: 700; }

/* "View Course" - full width outline, pinned to the card bottom */
.cp-explore .cp-card__cta {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; box-sizing: border-box;
  margin-top: auto; padding: 12px; border: 2px solid var(--primary-teal); border-radius: var(--radius-btn);
  background: #fff; color: var(--primary-teal); font-size: 14px; line-height: 1.2; font-weight: 700; text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.cp-explore .cp-card__cta:hover, .cp-explore .cp-card__cta:focus-visible { background: var(--primary-teal); color: #fff; outline: none; }
.cp-explore .cp-card__cta span { font-size: 18px; line-height: 1; }
/* U+203A mirrors itself in RTL - no transform needed. */

/* Hover preview popup (title / last updated / benefits / add to cart / wishlist).
   Kept, but Owl's stage and the card clip it where it sits, so on desktop the page
   script moves it into .cp-pop-layer (inside the 1300px container) while it is open
   and puts it back on close. Inside a card it is never shown. */
.cp-explore .stm_lms_courses__single__inner .stm_lms_courses__single--info { display: none !important; }
.cp-explore > .container { position: relative; }
.cp-explore .cp-pop-layer { position: absolute; inset: 0; pointer-events: none; z-index: 1100; }
.cp-explore .cp-pop-layer .stm_lms_courses__single--info.cp-pop {
  display: block; position: absolute; left: 0; right: auto; top: 0; width: 320px; max-width: calc(100% - 16px); box-sizing: border-box;
  margin: 0; padding: 20px; background: #fff; border-radius: var(--radius-card);
  box-shadow: 0 10px 32px rgba(15, 24, 32, .18), 0 0 1px rgba(15, 24, 32, .2);
  text-align: start; pointer-events: auto;
  visibility: hidden; opacity: 0; transform: translateY(-6px); filter: none;
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.cp-explore .cp-pop-layer .cp-pop.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .18s ease, transform .18s ease; }
/* pointer toward the card */
.cp-explore .cp-pop-layer .cp-pop::before {
  content: ""; position: absolute; top: var(--arrow-y, 50%); width: 14px; height: 14px; margin-top: -7px;
  background: #fff; transform: rotate(45deg); box-shadow: -2px 2px 3px rgba(15, 24, 32, .06); border: 0;
}
.cp-explore .cp-pop-layer .cp-pop[data-side="right"]::before { left: -7px; right: auto; }
.cp-explore .cp-pop-layer .cp-pop[data-side="left"]::before { right: -7px; left: auto; box-shadow: 2px -2px 3px rgba(15, 24, 32, .06); }
.cp-explore .cp-pop .stm_lms_courses__single--info_preview { position: relative; margin: 0; padding: 0; }
.cp-explore .cp-pop .autBoxim { margin: 0 0 10px; }
.cp-explore .cp-pop .autBoxim > a {
  display: block; margin: 0 0 8px; padding: 0; background: none; width: auto; border-radius: 0; text-align: start;
  text-transform: none; font-size: 16px; line-height: 1.4; font-weight: 700; color: var(--text-strong);
}
.cp-explore .cp-pop .autBoxim > a:hover { background: none; color: var(--primary-teal) !important; }
.cp-explore .cp-pop .autBoxim > span { display: inline-block; font-size: 12px; line-height: 1.5; color: var(--text-muted); }
.cp-explore .cp-pop .autBoxim > span[style] { margin-inline-end: 6px; border-radius: var(--radius-pill); padding: 3px 10px !important; color: #fff; font-weight: 700; }
.cp-explore .cp-pop .allSubtit { margin: 0 0 10px; font-size: 12px; line-height: 1.5; color: var(--text-body); }
.cp-explore .cp-pop .allMistSubt p { margin: 0 0 10px; font-size: 13px; line-height: 1.55; color: var(--text-body); }
.cp-explore .cp-pop .allMistSubt ul { margin: 0 0 14px; padding: 0; list-style: none; }
.cp-explore .cp-pop .allMistSubt li { display: flex; gap: 8px; margin: 0 0 6px; font-size: 13px; line-height: 1.5; color: var(--text-strong); list-style: none; }
.cp-explore .cp-pop .allMistSubt li .fa { flex: 0 0 auto; margin-top: 3px; color: var(--primary-teal); font-size: 12px; }
.cp-explore .cp-pop .ntb_cart { display: flex; align-items: center; gap: 8px; margin: 0; }
.cp-explore .cp-pop .ntb_cart > a {
  flex: 1 1 auto; display: flex; align-items: center; justify-content: center; margin: 0; padding: 12px; width: auto;
  background: var(--cta-blue); color: #fff; border: 0; border-radius: var(--radius-btn);
  text-transform: none; font-size: 14px; line-height: 1.2; font-weight: 700; text-decoration: none;
}
.cp-explore .cp-pop .ntb_cart > a[style*="display:none"], .cp-explore .cp-pop .ntb_cart > a[style*="display: none"] { display: none; }
.cp-explore .cp-pop .ntb_cart > a:hover { background: #0029B8; color: #fff !important; }
.cp-explore .cp-pop .ntb_cartIcon { flex: 0 0 auto; }
.cp-explore .cp-pop .ntb_cartIcon a {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0; padding: 0;
  background: #fff; border: 2px solid var(--primary-teal); border-radius: var(--radius-btn); color: var(--primary-teal);
}
.cp-explore .cp-pop .ntb_cartIcon a:hover { background: var(--pill-teal-bg); color: var(--primary-teal) !important; }

/* Filtered results (AJAX grid, coursesub_tab_filter.blade.php): same cards,
   equal-height rows. */
.cp-explore #allcategorydatasub .row { display: flex; flex-wrap: wrap; margin-inline: -12px; }
.cp-explore #allcategorydatasub .row > .col.s4 { float: none; display: flex; padding: 12px; margin: 0; }
.cp-explore #allcategorydatasub .item,
.cp-explore #allcategorydatasub .custFullwdt { display: flex; flex-direction: column; width: 100%; }

/* ---------- Phase 4: carousel navigation ---------- */
/* The page script (theme 33 branch of the Owl init) gives every carousel its own
   nav container, .cp-nav, placed right after it: round prev/next at the end
   (bottom-right in LTR, bottom-left in RTL) of each section. Owl adds
   .disabled to the container when every card already fits, and to a button at
   either end of the track. */
.cp-explore .cp-nav { display: flex; justify-content: flex-end; gap: 8px; margin: 16px 0 0; }
.cp-explore .cp-nav.disabled { display: none; }
.cp-explore .cp-nav > button {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0; padding: 0;
  position: static; border: 0; border-radius: 50%; background: #E9ECEF; color: var(--text-strong); cursor: pointer;
  font-size: 0; line-height: 0; box-shadow: none; transition: background-color .15s ease, opacity .15s ease;
}
.cp-explore .cp-nav > button:hover { background: #DDE2E6; }
.cp-explore .cp-nav > button:focus-visible { outline: 2px solid var(--primary-teal); outline-offset: 2px; }
.cp-explore .cp-nav > button.disabled { opacity: .4; cursor: default; background: #E9ECEF; }
.cp-explore .cp-nav svg { width: 18px; height: 18px; display: block; }
/* RTL: the theme sets .exploCenter to direction:ltr, so the nav row is put back to rtl
   (prev on the right, next on the left) and the chevrons are mirrored. */
[dir="rtl"] .cp-explore .cp-nav, html[lang="ar"] .cp-explore .cp-nav { direction: rtl; }
[dir="rtl"] .cp-explore .cp-nav svg, html[lang="ar"] .cp-explore .cp-nav svg { transform: scaleX(-1); }
.cp-explore .cp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Phase 5: responsive ---------- */
/* The theme's mobile rules give the card inner a % side margin and pull the image
   left with a negative margin, and master.css forces img { width:auto !important;
   max-height:160px/200px !important }. None of it fits the 16:9 object-fit thumbnail,
   so all of it is neutralised at every width. */
.cp-explore .stm_lms_courses__single .stm_lms_courses__single__inner { margin: 0 !important; width: auto !important; max-width: none !important; align-self: stretch; }
.cp-explore .stm_lms_courses__single .stm_lms_courses__single--image { width: 100% !important; height: auto !important; max-height: none !important; }
.cp-explore .stm_lms_courses__single .stm_lms_courses__single--image > a,
.cp-explore .stm_lms_courses__single .stm_lms_courses__single--image > a > div,
.cp-explore .stm_lms_courses__single .stm_lms_courses__single--image .stm_lms_lazy_image { height: 100% !important; max-height: none !important; }
.cp-explore .stm_lms_courses__single .stm_lms_courses__single--image img {
  margin: 0 !important; width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; object-fit: cover;
}
/* < 992px: one column; the sidebar becomes a horizontally scrollable chip row. */
@media (max-width: 991.98px) {
  .cp-explore { padding-top: 24px; }
  .cp-explore .detiCategoInner > .row { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .cp-explore .sideFilter { position: static; }
  .cp-explore .sideFilterTitle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; }
  .cp-explore .filterItems {
    display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain;
    padding: 2px 2px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .cp-explore .filterItems::-webkit-scrollbar { display: none; }
  .cp-explore .filterItems .sideFilterItem { flex: 0 0 auto; margin: 0; }
  .cp-explore .filterItems .sideFilterItem > a {
    padding: 8px 14px; border: 1px solid #D9DEE2; border-radius: var(--radius-pill); background: #fff;
    white-space: nowrap; font-size: 14px; line-height: 1.3;
  }
  .cp-explore .filterItems li.sideFilterItem > a:hover { background: #F5F7F8 !important; }
  .cp-explore .filterItems li.sideFilterItem.active > a { border: 1px solid var(--primary-teal); border-radius: var(--radius-pill); background: var(--pill-teal-bg); }
}
/* < 576px: 16px gutters, smaller headings, no horizontal page scroll. */
@media (max-width: 575.98px) {
  .detiCourseCatego.newThemeAbha.cp-explore > .container { padding: 0 16px !important; }
  .cp-explore .cp-explore__title { font-size: 24px; margin-bottom: 16px; }
  .cp-explore .col.s9 > .headerContainer .sectionTitle { font-size: 18px; }
  .cp-explore .speclcorsingMain > .headerContainer.categoryname { padding-inline-end: 84px; }
  .cp-explore .speclcorsingMain > .headerContainer .sectionTitle { font-size: 20px; }
  .cp-explore .stm_lms_courses__single--inner,
  .cp-explore .exploCenter .owl-carousel.owl-theme .stm_lms_courses__single--inner { padding: 16px !important; }
  .cp-explore .stm_lms_courses__single--title h5 { font-size: 16px; min-height: calc(16px * 1.4 * 2); }
  .cp-explore #allcategorydatasub .row > .col.s4 { width: 100%; }
}
@media (min-width: 576px) and (max-width: 991.98px) {
  .cp-explore #allcategorydatasub .row > .col.s4 { width: 50%; }
}
/* Nothing inside the page may cause a horizontal page scroll. */
.cp-explore { max-width: 100%; overflow-x: clip; }
