/* ═══════════════════════════════════════════════
   BlogPanel - Frontend Styles
   ═══════════════════════════════════════════════ */

/* ─── Reset & Base ────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ─── Page Loader ─────────────────────────────── */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .4s ease, visibility .4s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.loader-logo {
  width: 56px; height: 56px;
  background: var(--primary);
  color: #fff;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800;
  animation: logoPulse 1s ease-in-out infinite alternate;
}
@keyframes logoPulse { from { transform: scale(1); } to { transform: scale(1.08); } }
.loader-bar {
  width: 200px; height: 4px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}
.loader-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 99px;
  animation: loadProgress 1.2s ease-in-out infinite;
}
@keyframes loadProgress {
  0% { width: 0%; transform: translateX(0); }
  50% { width: 70%; }
  100% { width: 100%; transform: translateX(0); }
}

/* ─── Header ──────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
  transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,.1); }
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 2px;
}
.menu-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .3s;
  display: block;
}
.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-text {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  margin-left: 16px;
}
.nav-link {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--primary); background: #f0f4ff; }
.header-right { display: flex; align-items: center; gap: 8px; }
.search-toggle {
  padding: 8px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-light);
  border-radius: 8px;
  transition: background .2s, color .2s;
}
.search-toggle:hover { background: #f0f4ff; color: var(--primary); }

/* Search Bar */
.search-bar {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: none;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
}
.search-bar.open { display: block; }
.search-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  align-items: center;
}
.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
}
.search-input-wrap svg { color: var(--text-light); flex-shrink: 0; }
.search-input-wrap input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 15px;
  color: var(--text);
}
.search-input-wrap button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.search-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-light);
  padding: 6px;
}

/* Mobile Nav — dropdown (pushes content down) */
.mobile-overlay { display: none; }
.mobile-nav {
  display: none;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--header-height);
  z-index: 99;
}
.mobile-nav.open { display: block; }
.mobile-nav-header { display: none; }
.mobile-nav a {
  display: block;
  padding: 13px 20px;
  color: var(--text);
  font-size: 15px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { background: #f1f5f9; color: var(--primary); }

/* ─── Layout ──────────────────────────────────── */
.site-main { min-height: calc(100vh - var(--header-height) - 200px); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ─── Ad Zones ────────────────────────────────── */
.ad-zone {
  text-align: center;
  overflow: hidden;
}
.ad-zone::before {
  content: 'ADVERTISEMENT';
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #94a3b8;
  text-align: center;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.ad-home-top {
  background: #f8fafc;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.ad-inline {
  grid-column: 1 / -1;
  padding: 20px 0;
}
.ad-bottom { margin: 32px 0; }
.ad-article-top {
  background: #f8fafc;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.ad-article-bottom,
.ad-before-related,
.ad-after-related {
  margin: 24px 0;
  text-align: center;
}

/* ─── Category Pills ──────────────────────────── */
.category-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.pill {
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  background: #f1f5f9;
  color: var(--text-light);
  transition: all .2s;
  white-space: nowrap;
}
.pill:hover, .pill.active {
  background: var(--primary);
  color: #fff;
}

/* ─── Post Cards ──────────────────────────────── */
.card-category {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  background: var(--primary);
  color: #fff;
  margin-bottom: 8px;
}
.card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--text);
}
.card-title a:hover { color: var(--primary); }
.card-excerpt { font-size: 14px; color: var(--text-light); line-height: 1.6; margin-bottom: 10px; }
.card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
}
.meta-dot { opacity: .5; }
.read-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}
.read-more:hover { text-decoration: underline; }

/* Home List Layout */
.home-list { display: flex; flex-direction: column; gap: 24px; }
.post-card-list {
  display: flex;
  flex-direction: row-reverse;
  gap: 0;
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow .2s, transform .2s;
}
.post-card-list:hover { box-shadow: 0 4px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.card-image-list {
  width: 260px;
  flex-shrink: 0;
  overflow: hidden;
}
.card-image-list img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  transition: transform .3s;
}
.post-card-list:hover .card-image-list img { transform: scale(1.04); }
.post-card-list .card-body { flex: 1; padding: 20px; display: flex; flex-direction: column; }

/* Home Grid Layout */
.home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.home-grid .grid-full { grid-column: 1 / -1; }
.post-card-grid {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow .2s, transform .2s;
}
.post-card-grid:hover { box-shadow: 0 4px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.card-image {
  overflow: hidden;
  aspect-ratio: 16/9;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.post-card-grid:hover .card-image img { transform: scale(1.04); }
.post-card-grid .card-body { padding: 16px; }
.post-card-grid .card-title { font-size: 16px; }

/* ─── No Posts ────────────────────────────────── */
.no-posts {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-light);
  grid-column: 1 / -1;
}
.no-posts svg { margin: 0 auto 16px; opacity: .3; }
.no-posts p { font-size: 16px; }

/* ─── Category Header ─────────────────────────── */
.category-header { padding: 16px 0 12px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.category-page-title { font-size: 26px; font-weight: 800; color: var(--text); margin: 4px 0 0; }
.category-page-desc { color: var(--text-muted); font-size: 15px; margin: 0 0 8px; }
.category-page-count { display: inline-block; background: var(--primary); color: #fff; padding: 3px 12px; border-radius: 99px; font-size: 12px; font-weight: 600; }

/* Home bottom content */
.home-bottom-content { margin-top: 32px; padding: 24px; background: var(--card-bg); border-radius: 12px; border: 1px solid var(--border); font-size: 15px; line-height: 1.8; color: var(--text); }

/* Category Container */
.category-container { padding-bottom: 48px; }

/* Category Article (below posts) */
.category-article {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

/* Featured Post */
.post-card-featured {
  display: flex;
  gap: 24px;
  background: var(--card-bg);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 28px;
  transition: box-shadow .2s;
}
.post-card-featured:hover { box-shadow: 0 8px 32px rgba(0,0,0,.1); }
.featured-image-wrap {
  width: 45%;
  flex-shrink: 0;
  overflow: hidden;
}
.featured-image-wrap img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  transition: transform .3s;
}
.post-card-featured:hover .featured-image-wrap img { transform: scale(1.04); }
.featured-body { flex: 1; padding: 28px; display: flex; flex-direction: column; justify-content: center; }
.featured-title { font-size: 24px; font-weight: 800; line-height: 1.3; margin: 8px 0; }
.featured-title a:hover { color: var(--primary); }
.btn-read-more {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  align-self: flex-start;
  transition: background .2s;
}
.btn-read-more:hover { background: var(--secondary); }

/* Category grid */
.cat-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ─── Breadcrumb ──────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 20px;
  flex-wrap: nowrap;
  overflow: hidden;
  white-space: nowrap;
}
.breadcrumb a { color: var(--text-light); flex-shrink: 0; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { opacity: .6; }
.breadcrumb span:last-child { overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; }

/* ─── Article Page ────────────────────────────── */
.article-container { padding: 14px 20px 60px; }
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
  max-width: 1200px;
  margin: 0 auto;
}
.article-main { min-width: 0; }

.article-header { margin-bottom: 20px; }
.article-title {
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
  margin: 10px 0 16px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-light);
}
.article-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-thumbnail {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 28px;
  aspect-ratio: 16/9;
}
.article-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-content {
  font-size: 17px;
  line-height: 1.85;
  color: #334155;
}
.article-content h2 { font-size: 24px; font-weight: 700; margin: 32px 0 14px; color: var(--text); }
.article-content h3 { font-size: 20px; font-weight: 700; margin: 28px 0 12px; color: var(--text); }
.article-content h4 { font-size: 18px; font-weight: 600; margin: 24px 0 10px; }
.article-content p { margin-bottom: 18px; }
.article-content ul, .article-content ol { margin: 16px 0 16px 24px; }
.article-content li { margin-bottom: 8px; }
.article-content ul li { list-style: disc; }
.article-content ol li { list-style: decimal; }
.article-content strong { font-weight: 700; color: var(--text); }
.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  margin: 24px 0;
  background: #f0f4ff;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-light);
}
.article-content img { border-radius: 10px; margin: 20px auto; max-width: 100%; }
.article-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.article-content code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  color: #e11d48;
}
.article-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 20px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.6;
}
.article-content pre code { background: none; color: inherit; padding: 0; }

/* Article Footer Meta */
.article-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 32px 0;
}
.article-tags { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-light); }
.tag-link {
  padding: 4px 12px;
  background: #f1f5f9;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: background .2s;
}
.tag-link:hover { background: var(--primary); color: #fff; }
.article-share { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-light); }
.share-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #fff;
}
.share-twitter { background: #1da1f2; }
.share-fb { background: #1877f2; }
.share-wa { background: #25d366; }
.share-btn:hover { opacity: .85; }

/* ─── Related Posts ───────────────────────────── */
.related-posts { margin: 32px 0; }
.related-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.related-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
}
.related-title span {
  white-space: nowrap;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* Related Posts - List Style (same card as grid, single column) */
.related-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.related-card {
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: box-shadow .2s, transform .2s, opacity .15s;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}
.related-card:hover,
.related-card:active { box-shadow: 0 4px 16px rgba(0,0,0,.13); transform: translateY(-2px); }
.related-card:active { opacity: .88; transform: scale(.97); }
.related-image-wrap { display: block; overflow: hidden; aspect-ratio: 16/11; flex-shrink: 0; line-height: 0; font-size: 0; }
.related-image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; vertical-align: top; margin: 0; padding: 0; transition: transform .3s; }
.related-card:hover .related-image-wrap img,
.related-card:active .related-image-wrap img { transform: scale(1.04); }
.related-body { padding: 3px 6px 6px; }
.related-post-title,
.article-content .related-post-title {
  font-size: 12px !important; font-weight: 600; line-height: 1.35;
  margin: 0 !important; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.related-post-title a { color: inherit; text-decoration: none; }
.related-post-title a:hover { color: var(--primary); }

/* ─── Sidebar ─────────────────────────────────── */
.article-sidebar { position: sticky; top: 76px; height: fit-content; }
.sidebar-widget {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 20px;
}
.widget-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}
.widget-categories li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: color .2s;
}
.widget-categories li:last-child a { border-bottom: none; }
.widget-categories li a:hover { color: var(--primary); }
.cat-count {
  background: #f1f5f9;
  color: var(--text-light);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
}
.widget-recent li a {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.widget-recent li:last-child a { border-bottom: none; }
.widget-recent li a img {
  width: 56px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.recent-title { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.4; display: block; }
.recent-date { font-size: 11px; color: #94a3b8; display: block; margin-top: 3px; }
.widget-recent li a:hover .recent-title { color: var(--primary); }

/* ─── Pagination ──────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 0;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  transition: all .2s;
}
.page-btn:hover, .page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ─── Static Page ─────────────────────────────── */
.static-page { background: #fff; border-radius: 14px; border: 1px solid var(--border); padding: 40px; }
.static-page .article-title { margin-bottom: 24px; }

/* ─── Footer ──────────────────────────────────── */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 48px 0 0;
}
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #1e293b;
}
.footer-logo { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.footer-about p { font-size: 14px; line-height: 1.7; }
.footer-col h4 { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 16px; text-transform: uppercase; letter-spacing: .5px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 14px; color: #64748b; transition: color .2s; }
.footer-col ul li a:hover { color: var(--primary); }
.footer-col .cat-count { background: #1e293b; color: #475569; }
.footer-pages-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 16px 0;
  border-top: 1px solid #1e293b;
}
.footer-pages-links a { font-size: 13px; color: #64748b; transition: color .2s; }
.footer-pages-links a:hover { color: var(--primary); }
.footer-bottom {
  padding: 16px 0;
  text-align: center;
  font-size: 13px;
  color: #475569;
  border-top: 1px solid #1e293b;
}

/* ─── Responsive ──────────────────────────────── */
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .home-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-posts-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .header-nav { display: none; }

  /* Home list → column of full-width cards */
  .home-list { display: flex; flex-direction: column; gap: 16px; }
  /* List card on mobile = same visual as grid card */
  .post-card-list { flex-direction: column; border-radius: 14px; }
  .card-image-list { width: 100%; aspect-ratio: 16/9; height: auto; }
  .card-image-list img { width: 100%; height: 100%; min-height: unset; object-fit: cover; }
  .post-card-list .card-body { padding: 14px 16px 18px; }
  .post-card-list .card-title { font-size: 16px; line-height: 1.4; }

  /* Home grid: single column */
  .home-grid { grid-template-columns: 1fr; gap: 16px; }
  .post-card-grid { border-radius: 14px; }
  .card-image { aspect-ratio: 16/9; }
  .post-card-grid .card-title { font-size: 16px; line-height: 1.4; }

  /* Category grid: single column */
  .cat-posts-grid { grid-template-columns: 1fr; gap: 16px; }

  .related-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .category-page-title { font-size: 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .article-container { padding: 10px 16px 48px; }
}

@media (max-width: 480px) {
  .category-pills { gap: 6px; }
  .pill { font-size: 12px; padding: 5px 12px; }
  .article-footer-meta { flex-direction: column; align-items: flex-start; }
  .article-meta { gap: 10px; }
  .related-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .home-container { padding: 0 16px; }
}
