/* BLOG GRID (Scoped styles only) */
.bg9 {
  --c1: #12616E; /* main brand color */
  --ink: #0f172a;
  --muted: #6b7280;
  --ring: #e6ebf2;
  --chip: #eef2f7;
  position: relative;
  isolation: isolate;
}

/* Container */
.bg9 .bg9-wrap {
  max-width: 1200px;
  margin: 28px auto 80px;
  padding: 0 16px;
  font-family: inherit;
}

/* Topbar */
.bg9 .bg9-topbar {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

/* Search Box */
.bg9 .bg9-search {
  position: relative;
  flex: 1 1 360px;
  max-width: 520px;
}

.bg9 .bg9-search input {
  width: 100%;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--ring);
  background: #fff;
  padding: 0 42px 0 40px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bg9 .bg9-search input:focus {
  border-color: var(--c1);
  box-shadow: 0 0 0 4px rgba(18, 97, 110, 0.15);
}

.bg9 .bg9-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  opacity: 0.6;
}

.bg9 .bg9-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: none;
  color: #64748b;
}

.bg9 .bg9-clear.bg9-show {
  display: block;
}

/* Tabs */
.bg9 .bg9-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.bg9 .bg9-tab {
  border: 1px solid var(--ring);
  background: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  color: #111827;
  cursor: pointer;
  transition: all 0.18s ease;
}

.bg9 .bg9-tab.bg9-active {
  background: var(--c1);
  color: #fff;
  border-color: var(--c1);
  box-shadow: 0 6px 14px rgba(18, 97, 110, 0.25);
}

/* Grid & Cards */
.bg9 .bg9-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

@media (max-width: 640px) {
  .bg9 .bg9-grid {
    grid-template-columns: 1fr;
  }
}

.bg9 .bg9-card {
  background: #fff;
  border: 1px solid var(--ring);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.bg9 .bg9-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(6, 24, 44, 0.18);
}

.bg9 .bg9-thumb {
  aspect-ratio: 16/10;
  background: #e8edf5;
  overflow: hidden;
}

.bg9 .bg9-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.bg9 .bg9-card:hover .bg9-thumb img {
  transform: scale(1.04);
}

.bg9 .bg9-body {
  padding: 14px;
}

.bg9 .bg9-chip {
  display: inline-block;
  background: var(--chip);
  color: var(--c1);
  font-weight: 600;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
}

.bg9 .bg9-title {
  margin: 8px 0 6px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--ink);
}

.bg9 .bg9-excerpt {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

.bg9 .bg9-meta {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #eef2f7;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #475569;
}

.bg9 .bg9-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid #e6ebf2;
}

.bg9 .bg9-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #6b7280;
  background: #fff;
  border: 1px dashed #d7dde6;
  border-radius: 16px;
  padding: 32px 16px;
}

/* Accessibility */
.bg9 .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
