/* ================================================================
   News / Blog — frontend styles
   ================================================================ */

/* ── Listing: grid ── */
.blog-list-section { padding: 3.5rem 0 5rem; }
.blog-empty { color: var(--text-muted); text-align: center; padding: 3rem 0; }

/* ── Category tabs ── */
.blog-tabs { display: flex; gap: .75rem; justify-content: center; margin-bottom: 2rem; flex-wrap: wrap; }
.blog-tab {
  padding: .45rem 1.4rem; border-radius: 100px;
  border: 1.5px solid #F6F0E8; background: #F6F0E8;
  color: #696969; font-size: .9rem; font-weight: 500;
  text-decoration: none; white-space: nowrap;
  transition: background .22s, border-color .22s, color .18s, box-shadow .22s;
}
.blog-tab:hover { border-color: #EED9B1; background: #EED9B1; box-shadow: 0 4px 12px rgba(192,144,70,.18); }
.blog-tab.active { background: #EED9B1; border-color: #EED9B1; color: #696969; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
@media (max-width: 1100px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .blog-grid { grid-template-columns: 1fr; } }

.blog-card {
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 4px 32px 0 rgba(0,0,0,.04);
  height: 100%; display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s;
}
.blog-card:hover { box-shadow: 0 8px 32px 0 rgba(0,0,0,.1); }

.blog-card-img { aspect-ratio: 1; overflow: hidden; flex-shrink: 0; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.blog-card:hover .blog-card-img img { transform: scale(1.04); }
.blog-card-img-placeholder { width: 100%; height: 100%; background: #e8ece8; }

.blog-card-cat {
  display: inline-block; font-size: .72rem; font-weight: 600;
  color: #06342F; background: rgba(6,52,47,.09);
  border-radius: 20px; padding: .18rem .65rem;
  margin-bottom: .55rem; align-self: flex-start;
}

.blog-card-body { padding: 1.25rem 1.4rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.blog-card-title {
  font-size: 1rem; font-weight: 700; color: #0d2d2a; line-height: 1.55;
  margin: 0 0 .5rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card-excerpt {
  font-size: .85rem; color: #666; line-height: 1.65; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}
.blog-card-meta { display: flex; align-items: center; gap: .4rem; font-size: 12px; color: #9aa5b1; margin-top: .75rem; }
.blog-meta-dot { color: #d1d5db; }

/* ── Detail: outer wrap ── */
.blog-detail-wrap { padding: 2rem 0 5rem; }

/* ── Detail: breadcrumb ── */
.blog-breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: .35rem;
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 2rem;
}
.blog-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.blog-breadcrumb a:hover { color: var(--primary); }
.blog-breadcrumb svg { color: #d1d5db; flex-shrink: 0; }
.blog-breadcrumb-current { color: var(--accent); font-weight: 500; }

/* ── Detail: two-column layout ── */
.blog-detail-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 860px) {
  .blog-detail-layout { grid-template-columns: 1fr; }
  .blog-detail-sidebar { order: -1; }
}

/* ── Detail: article ── */
.blog-detail-cat {
  display: inline-block;
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--primary); text-decoration: none;
  margin-bottom: .6rem;
}
.blog-detail-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800; line-height: 1.25;
  color: var(--text);
  margin-bottom: .75rem;
}
.blog-detail-meta { display: flex; align-items: center; gap: .5rem; font-size: 13px; color: var(--text-muted); margin-bottom: 1.5rem; }
.blog-detail-author { font-weight: 500; color: var(--text); }

.blog-detail-cover {
  border-radius: 14px; overflow: hidden;
  margin-bottom: 2rem;
  background: #f3f4f6;
}
.blog-detail-cover img { width: 100%; height: auto; display: block; }

/* ── Detail: body / prose ── */
.prose { font-size: 16px; line-height: 1.8; color: var(--text); }
.prose h1, .prose h2, .prose h3, .prose h4 { font-weight: 700; line-height: 1.3; margin: 1.75rem 0 .65rem; color: var(--text); }
.prose h1 { font-size: 1.8rem; }
.prose h2 { font-size: 1.4rem; }
.prose h3 { font-size: 1.15rem; }
.prose p  { margin-bottom: 1.1rem; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1.1rem; }
.prose li { margin-bottom: .4rem; }
.prose strong { font-weight: 700; }
.prose em { font-style: italic; }
.prose a  { color: var(--primary); text-decoration: underline; }
.prose blockquote {
  border-left: 3px solid var(--primary); padding-left: 1.1rem;
  margin: 1.5rem 0; color: var(--text-muted); font-style: italic;
}
.prose img { border-radius: 10px; margin: 1.5rem 0; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1.25rem; font-size: 14px; }
.prose th { background: var(--primary); color: #fff; padding: .55rem .85rem; text-align: left; }
.prose td { border: 1px solid var(--border); padding: .55rem .85rem; }

/* ── Detail: sidebar ── */
.blog-sidebar-label {
  display: flex; align-items: center; gap: .5rem;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--border);
}
.blog-sidebar-related { color: var(--accent); font-weight: 700; }

.blog-related-list { display: flex; flex-direction: column; gap: 1rem; }

.blog-related-item {
  display: flex; gap: .85rem; align-items: flex-start;
  text-decoration: none; color: inherit;
  padding: .5rem;
  border-radius: 10px;
  transition: background .15s;
}
.blog-related-item:hover { background: #f3f4f6; }

.blog-related-img {
  width: 80px; height: 80px; flex-shrink: 0;
  border-radius: 8px; overflow: hidden; background: #e5e7eb;
}
.blog-related-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-related-img-placeholder { width: 100%; height: 100%; background: #e5e7eb; }

.blog-related-info { flex: 1; min-width: 0; }
.blog-related-title {
  font-size: 13px; font-weight: 700; line-height: 1.35; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: .3rem;
}
.blog-related-excerpt {
  font-size: 12px; color: var(--text-muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Pagination ── */
.blog-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: .4rem; margin-top: 3rem; flex-wrap: wrap;
}
.blog-page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 .5rem;
  border-radius: 8px; font-size: 14px; font-weight: 500;
  color: var(--text); text-decoration: none;
  border: 1.5px solid var(--border); background: #fff;
  transition: background .15s, border-color .15s, color .15s;
  cursor: pointer;
}
.blog-page-btn:hover:not(.blog-page-active):not(.blog-page-disabled) {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.blog-page-active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.blog-page-disabled { opacity: .35; cursor: default; }
.blog-page-ellipsis { font-size: 14px; color: var(--text-muted); padding: 0 .25rem; line-height: 38px; }
