/* =========================
   GRID LAYOUT
   ========================= */

.grid-3-2-1 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
  align-items: start;
}

.grid-3-2-1 .card:nth-child(3) {
    padding-right: 100px !important;
  }

/* =========================
   TABLET
   2 columns + third full width
   ========================= */

@media (max-width: 1024px) {

  .grid-3-2-1 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "card1 card2"
      "card3 card3";
    gap: 34px;
    align-items: start;
  }

  .grid-3-2-1 .card:nth-child(1) {
    grid-area: card1;
  }

  .grid-3-2-1 .card:nth-child(2) {
    grid-area: card2;
  }

  .grid-3-2-1 .card:nth-child(3) {
    grid-area: card3;
    width: 100%;
    max-width: 100%;
    padding-left: 64px !important;
    padding-right: 0px !important;
  }
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 767px) {

  .grid-3-2-1 {
    grid-template-columns: 1fr;
    grid-template-areas:
      "card1"
      "card2"
      "card3";
    gap: 16px;
  }
  
  .grid-3-2-1 .card:nth-child(3) {
    padding-left: 0 !important;
  }
}

/* =========================
   CARD
   ========================= */

.gridcards .card {
  display: flex;
  flex-direction: column;
  gap: 12px;

  background: #fff;

  /* removed card padding */
  padding: 0;

  height: auto !important;
  min-height: 0 !important;

  align-self: start !important;

  overflow: hidden;
}

/* =========================
   IMAGE
   ========================= */

.gridcards .card__image-bg {
  width: 120px;
  height: 120px;

  margin: 0 auto 12px;

  background-image: var(--card-img, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  aspect-ratio: auto !important;
}

/* Safety backup */
.gridcards .card__image-bg:empty {
  display: none;
}

/* Remove old aspect ratio override */
@supports (aspect-ratio: 16 / 9) {

  .gridcards .card__image-bg {
    aspect-ratio: auto !important;
    height: 120px;
  }
}

/* =========================
   ICON
   ========================= */

.gridcards .card__icon {
  width: 56px;
  height: auto;
}

/* =========================
   TYPOGRAPHY
   ========================= */

.gridcards .card__title {
  margin: 0;

  font-family: "Figtree", sans-serif !important;
  font-weight: 600;
  font-size: 22px !important;
  line-height: 120% !important;

  text-align: center;
}

.gridcards .card__body {
  font-family: "Figtree", sans-serif !important;
  color: #000000;
  text-align: center;
}

/* =========================
   CTA
   ========================= */

.gridcards .card__cta {
  margin-top: 0;

  font-weight: 600;
  text-decoration: none;

  color: #0f172a;

  transition: color .2s ease;
}

.gridcards .card__cta:hover {
  color: #2563eb;
}

/* =========================
   EMPTY STATE
   ========================= */

.gridcards .card--empty {
  text-align: center;
  color: #64748b;

  background: #f8fafc;
  border: 1px dashed #cbd5e1;
}