.bcg-knowledge-template {
  --bcg-navy: #0b2239;
  --bcg-blue: #1774ba;
  --bcg-muted: #60717f;
  --bcg-line: #dde7ee;
  width: 100%;
  font-family: Manrope, Arial, sans-serif;
}

.bcg-search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  background: #fff;
  border: 1px solid #c9d9e5;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(11, 34, 57, 0.08);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bcg-search-box:focus-within {
  border-color: var(--bcg-blue);
  box-shadow: 0 0 0 3px rgba(23, 116, 186, 0.14), 0 10px 28px rgba(11, 34, 57, 0.08);
}

.bcg-search-icon {
  color: var(--bcg-blue);
  font-size: 27px;
  line-height: 1;
}

.bcg-search-box input {
  width: 100%;
  min-width: 0;
  height: 58px;
  padding: 0;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--bcg-navy);
  font: 500 16px/1.4 Manrope, Arial, sans-serif;
}

.bcg-search-box input::placeholder { color: #7a8994; }

.bcg-clear {
  display: none;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--bcg-muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.bcg-clear.is-visible { display: block; }
.bcg-filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.bcg-filter {
  padding: 9px 14px;
  border: 1px solid #c9d9e5;
  border-radius: 999px;
  background: #fff;
  color: #23394b;
  font: 700 13px/1.2 Manrope, Arial, sans-serif;
  cursor: pointer;
  transition: 0.2s;
}

.bcg-filter:hover { border-color: var(--bcg-blue); color: var(--bcg-blue); }
.bcg-filter.is-active { border-color: var(--bcg-navy); background: var(--bcg-navy); color: #fff; }
.bcg-result-count { min-height: 21px; margin-top: 14px; color: var(--bcg-muted); font-size: 13px; }

.bcg-article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.bcg-article-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--bcg-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(11, 34, 57, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.bcg-article-card:hover {
  transform: translateY(-4px);
  border-color: #9fc7e1;
  box-shadow: 0 16px 38px rgba(11, 34, 57, 0.1);
}

.bcg-article-card[hidden] { display: none !important; }
.bcg-card-media { display: block; height: 190px; aspect-ratio: 16 / 9; overflow: hidden; background: #dfeaf2; }
.bcg-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.bcg-article-card:hover .bcg-card-media img { transform: scale(1.035); }

.bcg-card-placeholder {
  display: grid;
  height: 190px;
  place-items: center;
  padding: 20px;
  background-color: #0b2239;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 28px 28px;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.bcg-card-body { display: flex; flex: 1; flex-direction: column; padding: 22px; }
.bcg-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bcg-card-category { color: var(--bcg-blue); font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.bcg-card-meta time { color: #7a8994; font-size: 12px; white-space: nowrap; }
.bcg-card-body h3 { margin: 10px 0 9px; color: var(--bcg-navy); font-size: 21px; line-height: 1.3; }
.bcg-card-body h3 a { color: inherit; text-decoration: none; }
.bcg-card-body p { margin: 0 0 18px; color: var(--bcg-muted); font-size: 14px; line-height: 1.6; }
.bcg-card-link { margin-top: auto; color: var(--bcg-blue); font-size: 14px; font-weight: 800; text-decoration: none; }
.bcg-card-link:hover { color: var(--bcg-navy); }
.bcg-card-link.is-disabled { color: #8997a1; }

.bcg-no-results {
  display: none;
  margin-top: 24px;
  padding: 34px 24px;
  border: 1px solid var(--bcg-line);
  border-radius: 14px;
  background: #fff;
  text-align: center;
}

.bcg-no-results.is-visible { display: block; }
.bcg-no-results h3 { margin: 0 0 8px; color: var(--bcg-navy); font-size: 22px; }
.bcg-no-results p { margin: 0; color: var(--bcg-muted); font-size: 14px; }

@media (max-width: 1024px) {
  .bcg-article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .bcg-search-box { padding: 0 14px; }
  .bcg-search-box input { height: 54px; font-size: 14px; }
  .bcg-filter-row { gap: 8px; }
  .bcg-filter { padding: 8px 11px; font-size: 12px; }
  .bcg-article-grid { grid-template-columns: 1fr; gap: 18px; }
  .bcg-card-media, .bcg-card-placeholder { height: 210px; }
}


/* Search and archive navigation (v1.2.0) */
.bcg-search-box { min-height: 58px; }
.bcg-search-box .bcg-search-icon { flex: 0 0 auto; }
.bcg-search-box input { flex: 1 1 auto; }
.bcg-search-submit {
  flex: 0 0 auto; padding: 10px 18px; border: 0; border-radius: 9px;
  background: #0b2239; color: #fff; font: 700 13px/1.2 Manrope, Arial, sans-serif; cursor: pointer;
}
.bcg-search-submit:hover { background: #1774ba; }
.bcg-clear { display: inline-block; color: #60717f; font-size: 13px; text-decoration: none; white-space: nowrap; }
.bcg-filter { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.bcg-filter[aria-current="page"] { cursor: default; }
.bcg-result-count { margin-bottom: 0; }
.bcg-pagination { display: flex; justify-content: center; margin: 34px 0 10px; }
.bcg-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bcg-pagination li { margin: 0; }
.bcg-pagination a, .bcg-pagination span {
  display: inline-flex; min-width: 42px; min-height: 42px; align-items: center; justify-content: center;
  padding: 8px 13px; border: 1px solid #c9d9e5; border-radius: 9px;
  color: #23394b; background: #fff; font-size: 13px; font-weight: 700; text-decoration: none;
}
.bcg-pagination .current { border-color: #0b2239; background: #0b2239; color: #fff; }
.bcg-pagination a:hover { border-color: #1774ba; color: #1774ba; }
@media (max-width: 767px) {
  .bcg-search-box { gap: 8px; }
  .bcg-search-submit { padding: 9px 12px; }
  .bcg-pagination a, .bcg-pagination span { min-width: 38px; min-height: 38px; padding: 7px 10px; }
}

/* Stable card media dimensions while thumbnails load. */
.bcg-card-media img { aspect-ratio: 16 / 9; }
