/*
 * Mindset Growth Hub: Courses page (English, LTR).
 * Every <style> block of tpl-en-courses in final.html, in its original order.
 */

:root {
  --primary: #3A66AE; --primary-dark: #2B4F8C; --navy: #14244B; --navy-2: #0F2A55;
  --amber: #F6AB1C; --amber-hover: #FFBB33; --sky: #BCD6EC; --sky-soft: #E4EFF9;
  --bg: #F6F9FD; --hero-bg: #EEF6FE; --surface: #fff; --text: #14244B; --muted: #55627F; --line: #DDE6F2;
  --r: 16px; --shadow: 0 10px 30px -14px rgba(20,36,75,.22); --ease: cubic-bezier(.2,.7,.2,1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Tajawal, "Segoe UI", Tahoma, sans-serif; color: var(--text); background: var(--bg); line-height: 1.7; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(100% - 40px, 1200px); margin-inline: auto; }
.ico { width: 18px; height: 18px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Page header ---------- */
.ph { background: var(--hero-bg); position: relative; overflow: hidden; }
.ph::after { content: ""; position: absolute; inset: auto 0 0 0; height: 90px; background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; }
.ph-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 32px; min-height: 290px; padding: 34px 0 76px; position: relative; z-index: 1; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: .92rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a:hover { color: var(--primary); }
.crumbs [aria-current] { color: var(--navy); font-weight: 500; }
.ph h1 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; line-height: 1.3; color: var(--navy); }
.ph p { margin-top: 14px; max-width: 34em; font-size: clamp(1rem, 1.5vw, 1.2rem); color: #3B4A6B; line-height: 1.9; }
.ph-photo { position: absolute; left: 0; top: 0; width: min(48vw, 640px); aspect-ratio: 520 / 244; z-index: 0; }
.ph-photo img { width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: linear-gradient(to left, transparent 0, #000 12%), linear-gradient(to top, transparent 0, #000 18%); -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to left, transparent 0, #000 12%), linear-gradient(to top, transparent 0, #000 18%); mask-composite: intersect; }

/* ---------- Filters (search + category + specialization, design of nahjqatar.com in the site colors) ---------- */
.filters { position: relative; z-index: 2; margin-top: -40px; display: flex; align-items: stretch; gap: 9px; padding: 10px 13px; min-height: 78px; background: var(--surface); border: 1px solid rgba(246,171,28,.45); border-radius: 17px; box-shadow: 0 10px 24px rgba(20,36,75,.10); transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease; animation: filtersIn .75s ease both; }
.filters:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(20,36,75,.13); border-color: rgba(246,171,28,.7); }
.filters::before { content: ""; position: absolute; inset: -1px; border-radius: 18px; pointer-events: none; background: linear-gradient(115deg, transparent 15%, rgba(255,255,255,.7) 48%, transparent 72%); transform: translateX(-120%); animation: filtersShine 5.5s 1.2s ease-in-out infinite; opacity: .55; }
.filters > * { position: relative; z-index: 1; }
.field { display: flex; align-items: center; gap: 8px; min-height: 57px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--muted); position: relative; transition: border-color .25s, box-shadow .25s; }
.field:hover, .field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(58,102,174,.08); }
.field .ico { color: var(--primary); width: 16px; height: 16px; }
.field input, .field select { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font-size: .9rem; }
.field input { height: 55px; }
.field--search { flex: 1.25; min-width: 220px; }
.field--select { flex: 0 0 172px; padding: 0 12px 0 0; padding-inline: 14px 12px; }
.field-label { position: absolute; inset-inline-start: 38px; top: 7px; font-size: .68rem; font-weight: 800; color: var(--navy); pointer-events: none; }
.field--select select { appearance: none; -webkit-appearance: none; width: 100%; height: 55px; padding: 17px 0 3px; padding-inline: 0 20px; font-size: .82rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.field--select .chev { position: absolute; inset-inline-end: 12px; top: 20px; width: 15px; height: 15px; color: var(--amber); pointer-events: none; }
.field--select::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: 4px; height: 2px; border-radius: 99px; background: linear-gradient(90deg, transparent, var(--amber), transparent); transform: scaleX(0); transition: transform .3s ease; pointer-events: none; }
.field--select:focus-within::after { transform: scaleX(1); }
.btn-reset, .btn-search { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 57px; padding: 0 16px; border-radius: 12px; font-size: .85rem; font-weight: 800; white-space: nowrap; cursor: pointer; transition: transform .25s, box-shadow .25s, background .25s; }
.btn-reset { min-width: 82px; border: 1px solid var(--line); background: #fff; color: var(--muted); }
.btn-reset .ico { width: 16px; height: 16px; color: var(--amber); }
.btn-search { min-width: 132px; border: 1px solid var(--navy-2); background: linear-gradient(135deg, var(--primary-dark), var(--navy-2)); color: #fff; box-shadow: 0 8px 17px rgba(20,36,75,.18); }
.btn-search .ico { width: 16px; height: 16px; color: var(--amber); }
.btn-reset:hover, .btn-search:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(20,36,75,.12); }
.btn-search:hover { box-shadow: 0 11px 22px rgba(20,36,75,.26); }
@keyframes filtersIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes filtersShine { 0%, 65%, 100% { transform: translateX(-120%); } 78% { transform: translateX(120%); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.card.card-in { animation: cardIn .45s ease both; }
@media (prefers-reduced-motion: reduce) { .filters, .filters::before, .card.card-in { animation: none; } }

/* ---------- Results line ---------- */
.bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 26px 4px 18px; }
.count { font-size: 1rem; color: var(--muted); }
.count #countNum { color: var(--navy); font-weight: 700; }
.count b { font-weight: 800; color: var(--navy); }
.count-note { font-size: .9rem; color: var(--muted); }

/* ---------- Cards (course catalogue design of nahjqatar.com, in the site colors) ---------- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.card { position: relative; background: var(--surface); border-radius: 15px; overflow: hidden; box-shadow: 0 10px 24px rgba(20,36,75,.08); border: 1px solid #E8EEF7; min-height: 342px; display: flex; flex-direction: column; transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease; }
.card::after { content: ""; position: absolute; inset: 0; border-radius: 15px; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(58,102,174,0); transition: box-shadow .35s ease; }
.card:hover { transform: translateY(-8px); box-shadow: 0 18px 36px rgba(20,36,75,.16); }
.card:hover::after { box-shadow: inset 0 0 0 1px rgba(58,102,174,.25); }
.card[hidden] { display: none; }
.card-media { display: block; height: 145px; position: relative; overflow: hidden; background: var(--sky-soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card-media img { transform: scale(1.045); }
.card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 25%, rgba(255,255,255,.22) 50%, transparent 75%); transform: translateX(-120%); transition: transform .75s ease; pointer-events: none; }
.card:hover .card-media::after { transform: translateX(120%); }
.card-badge { position: absolute; inset-inline-start: 10px; top: 10px; z-index: 1; background: rgba(20,36,75,.9); color: #fff; padding: 5px 9px; border-radius: 8px; font-size: 10px; font-weight: 800; line-height: 1.3; letter-spacing: .2px; text-transform: uppercase; transition: transform .3s ease; }
.card:hover .card-badge { transform: translateY(-2px); }
.card-body { padding: 13px 17px 10px; display: flex; flex-direction: column; flex: 1; }
.card h2 { font-size: 15px; font-weight: 800; line-height: 1.65; color: var(--navy); margin-bottom: 5px; }
.card h2 a:hover { color: var(--primary); }
.card p { font-size: 12px; line-height: 1.75; color: var(--muted); margin-bottom: 9px; min-height: 33px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { margin-top: auto; display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); }
.card .meta .ico { width: 13px; height: 13px; color: var(--amber); }
.card-foot { display: flex; align-items: center; justify-content: flex-start; padding: 0 17px 14px; }
.btn-card { position: relative; overflow: hidden; display: inline-flex; align-items: center; background: var(--amber); color: var(--navy); border-radius: 9px; box-shadow: 0 8px 18px -10px rgba(246,171,28,.9); padding: 7px 13px; font-size: 12px; font-weight: 800; line-height: 1.5; transition: background .25s, transform .25s; }
.btn-card:hover { background: var(--amber-hover); transform: translateY(-2px); }
.btn-card::after { content: ""; position: absolute; top: 0; bottom: 0; width: 45%; left: -60%; background: rgba(255,255,255,.35); transform: skewX(-20deg); transition: left .55s ease; }
.btn-card:hover::after { left: 120%; }
.empty { grid-column: 1 / -1; text-align: center; padding: 48px 20px; color: var(--muted); background: #fff; border-radius: var(--r); border: 1px dashed var(--line); }

/* ---------- Pagination ---------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 40px; }
.pager button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--navy); font-weight: 700; cursor: pointer; display: grid; place-items: center; transition: background .2s, border-color .2s; }
.pager button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pager button[aria-current="page"] { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.pager button:disabled { opacity: .45; cursor: default; }

/* ---------- Bottom banner ---------- */
.banner { position: relative; margin-top: 60px; height: 170px; background: linear-gradient(to bottom, var(--bg), #EDF4FC); overflow: hidden; }
.banner-art { position: absolute; left: 0; bottom: 0; width: 470px; height: 157px; background: url("../../images/courses-banner-art.jpg") left bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(to left, transparent 0, #000 22%); mask-image: linear-gradient(to left, transparent 0, #000 22%); }
.banner-text { position: absolute; left: 50%; top: 50%; transform: translate(-6%, -50%) rotate(-6deg); font-family: "Aref Ruqaa", Tajawal, serif; font-weight: 700; font-size: clamp(1.5rem, 2.8vw, 2.1rem); line-height: 1.35; color: var(--navy-2); text-align: center; }
.banner-text svg { display: block; width: 72%; height: 18px; margin: 4px auto 0; color: var(--amber); }

/* ---------- Footer ---------- */
.foot { background: var(--navy-2); color: #D5E0F3; position: relative; overflow: hidden; font-size: .92rem; }
.foot::before, .foot::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.foot::before { width: 130px; height: 130px; right: -84px; top: 34%; background: var(--amber); }
.foot::after { width: 80px; height: 120px; right: -52px; top: 22%; background: var(--primary); opacity: .6; border-radius: 10px 999px 999px 999px; }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 32px; padding: 34px 0 26px; position: relative; z-index: 1; }
.foot h3 { color: #fff; font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.foot-about { max-width: 22em; line-height: 1.9; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot a:hover { color: var(--amber); }
.foot-contact li { display: flex; align-items: center; gap: 10px; }
.foot-contact .ico { width: 17px; height: 17px; color: #fff; }
.foot-links { border-inline-end: 1px solid rgba(255,255,255,.15); padding-inline-end: 24px; }
.foot-brand { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }
.foot-logo { background: #fff; border-radius: 14px; padding: 8px 14px; display: inline-block; }
.foot-logo img { height: 40px; width: auto; }
.social { display: flex; gap: 10px; }
.social a { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.75); display: grid; place-items: center; color: #fff; transition: background .2s, color .2s; }
.social a:hover { background: #fff; color: var(--navy-2); }
.social .ico { width: 16px; height: 16px; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.14); padding: 14px 0 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; position: relative; z-index: 1; }
.foot-bottom nav { display: flex; gap: 16px; }
.foot-bottom nav a + a { border-inline-start: 1px solid rgba(255,255,255,.3); padding-inline-start: 16px; }

/* ---------- Reveal ---------- */
.js .rv { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 980px) { .filters { flex-wrap: wrap; } .field--search { flex-basis: 100%; } .field--select { flex: 1; min-width: 150px; } }
@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-grid { grid-template-columns: 1fr; padding: 0 0 64px; }
  .ph-photo { position: relative; width: calc(100% + 40px); margin-inline: -20px; max-width: none; }
  .ph-photo img { -webkit-mask-image: linear-gradient(to top, transparent 0, #000 25%); mask-image: linear-gradient(to top, transparent 0, #000 25%); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-links { border: 0; padding: 0; }
  .foot-brand { align-items: flex-start; }
  .banner-text { left: auto; right: 24px; transform: translateY(-50%) rotate(-6deg); }
}
@media (max-width: 560px) {
  .card { min-height: 0; }
  .card-media { height: 190px; }
  .grid { grid-template-columns: 1fr; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 9px; border-radius: 14px; }
  .field--search { grid-column: 1 / -1; min-width: 0; }
  .field--select { min-width: 0; width: 100%; }
  .btn-reset, .btn-search { width: 100%; min-width: 0; }
  .banner { height: 150px; }
  .banner-art { width: 300px; opacity: .55; }
  .banner-text { right: 16px; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-bottom { justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
  .js .rv { opacity: 1; transform: none; }
}

/* ---------- English (LTR) adjustments ---------- */
html[dir="ltr"] .xh-in, html[dir="ltr"] .ph-grid { text-align: left; }
html[dir="ltr"] .xh-photo, html[dir="ltr"] .ph-photo { left: auto; right: 0; }
html[dir="ltr"] .xh-photo img, html[dir="ltr"] .ph-photo img { transform: scaleX(-1); }
html[dir="ltr"] .f input[dir="ltr"] { text-align: left; }
html[dir="ltr"] .sel select { padding-left: 16px; padding-right: 40px; }
html[dir="ltr"] .sel .chev { left: auto; right: 14px; }
html[dir="ltr"] #revTrack > * { direction: ltr; }
html[dir="ltr"] .ucta h2 { max-width: 13em !important; }
html[dir="ltr"] .ucta p { max-width: 30em; }
html[dir="ltr"] .wimg.amber .art::before, html[dir="ltr"] .wimg.amber .art::after { width: 72px; height: 170px; top: -80px; }
html[dir="ltr"] .wimg.amber .art::after { right: 128px; top: -110px; }
html[dir="ltr"] .banner-text { transform: translate(-50%, -50%) rotate(-4deg); }
@media (max-width: 860px) { html[dir="ltr"] .xh-photo, html[dir="ltr"] .ph-photo { right: auto; } html[dir="ltr"] .banner-text { right: auto; left: 24px; transform: translateY(-50%) rotate(-4deg); } }
