/* Techieed Stories Grid styles */
.tsg-grid {
  display: grid;
  grid-template-columns: repeat(var(--tsg-cols, 4), minmax(0,1fr));
  gap: 18px;
}
@media (max-width: 1024px) {
  .tsg-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .tsg-grid { grid-template-columns: repeat(1, minmax(0,1fr)); }
}

.tsg-card {
  position: relative;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eef2f7;
  box-shadow: 0 12px 28px rgba(2,6,23,.12);
  text-decoration: none;
}
.tsg-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(2,6,23,.16);
}

.tsg-thumb {
  width: 100%;
  padding-top: 170%; /* portrait-ish ratio */
  background-size: cover;
  background-position: center;
  background-color: #0b1220;
}

.tsg-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(0,0,0,.68), rgba(0,0,0,.08));
  pointer-events: none;
}

.tsg-meta {
  position: absolute;
  left: 12px; right: 12px; bottom: 12px;
  color: #fff;
}
.tsg-title {
  font-weight: 800; font-size: 16px; line-height: 1.25; margin-bottom: 4px;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.tsg-date {
  font-weight: 600; font-size: 12px; opacity: .9;
}

.tsg-pager {
  display: flex; gap: 10px; justify-content: center; margin-top: 18px;
}
.tsg-btn {
  background:#e5e7eb; color:#111827; border-radius:999px; padding:10px 18px; text-decoration:none;
  border: 1px solid #d1d5db;
}
.tsg-btn-primary {
  background:#2563eb; color:#fff; border: 1px solid #1e40af;
}

.tsg-error, .tsg-empty {
  padding: 12px; background: #fff; border:1px solid #fee2e2; color:#991b1b; border-radius: 8px;
}
