/* =====================================================================
   Education — D - Metal Price Capsule row (Figma 10159:15141 / 10159:15142).
   Three white, gray-bordered, rounded cards across the 1240 content area
   (380px @ 1440, 50px gap). Each: gold badge pill, big H1 spot price,
   change + bid meta line, and a blue "Live … Chart" link with an arrow
   tinted via CSS mask. Tokens only; BEM; education- prefixed.
   ===================================================================== */

.education-capsules {
  padding-block: var(--education-capsules-pad-block);
}

.education-capsules__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--education-capsules-gap);
  align-items: stretch; /* equal-height cards across the row */
}
.education-capsules__cell {
  display: flex;
}

/* ---- Capsule card ---- */
/* The whole card links through to its metal price page. The "Live … Chart"
   anchor is stretched to cover the card (::after overlay) so the price itself
   is clickable, without nesting links. `position: relative` anchors the overlay. */
.education-capsule {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--education-capsule-gap);
  padding: var(--education-capsule-pad);
  background: var(--gray-0);
  border: 1px solid var(--gray-3);
  border-radius: var(--education-capsule-radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.education-capsule:hover,
.education-capsule:focus-within {
  border-color: var(--og-blue);
  box-shadow: 0 0 0 1px var(--og-blue);
}

/* ---- Gold badge pill (Axiforma Bold 12) ---- */
.education-capsule__badge {
  display: inline-flex;
  align-items: center;
  padding: var(--education-capsule-badge-pad);
  border-radius: var(--education-capsule-badge-radius);
  background: var(--badge-gold);
  color: var(--gray-8);
  font-size: var(--fs-12);
  font-weight: var(--fw-bold);
  line-height: normal;
  text-align: center;
  white-space: nowrap;
}

/* Per-metal badge tint — matches the price-page accent palette
   (price-chart.css [data-metal="silver"|"platinum"]). Gold keeps the
   default badge-gold pill above. */
.education-capsule--silver .education-capsule__badge {
  background: #e9edf2;
  color: #3f4654;
}
.education-capsule--platinum .education-capsule__badge {
  background: #ece8fe;
  color: #4a36a0;
}

/* ---- Price (Axiforma Medium 44/55) ---- */
.education-capsule__price {
  margin: 0;
  width: 100%;
  font-size: var(--fs-44);
  font-weight: var(--fw-medium);
  line-height: var(--lh-55);
  color: var(--gray-8);
  word-break: break-word;
}

/* ---- Change + bid meta (Axiforma Regular 16, muted) ---- */
.education-capsule__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--education-capsule-meta-gap);
  width: 100%;
  font-size: var(--fs-16);
  font-weight: var(--fw-regular);
  line-height: normal;
  color: var(--gray-7);
}
.education-capsule__change,
.education-capsule__bid {
  white-space: nowrap;
}

/* ---- "Live … Chart" link (Axiforma SemiBold 16, OneGold blue) ---- */
.education-capsule__link {
  display: flex;
  align-items: center;
  gap: var(--education-capsule-link-gap);
  padding-block: var(--education-capsule-link-pad);
  width: 100%;
}
/* Stretch the link over the entire card so the price/badge click through too. */
.education-capsule__link::after {
  content: "";
  position: absolute;
  inset: 0;
}
.education-capsule__link-label {
  font-size: var(--fs-16);
  font-weight: var(--fw-semibold);
  line-height: 1;
  color: var(--og-blue);
  white-space: nowrap;
}
/* Arrow — single SVG tinted via CSS mask (price-arrow technique). */
.education-capsule__link-arrow {
  flex: none;
  width: var(--education-capsule-arrow-w);
  height: var(--education-capsule-arrow-h);
  background-color: var(--og-blue);
  -webkit-mask: url("../../img/education-capsule-arrow.svg") no-repeat center / contain;
          mask: url("../../img/education-capsule-arrow.svg") no-repeat center / contain;
}

/* ---- Tablet (600–1023px): 3 equal-height capsules → 2-up; align-items:stretch
   preserves equal height across both rows. ---- */
@media (max-width: 1023.98px) {
  .education-capsules__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--education-capsules-gap);
    align-items: stretch;
  }
}

/* ---- Mobile (M - Metal Price Capsule, Figma 10159:15263 @ 390) ---- */
@media (max-width: 767.98px) {
  /* Three capsules stack to a single full-width column, 20px between cards. */
  .education-capsules__grid {
    grid-template-columns: 1fr;
    gap: var(--education-capsules-gap-mobile);
  }
  .education-capsule {
    width: 100%;
  }
  /* Change + Bid stay on one row beneath the price. */
  .education-capsule__meta {
    flex-wrap: nowrap;
  }
}
