/* Rexi course card.
 * Shared by the courses page and the [rexi_courses] section, so both stay identical.
 * Nothing here paints a page background: the section inherits whatever it is dropped into. */

.rxa {
  --rxa-black: #000;
  --rxa-muted: rgba(0, 0, 0, .64);
  --rxa-blue: #183FE1;
  --rxa-blue-hover: #002791;
  --rxa-bg: #F5F5F5;
  --rxa-panel: #EBEBEB;
  --rxa-cream: #EFE8D1;
  --rxa-line: rgba(0, 0, 0, .2);
  --rxa-red: #D82121;
  --rxa-star: #FAA625;
  --rxa-orange: #F59E0B;
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  color: var(--rxa-black);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  text-align: start;
}
.rxa *, .rxa *::before, .rxa *::after { box-sizing: border-box; }
.rxa h1, .rxa h2, .rxa h3, .rxa p, .rxa fieldset { margin: 0; padding: 0; }
.rxa h1, .rxa h2, .rxa h3, .rxa button, .rxa input { font-family: inherit; }
.rxa h1, .rxa h2, .rxa h3 { color: var(--rxa-black); text-transform: none; letter-spacing: -.02em; }
.rxa a { color: inherit; text-decoration: none; }
.rxa a:hover { color: var(--rxa-blue); }
.rxa a:focus-visible, .rxa button:focus-visible, .rxa input:focus-visible, .rxa summary:focus-visible { outline: 3px solid var(--rxa-blue); outline-offset: 4px; }
.rxa .rxa-sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); border: 0; white-space: nowrap; }

/* ===== The card ===== */
.rxa .rxa-card { display: flex; flex-direction: column; min-width: 0; height: 100%; margin: 0; padding: 0; overflow: hidden; border: .5px solid rgba(0,0,0,.1); border-radius: 12px; background: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.rxa .rxa-card:hover, .rxa .rxa-card:focus-within { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(0,0,0,.08); }
.rxa .rxa-card-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #EBEBEB; }
.rxa .rxa-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.rxa .rxa-card:hover .rxa-card-media img { transform: scale(1.03); }
.rxa .rxa-sale, .rxa .rxa-bundle-tag { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 6px; background: var(--rxa-orange); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.4; }
.rxa .rxa-bundle-tag { left: auto; right: 12px; background: var(--rxa-blue); }
.rxa .rxa-card-body { display: flex; flex: 1; flex-direction: column; padding: 20px; }
.rxa .rxa-ic { display: block; flex-shrink: 0; }
.rxa .rxa-card-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; color: var(--rxa-muted); font-size: 14px; line-height: 1.3; }
.rxa .rxa-card-meta > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.rxa .rxa-card-cat span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rxa .rxa-card-students { flex-shrink: 0; white-space: nowrap; }
.rxa .rxa-card-meta .rxa-ic { color: var(--rxa-blue); }
.rxa .rxa-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.rxa .rxa-card-title { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.35; letter-spacing: -.2px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rxa .rxa-card-title a { color: var(--rxa-black); }
.rxa .rxa-card-title a:hover { color: var(--rxa-blue); }
.rxa .rxa-card-rating { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.rxa .rxa-card-by { margin: 6px 0 0; color: var(--rxa-muted); font-size: 13px; }
.rxa .rxa-card-foot { margin-top: auto; padding-top: 18px; }
.rxa .rxa-card-price { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding-top: 16px; border-top: .5px solid rgba(0,0,0,.1); }
.rxa .rxa-old, .rxa .rxa-old .amount, .rxa .rxa-old bdi { color: var(--rxa-red); font-size: 15px; font-weight: 500; text-decoration: line-through; }
.rxa .rxa-card-level { display: inline-flex; align-items: center; gap: 6px; color: var(--rxa-muted); font-size: 14px; }
.rxa .rxa-now { margin-left: auto; }
.rxa .rxa-now, .rxa .rxa-now .amount, .rxa .rxa-now bdi { color: var(--rxa-black); font-size: 22px; font-weight: 600; line-height: 1.2; letter-spacing: -.3px; text-decoration: none; font-variant-numeric: tabular-nums; }
.rxa .rxa-now .screen-reader-text, .rxa .rxa-old .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.rxa .rxa-card-btn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 48px; margin-top: 16px; border-radius: 8px; background: var(--rxa-blue); color: #fff !important; font-size: 16px; font-weight: 600; text-decoration: none; transition: background .3s ease, gap .3s ease; }
.rxa .rxa-card-btn:hover { background: var(--rxa-blue-hover); gap: 12px; color: #fff; }
.rxa .rxa-card-progress { display: flex; align-items: center; gap: 10px; padding-top: 16px; border-top: .5px solid rgba(0,0,0,.1); color: var(--rxa-muted); font-size: 14px; }
.rxa .rxa-bar { flex: 1; height: 6px; overflow: hidden; border-radius: 6px; background: #EBEBEB; }
.rxa .rxa-bar i { display: block; height: 100%; border-radius: 6px; background: var(--rxa-blue); }

/* ===== The [rexi_courses] section ===== */
.rxa-section { padding: 0; background: none; }
.rxa-section .rxa-section-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.rxa-section .rxa-sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; margin-bottom: 28px; }
.rxa-section .rxa-sec-head:empty { display: none; }
.rxa-section .rxa-sec-copy { min-width: 0; }
.rxa-section .rxa-sec-title { font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; line-height: 1.2; }
.rxa-section .rxa-sec-sub { margin-top: 8px; color: var(--rxa-muted); font-size: 15px; }
.rxa-section .rxa-sec-all { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; height: 44px; padding: 0 20px; border: 1px solid var(--rxa-line); border-radius: 8px; color: var(--rxa-black); font-size: 15px; font-weight: 500; white-space: nowrap; transition: border-color .3s ease, color .3s ease, gap .3s ease; }
.rxa-section .rxa-sec-all:hover { border-color: var(--rxa-blue); color: var(--rxa-blue); gap: 12px; }
.rxa-section .rxa-sec-foot { margin-top: 32px; text-align: center; }
.rxa-section .rxa-sec-foot .rxa-sec-all { border-color: var(--rxa-blue); color: var(--rxa-blue); }
.rxa-section .rxa-sec-foot .rxa-sec-all:hover { background: var(--rxa-blue); color: #fff; }

/* Column count comes from the shortcode/widget; it steps down on smaller screens. */
.rxa .rxa-cards { display: grid; grid-template-columns: repeat(var(--rxa-cols, 3), minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.rxa .rxa-cards > * { min-width: 0; }
.rxa-section .rxa-empty-note { padding: 32px 24px; border: 1px dashed var(--rxa-line); border-radius: 12px; color: var(--rxa-muted); text-align: center; }

@media (max-width: 991px) {
  .rxa .rxa-cards { grid-template-columns: repeat(min(var(--rxa-cols, 3), 2), minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .rxa .rxa-card-body { padding: 16px; }
  .rxa .rxa-card-title { font-size: 17px; }
  .rxa .rxa-now, .rxa .rxa-now .amount, .rxa .rxa-now bdi { font-size: 20px; }
  .rxa-section .rxa-sec-head { align-items: stretch; flex-direction: column; margin-bottom: 20px; }
  .rxa-section .rxa-sec-all { align-self: flex-start; }
  .rxa-section .rxa-section-inner { padding: 0 16px; }
}
@media (max-width: 575px) {
  .rxa .rxa-cards { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .rxa .rxa-card, .rxa .rxa-card-media img, .rxa .rxa-card-btn, .rxa-section .rxa-sec-all { transition: none; }
  .rxa .rxa-card:hover, .rxa .rxa-card:focus-within { transform: none; }
  .rxa .rxa-card:hover .rxa-card-media img { transform: none; }
}
