.ecg-grid {
    --ecg-gap: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 per row */
    gap: var(--ecg-gap);
  }
  
  .ecg-card {
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow .2s ease;
  }
  .ecg-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.08);
  }
  
  .ecg-thumb {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 2;
  }
  .ecg-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display:block;
    transition: transform .35s ease;
  }
  .ecg-card:hover .ecg-thumb img {
    transform: scale(1.04);
  }
  
  .ecg-btn {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(0,0,0,.72);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    font-weight: 600;
    transition: background .2s ease, transform .2s ease;
  }
  .ecg-card:hover .ecg-btn {
    background: rgba(0,0,0,.86);
    transform: translateY(-2px);
  }
  
  .ecg-body {
    padding: 14px 16px 16px;
  }
  .ecg-title {
    margin: 0 0 6px 0;
    font-size: 18px;
    line-height: 1.3;
  }
  .ecg-title a {
    text-decoration: none;
    color: inherit;
  }
  .ecg-desc {
    margin: 0 0 8px 0;
    color: #555;
    font-size: 14px;
  }
  .ecg-count {
    font-size: 12px;
    color: #666;
  }
  
  /* Responsive: stack on narrow screens */
  @media (max-width: 640px) {
    .ecg-grid {
      grid-template-columns: 1fr;
    }
  }
  