/* ── Blog Listing Page ────────────────────────────────────── */
* { box-sizing: border-box; }

.blogs-page {
  min-height: 100vh;
  background: #f8faff;
}

/* Hero */
.blogs-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #1e40af 100%);
  padding: 60px 32px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blogs-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.blogs-hero-content { position: relative; max-width: 700px; margin: 0 auto; }
.blogs-hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: #93c5fd;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 20px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.2);
}
.blogs-hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 14px;
  line-height: 1.15;
}
.blogs-hero p {
  font-size: 1.05rem;
  color: #93c5fd;
  margin: 0 0 28px;
}

/* Search */
.blogs-search-wrap {
  display: flex;
  max-width: 520px;
  margin: 0 auto;
  background: #fff;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.blogs-search-input {
  flex: 1;
  padding: 14px 20px;
  border: none;
  outline: none;
  font-size: 0.9rem;
  font-family: inherit;
  color: #0f172a;
}
.blogs-search-btn {
  background: #1e40af;
  color: #fff;
  border: none;
  padding: 14px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}
.blogs-search-btn:hover { background: #1e3a8a; }

/* Body */
.blogs-body {
  max-width: 1200px;
  margin: -30px auto 60px;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}

/* Category pills */
.blogs-cats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 4px 20px rgba(15,23,42,0.08);
  margin-bottom: 36px;
}
.blogs-cats-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
  margin-right: 4px;
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px;
  border-radius: 50px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.cat-pill:hover { border-color: #1e40af; color: #1e40af; }
.cat-pill.active { background: #1e40af; color: #fff; border-color: #1e40af; }
.cat-pill-count {
  background: rgba(255,255,255,0.25);
  border-radius: 20px;
  padding: 1px 7px;
  font-size: 0.72rem;
}
.cat-pill:not(.active) .cat-pill-count { background: #f1f5f9; color: #64748b; }

/* Layout */
.blogs-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

/* Grid */
.blogs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 10px rgba(15,23,42,0.05);
  transition: transform 0.25s, box-shadow 0.25s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 36px rgba(15,23,42,0.12);
}

.blog-card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}

.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.blog-card:hover .blog-card-img { transform: scale(1.06); }

.blog-card-cat {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255,255,255,0.92);
  color: #1e40af;
  backdrop-filter: blur(4px);
}

.blog-card-featured {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #f59e0b;
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

.blog-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-desc {
  font-size: 0.84rem;
  color: #64748b;
  line-height: 1.55;
  margin: 0 0 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.blog-card-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bc-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bc-author-name {
  font-size: 0.78rem;
  font-weight: 500;
  color: #475569;
}

.bc-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bc-read-time, .bc-views {
  font-size: 0.75rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Empty state */
.blogs-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 20px;
  color: #94a3b8;
}
.blogs-empty svg { margin-bottom: 16px; opacity: 0.4; }
.blogs-empty h3 { font-size: 1.25rem; color: #475569; margin: 0 0 8px; }
.blogs-empty p { font-size: 0.9rem; margin: 0; }

/* Pagination */
.blogs-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}

.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.pg-btn:hover { border-color: #1e40af; color: #1e40af; }
.pg-btn.active { background: #1e40af; border-color: #1e40af; color: #fff; }
.pg-btn.disabled { opacity: 0.4; pointer-events: none; }
.pg-arrow { width: auto; padding: 0 14px; gap: 6px; }

/* Sidebar */
.blogs-sidebar { display: flex; flex-direction: column; gap: 24px; }

.sidebar-card {
  background: #fff;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 2px 10px rgba(15,23,42,0.06);
  border: 1px solid #e2e8f0;
}

.sidebar-title {
  font-size: 0.875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

/* Sidebar cats */
.sidebar-cats { display: flex; flex-direction: column; gap: 6px; }
.sidebar-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 500;
}
.sidebar-cat-item:hover { background: #f1f5f9; }
.sidebar-cat-item.active { background: #eff6ff; color: #1e40af; font-weight: 600; }
.sidebar-cat-count {
  background: #f1f5f9;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
}
.sidebar-cat-item.active .sidebar-cat-count { background: #dbeafe; color: #1e40af; }

/* Recent posts */
.sidebar-recent { display: flex; flex-direction: column; gap: 14px; }
.sidebar-recent-item {
  display: flex;
  gap: 12px;
  text-decoration: none;
  align-items: flex-start;
  padding: 10px;
  border-radius: 8px;
  transition: background 0.2s;
}
.sidebar-recent-item:hover { background: #f8fafc; }
.recent-img { width: 58px; height: 48px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.recent-info { min-width: 0; }
.recent-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 4px;
}
.recent-date { font-size: 0.72rem; color: #94a3b8; }

/* Newsletter */
.sidebar-newsletter { background: linear-gradient(135deg, #1e3a8a, #1e40af); border: none; }
.sidebar-newsletter .sidebar-title { color: #93c5fd; border-bottom-color: rgba(255,255,255,0.1); }
.sidebar-newsletter p { font-size: 0.84rem; color: #bfdbfe; margin: 0 0 16px; line-height: 1.5; }
.nl-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  outline: none;
  font-size: 0.875rem;
  margin-bottom: 10px;
  font-family: inherit;
}
.nl-btn {
  width: 100%;
  padding: 10px;
  background: #f59e0b;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.nl-btn:hover { background: #d97706; }

/* Responsive */
@media (max-width: 1050px) {
  .blogs-layout { grid-template-columns: 1fr; }
  .blogs-sidebar { display: grid; grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
  .blogs-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .blogs-hero { padding: 40px 16px 60px; }
  .blogs-hero h1 { font-size: 1.8rem; }
  .blogs-body { padding: 0 16px; margin-top: -20px; }
  .blogs-grid { grid-template-columns: 1fr; }
  .blogs-sidebar { grid-template-columns: 1fr; }
}
