/* ===========================================================
   BHE UNI — Course search page (v2 redesign)
   Every rule is scoped to .cs-page so it does not leak into the
   shared layout. Heading/paragraph sizes use !important because
   front/css/style.css forces h1–h6 and p sizes with !important.
   =========================================================== */
.cs-page {
  --navy-950: #06122a;
  --navy-900: #0a1a33;
  --navy-800: #0f2747;
  --brand-50: #fff5ed;
  --brand-300: #ffb877;
  --brand-400: #ff9a47;
  --brand-500: #f47b20;
  --brand-600: #dd6610;
  --orange-grad: linear-gradient(90deg, #f7a823, #f47b20);
  font-family: "Kanit", system-ui, -apple-system, sans-serif;
  color: var(--navy-900);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
.cs-page .container-xxl { max-width: 1320px; }
.cs-page a { text-decoration: none; }
.cs-page :is(a, button, select, input):focus-visible { outline: 3px solid #ff9823; outline-offset: 3px; }

/* ---- hero ---- */
.cs-page .crs-hero { position: relative; isolation: isolate; overflow: hidden; padding: 72px 0 64px; background: #f5f7fd; }
.cs-page .crs-hero::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: conic-gradient(from 235deg at 90% 100%, #2a55cf06 0 20deg, transparent 20deg 40deg, #f47b2009 40deg 60deg, transparent 60deg 80deg, #2a55cf0a 80deg 100deg, transparent 100deg); }
.cs-page .crs-hero > .container-xxl { position: relative; z-index: 2; }
.cs-page .crs-hero h1 { font-weight: 700; font-size: clamp(2.1rem, 4.4vw, 3.3rem) !important; line-height: 1.12; color: var(--navy-900); margin: 0; max-width: 16ch; }
.cs-page .crs-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; color: var(--brand-600); background: var(--brand-50); border: 1px solid rgba(244,123,32,.25); border-radius: 999px; padding: 7px 15px; margin-bottom: 18px; }
.cs-page .crs-lead { font-weight: 300; font-size: 16px !important; line-height: 1.7; color: #5b6b82; margin: 18px 0 0; max-width: 46ch; }
.cs-page .crs-hi { display: inline-block; background: var(--orange-grad); color: #fff; border-radius: 12px; padding: 0 14px; box-shadow: 0 12px 24px -10px rgba(244,123,32,.6); }
.cs-page .crs-hero-photo { position: relative; align-self: flex-end; margin-bottom: -64px; }
.cs-page .crs-hero-photo img { display: block; width: 100%; height: 340px; border-radius: 26px 26px 0 0; object-fit: cover; }
@media (max-width: 991px) {
  .cs-page .crs-hero-photo { margin-top: 26px; margin-bottom: 0; }
  .cs-page .crs-hero-photo img { height: 260px; border-radius: 26px; }
}

/* ---- search card ---- */
.cs-page .crs-search { position: relative; margin-top: -40px; z-index: 5; background: #fff; border: 1px solid rgba(226,232,240,.85); border-radius: 22px; padding: 28px 30px; box-shadow: 0 34px 74px -40px rgba(10,26,51,.4); }
.cs-page .crs-search h2 { font-weight: 600; font-size: 22px !important; color: var(--navy-900); margin: 0; }
.cs-page .crs-search .cs-sub { font-weight: 300; font-size: 14px !important; color: #64748b; margin: 6px 0 20px; }
.cs-page .crs-searchbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: #f6f8fc; border: 1px solid #e6ecf5; border-radius: 80px; padding: 8px; }
.cs-page .crs-sel, .cs-page .crs-namewrap { position: relative; flex: 1 1 150px; min-width: 130px; }
.cs-page .crs-sel select, .cs-page .crs-namewrap input { width: 100%; height: 52px; border: 0; background: transparent; font-family: inherit; font-weight: 400; font-size: 14.5px; color: var(--navy-900); padding: 0 34px 0 16px; cursor: pointer; appearance: none; -webkit-appearance: none; -moz-appearance: none; text-overflow: ellipsis; }
.cs-page .crs-sel select:focus, .cs-page .crs-namewrap input:focus { outline: none; }
.cs-page .crs-sel::after { content: "\F282"; font-family: "bootstrap-icons"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #9aa6b6; font-size: 13px; pointer-events: none; }
.cs-page .crs-namewrap input { padding-left: 16px; cursor: text; }
.cs-page .crs-namewrap input::placeholder { color: #5a6a85; opacity: 1; }
.cs-page .crs-sel + .crs-sel, .cs-page .crs-namewrap { border-left: 1px solid #e6ecf5; }
.cs-page .crs-search-btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 160px; height: 52px; border: 0; border-radius: 80px; background: linear-gradient(135deg, #2452cf, #1c3f9e); color: #fff; font-weight: 600; font-size: 16px; cursor: pointer; transition: transform .2s, box-shadow .2s; box-shadow: 0 14px 28px -12px rgba(28,63,158,.6); }
.cs-page .crs-search-btn:hover { transform: translateY(-2px); box-shadow: 0 20px 36px -12px rgba(28,63,158,.75); }
@media (max-width: 767px) {
  .cs-page .crs-search { padding: 22px 18px; }
  .cs-page .crs-searchbar { border-radius: 18px; }
  .cs-page .crs-sel, .cs-page .crs-namewrap { flex: 1 1 100%; border-left: 0 !important; border-bottom: 1px solid #e6ecf5; }
  .cs-page .crs-namewrap { border-bottom: 0; }
  .cs-page .crs-search-btn { flex: 1 1 100%; border-radius: 12px; font-size: 14px; }
}

/* ---- listing ---- */
.cs-page .cs-listing { padding: 64px 0 24px; scroll-margin-top: 40px; }

/* filter sidebar */
.cs-page .crs-filter { background: #fff; border: 1px solid rgba(226,232,240,.85); border-radius: 20px; padding: 26px; box-shadow: 0 24px 54px -38px rgba(10,26,51,.3); position: sticky; top: 96px; }
.cs-page .crs-filter-head { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 18px; color: var(--navy-900); padding-bottom: 16px; border-bottom: 1px solid #eef2f7; margin-bottom: 20px; }
.cs-page .crs-filter-head i { color: var(--brand-500); }
.cs-page .crs-flabel { display: block; font-weight: 600; font-size: 13.5px !important; color: var(--navy-800); margin: 0 0 10px; }
.cs-page .crs-fselect { width: 100%; height: 46px; border: 1px solid #dde5ef; border-radius: 11px; padding: 0 44px 0 14px; font-family: inherit; font-weight: 400; font-size: 14px; color: var(--navy-900); cursor: pointer; text-overflow: ellipsis; appearance: none; -webkit-appearance: none; background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235b6b82' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; background-size: 16px; }
.cs-page .crs-fselect:focus { outline: none; border-color: var(--brand-400); background-color: #fff; box-shadow: 0 0 0 3px rgba(244,123,32,.12); }
.cs-page .crs-fgroup { margin-bottom: 24px; }
.cs-page .crs-levels { display: flex; flex-wrap: wrap; gap: 9px; }
.cs-page .crs-level { border: 1px solid #dde5ef; background: #fff; color: #475569; font-family: inherit; font-weight: 500; font-size: 13px; line-height: 1.3; padding: 8px 16px; border-radius: 999px; cursor: pointer; transition: all .2s; }
.cs-page .crs-level:hover { border-color: var(--brand-300); color: var(--brand-600); }
.cs-page .crs-level.active { background: var(--navy-950); border-color: var(--navy-950); color: #fff; }
.cs-page .crs-reset { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 8px; height: 44px; border: 1px solid #dde5ef; border-radius: 11px; background: #fff; color: #475569; font-weight: 500; font-size: 14px; transition: all .2s; }
.cs-page .crs-reset:hover { border-color: var(--brand-400); color: var(--brand-600); }
@media (max-width: 991px) { .cs-page .crs-filter { position: static; } }

/* toolbar */
.cs-page .crs-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.cs-page .crs-count { font-weight: 300; font-size: 14px !important; color: #64748b; margin: 0; }
.cs-page .crs-count strong { font-weight: 600; color: var(--navy-900); }
.cs-page .crs-sort { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.cs-page .crs-sort label { margin: 0; flex-shrink: 0; white-space: nowrap; font-weight: 300; font-size: 13.5px; line-height: 1; color: #94a3b8; }
.cs-page .crs-sort select { appearance: none; -webkit-appearance: none; box-sizing: border-box; height: 44px; border: 1px solid #dde5ef; border-radius: 11px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23102443' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; background-size: 16px; padding: 0 42px 0 16px; font-family: inherit; font-weight: 500; font-size: 13.5px; color: var(--navy-900); cursor: pointer; }
.cs-page .crs-sort select:focus { outline: none; border-color: var(--brand-400); }
.cs-page .crs-empty { text-align: center; padding: 56px 20px; color: #94a3b8; font-size: 15px; border: 1px dashed #dde5ef; border-radius: 20px; }
.cs-page .crs-empty i { display: block; font-size: 26px; margin-bottom: 10px; }

/* course cards */
.cs-page .course-card { height: 100%; background: #fff; border: 1px solid rgba(226,232,240,.85); border-radius: 20px; overflow: hidden; transition: transform .3s, box-shadow .3s, border-color .3s; display: flex; flex-direction: column; }
.cs-page .course-card:hover { transform: translateY(-5px); border-color: rgba(255,184,119,.7); box-shadow: 0 28px 56px -30px rgba(244,123,32,.4); }
.cs-page .course-thumbnail { position: relative; min-height: 200px; padding: 100px 22px 26px; display: flex; align-items: flex-end; isolation: isolate; background: #102443 url("../img/university-details/course-thumbnail.svg") center/cover no-repeat; }
.cs-page .course-lvl { position: absolute; top: 22px; right: 20px; z-index: 2; max-width: 48%; font-weight: 500; font-size: 10px; line-height: 1.4; color: #dce9fc; background: #ffffff0d; border: 1px solid #ffffff26; border-radius: 999px; padding: 5px 9px; }
.cs-page .course-thumbnail-brand { position: absolute; top: 18px; left: 22px; display: block; width: 86px; height: auto; }
.cs-page .course-thumbnail-title { position: relative; display: block; width: 100%; margin: 0; color: #fff; font-size: 24px !important; font-weight: 500; line-height: 1.22; letter-spacing: -.35px; overflow-wrap: break-word; text-wrap: balance; }
.cs-page .course-thumbnail-title::before { content: ""; display: block; width: 30px; height: 3px; margin-bottom: 13px; border-radius: 3px; background: linear-gradient(90deg, #ffb52c, #ff7620); }
.cs-page .course-thumbnail-title.is-long { font-size: 20px !important; line-height: 1.28; }
.cs-page .course-thumbnail-title a { color: inherit; }
.cs-page .course-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.cs-page .course-uni { display: flex; align-items: flex-start; gap: 7px; font-size: 13.5px; line-height: 1.4; color: #5b6b82; margin-bottom: 16px; }
.cs-page .course-uni i { color: var(--brand-500); margin-top: 1px; }
.cs-page .course-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; padding-top: 16px; border-top: 1px solid #eef2f7; }
.cs-page .course-meta .cm-k { font-weight: 300; font-size: 11.5px; color: #94a3b8; }
.cs-page .course-meta .cm-v { font-weight: 600; font-size: 13.5px; color: var(--navy-900); margin-top: 2px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cs-page .course-meta .cm-v.fee { color: #0d9488; }
.cs-page .course-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 18px; }
.cs-page .course-apply { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; color: #fff; background: var(--orange-grad); border-radius: 999px; padding: 10px 20px; transition: transform .2s, box-shadow .2s; box-shadow: 0 12px 24px -12px rgba(244,123,32,.6); }
.cs-page .course-apply:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 18px 30px -12px rgba(244,123,32,.75); }
.cs-page .course-save { width: 40px; height: 40px; border-radius: 11px; border: 1px solid #dde5ef; background: #fff; color: #94a3b8; cursor: pointer; transition: all .2s; display: grid; place-items: center; font-size: 16px; }
.cs-page .course-save:hover, .cs-page .course-save.saved { border-color: var(--brand-400); color: var(--brand-500); background: var(--brand-50); }

/* pagination */
.cs-page .uni-pagination { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
.cs-page .uni-pagination :is(a, span.pg) { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 42px; padding: 8px 14px; border: 1px solid #dde5ef; border-radius: 11px; background: #fff; color: #213870; font-weight: 500; font-size: 14px; }
.cs-page .uni-pagination a:hover { border-color: #ff9823; background: #fff6ec; color: #213870; }
.cs-page .uni-pagination [aria-current="page"] { background: #213870; color: #fff; border-color: #213870; }
.cs-page .uni-pagination .is-disabled { opacity: .4; }
.cs-page .uni-pagination .gap { color: #94a3b8; padding: 0 2px; }

/* ---- CTA ---- */
.cs-page .cta-banner-sec { padding: 64px 0; background: #fff; }
.cs-page .cta-banner { position: relative; overflow: hidden; border-radius: 34px; padding: 64px 32px; text-align: center; background: linear-gradient(108deg, #142c7a 0%, #2452cf 52%, #3f74e8 100%); box-shadow: 0 44px 90px -44px rgba(20,52,140,.7); }
.cs-page .cta-banner::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 88% 18%, rgba(255,255,255,.16), transparent 55%), radial-gradient(90% 80% at 8% 92%, rgba(8,20,60,.45), transparent 60%); pointer-events: none; }
.cs-page .cta-banner::after { content: ""; position: absolute; right: -70px; top: -70px; width: 260px; height: 260px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.12); pointer-events: none; }
.cs-page .cta-banner > * { position: relative; z-index: 1; }
.cs-page .cta-banner h2 { font-weight: 700; font-size: clamp(1.9rem, 4.2vw, 3rem) !important; line-height: 1.08; color: #fff; margin: 0; }
.cs-page .cta-banner p { font-size: 16px !important; line-height: 1.65; color: rgba(255,255,255,.78); max-width: 620px; margin: 16px auto 0; }
.cs-page .cta-banner .btn-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 30px; padding: 14px 34px; border-radius: 999px; font-weight: 600; font-size: 15.5px; color: #fff; border: 1.5px solid rgba(255,255,255,.65); transition: all .25s; }
.cs-page .cta-banner .btn-cta:hover { background: #fff; color: #1c3f9e; border-color: #fff; transform: translateY(-2px); }
@media (max-width: 575px) { .cs-page .cta-banner { padding: 48px 22px; border-radius: 26px; } }

@media (prefers-reduced-motion: reduce) { .cs-page * { transition: none !important; transform: none !important; } }
