/* ==========================================================================
   CWS — curriculum / capability cards
   Everything is scoped to .cws-cur. Nothing here can reach the theme,
   and nothing in the theme can reach in.
   Per-card colours are injected inline as --cws-cur-accent,
   --cws-cur-title and --cws-cur-body.
   ========================================================================== */

.cws-cur {
  /* Fallbacks — overridden per card by the colour fields */
  --cws-cur-accent: #0E7A5F;
  --cws-cur-title: #0C5A45;
  --cws-cur-body: #26332e;

  --cws-cur-ink: #0f1f1a;
  --cws-cur-muted: #5a6b65;
  --cws-cur-hair: #dfe7e3;
  --cws-cur-card: #ffffff;

  /* The module fills whatever container the HubSpot row gives it, so it
     lines up with the heading and body copy around it. Set a value here
     only if you drop it into a full-bleed row that has no width of its own. */
  --cws-cur-max: none;
  --cws-cur-gutter: 0;
  --cws-cur-gap: 1.5rem;

  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  box-sizing: border-box;
}

.cws-cur *,
.cws-cur *::before,
.cws-cur *::after { box-sizing: border-box; }

.cws-cur__wrap {
  width: 100%;
  max-width: var(--cws-cur-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--cws-cur-gutter);
  padding-right: var(--cws-cur-gutter);
}

/* --------------------------------------------------------- grid */

.cws-cur__grid {
  display: grid;
  gap: var(--cws-cur-gap);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .cws-cur--cols-2 .cws-cur__grid { grid-template-columns: repeat(2, 1fr); }
  .cws-cur--cols-3 .cws-cur__grid { grid-template-columns: repeat(2, 1fr); }
  .cws-cur--cols-4 .cws-cur__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1080px) {
  .cws-cur--cols-3 .cws-cur__grid { grid-template-columns: repeat(3, 1fr); }
  .cws-cur--cols-4 .cws-cur__grid { grid-template-columns: repeat(4, 1fr); }
}

/* --------------------------------------------------------- card */

.cws-cur__card {
  background: var(--cws-cur-card);
  border: 1px solid var(--cws-cur-hair);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cws-cur__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 40px -30px rgba(15, 31, 26, .4);
  border-color: var(--cws-cur-accent);
}

@media (hover: none) {
  .cws-cur__card:hover { transform: none; box-shadow: none; }
}

/* --------------------------------------------------------- head band */

.cws-cur__head {
  display: flex;
  align-items: center;
  gap: .95rem;
  padding: 1.25rem 1.6rem;
  border-bottom: 1px solid var(--cws-cur-hair);
  background: #f4f7f6;
}

/* Tint the band with the card's own accent where supported */
@supports (background: color-mix(in srgb, red 12%, white)) {
  .cws-cur__head {
    background: color-mix(in srgb, var(--cws-cur-accent) 12%, #fff);
  }
}

.cws-cur__icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--cws-cur-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  overflow: hidden;
}

.cws-cur__icon img {
  display: block;
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.cws-cur__headtext {
  display: block;
  min-width: 0;
}

.cws-cur__group {
  display: block;
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--cws-cur-title);
}

.cws-cur__audience {
  display: block;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--cws-cur-muted);
  margin-top: .35rem;
}

/* --------------------------------------------------------- body */

.cws-cur__body { padding: .3rem 1.6rem 1.7rem; }

.cws-cur__course {
  border-top: 1px solid var(--cws-cur-hair);
  padding: 1.05rem 0;
}

.cws-cur__course:first-child { border-top: 0; }
.cws-cur__course:last-child { padding-bottom: 0; }

.cws-cur__cname {
  display: block;
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--cws-cur-ink);
}

.cws-cur__cdesc {
  font-size: .92rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--cws-cur-body);
  margin: .15rem 0 0;
}

/* --------------------------------------------------------- tags */

.cws-cur__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .6rem;
}

.cws-cur__tag {
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--cws-cur-title);
  background: #eef3f1;
  border-radius: 6px;
  padding: .32em .7em;
}

@supports (background: color-mix(in srgb, red 12%, white)) {
  .cws-cur__tag {
    background: color-mix(in srgb, var(--cws-cur-accent) 13%, #fff);
  }
}
