/* ==========================================================================
   Care Academy catalog pages (Milestone 7A): courses, certifications, professional development
   bundles and pricing. Additions to site.css (classes prefixed .catalog-),
   used by templates/sections/catalog-*.php. Colours only via --sn-* tokens;
   gold text only on navy; logical properties only (RTL needs nothing extra).
   ========================================================================== */

/* Card lists are real lists (<ul>) for screen readers, without bullets. */
.catalog-plain,
.catalog-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* One full-width card per row (catalog overview, pricing cards). */
.catalog-rows,
.catalog-stack {
  display: grid;
  gap: 1rem;
  margin-block: 1.5rem 0;
}

/* Cards with a button at the bottom: buttons line up across a grid row. */
.catalog-course,
.catalog-item,
.catalog-row {
  display: flex;
  flex-direction: column;
}

.catalog-course > .sn-actions,
.catalog-item > .sn-actions {
  margin-block-start: auto;
  padding-block-start: 0.5rem;
}

/* Grid of course cards sits a little below the intro lines. */
.catalog-courses {
  margin-block-start: 1.5rem;
}

/* Hours · price line under a course or bundle title. */
.catalog-meta,
.catalog-price {
  margin-block: 0 0.75rem;
  color: var(--sn-navy);
  font-weight: 700;
}

.catalog-price {
  font-size: 1.1rem;
}

/* "Program details: 20 hrs · $149 · online" — italic, as in his design. */
.catalog-details {
  font-size: 0.95rem;
  font-style: italic;
}

/* The tier line under the eligibility note (specialty certifications). */
.catalog-tier-line {
  max-inline-size: var(--sn-measure);
}

/* Individual course tiers: one line per card, in the sub-heading face. */
.catalog-tier {
  color: var(--sn-navy);
  font-family: var(--sn-font-sub);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.35;
}

/* Med Tech training modules, each followed by its program details line. */
.catalog-modules {
  display: grid;
  gap: 0.75rem;
  margin-block: 0 0.75rem;
}

.catalog-module {
  margin-block: 0 0.25rem;
  font-weight: 600;
}

.sn-card .catalog-modules p.catalog-details {
  margin-block-end: 0;
}

/* Hero price on the navy band (40-hour certification): large gold figure. */
.catalog-hero-price {
  margin-block: 0 1rem;
  color: var(--sn-gold);
  font-family: var(--sn-font-heading);
  font-size: clamp(2.4rem, 2rem + 1.6vw, 3.2rem);
  line-height: 1;
}

/* Hero buttons sit side by side at a comfortable width, as in his design
   (one alone, e.g. before its Pay Now product is published, keeps its size). */
.catalog-hero-actions > .sn-btn {
  flex: 0 1 16rem;
}

/* Tables with long text cells: let text wrap (site.css keeps cells on one
   line); only the hour columns stay unbroken. */
.catalog-table td:not(:first-child),
.catalog-table th:not(:first-child) {
  white-space: normal;
}

.catalog-table td.catalog-nowrap,
.catalog-table th.catalog-nowrap {
  white-space: nowrap;
}

/* Price lines and "Program details" under a card's list get breathing room. */
.sn-card .sn-list + .catalog-meta,
.sn-card .sn-list + .catalog-price,
.sn-card .sn-list + .catalog-details,
.sn-card .sn-list + p {
  margin-block-start: 0.75rem;
}

.sn-actions + .catalog-meta {
  margin-block-start: 1rem;
}

.catalog-courses + .sn-note,
.catalog-courses + p {
  margin-block-start: 1.5rem;
}

.catalog-table tbody th {
  color: var(--sn-navy);
  font-weight: 700;
}

/* Phones: tables become stacked blocks (one row per block) so nothing scrolls
   sideways. The header row is visually hidden (still read by screen readers)
   and each cell shows its column name from data-label instead. */
@media (max-width: 767.98px) {
  .catalog-hero-actions > .sn-btn {
    flex-basis: 100%;
  }

  .catalog-table thead {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .catalog-table,
  .catalog-table tbody,
  .catalog-table tr,
  .catalog-table th,
  .catalog-table td {
    display: block;
    inline-size: 100%;
    box-sizing: border-box;
  }

  .catalog-table tr {
    padding-block: 0.75rem;
    padding-inline: 1rem;
    border-block-end: 1px solid var(--sn-gold-line);
    background: var(--sn-card);
  }

  .catalog-table tr:nth-child(even) {
    background: var(--sn-bg);
  }

  /* The parent theme stripes odd rows' cells; on phones the row is the card. */
  .catalog-table tbody > tr:nth-child(n) > th,
  .catalog-table tbody > tr:nth-child(n) > td {
    background: transparent;
  }

  .catalog-table th,
  .catalog-table td,
  .catalog-table td.catalog-nowrap {
    padding-block: 0.15rem;
    padding-inline: 0;
    border: 0;
    background: transparent;
    white-space: normal;
  }

  .catalog-table td[data-label]::before {
    content: attr(data-label) ": ";
    color: var(--sn-navy);
    font-weight: 600;
  }

}
