/* ==== Blog List & Blog Detail (shared) ==== */

/* Page head */
.page-head { padding: 20px 0 12px; }
.breadcrumbs { color: var(--muted); font-size: .95rem; }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.result-head h1 { margin: 0; font-size: 1.4rem; }

/* Blog grid/cards */
.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.post { background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.post a.thumb { display: block; aspect-ratio: 4 / 3; background: #f8fafc; }
.post a.thumb img { width: 100%; height: 100%; object-fit: cover; }
.post .content { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.post .title { font-weight: 600; line-height: 1.35; }
.post .meta { color: var(--muted); font-size: .9rem; }

.post .actions {
  padding: 0 12px 12px;   /* spacing matches content */
}

.post .actions .btn {
  display: inline-block;  /* keeps button natural size */
  margin-top: 4px;        /* small gap from meta */
}

.load-more-wrap { display: flex; justify-content: center; margin: 24px 0 40px; }

/* ==== Blog Detail (blog-detail.php) ==== */

/* Headings & meta already defined in list; reuse .page-head, .breadcrumbs, .meta */

.blog-wrap {
  display: grid;
  grid-template-columns: minmax(0, 14fr) minmax(0, 5fr);
  gap: 24px;
  max-width: 1200px;
  margin: 18px auto;
  align-items: start;
}
.blog-wrap > * { min-width: 0; }

/* Content card */
.card { background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.card .head { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.card .body { padding: 18px; }

.hero-img { border-radius: 12px; overflow: hidden; }
.hero-img img { display: block; width: 100%; height: auto; }

/* Body content */
.content h2, .content h3 { margin-top: 1.2em; }
.content p { margin: 0.6em 0; }
.content ul { margin: 0.6em 0 0.6em 1.2em; }
blockquote { margin: 1em 0; padding-left: 14px; border-left: 3px solid var(--brand-100); color: var(--muted); }

/* Figure (replacing inline styles) */
.figure { margin: 20px 0; }
.figure-img { display: block; width: 100%; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

/* Sidebar */
.sidebar .section { background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 16px; }
.sidebar .section h3 { margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 1.1rem; }
.sidebar .section .body { padding: 12px 14px; }

.recent { display: grid; gap: 12px; }
.recent a.item { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; }
.recent img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.recent .t { font-weight: 600; line-height: 1.3; }
.recent .d { color: var(--muted); font-size: .9rem; }

/* Archives */
.archives .year { font-weight: 700; margin-top: 8px; margin-bottom: 6px; }
.archives ul { list-style: none; margin: 0; padding: 0; }
.archives li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.archives li:last-child { border-bottom: 0; }
.archives a { color: inherit; }
.archives .older { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
.pill { display: inline-block; background: #f0f9ff; border: 1px solid #bae6fd; color: #0369a1; border-radius: 999px; padding: 2px 8px; font-size: .8rem; }


/* Responsive */
@media (max-width: 980px){
  .grid.cols-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px){
  .blog-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 720px){
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
