* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: #222;
  background: #fafafa;
}
.site-header {
  padding: 24px 16px;
  text-align: center;
}
.site-header h1 {
  margin: 0 0 8px;
}
.site-header p {
  margin: 0;
  color: #555;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 220px);
  grid-auto-rows: 8px; /* base row height */
  gap: 16px;
  padding: 0 16px 24px;
  align-items: start;
  justify-content: center;
}

@media (max-width: 599px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}
@media (min-width: 600px) and (max-width: 899px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}
@media (min-width: 900px) and (max-width: 1199px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}
@media (min-width: 1200px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.06);
  overflow: hidden;
}
.card img {
  width: 100%;
  height: auto;
  display: block;
}
.card .media {
  width: 100%;
  display: block;
  background: linear-gradient(135deg, #eef1f5, #dfe6ef);
  border-bottom: 1px solid #f0f0f0;
}
.card h2 {
  font-size: 18px;
  margin: 12px 12px 4px;
}
.card p {
  margin: 0 12px 16px;
  color: #444;
}

