/*
 * Blog — Archive & Single Post
 * CloudTech Services Theme
 * ─────────────────────────────────────────────────────────────────────────────
 */

/* ══════════════════════════════════════════════════════════════════════════
   SHARED BASE
   ══════════════════════════════════════════════════════════════════════════ */
.blog-wrap {
  max-width: 1240px; margin: 0 auto; padding: 0 1.5rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   ARCHIVE — Page Hero
   ══════════════════════════════════════════════════════════════════════════ */
.blog-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #060f1e 0%, #0c1e3a 50%, #0d2d52 100%);
  padding: 5rem 1.5rem 4.5rem; text-align: center;
}
.blog-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 60% at 20% 30%, rgba(14,165,233,0.2) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 80% 70%, rgba(99,102,241,0.15) 0%, transparent 50%);
}
.blog-hero::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56,189,248,0.7) 40%, rgba(99,102,241,0.5) 65%, transparent);
}
.blog-hero-inner { position: relative; z-index: 2; max-width: 680px; margin: 0 auto; }
.blog-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: rgba(14,165,233,0.12); border: 1px solid rgba(14,165,233,0.28);
  border-radius: 999px; padding: 0.35rem 1rem;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: #38bdf8; margin-bottom: 1.1rem;
}
.blog-hero-eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #38bdf8; box-shadow: 0 0 6px rgba(56,189,248,0.8);
}
.blog-hero-title {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; color: #fff;
  letter-spacing: -0.04em; line-height: 1.15; margin: 0 0 0.85rem;
}
.blog-hero-desc {
  font-size: 1.05rem; color: rgba(255,255,255,0.65); line-height: 1.7; margin: 0;
}
.blog-hero-desc--rich { font-size: 1.05rem; color: rgba(255,255,255,0.65); line-height: 1.7; margin: 0; }
.blog-hero-desc--rich p { margin: 0 0 0.65rem; }
.blog-hero-desc--rich p:last-child { margin-bottom: 0; }

/* Hero search */
.blog-hero-search {
  display: flex; align-items: center; gap: 0;
  background: rgba(255,255,255,0.12); backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 14px; overflow: hidden;
  max-width: 480px; margin: 1.75rem auto 0;
}
.blog-hero-search-input {
  flex: 1; background: transparent; border: none; outline: none;
  padding: 0.85rem 1.1rem; font-size: 0.95rem; color: #fff;
  font-family: inherit;
}
.blog-hero-search-input::placeholder { color: rgba(255,255,255,0.55); }
.blog-hero-search-btn {
  background: rgba(255,255,255,0.18); border: none; cursor: pointer;
  padding: 0 1.1rem; height: 100%; color: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; min-height: 50px;
}
.blog-hero-search-btn:hover { background: rgba(255,255,255,0.28); }

/* ══════════════════════════════════════════════════════════════════════════
   CHUYÊN MỤC — Section cards (trang tin tức chính)
   ══════════════════════════════════════════════════════════════════════════ */
.blog-cats-section {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 2.5rem 0 3rem;
}
.blog-cats-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 1.5rem; gap: 1rem;
}
.blog-cats-title {
  font-size: 1.25rem; font-weight: 800; color: #0f172a;
  margin: 0 0 0.3rem; letter-spacing: -0.025em;
}
.blog-cats-sub {
  margin: 0; font-size: 0.9rem; color: #64748b;
}
.blog-cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1rem;
}
.blog-cat-card {
  position: relative; overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--cat-from, #0ea5e9), var(--cat-to, #0369a1));
  padding: 1.4rem 1.2rem 1.1rem;
  text-decoration: none; color: #fff;
  display: flex; flex-direction: column; gap: 0.35rem;
  min-height: 110px;
  transition: transform 0.22s, box-shadow 0.22s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.blog-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}
.blog-cat-card-icon {
  position: absolute; bottom: -8px; right: -6px;
  opacity: 0.18; transform: rotate(-10deg);
  pointer-events: none;
  width: 56px; height: 56px;
}
.blog-cat-card-name {
  font-size: 0.95rem; font-weight: 700; line-height: 1.35;
  position: relative; z-index: 1;
}
.blog-cat-card-count {
  font-size: 0.78rem; opacity: 0.85;
  position: relative; z-index: 1;
}

/* ══════════════════════════════════════════════════════════════════════════
   ARCHIVE — Layout
   ══════════════════════════════════════════════════════════════════════════ */
.blog-layout {
  display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem;
  padding: 2.75rem 0 4rem; align-items: start;
}
.blog-main { min-width: 0; }

/* ══════════════════════════════════════════════════════════════════════════
   Bài FEATURED (bài đầu tiên)
   ══════════════════════════════════════════════════════════════════════════ */
.blog-featured {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-radius: 20px; overflow: hidden;
  border: 1.5px solid #e2e8f0;
  text-decoration: none; color: inherit;
  margin-bottom: 1.75rem;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  background: #fff;
  min-height: 280px;
}
.blog-featured:hover {
  border-color: rgba(14,165,233,0.4);
  box-shadow: 0 16px 48px rgba(14,165,233,0.12);
  transform: translateY(-3px);
}
.blog-featured-thumb {
  position: relative; overflow: hidden;
  min-height: 260px;
  background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 100%);
}
.blog-featured-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.45s ease;
}
.blog-featured:hover .blog-featured-thumb img { transform: scale(1.06); }
.blog-featured-thumb-placeholder {
  width: 100%; height: 100%; min-height: 260px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.75rem; color: rgba(255,255,255,0.6); font-size: 0.9rem;
  font-weight: 600;
}
.blog-featured-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6,15,30,0.5) 0%, transparent 60%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.25rem 1.25rem;
  gap: 0.5rem;
}
.blog-featured-cat {
  display: inline-block;
  background: rgba(14,165,233,0.9); backdrop-filter: blur(4px);
  color: #fff; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.25rem 0.65rem; border-radius: 999px;
  align-self: flex-start;
}
.blog-featured-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: rgba(245,158,11,0.9); backdrop-filter: blur(4px);
  color: #fff; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.6rem; border-radius: 999px;
  align-self: flex-start;
}
.blog-featured-body {
  padding: 1.75rem 1.75rem 1.75rem;
  display: flex; flex-direction: column; justify-content: center;
}
.blog-featured-meta {
  display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap;
  font-size: 0.78rem; color: #94a3b8; margin-bottom: 0.85rem;
}
.blog-featured-date, .blog-featured-author, .blog-featured-time {
  display: flex; align-items: center; gap: 0.3rem;
}
.blog-featured-title {
  font-size: clamp(1.05rem, 2vw, 1.4rem); font-weight: 800;
  color: #0f172a; line-height: 1.35; letter-spacing: -0.025em;
  margin: 0 0 0.85rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-featured-excerpt {
  font-size: 0.88rem; color: #64748b; line-height: 1.7;
  margin: 0 0 1.25rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}
.blog-featured-cta {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.88rem; font-weight: 700; color: #0ea5e9;
  transition: gap 0.2s;
}
.blog-featured:hover .blog-featured-cta { gap: 0.6rem; }

/* ══════════════════════════════════════════════════════════════════════════
   ARCHIVE — Post Cards (grid)
   ══════════════════════════════════════════════════════════════════════════ */
.blog-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem;
}
.blog-card {
  background: #fff; border: 1.5px solid #e2e8f0;
  border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  text-decoration: none; color: inherit;
}
.blog-card:hover {
  border-color: rgba(14,165,233,0.35);
  box-shadow: 0 10px 32px rgba(14,165,233,0.1);
  transform: translateY(-4px);
}
.blog-card-thumb {
  position: relative; overflow: hidden;
  aspect-ratio: 16/9; background: #e2e8f0;
}
.blog-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.45s ease; display: block;
}
.blog-card:hover .blog-card-thumb img { transform: scale(1.06); }
.blog-card-thumb-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #0c1e3a 0%, #0369a1 100%);
  display: flex; align-items: center; justify-content: center;
}
.blog-card-placeholder-letter {
  font-size: 2.25rem; font-weight: 900; color: rgba(255,255,255,0.35);
  letter-spacing: -0.04em; line-height: 1; font-style: italic;
  text-transform: uppercase;
}
.blog-card-cat {
  position: absolute; top: 0.6rem; left: 0.6rem;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0.22rem 0.6rem; border-radius: 999px;
  box-shadow: 0 3px 10px rgba(14,165,233,0.35);
}
.blog-card-body { padding: 1.1rem 1.2rem 1.2rem; flex: 1; display: flex; flex-direction: column; }
.blog-card-meta {
  display: flex; align-items: center; gap: 0.65rem;
  font-size: 0.75rem; color: #94a3b8; margin-bottom: 0.6rem; flex-wrap: wrap;
}
.blog-card-meta-item { display: flex; align-items: center; gap: 0.3rem; }
.blog-card-meta svg { opacity: 0.75; }
.blog-card-title {
  font-size: 0.95rem; font-weight: 700; color: #0f172a;
  line-height: 1.45; margin: 0 0 0.5rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card-excerpt {
  font-size: 0.82rem; color: #64748b; line-height: 1.65; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}
.blog-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 0.9rem; padding-top: 0.85rem;
  border-top: 1px solid #f1f5f9;
}
.blog-card-author {
  display: flex; align-items: center; gap: 0.3rem;
  font-size: 0.75rem; color: #94a3b8;
}
.blog-card-read {
  font-size: 0.8rem; font-weight: 700; color: #0ea5e9;
  display: flex; align-items: center; gap: 0.25rem;
  transition: gap 0.2s;
}
.blog-card:hover .blog-card-read { gap: 0.45rem; }

/* ── Empty ── */
.blog-empty {
  text-align: center; padding: 4rem 2rem;
  color: #64748b; font-size: 1rem;
}

/* ── Pagination ── */
.blog-pagination {
  margin-top: 2.5rem; display: flex; justify-content: center;
}
.blog-pagination .nav-links {
  display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: center;
}
.blog-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  font-size: 0.88rem; font-weight: 600; text-decoration: none;
  background: #fff; border: 1.5px solid #e2e8f0; color: #334155;
  transition: all 0.2s;
}
.blog-pagination .page-numbers:hover,
.blog-pagination .page-numbers.current {
  background: #0ea5e9; border-color: #0ea5e9; color: #fff;
  box-shadow: 0 4px 14px rgba(14,165,233,0.3);
}
.blog-pagination .page-numbers.dots {
  background: transparent; border-color: transparent;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════════════════════════ */
.blog-sidebar {
  position: sticky; top: 90px;
  display: flex; flex-direction: column; gap: 1.5rem;
}
.sidebar-widget {
  background: #fff; border: 1.5px solid #e2e8f0;
  border-radius: 18px; padding: 1.5rem 1.4rem; overflow: hidden;
}
.sidebar-widget-title {
  font-size: 0.82rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: #0ea5e9; margin: 0 0 1.15rem;
  padding-bottom: 0.85rem; border-bottom: 1.5px solid #e0f2fe;
  display: flex; align-items: center; gap: 0.5rem;
}
.sidebar-widget-title svg { opacity: 0.85; }

/* Search widget */
.sidebar-search { display: flex; gap: 0.5rem; }
.sidebar-search-input {
  flex: 1; border: 1.5px solid #e2e8f0; border-radius: 10px;
  padding: 0.6rem 0.85rem; font-size: 0.88rem; color: #0f172a;
  background: #f8fafc; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.sidebar-search-input:focus {
  border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14,165,233,0.12);
}
.sidebar-search-btn {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff; border: none; border-radius: 10px;
  width: 38px; height: 38px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.2s;
}
.sidebar-search-btn:hover { opacity: 0.85; }

/* Recent posts widget */
.sidebar-posts { display: flex; flex-direction: column; gap: 0.9rem; }
.sidebar-post { display: flex; gap: 0.85rem; text-decoration: none; color: inherit; }
.sidebar-post-thumb {
  width: 64px; height: 64px; border-radius: 10px; flex-shrink: 0;
  overflow: hidden; background: #e0f2fe;
}
.sidebar-post-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.3s;
}
.sidebar-post:hover .sidebar-post-thumb img { transform: scale(1.08); }
.sidebar-post-thumb-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #0c1e3a, #0369a1);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 900;
  color: rgba(255,255,255,0.45); text-transform: uppercase;
}
.sidebar-post-info { flex: 1; min-width: 0; }
.sidebar-post-title {
  font-size: 0.85rem; font-weight: 600; color: #0f172a; line-height: 1.4;
  margin: 0 0 0.25rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color 0.2s;
}
.sidebar-post:hover .sidebar-post-title { color: #0ea5e9; }
.sidebar-post-date { font-size: 0.76rem; color: #94a3b8; }

/* Categories widget */
.sidebar-cats { display: flex; flex-direction: column; gap: 0.4rem; }
.sidebar-cat {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.55rem 0.7rem; border-radius: 10px;
  text-decoration: none; color: #334155; font-size: 0.88rem;
  transition: background 0.18s, color 0.18s;
}
.sidebar-cat:hover { background: #f0f9ff; color: #0ea5e9; }
.sidebar-cat-count {
  background: #e0f2fe; color: #0284c7; font-size: 0.75rem; font-weight: 700;
  padding: 0.15rem 0.55rem; border-radius: 999px;
}

/* Tags widget */
.sidebar-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.sidebar-tag {
  display: inline-block; padding: 0.3rem 0.8rem;
  background: #f8fafc; border: 1.5px solid #e2e8f0;
  border-radius: 999px; font-size: 0.8rem; color: #475569;
  text-decoration: none; transition: all 0.2s;
}
.sidebar-tag:hover {
  background: #0ea5e9; border-color: #0ea5e9; color: #fff;
}

/* ══════════════════════════════════════════════════════════════════════════
   SINGLE POST — Layout
   ══════════════════════════════════════════════════════════════════════════ */
.post-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f8faff 100%);
  border-bottom: 1.5px solid #bae6fd;
}
/* Khi có featured image làm BG */
.post-hero--has-bg {
  min-height: 340px; display: flex; align-items: flex-end;
  background: linear-gradient(135deg, #060f1e 0%, #0c1e3a 60%, #0d2d52 100%);
}
.post-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(0.38);
}
.post-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6,15,30,0.92) 0%, rgba(6,15,30,0.35) 65%, transparent 100%);
}
.post-hero-inner {
  position: relative; z-index: 2;
  max-width: 820px; margin: 0 auto;
  padding: 2.5rem 1.5rem 2.25rem;
  width: 100%;
}
/* Màu text mặc định (nền sáng) */
.post-hero-cats { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.post-hero-cat {
  display: inline-block;
  background: #0ea5e9; color: #fff;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 0.25rem 0.75rem; border-radius: 999px;
  text-decoration: none;
}
.post-hero-title {
  font-size: clamp(1.45rem, 3vw, 2.2rem); font-weight: 800;
  color: #0f172a; line-height: 1.25; letter-spacing: -0.035em;
  margin: 0 0 0.9rem;
}
.post-hero-meta {
  display: flex; align-items: center; gap: 1.1rem;
  flex-wrap: wrap; font-size: 0.82rem; color: #64748b;
}
.post-hero-meta-item { display: flex; align-items: center; gap: 0.35rem; }
.post-hero-meta svg { opacity: 0.6; }
.post-hero-meta a { color: #0ea5e9; text-decoration: none; }
.post-hero-meta a:hover { color: #0284c7; }
/* Khi có ảnh nền: chuyển text sang trắng */
.post-hero--has-bg .post-hero-title { color: #fff; }
.post-hero--has-bg .post-hero-meta  { color: rgba(255,255,255,0.65); }
.post-hero--has-bg .post-hero-meta a { color: rgba(255,255,255,0.85); }
.post-hero--has-bg .post-hero-meta a:hover { color: #38bdf8; }

/* ── Reading progress bar ── */
.post-progress {
  position: fixed; top: 0; left: 0; z-index: 9999;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, #0ea5e9, #38bdf8, #7c3aed);
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ── Single layout ── */
.post-layout {
  display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem;
  max-width: 1160px; margin: 0 auto; padding: 3rem 1.5rem 4rem;
  align-items: start;
}

/* ── Article content ── */
.post-article { min-width: 0; }
.post-content {
  font-size: 1.02rem; line-height: 1.85; color: #334155;
}
.post-content h2 {
  font-size: 1.55rem; font-weight: 800; color: #0f172a;
  margin: 2.25rem 0 0.9rem; letter-spacing: -0.03em;
  padding-bottom: 0.5rem; border-bottom: 2px solid #e0f2fe;
}
.post-content h3 {
  font-size: 1.2rem; font-weight: 700; color: #0f172a;
  margin: 1.75rem 0 0.7rem;
}
.post-content h4 { font-size: 1rem; font-weight: 700; color: #1e293b; margin: 1.5rem 0 0.6rem; }
.post-content p { margin: 0 0 1.25rem; }
.post-content a { color: #0ea5e9; text-decoration: underline; text-decoration-color: rgba(14,165,233,0.35); }
.post-content a:hover { text-decoration-color: #0ea5e9; }
.post-content ul, .post-content ol { padding-left: 1.5rem; margin: 0 0 1.25rem; }
.post-content li { margin-bottom: 0.45rem; }
.post-content blockquote {
  margin: 1.75rem 0; padding: 1.25rem 1.5rem;
  border-left: 4px solid #0ea5e9;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border-radius: 0 14px 14px 0;
  font-style: italic; color: #1e4e8c; font-size: 1.05rem;
}
.post-content img {
  max-width: 100%; height: auto; border-radius: 14px;
  box-shadow: 0 8px 28px rgba(15,23,42,0.1); margin: 0.5rem 0;
}
.post-content pre {
  background: #0f172a; color: #e2e8f0;
  border-radius: 12px; padding: 1.25rem 1.5rem;
  overflow-x: auto; font-size: 0.87rem; line-height: 1.65;
  margin: 1.5rem 0;
}
.post-content code {
  background: #f0f9ff; color: #0369a1;
  padding: 0.15rem 0.45rem; border-radius: 5px;
  font-size: 0.88em;
}
.post-content pre code { background: none; color: inherit; padding: 0; }
.post-content table {
  width: 100%; border-collapse: collapse; margin: 1.5rem 0;
  font-size: 0.9rem;
}
.post-content th {
  background: #f0f9ff; color: #0369a1;
  padding: 0.7rem 1rem; text-align: left; font-weight: 700;
  border-bottom: 2px solid #bae6fd;
}
.post-content td {
  padding: 0.65rem 1rem; border-bottom: 1px solid #f1f5f9; color: #334155;
}
.post-content tr:last-child td { border-bottom: none; }

/* ── Tags footer ── */
.post-tags {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  margin-top: 2.25rem; padding-top: 1.5rem; border-top: 1.5px solid #e2e8f0;
}
.post-tags-label { font-size: 0.82rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.06em; }
.post-tag {
  display: inline-block; padding: 0.3rem 0.8rem;
  background: #f8fafc; border: 1.5px solid #e2e8f0;
  border-radius: 999px; font-size: 0.8rem; color: #475569;
  text-decoration: none; transition: all 0.2s;
}
.post-tag:hover { background: #0ea5e9; border-color: #0ea5e9; color: #fff; }

/* ── Author box ── */
.post-author {
  margin-top: 2.25rem; padding: 1.5rem;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border-radius: 18px; border: 1.5px solid #bae6fd;
  display: flex; gap: 1.25rem; align-items: flex-start;
}
.post-author-avatar {
  width: 68px; height: 68px; border-radius: 50%; flex-shrink: 0;
  overflow: hidden; border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(14,165,233,0.2);
}
.post-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-author-info { flex: 1; }
.post-author-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #0ea5e9; margin-bottom: 0.2rem; }
.post-author-name { font-size: 1rem; font-weight: 700; color: #0f172a; margin: 0 0 0.4rem; }
.post-author-bio { font-size: 0.86rem; color: #475569; line-height: 1.65; margin: 0; }

/* ── Post navigation ── */
.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  margin-top: 2.25rem;
}
.post-nav-item {
  padding: 1.1rem 1.25rem; border-radius: 14px;
  background: #fff; border: 1.5px solid #e2e8f0;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 0.3rem;
  transition: border-color 0.22s, box-shadow 0.22s;
}
.post-nav-item:hover {
  border-color: rgba(14,165,233,0.35);
  box-shadow: 0 6px 20px rgba(14,165,233,0.1);
}
.post-nav-item--next { text-align: right; }
.post-nav-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #94a3b8; }
.post-nav-title { font-size: 0.9rem; font-weight: 600; color: #1e293b; line-height: 1.4; }

/* ── Related posts ── */
.post-related { margin-top: 3rem; }
.post-related-title {
  font-size: 1.25rem; font-weight: 800; color: #0f172a;
  margin: 0 0 1.35rem; padding-bottom: 0.75rem;
  border-bottom: 2px solid #e0f2fe;
  display: flex; align-items: center; gap: 0.6rem;
}
.post-related-title svg { color: #0ea5e9; }
.post-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.post-related-card {
  background: #fff; border: 1.5px solid #e2e8f0; border-radius: 14px;
  overflow: hidden; text-decoration: none; color: inherit;
  transition: border-color 0.22s, box-shadow 0.22s, transform 0.22s;
}
.post-related-card:hover {
  border-color: rgba(14,165,233,0.3);
  box-shadow: 0 8px 24px rgba(14,165,233,0.1);
  transform: translateY(-3px);
}
.post-related-thumb {
  aspect-ratio: 16/9; overflow: hidden; background: #e0f2fe;
}
.post-related-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.4s;
}
.post-related-card:hover .post-related-thumb img { transform: scale(1.06); }
.post-related-body { padding: 1rem 1.1rem 1.2rem; }
.post-related-cat { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #0ea5e9; margin-bottom: 0.35rem; }
.post-related-title-text {
  font-size: 0.88rem; font-weight: 700; color: #0f172a; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-related-date { font-size: 0.76rem; color: #94a3b8; margin-top: 0.4rem; }

/* ── Sticky sidebar TOC ── */
.post-sidebar { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 1.5rem; }
.post-toc {
  background: #fff; border: 1.5px solid #e2e8f0;
  border-radius: 18px; padding: 1.4rem; overflow: hidden;
}
.post-toc-title {
  font-size: 0.82rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: #0ea5e9;
  margin: 0 0 1rem; padding-bottom: 0.75rem; border-bottom: 1.5px solid #e0f2fe;
  display: flex; align-items: center; gap: 0.5rem;
}
.post-toc-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.post-toc-item {}
.post-toc-link {
  display: block; padding: 0.42rem 0.6rem; border-radius: 8px;
  font-size: 0.85rem; color: #475569; text-decoration: none;
  transition: background 0.18s, color 0.18s;
  border-left: 2px solid transparent;
}
.post-toc-link:hover,
.post-toc-link.active {
  background: #f0f9ff; color: #0ea5e9;
  border-left-color: #0ea5e9;
}
.post-toc-item--h3 .post-toc-link { padding-left: 1.2rem; font-size: 0.82rem; }

/* Share widget */
.post-share {
  background: #fff; border: 1.5px solid #e2e8f0;
  border-radius: 18px; padding: 1.4rem; text-align: center;
}
.post-share-title {
  font-size: 0.82rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: #64748b; margin: 0 0 1rem;
}
.post-share-btns { display: flex; flex-direction: column; gap: 0.55rem; }
.post-share-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.65rem 1rem; border-radius: 10px; font-size: 0.83rem; font-weight: 600;
  text-decoration: none; transition: opacity 0.2s, transform 0.2s;
}
.post-share-btn:hover { opacity: 0.88; transform: translateX(2px); }
.post-share-btn--fb  { background: #1877f2; color: #fff; }
.post-share-btn--tw  { background: #0f1419; color: #fff; }
.post-share-btn--copy { background: #f1f5f9; color: #334155; border: 1.5px solid #e2e8f0; }

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .blog-layout   { grid-template-columns: 1fr; }
  .blog-sidebar  { position: static; display: grid; grid-template-columns: repeat(2, 1fr); }
  .post-layout   { grid-template-columns: 1fr; }
  .post-sidebar  { position: static; display: grid; grid-template-columns: repeat(2, 1fr); }
  .post-related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .blog-featured { grid-template-columns: 1fr; min-height: unset; }
  .blog-featured-thumb { min-height: 200px; }
  .blog-featured-body { padding: 1.35rem; }
  .blog-cats-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-sidebar { grid-template-columns: 1fr; }
  .post-sidebar { grid-template-columns: 1fr; }
  .post-related-grid { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .post-author { flex-direction: column; align-items: center; text-align: center; }
  .blog-hero { padding: 3.5rem 1.25rem 3rem; }
  .post-hero-inner { padding: 1.75rem 1.25rem 1.75rem; }
  .blog-hero-search { max-width: 100%; }
}
@media (max-width: 480px) {
  .blog-card-body { padding: 1rem 1rem 1.1rem; }
  .blog-cats-section { padding: 2rem 0 2.5rem; }
  .blog-cats-grid { grid-template-columns: repeat(2, 1fr); }
}
