.ezmq-course-browser {
  --ezmq-primary: #145fe8;
  --ezmq-primary-dark: #0b3f9e;
  --ezmq-accent: #39b8d4;
  --ezmq-ink: #0b1f3a;
  --ezmq-text: #31445f;
  --ezmq-muted: #718096;
  --ezmq-line: #e2eaf4;
  --ezmq-soft: #f5f8fc;
  --ezmq-card: #ffffff;
  --ezmq-shadow-sm: 0 10px 28px rgba(12, 38, 78, .07);
  --ezmq-shadow: 0 22px 55px rgba(12, 38, 78, .13);
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  color: var(--ezmq-ink);
  font-family: inherit;
  box-sizing: border-box;
}
.ezmq-course-browser *, .ezmq-course-browser *::before, .ezmq-course-browser *::after { box-sizing: border-box; }

/* Hero */
.ezmq-browser-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  min-height: 245px;
  padding: clamp(34px, 5vw, 58px);
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid rgba(20, 95, 232, .10);
  border-radius: 30px;
  background:
    radial-gradient(circle at 88% 18%, rgba(57, 184, 212, .17), transparent 27%),
    radial-gradient(circle at 74% 92%, rgba(20, 95, 232, .15), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f3f8ff 55%, #edf7fb 100%);
  box-shadow: 0 16px 45px rgba(12, 38, 78, .08);
}
.ezmq-browser-hero::before,
.ezmq-browser-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}
.ezmq-browser-hero::before { width: 210px; height: 210px; inset-inline-end: -92px; top: -92px; border: 1px solid rgba(20, 95, 232, .12); }
.ezmq-browser-hero::after { width: 130px; height: 130px; inset-inline-end: 70px; bottom: -78px; border: 1px solid rgba(57, 184, 212, .18); }
.ezmq-browser-header { position: relative; z-index: 2; max-width: 720px; margin: 0; text-align: start; }
.ezmq-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 6px 12px;
  margin-bottom: 14px;
  border: 1px solid #d7e6fb;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: var(--ezmq-primary);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .10em;
  text-transform: uppercase;
}
.ezmq-eyebrow > span { width: 7px; height: 7px; border-radius: 50%; background: var(--ezmq-accent); box-shadow: 0 0 0 4px rgba(57,184,212,.13); }
.ezmq-browser-header h2 { margin: 0; color: var(--ezmq-ink); font-size: clamp(31px, 4vw, 49px); line-height: 1.08; letter-spacing: -.04em; }
.ezmq-browser-header p { max-width: 630px; margin: 15px 0 0; color: #5f728d; font-size: clamp(15px, 1.6vw, 18px); line-height: 1.7; }
.ezmq-hero-mark { position: relative; z-index: 2; display: grid; width: 145px; height: 145px; place-items: center; border: 1px solid rgba(255,255,255,.85); border-radius: 38px; background: rgba(255,255,255,.55); box-shadow: inset 0 1px 0 #fff, 0 20px 50px rgba(20,95,232,.13); backdrop-filter: blur(10px); transform: rotate(4deg); }
.ezmq-hero-mark-core { display: grid; width: 94px; height: 94px; place-items: center; border-radius: 28px; background: linear-gradient(145deg, var(--ezmq-primary), var(--ezmq-primary-dark)); color: #fff; box-shadow: 0 18px 35px rgba(20,95,232,.27); transform: rotate(-4deg); }

/* Filters */
.ezmq-filter-panel {
  position: relative;
  z-index: 12;
  padding: 15px;
  margin-bottom: 28px;
  border: 1px solid var(--ezmq-line);
  border-radius: 24px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--ezmq-shadow-sm);
}
.ezmq-filter-primary { display: grid; grid-template-columns: minmax(255px, 330px) minmax(280px, 1fr); align-items: stretch; gap: 12px; }
.ezmq-university-dropdown { position: relative; min-width: 0; }
.ezmq-university-trigger {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  padding: 9px 14px;
  border: 1px solid #dce5f1;
  border-radius: 16px;
  background: #f8fbff;
  color: var(--ezmq-ink);
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.ezmq-university-trigger:hover,
.ezmq-university-trigger[aria-expanded="true"] { border-color: #9bbff4; background: #fff; box-shadow: 0 0 0 4px rgba(20,95,232,.08); }
.ezmq-trigger-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ezmq-trigger-copy > small { color: #8090a5; font-size: 10px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.ezmq-trigger-value { min-width: 0; display: flex; align-items: center; gap: 9px; }
.ezmq-trigger-icon,
.ezmq-option-icon { display: grid; place-items: center; overflow: hidden; color: var(--selected-university-color, var(--ezmq-primary)); background: #edf4ff; }
.ezmq-trigger-icon { width: 31px; height: 31px; flex: 0 0 31px; border-radius: 10px; }
.ezmq-trigger-icon img,
.ezmq-option-icon img { width: 100%; height: 100%; padding: 4px; object-fit: contain; background: #fff; }
.ezmq-trigger-label { min-width: 0; overflow: hidden; font-size: 14px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.ezmq-trigger-chevron { flex: 0 0 auto; color: #718198; transition: transform .2s ease; }
.ezmq-university-trigger[aria-expanded="true"] .ezmq-trigger-chevron { transform: rotate(180deg); }
.ezmq-university-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 10px);
  inset-inline: 0;
  max-height: 390px;
  padding: 9px;
  overflow-y: auto;
  border: 1px solid #dae4f1;
  border-radius: 18px;
  background: rgba(255,255,255,.99);
  box-shadow: 0 24px 60px rgba(9,34,71,.19);
  transform-origin: top;
  animation: ezmqDropdownIn .17s ease both;
}
.ezmq-university-menu[hidden] { display: none !important; }
@keyframes ezmqDropdownIn { from { opacity: 0; transform: translateY(-5px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.ezmq-menu-heading { padding: 7px 10px 9px; color: #8391a5; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.ezmq-university-option {
  --university-color: var(--ezmq-primary);
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 8px 10px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--ezmq-text);
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.ezmq-university-option:hover { background: #f3f7fc; color: var(--ezmq-ink); }
.ezmq-university-option.is-active { background: #edf5ff; color: var(--ezmq-primary); }
.ezmq-option-icon { width: 42px; height: 42px; border-radius: 12px; color: var(--university-color); background: rgba(20,95,232,.08); }
.ezmq-option-all { color: var(--ezmq-primary); }
.ezmq-university-initial { font-size: 15px; font-weight: 900; }
.ezmq-option-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ezmq-option-copy strong { overflow: hidden; font-size: 13px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.ezmq-option-copy small { overflow: hidden; color: #8896a9; font-size: 10.5px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.ezmq-option-count { min-width: 27px; padding: 4px 7px; border-radius: 999px; background: #f0f4f9; color: #687b93; font-size: 10px; font-weight: 850; text-align: center; }
.ezmq-option-check { width: 20px; color: var(--ezmq-primary); font-size: 13px; font-weight: 900; opacity: 0; }
.ezmq-university-option.is-active .ezmq-option-check { opacity: 1; }

.ezmq-search-box { position: relative; display: block; min-width: 0; }
.ezmq-search-box svg { position: absolute; inset-inline-start: 18px; top: 50%; transform: translateY(-50%); color: #74859c; pointer-events: none; }
.ezmq-search-box input,
.ezmq-select-wrap select {
  width: 100%;
  margin: 0;
  border: 1px solid #dce5f1;
  outline: 0;
  background: #f8fbff;
  color: var(--ezmq-ink);
  font: inherit;
  font-size: 14px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.ezmq-search-box input { height: 64px; padding: 0 18px 0 52px; border-radius: 16px; }
[dir="rtl"] .ezmq-search-box input { padding: 0 52px 0 18px; }
.ezmq-search-box input:focus,
.ezmq-select-wrap select:focus { border-color: #9bbff4; background: #fff; box-shadow: 0 0 0 4px rgba(20,95,232,.08); }
.ezmq-filter-secondary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 4px 0; margin-top: 13px; border-top: 1px solid #edf1f6; }
.ezmq-result-count { min-width: max-content; color: var(--ezmq-muted); font-size: 12.5px; }
.ezmq-result-count strong { color: var(--ezmq-primary); font-size: 15px; }
.ezmq-secondary-controls { display: flex; align-items: center; gap: 9px; }
.ezmq-select-wrap { display: block; min-width: 160px; }
.ezmq-select-wrap select { height: 40px; padding: 0 34px 0 12px; border-radius: 12px; cursor: pointer; font-size: 12.5px; }
[dir="rtl"] .ezmq-select-wrap select { padding: 0 12px 0 34px; }

/* Results */
.ezmq-results-shell { position: relative; min-height: 180px; }
.ezmq-course-grid { display: grid; grid-template-columns: repeat(var(--ezmq-columns, 3), minmax(0, 1fr)); gap: 24px; transition: opacity .18s ease; }
.ezmq-course-browser.is-loading .ezmq-course-grid { opacity: .32; pointer-events: none; }
.ezmq-loader { position: absolute; z-index: 20; inset: 38px 0 auto; width: max-content; max-width: calc(100% - 30px); margin: auto; display: flex; align-items: center; gap: 6px; padding: 12px 17px; border: 1px solid var(--ezmq-line); border-radius: 999px; background: #fff; box-shadow: var(--ezmq-shadow); color: var(--ezmq-muted); font-size: 13px; font-style: normal; }
.ezmq-loader[hidden] { display: none !important; }
.ezmq-loader span { width: 7px; height: 7px; border-radius: 50%; background: var(--ezmq-primary); animation: ezmqPulse 1s infinite ease-in-out; }
.ezmq-loader span:nth-child(2) { animation-delay: .14s; }
.ezmq-loader span:nth-child(3) { animation-delay: .28s; margin-inline-end: 4px; }
.ezmq-loader em { font-style: normal; }
@keyframes ezmqPulse { 0%, 80%, 100% { transform: scale(.65); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

/* Course cards */
.ezmq-course-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid #e2e9f2; border-radius: 24px; background: var(--ezmq-card); box-shadow: 0 10px 30px rgba(12,38,78,.065); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.ezmq-course-card:hover { transform: translateY(-7px); border-color: #cbd9eb; box-shadow: var(--ezmq-shadow); }
.ezmq-card-media { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9.2; background: linear-gradient(135deg, #edf5ff 0%, #e7f6f9 100%); }
.ezmq-card-media > img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.ezmq-course-card:hover .ezmq-card-media > img { transform: scale(1.035); }
.ezmq-card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(6,28,58,.20), transparent 45%); pointer-events: none; }
.ezmq-course-placeholder { display: grid; width: 100%; height: 100%; place-items: center; color: var(--ezmq-primary); }
.ezmq-price-badge {
  position: absolute;
  z-index: 3;
  top: 14px;
  inset-inline-end: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 45px;
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(11,31,58,.97), rgba(16,63,126,.96));
  color: #fff;
  box-shadow: 0 10px 24px rgba(4,24,52,.25);
  backdrop-filter: blur(8px);
  line-height: 1;
}
.ezmq-price-current { display: flex; align-items: baseline; gap: 4px; }
.ezmq-price-current strong { color: #fff; font-size: 18px; font-weight: 900; letter-spacing: -.02em; }
.ezmq-price-current small { color: #b9ddff; font-size: 9px; font-weight: 850; letter-spacing: .06em; }
.ezmq-price-badge del { color: rgba(255,255,255,.58); font-size: 9px; font-weight: 650; }
.ezmq-price-free { display: inline-flex; align-items: center; min-height: 28px; color: #fff; font-size: 12px; font-weight: 900; letter-spacing: .03em; }
.ezmq-card-body { display: flex; flex: 1 1 auto; flex-direction: column; padding: 20px; }
.ezmq-card-taxonomy { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 25px; margin-bottom: 10px; }
.ezmq-card-taxonomy > span { display: inline-flex; align-items: center; min-height: 24px; max-width: 100%; padding: 4px 9px; overflow: hidden; border-radius: 999px; font-size: 10.5px; font-weight: 850; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.ezmq-university-label { background: #edf5ff; color: var(--university-color, var(--ezmq-primary)); }
.ezmq-category-label { background: #f1f4f8; color: #60728a; }
.ezmq-card-body h3 { display: -webkit-box; min-height: 54px; margin: 0; overflow: hidden; font-size: 19px; line-height: 1.42; letter-spacing: -.02em; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ezmq-card-body h3 a { color: var(--ezmq-ink); text-decoration: none; }
.ezmq-card-body h3 a:hover { color: var(--ezmq-primary); }
.ezmq-course-excerpt { display: -webkit-box; min-height: 45px; margin: 9px 0 17px; overflow: hidden; color: #6d7e94; font-size: 13px; line-height: 1.72; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ezmq-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 15px; margin-top: auto; border-top: 1px solid #edf1f6; }
.ezmq-instructor { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ezmq-instructor img { width: 38px; height: 38px; flex: 0 0 38px; border: 2px solid #edf3fb; border-radius: 50%; object-fit: cover; }
.ezmq-instructor span { display: flex; min-width: 0; flex-direction: column; }
.ezmq-instructor small { color: #8b99ab; font-size: 9.5px; line-height: 1.2; }
.ezmq-instructor strong { max-width: 130px; overflow: hidden; color: #3c4f69; font-size: 11.5px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.ezmq-view-course { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 9px 13px; border-radius: 12px; background: linear-gradient(135deg, var(--ezmq-primary), #0f78db); color: #fff; box-shadow: 0 8px 18px rgba(20,95,232,.18); font-size: 11.5px; font-weight: 850; text-decoration: none; white-space: nowrap; transition: transform .2s ease, box-shadow .2s ease; }
.ezmq-view-course:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 11px 23px rgba(20,95,232,.27); }
[dir="rtl"] .ezmq-view-course svg { transform: rotate(180deg); }

.ezmq-empty-state { grid-column: 1 / -1; display: flex; min-height: 310px; align-items: center; justify-content: center; flex-direction: column; padding: 40px 20px; border: 1px dashed #cad6e5; border-radius: 24px; background: rgba(255,255,255,.72); text-align: center; }
.ezmq-empty-icon { display: grid; width: 84px; height: 84px; margin-bottom: 15px; place-items: center; border-radius: 24px; background: #fff; color: var(--ezmq-primary); box-shadow: 0 10px 30px rgba(17,48,88,.08); }
.ezmq-empty-state h3 { margin: 0 0 8px; color: var(--ezmq-ink); font-size: 20px; }
.ezmq-empty-state p { max-width: 420px; margin: 0; color: var(--ezmq-muted); font-size: 14px; }
.ezmq-pagination { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; margin-top: 32px; }
.ezmq-page-btn { display: grid; width: 40px; height: 40px; padding: 0; place-items: center; border: 1px solid var(--ezmq-line); border-radius: 12px; background: #fff; color: #4e6078; font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; transition: all .18s ease; }
.ezmq-page-btn:hover:not(:disabled), .ezmq-page-btn.is-current { border-color: var(--ezmq-primary); background: var(--ezmq-primary); color: #fff; box-shadow: 0 8px 18px rgba(23,105,224,.2); }
.ezmq-page-btn:disabled { opacity: .35; cursor: not-allowed; }
.ezmq-page-dots { color: #8b99ab; }
.ezmq-browser-notice { padding: 15px; border: 1px solid #f0c36d; border-radius: 8px; background: #fff8e5; }
.ezmq-course-browser .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1024px) {
  .ezmq-browser-hero { min-height: 220px; }
  .ezmq-hero-mark { width: 125px; height: 125px; border-radius: 34px; }
  .ezmq-hero-mark-core { width: 82px; height: 82px; }
  .ezmq-course-grid { grid-template-columns: repeat(min(2, var(--ezmq-columns, 3)), minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ezmq-browser-hero { grid-template-columns: 1fr; min-height: auto; padding: 30px 25px; border-radius: 24px; }
  .ezmq-browser-header { text-align: center; }
  .ezmq-browser-header p { margin-inline: auto; }
  .ezmq-hero-mark { display: none; }
  .ezmq-filter-primary { grid-template-columns: 1fr; }
  .ezmq-filter-secondary { align-items: stretch; flex-direction: column; }
  .ezmq-secondary-controls { width: 100%; }
  .ezmq-select-wrap { flex: 1 1 0; min-width: 0; }
}
@media (max-width: 680px) {
  .ezmq-browser-hero { margin-bottom: 16px; }
  .ezmq-browser-header h2 { font-size: 31px; }
  .ezmq-filter-panel { padding: 10px; margin-bottom: 20px; border-radius: 19px; }
  .ezmq-university-trigger, .ezmq-search-box input { min-height: 58px; height: 58px; border-radius: 14px; }
  .ezmq-university-menu { position: absolute; max-height: 330px; border-radius: 16px; }
  .ezmq-university-option { grid-template-columns: 38px minmax(0, 1fr) auto auto; min-height: 56px; padding: 7px 8px; }
  .ezmq-option-icon { width: 38px; height: 38px; border-radius: 11px; }
  .ezmq-option-copy small { display: none; }
  .ezmq-filter-secondary { padding-inline: 2px; }
  .ezmq-secondary-controls { flex-direction: column; }
  .ezmq-select-wrap { width: 100%; }
  .ezmq-select-wrap select { height: 43px; }
  .ezmq-course-grid { grid-template-columns: 1fr; gap: 18px; }
  .ezmq-course-card { border-radius: 20px; }
  .ezmq-card-body { padding: 17px; }
  .ezmq-card-footer { align-items: stretch; flex-direction: column; }
  .ezmq-view-course { width: 100%; }
  .ezmq-instructor strong { max-width: 220px; }
  .ezmq-page-btn { width: 37px; height: 37px; border-radius: 10px; }
}

/* Automatic Tutor LMS course archive replacement */
.ezmq-course-archive-page {
  width: 100%;
  padding: 24px 0 clamp(52px, 7vw, 90px);
  background:
    radial-gradient(circle at 10% 0%, rgba(20,95,232,.055), transparent 27%),
    #f5f8fc;
}
.ezmq-course-archive-container { width: min(1200px, calc(100% - 32px)); margin-inline: auto; }
.ezmq-course-archive-page .ezmq-course-browser { padding-inline: 0; }
@media (max-width: 680px) {
  .ezmq-course-archive-page { padding-top: 14px; }
  .ezmq-course-archive-container { width: min(100% - 20px, 1200px); }
}
