/* Rexi courses page layout.
   Tokens, resets and the card itself live in cards.css (this file depends on it),
   so the courses page and the [rexi_courses] section always render the same card. */

.rxa-archive {
  padding: 0 0 64px;
  background: var(--rxa-bg);
  /* Full-bleed paint without viewport-width horizontal scrollbar overflow. */
  box-shadow: 0 0 0 100vmax var(--rxa-bg);
  clip-path: inset(0 -100vmax);
}
.rxa .rxa-container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.rxa .rxa-icon { width: 20px; height: 20px; display: inline-block; flex: 0 0 20px; vertical-align: middle; }
.rxa .rxa-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 28px 0; margin-bottom: 28px; border-bottom: 1px solid var(--rxa-line); }
.rxa .rxa-chip { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; min-height: 44px; border: 1px solid transparent; border-radius: 8px; background: #fff; font-weight: 500; }
.rxa .rxa-chip .rxa-icon { color: var(--rxa-blue); }
.rxa .rxa-chip:hover { border-color: var(--rxa-blue); }
.rxa .rxa-chip.is-active { color: #fff; background: var(--rxa-blue); }
.rxa .rxa-chip.is-active .rxa-icon { color: inherit; }
.rxa .rxa-featured { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 32px; margin: 28px 0 36px; padding: 28px; border-radius: 12px; background: var(--rxa-cream); }
.rxa .rxa-featured-no-image { grid-template-columns: 1fr; }
.rxa .rxa-featured-copy { min-width: 0; }
.rxa .rxa-ribbon { display: inline-block; margin-bottom: 16px; padding: 5px 22px 5px 10px; color: #000; background: var(--rxa-orange); clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 50%, 100% 100%, 0 100%); font-size: 13px; font-weight: 600; }
.rxa .rxa-featured h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.rxa .rxa-byline { margin-top: 8px; color: var(--rxa-muted); font-size: 13px; }
.rxa .rxa-featured-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 16px; font-size: 14px; }
.rxa .rxa-rating { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; color: var(--rxa-black); font-size: 14px; font-weight: 500; white-space: nowrap; }
.rxa .rxa-rating .rxa-icon { color: var(--rxa-star); width: 18px; height: 18px; flex-basis: 18px; }
.rxa .rxa-featured-bottom { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--rxa-line); }
.rxa .rxa-featured-image { display: block; min-width: 0; }
.rxa .rxa-featured-image img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.rxa .rxa-layout { display: grid; grid-template-columns: 225px minmax(0, 1fr); align-items: start; gap: 24px; padding-top: 8px; }
.rxa .rxa-sidebar { min-width: 0; border-radius: 12px; background: var(--rxa-panel); }
.rxa .rxa-filter-panel > summary { display: flex; align-items: center; gap: 10px; padding: 20px; list-style: none; font-size: 18px; font-weight: 600; cursor: default; }
.rxa .rxa-filter-panel > summary::-webkit-details-marker { display: none; }
.rxa .rxa-filter-chevron { display: none; margin-inline-start: auto; }
.rxa .rxa-filter-form { padding: 0 20px 20px; }
.rxa .rxa-filter-form fieldset { min-width: 0; margin-bottom: 24px; border: 0; }
.rxa .rxa-filter-form legend { float: none; width: auto; margin: 0 0 12px; padding: 0; border: 0; color: var(--rxa-black); font-size: 15px; font-weight: 600; }
.rxa .rxa-check { display: flex; align-items: start; gap: 10px; margin: 0; padding: 7px 0; color: var(--rxa-muted); font-size: 13px; font-weight: 400; cursor: pointer; }
.rxa .rxa-check span { min-width: 0; overflow-wrap: anywhere; }
.rxa .rxa-check input { appearance: auto; -webkit-appearance: checkbox; flex: 0 0 16px; width: 16px; height: 16px; margin: 2px 0 0; padding: 0; accent-color: var(--rxa-blue); cursor: pointer; }
/* No filter groups worth showing: give the whole width to the results. */
.rxa .rxa-layout-nofilters { grid-template-columns: minmax(0, 1fr); }
.rxa .rxa-filter-count[hidden] { display: none; }
.rxa .rxa-filter-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-inline-start: auto; padding: 0 7px; border-radius: 11px; background: var(--rxa-blue); color: #fff; font-size: 12px; font-weight: 600; }
.rxa .rxa-results { min-width: 0; }
.rxa .rxa-results-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.rxa .rxa-results-header h1 { font-size: 28px; font-weight: 600; line-height: 1.2; }
.rxa .rxa-search { display: flex; align-items: stretch; flex: 0 1 270px; min-width: 0; margin: 0; border: 1px solid var(--rxa-line); border-radius: 8px; background: #fff; }
.rxa .rxa-search input { width: 100%; min-width: 0; height: 44px; margin: 0; padding: 10px 4px 10px 14px; border: 0; border-radius: 8px 0 0 8px; background: transparent; color: var(--rxa-black); box-shadow: none; font-size: 13px; }
.rxa .rxa-search input::placeholder { color: var(--rxa-muted); opacity: 1; }
.rxa .rxa-search button { display: grid; place-items: center; flex: 0 0 44px; margin: 0; padding: 0; border: 0; border-radius: 0 8px 8px 0; background: transparent; color: var(--rxa-black); cursor: pointer; }
.rxa .rxa-search button:hover { color: var(--rxa-blue); }
.rxa .rxa-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rxa .rxa-purchase { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.rxa .rxa-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; color: var(--rxa-black); font-size: 18px; font-weight: 600; line-height: 1.4; }
.rxa .rxa-price .price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.rxa .rxa-price ins { order: 0; padding: 0; background: transparent; color: var(--rxa-black); font-weight: 600; text-decoration: none; }
.rxa .rxa-price del { order: 1; color: var(--rxa-red); font-size: 14px; font-weight: 400; opacity: 1; text-decoration: line-through; }
.rxa .rxa-price .woocommerce-price-suffix { order: 2; font-size: 12px; font-weight: 400; }
.rxa .rxa-price .screen-reader-text, .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; }
.rxa .rxa-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0; min-height: 44px; margin: 0; padding: 10px 18px; border: 0; border-radius: 8px; background: var(--rxa-blue); color: #fff; box-shadow: none; font-size: 14px; font-weight: 500; line-height: 1.5; letter-spacing: 0; text-transform: none; cursor: pointer; }
.rxa .rxa-button:hover { background: var(--rxa-blue-hover); color: #fff; }
.rxa .rxa-featured .rxa-button { margin-inline-start: auto; }
.rxa .rxa-apply { width: 100%; }
.rxa .rxa-clear { display: block; margin-top: 12px; color: var(--rxa-blue); text-align: center; text-decoration: underline; }
.rxa .rxa-pagination { margin-top: 28px; }
.rxa .rxa-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rxa .rxa-pagination li { margin: 0; padding: 0; list-style: none; }
.rxa .rxa-pagination a, .rxa .rxa-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--rxa-line); border-radius: 8px; background: #fff; }
.rxa .rxa-pagination .current, .rxa .rxa-pagination a:hover { border-color: var(--rxa-blue); background: var(--rxa-blue); color: #fff; }
.rxa .rxa-empty { padding: 48px 24px; border: 1px solid var(--rxa-line); border-radius: 12px; background: #fff; text-align: center; }
.rxa .rxa-empty p { margin-bottom: 16px; }
@media (min-width: 992px) {
  .rxa .rxa-filter-panel:not([open]) > .rxa-filter-form { display: block; }
}
@media (max-width: 991px) {
  .rxa .rxa-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .rxa .rxa-filter-panel > summary { cursor: pointer; }
  .rxa .rxa-filter-chevron { display: inline-flex; }
  .rxa .rxa-filter-panel[open] .rxa-filter-chevron { transform: rotate(90deg); }
  .rxa .rxa-featured { gap: 24px; padding: 24px; }
}
@media (max-width: 767px) {
  .rxa { padding-bottom: 40px; }
  .rxa .rxa-chips { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 20px; padding: 20px 4px; scroll-padding-inline: 4px; }
  .rxa .rxa-chip { flex-shrink: 0; white-space: nowrap; }
  .rxa .rxa-featured { grid-template-columns: minmax(0, 1fr); gap: 20px; margin: 20px 0 24px; padding: 20px; }
  .rxa .rxa-featured-image { grid-row: 1; }
  .rxa .rxa-grid { grid-template-columns: minmax(0, 1fr); }
  .rxa .rxa-results-header { align-items: stretch; flex-direction: column; }
  .rxa .rxa-results-header h1 { font-size: 26px; }
  .rxa .rxa-search { flex-basis: auto; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
}


/* ===== Browse by Categories heading ===== */
.rxa .rxa-chips-title { margin: 0; padding-top: 40px; font-size: 20px; font-weight: 600; line-height: 1.2; letter-spacing: -.3px; }
.rxa .rxa-chips-title + .rxa-chips { padding-top: 16px; }

/* ===== Search (Workademy style) ===== */
.rxa .rxa-search { flex-direction: row-reverse; border: 0; background: #EBEBEB; }
.rxa .rxa-search button { border-radius: 8px 0 0 8px; color: var(--rxa-muted); flex-basis: 40px; }
.rxa .rxa-search input { padding-left: 0; border-radius: 0 8px 8px 0; }

/* Card grid on the courses page (the card itself comes from cards.css). */
.rxa .rxa-grid { gap: 24px; }
/* ===== Instant filtering ===== */
.rxa.rxa-js [data-rxa-nojs] { display: none; }
.rxa .rxa-results { transition: opacity .2s ease; }
.rxa .rxa-results.is-loading { opacity: .45; pointer-events: none; }


@media (max-width: 767px) {
  .rxa .rxa-grid { gap: 16px; }
}
/* Banner price: old price (red, struck) first, current price after — same order as the cards. */
.rxa .rxa-featured .rxa-price ins { order: 1; font-size: 22px; }
.rxa .rxa-featured .rxa-price del { order: 0; font-size: 15px; font-weight: 500; }

/* Banner button = same as card button (arrow slides on hover), auto width */
.rxa .rxa-featured .rxa-featured-btn { width: auto; margin: 0 0 0 auto; padding: 0 24px; }
@media (max-width: 767px) { .rxa .rxa-featured .rxa-featured-btn { width: 100%; margin-top: 12px; } }

.rxa .rxa-featured-lessons { display: inline-flex; align-items: center; gap: 6px; }
.rxa .rxa-featured-lessons .rxa-ic { color: var(--rxa-blue); }

/* ===== "Newest!" tab (as on the reference) =====
   A white tab with an orange top bar and a zig-zag bottom edge, hanging from the top of the banner. */
.rxa .rxa-featured { position: relative; align-items: start; padding: 40px; }
.rxa .rxa-featured-copy { padding-top: 104px; }
.rxa .rxa-ribbon {
  --rxa-zig: 6px;
  position: absolute; top: 0; left: 40px; z-index: 1;
  display: block; margin: 0;
  padding: 22px 28px calc(20px + var(--rxa-zig));
  border-top: 6px solid var(--rxa-orange);
  background: #fff; color: #D97706;
  clip-path: none;
  font-size: 20px; font-weight: 500; line-height: 1.2; letter-spacing: -.2px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--rxa-zig)) 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--rxa-zig)) 100%;
}
@media (max-width: 991px) {
  .rxa .rxa-featured { padding: 24px; }
  .rxa .rxa-featured-copy { padding-top: 88px; }
  .rxa .rxa-ribbon { left: 24px; padding: 18px 22px calc(16px + var(--rxa-zig)); font-size: 18px; }
}
/* Phone: the tab still hangs from the top edge; the picture and text move down below it. */
@media (max-width: 767px) {
  .rxa .rxa-featured { padding: 84px 20px 20px; }
  .rxa .rxa-featured-copy { padding-top: 0; }
  .rxa .rxa-ribbon { left: 20px; padding: 16px 20px calc(14px + var(--rxa-zig)); font-size: 17px; }
}
