/**
 * Blog — Google News style layout
 * Reuses the --cf-* brand variables already defined in style.css
 */

/* ── Page header ─────────────────────────────────────────── */
.bn-header {
  background: var(--cf-dark);
  padding: 10rem 0 0;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--cf-blue), var(--cf-green), var(--cf-gold)) 1;
}
.bn-eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--cf-gold-light); margin-bottom: .3rem;
}
.bn-title { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; color: #fff; margin: 0; }

.bn-search-form { flex-shrink: 0; }
.bn-search-wrap { display: flex; position: relative; }
.bn-search-icon {
  position: absolute; left: .9rem; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,.4); z-index: 5; pointer-events: none;
}
.bn-search-input {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  color: #fff; padding: .6rem .9rem .6rem 2.4rem; border-radius: .6rem 0 0 .6rem;
  font-size: .88rem; width: 220px; outline: none; transition: all .2s;
}
.bn-search-input::placeholder { color: rgba(255,255,255,.35); }
.bn-search-input:focus { background: rgba(255,255,255,.13); border-color: var(--cf-blue); width: 280px; }
.bn-search-btn {
  background: var(--cf-blue); color: #fff; border: none;
  padding: .6rem 1rem; border-radius: 0 .6rem .6rem 0;
  font-size: .85rem; font-weight: 600; cursor: pointer; transition: .2s; white-space: nowrap;
}
.bn-search-btn:hover { background: var(--cf-blue-dark); }

/* ── Category tabs ───────────────────────────────────────── */
.bn-cat-tabs { display: flex; gap: .25rem; overflow-x: auto; padding: .9rem 0 0; scrollbar-width: none; }
.bn-cat-tabs::-webkit-scrollbar { display: none; }
.bn-cat-tab {
  display: inline-flex; align-items: center; gap: .35rem;
  color: rgba(255,255,255,.55); font-size: .82rem; font-weight: 600;
  padding: .45rem .9rem; border-radius: .5rem .5rem 0 0; text-decoration: none;
  white-space: nowrap; transition: .18s; border-bottom: 3px solid transparent;
}
.bn-cat-tab:hover { color: #fff; background: rgba(255,255,255,.07); }
.bn-cat-tab.active { background: var(--tab-color, var(--cf-blue)); border-bottom-color: var(--tab-color, var(--cf-blue)); }
.bn-cat-count {
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.18); border-radius: 999px; min-width: 1.2rem; height: 1.2rem;
  padding: 0 .4rem; font-size: .68rem; font-weight: 700; margin-left: .3rem;
}

/* ── Breaking ticker ─────────────────────────────────────── */
.bn-ticker {
  display: flex; align-items: center; gap: 0; background: linear-gradient(90deg, #B91C1C, #DC2626);
  border-radius: .6rem; margin-top: 1.25rem; overflow: hidden; height: 2.9rem;
}
.bn-ticker-label {
  display: flex; align-items: center; height: 100%; background: rgba(0,0,0,.22); color: #fff;
  font-size: .72rem; font-weight: 800; letter-spacing: 1px; padding: 0 .9rem;
  white-space: nowrap; flex-shrink: 0;
}
.bn-ticker-wrap { overflow: hidden; flex: 1; height: 100%; }
.bn-ticker-items { display: flex; align-items: center; height: 100%; gap: 2.5rem; animation: bn-scroll 24s linear infinite; white-space: nowrap; padding: 0 1.25rem; }
.bn-ticker-wrap:hover .bn-ticker-items { animation-play-state: paused; }
.bn-ticker-item { display: inline-flex; align-items: center; gap: .5rem; color: #fff; text-decoration: none; font-size: .85rem; font-weight: 600; }
.bn-ticker-item:hover { text-decoration: underline; }
.bn-ticker-cat {
  background: rgba(255,255,255,.22); color: #fff; font-weight: 700; font-size: .68rem;
  padding: .15rem .55rem; border-radius: .35rem; text-transform: uppercase; letter-spacing: .3px;
}
@keyframes bn-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Hero card ───────────────────────────────────────────── */
.bn-hero-card {
  display: block; background: #fff; border: 1px solid #e5e7eb; border-radius: .9rem;
  overflow: hidden; text-decoration: none; transition: box-shadow .2s;
}
.bn-hero-card:hover { box-shadow: 0 12px 28px rgba(15,23,42,.1); }
.bn-hero-img-wrap { position: relative; aspect-ratio: 16/8; background: #eef2f7; }
.bn-hero-img { width: 100%; height: 100%; object-fit: cover; }
.bn-hero-img-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 4rem;
}
.bn-hero-meta { position: absolute; left: 1rem; top: 1rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.bn-badge {
  display: inline-flex; align-items: center; color: #fff; font-size: .68rem; font-weight: 700;
  padding: .3rem .65rem; border-radius: .4rem; text-transform: uppercase; letter-spacing: .5px;
  white-space: nowrap;
}
.bn-badge-breaking { background: #DC2626; }
.bn-hero-body { padding: 1.25rem 1.5rem 1.5rem; }
.bn-hero-title { font-size: clamp(1.15rem, 2.3vw, 1.6rem); font-weight: 800; color: #111827; margin: 0 0 .5rem; }
.bn-hero-excerpt { color: #4b5563; font-size: .95rem; line-height: 1.55; margin: 0 0 .75rem; }
.bn-hero-byline { display: flex; flex-wrap: wrap; gap: .4rem; color: #6b7280; font-size: .82rem; }
.bn-dot::before { content: '·'; margin: 0 .1rem; }

/* ── Section head ────────────────────────────────────────── */
.bn-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 1.75rem 0 1rem;
}
.bn-section-title { font-size: 1.15rem; font-weight: 800; color: #111827; margin: 0; }
.bn-result-count { color: #6b7280; font-size: .85rem; }

/* ── Grid cards ──────────────────────────────────────────── */
.bn-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; align-items: stretch; }
@media (max-width: 767px) { .bn-grid { grid-template-columns: 1fr; } }
.bn-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: .75rem;
  overflow: hidden; transition: box-shadow .2s, transform .2s; height: 100%;
}
.bn-card:hover { box-shadow: 0 10px 22px rgba(15,23,42,.08); transform: translateY(-2px); }
.bn-card-link {
  display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none;
}
.bn-card-img-wrap { position: relative; aspect-ratio: 16/9; background: #eef2f7; flex-shrink: 0; }
.bn-card-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bn-card-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; }
.bn-card-cat-badge {
  position: absolute; left: .7rem; top: .7rem; color: #fff; font-size: .68rem;
  font-weight: 700; padding: .25rem .55rem; border-radius: .35rem;
}
.bn-card-body { padding: 1rem 1.15rem 1.15rem; display: flex; flex-direction: column; flex: 1; }
.bn-card-title { font-size: 1rem; font-weight: 700; color: #111827; margin: 0 0 .4rem; line-height: 1.35; }
.bn-card-excerpt { color: #6b7280; font-size: .85rem; line-height: 1.5; margin: 0 0 .6rem; flex: 1; }
.bn-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; color: #9ca3af; font-size: .76rem; margin-top: auto; }
.bn-card-meta > .bn-spacer { margin-left: auto; display: inline-flex; align-items: center; }

.bn-empty { text-align: center; padding: 3rem 1rem; color: #6b7280; }
.bn-empty .bn-empty-icon { font-size: 3rem; }

/* ── Pagination ──────────────────────────────────────────── */
.bn-pagination { display: flex; justify-content: center; gap: .35rem; margin-top: 1.75rem; }
.bn-pagination a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.2rem; height: 2.2rem; border-radius: .5rem; border: 1px solid #e5e7eb;
  color: #374151; font-size: .85rem; font-weight: 600; text-decoration: none;
}
.bn-pagination a.active { background: var(--cf-blue); border-color: var(--cf-blue); color: #fff; }
.bn-pagination a.disabled { opacity: .4; pointer-events: none; }

/* ── Sidebar ─────────────────────────────────────────────── */
.bn-sidebar-widget { background: #fff; border: 1px solid #e5e7eb; border-radius: .75rem; padding: 1.1rem; margin-bottom: 1rem; }
.bn-sidebar-title { font-size: .95rem; font-weight: 800; color: #111827; margin: 0 0 .85rem; display: flex; align-items: center; }
.bn-sidebar-item { display: flex; gap: .7rem; align-items: flex-start; text-decoration: none; padding: .55rem 0; border-top: 1px solid #f1f5f9; }
.bn-sidebar-item:first-child { border-top: none; padding-top: 0; }
.bn-sidebar-rank { font-weight: 800; color: var(--cf-blue-light); font-size: 1.3rem; line-height: 1; width: 1.5rem; flex-shrink: 0; }
.bn-sidebar-item-content { flex: 1; min-width: 0; }
.bn-sidebar-cat { font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.bn-sidebar-item-title { font-size: .87rem; font-weight: 600; color: #1f2937; line-height: 1.35; margin: .1rem 0; }
.bn-sidebar-item-meta { font-size: .74rem; color: #9ca3af; }
.bn-sidebar-thumb { width: 3.5rem; height: 3.5rem; object-fit: cover; border-radius: .5rem; flex-shrink: 0; }

.bn-cat-row { display: flex; align-items: center; gap: .6rem; text-decoration: none; padding: .5rem 0; color: #374151; }
.bn-cat-icon-wrap {
  width: 2.1rem; height: 2.1rem; border-radius: .5rem; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.bn-cat-row .flex-1 { flex: 1; font-size: .87rem; font-weight: 600; }
.bn-cat-pill { background: #f1f5f9; color: #6b7280; font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; }
.bn-cat-row-active .flex-1 { color: var(--cf-blue); }

.bn-recent-item { display: flex; gap: .65rem; align-items: center; text-decoration: none; padding: .55rem 0; border-top: 1px solid #f1f5f9; }
.bn-recent-item:first-child { border-top: none; padding-top: 0; }
.bn-recent-thumb, .bn-recent-thumb-ph { width: 3.2rem; height: 3.2rem; border-radius: .5rem; object-fit: cover; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.bn-recent-title { font-size: .85rem; font-weight: 600; color: #1f2937; line-height: 1.3; }
.bn-recent-meta { font-size: .72rem; color: #9ca3af; margin-top: .15rem; }

.bn-tag-cloud { display: flex; flex-wrap: wrap; gap: .4rem; }
.bn-tag {
  display: inline-flex; align-items: center; gap: .25rem; background: #f1f5f9; color: #374151;
  font-size: .78rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px; text-decoration: none;
  transition: .15s;
}
.bn-tag:hover, .bn-tag-active { background: var(--cf-blue); color: #fff; }
.bn-tag sup { font-size: .65rem; opacity: .75; }

.bn-nl-widget { background: linear-gradient(135deg, var(--cf-blue), var(--cf-blue-dark)); text-align: center; }
.bn-nl-icon { font-size: 1.8rem; margin-bottom: .4rem; }
.bn-nl-input {
  width: 100%; padding: .55rem .8rem; border-radius: .5rem; border: none; margin-bottom: .5rem; font-size: .85rem;
}
.bn-nl-btn {
  width: 100%; background: var(--cf-gold); color: #fff; border: none; padding: .55rem;
  border-radius: .5rem; font-weight: 700; cursor: pointer;
}

/* ── Article detail ──────────────────────────────────────── */
.bn-breadcrumb-bar { 
  background: var(--cf-dark); 
  border-bottom: 1px solid #e5e7eb;
  padding: 2rem 0;
  margin: 7rem 0;
}
.bn-article-title { font-size: clamp(1.5rem, 3.2vw, 2.3rem); font-weight: 800; color: #111827; line-height: 1.25; margin: 1rem 0 .75rem; }
.bn-article-lead { font-size: 1.05rem; color: #4b5563; line-height: 1.6; margin-bottom: 1.25rem; }
.bn-byline { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding: 1rem 0; border-top: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9; margin-bottom: 1.5rem; }
.bn-byline-avatar, .bn-byline-avatar-ph { width: 2.6rem; height: 2.6rem; border-radius: 50%; object-fit: cover; display: flex; align-items: center; justify-content: center; background: var(--cf-blue-light); color: var(--cf-blue-dark); font-weight: 800; flex-shrink: 0; }
.bn-byline-name { font-weight: 700; color: #111827; font-size: .9rem; }
.bn-byline-meta { font-size: .8rem; color: #6b7280; }
.bn-share { display: flex; gap: .4rem; align-items: center; }
.bn-share-label { font-size: .8rem; color: #6b7280; }
.bn-share-btn {
  width: 2rem; height: 2rem; border-radius: 50%; background: #f1f5f9; color: #374151;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border: none; cursor: pointer;
}
.bn-share-btn:hover { background: var(--cf-blue); color: #fff; }
.bn-featured-img-wrap { margin-bottom: 1.5rem; }
.bn-featured-img { width: 100%; border-radius: .75rem; }
.bn-article-body { font-size: 1.02rem; line-height: 1.75; color: #1f2937; }
.bn-article-body h2 { font-size: 1.3rem; font-weight: 800; margin: 1.75rem 0 .75rem; }
.bn-article-body img { max-width: 100%; border-radius: .6rem; }
.bn-detail-tags { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: .4rem; }
