/* Grid */
.hd-cards {
  display: grid;
  gap: 28px;
}

/* Desktop defaults */
.hd-cards.hd-cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.hd-cards.hd-cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.hd-cards.hd-cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

/* Tablet: force 2 columns for 3/4-col grids */
@media (max-width: 1024px){
  .hd-cards.hd-cols-3,
  .hd-cards.hd-cols-4 {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

/* Mobile: force 1 column for all */
@media (max-width: 767px){
  .hd-cards.hd-cols-2,
  .hd-cards.hd-cols-3,
  .hd-cards.hd-cols-4 {
    grid-template-columns: 1fr;
  }
}

/* Card (light by default) */
.hd-card {
  --hd-accent: #1f2a57; /* will be overridden by control inline */
  background: #fff;
  border-radius: 14px;
  padding: 28px 26px;
  box-shadow: 0 6px 22px rgba(0,0,0,.06);
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
  color: #0b0f1a;
}

/* Hover turns card dark (blue) */
.hd-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,.1);
  background: var(--hd-accent, #1f2a57);
  color: #ffffff;
}

/* Icon */
.hd-card-icon {
  width: 120px;
  height: 120px;
  border-radius: 999px;
  margin: 0 auto 18px auto;
  display: grid;
  place-items: center;
  background: rgba(31,42,87,.06);
}
.hd-card:hover .hd-card-icon { background: rgba(255,255,255,.15); }
.hd-card-icon img {
  max-width: 70px;
  height: auto;
  display: block;
}

/* Title — typography controlled by Elementor; keep spacing only */
.hd-card-title { margin: 10px 0 10px; }

/* Description */
.hd-card-desc {
  font-size: 15px;
  line-height: 1.6;
  color: #333a4a;
  margin: 0 0 18px 0;
}
.hd-card:hover .hd-card-desc { color: #e9edf7; }

/* Button */
.hd-card-actions { display: flex; justify-content: center; }
.hd-card-btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 10px;
  background: #eef1f7;
  color: #0b0f1a;
  text-decoration: none;
  font-weight: 600;
  transition: opacity .15s ease, background-color .2s ease, color .2s ease;
}
.hd-card:hover .hd-card-btn {
  background: #ffffff;
  color: #111111;
}
.hd-card-btn:hover { opacity: .9; }
.hd-card-icon:hover {
    background: white!important;
}