/* Scoped styles for Katy News Cards Grid */
.knbc { width: 100%; }
.knbc-title { margin: 0 0 12px 0; }
.knbc-grid {
  --knbc-gap: 18px;
  display: grid;
  gap: var(--knbc-gap);
  grid-template-columns: repeat(auto-fill, minmax(var(--knbc-min, 210px), 1fr));
  align-items: stretch;
}

.knbc-card {
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.knbc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.12);
}

.knbc-cover {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 7; /* baseball card-ish */
  background: linear-gradient(135deg, rgba(0,0,0,0.08), rgba(0,0,0,0.02));
  overflow: hidden;
}
.knbc-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.knbc-cover-placeholder {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(0,0,0,0.14), rgba(0,0,0,0.05)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.0), rgba(255,255,255,0.0) 8px, rgba(255,255,255,0.06) 8px, rgba(255,255,255,0.06) 16px);
}

.knbc-body {
  padding: 12px 14px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.knbc-card-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}
.knbc-card-title a {
  text-decoration: none;
}
.knbc-card-title a:hover {
  text-decoration: underline;
}

.knbc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  opacity: 0.85;
}
.knbc-meta-author {
  font-weight: 600;
}
.knbc-excerpt {
  font-size: 13px;
  line-height: 1.35;
  opacity: 0.92;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.knbc-actions {
  margin-top: auto;
}
.knbc-button {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.18);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.knbc-button:hover {
  text-decoration: none;
  filter: brightness(0.96);
}

.knbc-empty {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px dashed rgba(0,0,0,0.22);
  border-radius: 10px;
  opacity: 0.8;
}

.knbc-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 14px 0;
}
.knbc-filter-label { font-weight: 700; margin-right: 2px; }
.knbc-filter {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.16);
  text-decoration: none;
  font-size: 13px;
}
.knbc-filter.is-active {
  font-weight: 800;
  border-color: rgba(0,0,0,0.32);
}

.knbc-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 18px;
}
.knbc-page a,
.knbc-page span {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.16);
  text-decoration: none;
  font-size: 13px;
}
.knbc-page span.current {
  font-weight: 800;
  border-color: rgba(0,0,0,0.32);
}
.knbc-page a:hover {
  filter: brightness(0.96);
}

/* Keep it readable on small screens */
@media (max-width: 520px) {
  .knbc-grid { grid-template-columns: 1fr; }
}
