/* ═══════════════════════════════════════════════════════════════
   NoruCore – blog.css  v3
   Row-based bento: no CSS grid auto-placement → no overlap.
   Light theme, 8px radius.
═══════════════════════════════════════════════════════════════ */

:root {
  --nc-bg:       #FFFFFF;
  --nc-bg-warm:  #F7F4EF;
  --nc-bg-dark:  #181818;
  --nc-border:   rgba(0,0,0,0.08);
  --nc-red:      #C8352A;
  --nc-mid:      #999;
  --nc-text:     #0D0D0D;
  --nc-text-sec: #6B6B6B;
  --nc-r:        8px;
  --nc-gap:      10px;
}

/* ── BLOG CONTROLS (Search & Filter) ───────────────────────── */
.blog-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding: 40px 0 60px; /* Space between header and cards */
}

/* Search */
.search-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(0,0,0,.15); /* Elegant underline instead of box */
  padding: 8px 4px;
  transition: border-color .25s;
  width: 280px;
}
.search-wrap:focus-within { border-color: var(--nc-text); }
.search-input {
  flex: 1; border: none; outline: none;
  font-family: var(--ff-serif); /* Serif for a premium feel */
  font-size: 18px;
  background: transparent; color: var(--nc-text);
}
.search-input::placeholder { color: #aaa; font-family: var(--ff-sans); font-size: 15px; }
.search-icon { width: 16px; height: 16px; color: var(--nc-text); opacity: 0.5; }
.search-icon svg { width: 100%; height: 100%; }

/* Filters */
.filter-wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.filter-categories { display: flex; gap: 32px; }
.filter-link {
  background: none; border: none; border-bottom: 1px solid transparent;
  padding: 4px 0; font-family: var(--ff-sans); font-size: 14px;
  font-weight: 500; cursor: pointer; color: var(--nc-text-sec); 
  letter-spacing: .02em; transition: color .2s, border-color .2s;
}
.filter-link:hover { color: var(--nc-text); }
.filter-link.active { color: var(--nc-text); border-color: var(--nc-text); }

.filter-divider { width: 1px; height: 14px; background: rgba(0,0,0,.15); }

.sort-wrap {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: none; font-family: var(--ff-sans);
  font-size: 14px; font-weight: 500; color: var(--nc-text-sec);
  cursor: pointer; transition: color .2s; padding: 0;
}
.sort-wrap:hover { color: var(--nc-text); }

/* ── ARTICLES SECTION ───────────────────────────────────────── */
.articles-section { padding: 0 0 96px; }
.articles-count { font-size: 12px; color: var(--nc-mid); margin-bottom: 24px; text-transform: uppercase; letter-spacing: .05em;}

/* ── CARD GRID ──────────────────────────────────────────────── */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

/* ── BLOG CARD (.bc) — dual-layer blur system ───────────────── */
.bc {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(0,0,0,.14);
  transition: box-shadow .35s ease;
}
.bc:hover {
  box-shadow: 0 8px 36px rgba(0,0,0,.26);
}

/* Layer 1: sharp image */
.bc-bg-sharp {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.bc-bg-sharp img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Layer 2: blurred image, masked to bottom portion only */
.bc-bg-blur {
  position: absolute;
  inset: -16px;
  z-index: 1;
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 28%,
    rgba(0,0,0,.55) 48%,
    black 65%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 28%,
    rgba(0,0,0,.55) 48%,
    black 65%
  );
}
.bc-bg-blur img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: blur(20px) saturate(1.1);
  transform: scale(1.08);
  transition: filter .45s ease;
}
.bc:hover .bc-bg-blur img {
  filter: blur(13px) saturate(1.25);
}

/* Layer 3: dark gradient overlay */
.bc-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0)    0%,
    rgba(0,0,0,0.04) 35%,
    rgba(0,0,0,0.50) 58%,
    rgba(0,0,0,0.84) 100%
  );
}

/* Layer 4: text content — bottom overlay */
.bc-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.bc-title {
  font-family: var(--ff-serif);
  font-size: clamp(16px, 1.3vw, 21px);
  font-weight: 400;
  line-height: 1.15;
  color: #fff;
  letter-spacing: -.01em;
  margin: 0;
}
.bc-excerpt {
  font-size: 13px;
  color: rgba(255,255,255,.68);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bc-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.bc-date, .bc-author {
  font-size: 11px;
  color: rgba(255,255,255,.42);
  font-family: var(--ff-sans);
}
.bc-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  flex-shrink: 0;
}

/* ── EMPTY / LOADING ────────────────────────────────────────── */
.articles-empty, .articles-loading {
  text-align: center; padding: 80px 0;
  font-size: 18px; color: var(--nc-mid); font-family: var(--ff-serif);
}

/* ── LOAD MORE ──────────────────────────────────────────────── */
.load-more-row {
  margin-top: 40px; display: flex;
  flex-direction: column; align-items: center; gap: 14px;
}
.load-more-progress { width: 160px; height: 1px; background: rgba(0,0,0,.10); }
.load-more-bar { height: 100%; background: var(--nc-text); transition: width .4s; }
.btn-load-more {
  padding: 10px 28px; border: 1px solid rgba(0,0,0,.18);
  border-radius: 100px; font-family: var(--ff-sans);
  font-size: 13px; font-weight: 500;
  background: transparent; color: var(--nc-text); cursor: pointer; transition: all .2s;
}
.btn-load-more:hover { background: var(--nc-text); color: #fff; border-color: var(--nc-text); }
.btn-load-more:disabled { opacity: .3; cursor: default; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1200px) {
  .articles-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .header-flex { flex-direction: column; align-items: flex-start; }
  .search-wrap { width: 100%; max-width: 320px; }
}
@media (max-width: 640px) {
  .articles-grid { grid-template-columns: 1fr; }
}