/* Grid layout */
.gridcards {
  display: grid;
  gap: 24px;
  align-items: stretch;
}

/* Default: 3 columns */
.gridcards--3col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Optional: 2 columns */
.gridcards--2col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1024px) {
  .gridcards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (max-width: 767px) {
  .gridcards {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Card styles */
.gridcards .card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fff;
  border: none;
  border-radius: var(--card-border-radius);
  padding: 20px;
  height: 100%;
  overflow: hidden;
}

.gridcards.gridcards--border-enabled .card {
  border-style: solid;
  border-width: var(--card-border-width);
  border-color: var(--card-border-color);
}

/* Top image as background */
.gridcards .card__image-bg {
  width: 120px;
  margin: 0 auto;
  height: 120px;
  background-image: var(--card-img, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-bottom: 12px;
}

@supports (aspect-ratio: 16 / 9) {
  .gridcards .card__image-bg {
    padding-top: 0;
    aspect-ratio: 16 / 9;
  }
}

/* Optional smaller 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;
  color: var(--card-heading-color) !important;
}

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

/* CTA */
.gridcards .card__cta {
  margin-top: auto;
  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: none;
}