/* ─── Cards — program colour tiles and blog cards, plus their grids ───────
   Program card: a tile in the program's own colour (--pc, content data),
   round photo, dashed footer rule, round ink arrow. Blog card: white card
   with an outlined photo and a butter category sticker. Both lift with a
   sticker shadow on hover.
   ────────────────────────────────────────────────────────────────────────── */

/* Program card */
.pcard {
  --pc: var(--butter);
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--pc);
  border: var(--bw) solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  box-shadow: var(--shd);
  transition: transform .3s, box-shadow .3s;
}

.pcard:hover {
  transform: translate(-3px, -3px) rotate(-.6deg);
  box-shadow: var(--shd-lg);
}

.pcard__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.pcard__tag {
  background: var(--paper);
  border: var(--bw) solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12.5px;
  font-weight: 700;
}

.pcard__weeks {
  flex: none;
  font-size: 12px;
  font-weight: 700;
}

.pcard__weeks b {
  font-family: var(--font-title);
  font-size: 26px;
  margin-right: 3px;
}

.pcard__img {
  display: block;
  width: 68%;
  aspect-ratio: 1;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  border: var(--bw) solid var(--line);
  background: var(--paper);
}

.pcard__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s;
}

.pcard:hover .pcard__img img {
  transform: scale(1.08) rotate(3deg);
}

.pcard__title {
  font-size: 22px;
}

.pcard__title a {
  text-decoration: none;
}

.pcard__text {
  font-size: 15px;
  color: color-mix(in srgb, var(--ink) 85%, var(--pc));
}

.pcard__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: var(--bw) dashed color-mix(in srgb, var(--line) 35%, transparent);
  font-size: 13.5px;
  font-weight: 700;
}

.pcard__go {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  transition: transform .3s;
}

.pcard:hover .pcard__go {
  transform: rotate(-45deg);
}

.pcard--big {
  padding: 28px;
}

.pcard--big .pcard__title {
  font-size: clamp(24px, 3vw, 30px);
}

.pcard--big .pcard__img {
  width: 52%;
}

/* Blog card */
.bcard {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--paper);
  border: var(--bw) solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}

.bcard:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shd);
}

.bcard__media {
  position: relative;
  border-bottom: var(--bw) solid var(--line);
}

.bcard__img {
  display: block;
  height: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(140deg, var(--mint), var(--butter));
}

.bcard__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s;
}

.bcard:hover .bcard__img img {
  transform: scale(1.05);
}

.bcard__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  padding: 22px 24px 24px;
}

/* Category sticker — on the photo, or above the title without one */
.bcard__cat {
  background: var(--butter);
  border: var(--bw) solid var(--line);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
}

.bcard__media .bcard__cat {
  position: absolute;
  left: 14px;
  top: 14px;
}

.bcard__body > .bcard__cat {
  margin-bottom: 12px;
}

.bcard__title {
  font-size: 20px;
}

.bcard__title a {
  text-decoration: none;
}

.bcard__text {
  font-size: 15px;
  color: var(--mut);
}

.bcard__meta {
  margin: auto 0 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--mut);
}

.bcard--big .bcard__img {
  aspect-ratio: 4 / 3;
}

.bcard--row .bcard__text,
.bcard--rail .bcard__text {
  display: none;
}

.bcard--big .bcard__title {
  font-size: clamp(22px, 2.6vw, 28px);
}

.bcard--row .bcard__title,
.bcard--rail .bcard__title {
  font-size: 18px;
}

@media (min-width: 640px) {
  .bcard--row {
    flex-direction: row;
  }

  .bcard--row .bcard__media {
    width: 42%;
    flex: none;
    border-bottom: 0;
    border-right: var(--bw) solid var(--line);
  }

  .bcard--row .bcard__img {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
  }

  .bcard--row .bcard__media {
    min-height: 170px;
  }
}

/* Feature card (blog page) */
.bcard--feature {
  display: grid;
  gap: 0;
  margin-bottom: 40px;
  box-shadow: var(--shd);
}

.bcard--feature .bcard__title {
  font-size: clamp(26px, 3vw, 40px);
}

.bcard--feature .bcard__meta {
  margin: 0 0 18px;
}

@media (min-width: 860px) {
  .bcard--feature {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: stretch;
  }

  .bcard--feature .bcard__media {
    border-bottom: 0;
    border-right: var(--bw) solid var(--line);
  }

  .bcard--feature .bcard__img {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
  }

  .bcard--feature .bcard__media {
    min-height: 380px;
  }

  .bcard--feature .bcard__body {
    justify-content: center;
    padding: 40px;
  }

  .bcard--feature.bcard--noimg {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Grids */
.pgrid,
.bgrid {
  display: grid;
  gap: 26px;
}

@media (min-width: 640px) {
  .pgrid,
  .bgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .pgrid,
  .bgrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
