/* ==========================================================================
   ToolsCrow Blog — Complete Stylesheet
   Font: Inter (body) + Sora (display headings)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Sora:wght@400;600;700;800&display=swap');

/* ── CSS Variables ──────────────────────────────────────────────────────── */
:root {
  --brand:        #1e3a5f;
  --brand-mid:    #2d5f9e;
  --brand-light:  #4a90d9;
  --accent:       #f97316;
  --accent-light: #fff7ed;
  --surface:      #ffffff;
  --surface-2:    #f8fafc;
  --surface-3:    #f1f5f9;
  --border:       #e2e8f0;
  --border-dark:  #cbd5e1;
  --text-primary: #0f172a;
  --text-body:    #334155;
  --text-muted:   #64748b;
  --text-faint:   #94a3b8;
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --radius-xl:    24px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow:       0 4px 12px rgba(0,0,0,.08);
  --shadow-md:    0 8px 24px rgba(0,0,0,.10);
  --shadow-lg:    0 16px 40px rgba(0,0,0,.12);
  --font-display: 'Sora', sans-serif;
  --font-body:    'Inter', sans-serif;
  --transition:   .22s cubic-bezier(.4,0,.2,1);
}

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

body {
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--surface-2);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout Wrapper ─────────────────────────────────────────────────────── */
.blog-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.blog-page-body {
  padding: 32px 0 60px;
}

/* ── HOMEPAGE — Hero Slider ─────────────────────────────────────────────── */
.hero-slider {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 48px;
  background: var(--brand);
  height: 440px;
}

.hero-slider .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .7s ease;
  display: flex;
  align-items: flex-end;
}

.hero-slider .slide.active { opacity: 1; }

.slide-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,.9) 0%, rgba(15,23,42,.3) 60%, transparent 100%);
}

.slide-content {
  position: relative;
  z-index: 2;
  padding: 36px 40px;
  max-width: 680px;
}

.slide-cat {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.slide-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 12px;
}

.slide-title a { color: inherit; text-decoration: none; }
.slide-title a:hover { text-decoration: underline; }

.slide-meta {
  display: flex;
  gap: 16px;
  font-size: .8rem;
  color: rgba(255,255,255,.75);
  flex-wrap: wrap;
}

.hero-controls {
  position: absolute;
  bottom: 20px;
  right: 24px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}

.hero-dot.active {
  width: 24px;
  border-radius: 4px;
  background: #fff;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: .9rem;
}

.hero-arrow:hover { background: rgba(255,255,255,.32); }
.hero-arrow.prev { left: 16px; }
.hero-arrow.next { right: 16px; }

/* ── Breaking / Trending Strip ──────────────────────────────────────────── */
.trending-strip {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 36px;
}

.trending-label {
  background: var(--accent);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 12px 18px;
  white-space: nowrap;
  flex-shrink: 0;
}

.trending-ticker {
  overflow: hidden;
  flex: 1;
  padding: 0 20px;
}

.trending-ticker-inner {
  display: flex;
  animation: ticker 30s linear infinite;
  white-space: nowrap;
  gap: 40px;
}

.trending-ticker-inner:hover { animation-play-state: paused; }

.trending-ticker-inner a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  white-space: nowrap;
}

.trending-ticker-inner a:hover { color: var(--brand-mid); }

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Section Headers ────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 20px;
  background: var(--accent);
  border-radius: 2px;
}

.section-link {
  font-size: .82rem;
  color: var(--brand-mid);
  text-decoration: none;
  font-weight: 500;
}

.section-link:hover { text-decoration: underline; }

/* ── Blog Grid (Homepage) ───────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.blog-grid.two-col { grid-template-columns: repeat(2, 1fr); }

/* ── Blog Card ──────────────────────────────────────────────────────────── */
.blog-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.blog-card-thumb {
  position: relative;
  height: 190px;
  overflow: hidden;
  flex-shrink: 0;
}

.blog-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.blog-card:hover .blog-card-thumb img { transform: scale(1.04); }

.thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.5);
  font-size: 2rem;
}

.card-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  text-decoration: none;
}

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

.card-meta {
  display: flex;
  gap: 14px;
  font-size: .75rem;
  color: var(--text-faint);
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.card-meta a { color: var(--brand-mid); text-decoration: none; }
.card-meta a:hover { text-decoration: underline; }

.blog-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 10px;
  flex: 1;
}

.blog-card-title a { color: inherit; text-decoration: none; }
.blog-card-title a:hover { color: var(--brand-mid); }

.blog-card-excerpt {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: auto;
}

.read-more-link {
  font-size: .8rem;
  font-weight: 600;
  color: var(--brand-mid);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: gap var(--transition);
}

.read-more-link:hover { gap: 9px; }

.view-count {
  font-size: .75rem;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Featured Post (Large Card) ─────────────────────────────────────────── */
.featured-post-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 280px;
  margin-bottom: 24px;
  transition: box-shadow var(--transition);
}

.featured-post-card:hover { box-shadow: var(--shadow-md); }

.featured-post-card .thumb { height: 100%; min-height: 280px; }
.featured-post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }

.featured-post-card .featured-body {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.featured-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 12px;
}

.featured-title a { color: inherit; text-decoration: none; }
.featured-title a:hover { color: var(--brand-mid); }

.featured-excerpt {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 18px;
}

/* ── Homepage Layout (2-col) ────────────────────────────────────────────── */
.home-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

/* ── Sidebar ────────────────────────────────────────────────────────────── */
.blog-sidebar { position: sticky; top: 24px; }

.sidebar-widget {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--brand);
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-title i { color: var(--brand-mid); }

/* Search widget */
.search-form {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius);
  overflow: hidden;
}

.search-form input {
  flex: 1;
  padding: 10px 14px;
  border: none;
  font-family: var(--font-body);
  font-size: .9rem;
  background: var(--surface);
  color: var(--text-primary);
  outline: none;
}

.search-form button {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 0 16px;
  cursor: pointer;
  font-size: .9rem;
  transition: background var(--transition);
}

.search-form button:hover { background: var(--brand-mid); }

/* Category list */
.cat-list { list-style: none; padding: 0; margin: 0; }

.cat-list li { margin-bottom: 6px; }

.cat-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-body);
  text-decoration: none;
  font-size: .88rem;
  transition: background var(--transition), color var(--transition);
}

.cat-list a:hover {
  background: var(--brand);
  color: #fff;
}

.cat-list a:hover .cat-count { background: rgba(255,255,255,.25); color: #fff; }

.cat-count {
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  transition: background var(--transition), color var(--transition);
}

/* Popular posts sidebar */
.popular-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.popular-item:last-child { border-bottom: none; padding-bottom: 0; }
.popular-item:first-child { padding-top: 0; }

.popular-thumb {
  width: 64px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  display: flex;
  align-items: center;
  justify-content: center;
}

.popular-thumb img { width: 100%; height: 100%; object-fit: cover; }
.popular-thumb i { color: rgba(255,255,255,.6); font-size: 1.1rem; }

.popular-info h4 {
  font-size: .83rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
}

.popular-info h4 a { color: var(--text-primary); text-decoration: none; }
.popular-info h4 a:hover { color: var(--brand-mid); }

.popular-date {
  font-size: .72rem;
  color: var(--text-faint);
}

/* Tags cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }

.tag-pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 500;
  background: var(--surface-3);
  color: var(--text-muted);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.tag-pill:hover { background: var(--brand); color: #fff; }

/* Newsletter widget */
.newsletter-widget {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-mid) 100%);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  margin-bottom: 22px;
}

.newsletter-widget h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.newsletter-widget p {
  font-size: .82rem;
  color: rgba(255,255,255,.78);
  margin-bottom: 14px;
}

.newsletter-widget input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: .9rem;
  margin-bottom: 10px;
  font-family: var(--font-body);
}

.newsletter-widget button {
  width: 100%;
  padding: 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: opacity var(--transition);
}

.newsletter-widget button:hover { opacity: .88; }

/* Tools sidebar widget */
.tool-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-body);
  transition: color var(--transition);
}

.tool-item:last-child { border-bottom: none; }
.tool-item:hover { color: var(--brand-mid); }

.tool-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tool-icon-badge i { color: #fff; font-size: .9rem; }
.tool-item span { font-size: .85rem; font-weight: 500; }

/* ── Categories Grid Section ────────────────────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 40px;
}

.cat-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 14px;
  text-align: center;
  text-decoration: none;
  color: var(--text-body);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cat-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-mid);
  box-shadow: var(--shadow);
}

.cat-card-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.cat-card-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.cat-card-count {
  font-size: .72rem;
  color: var(--text-faint);
}

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

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-body);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.page-btn:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.page-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  font-weight: 700;
}

.page-btn.disabled { opacity: .45; pointer-events: none; }

/* ── POST PAGE Layout ───────────────────────────────────────────────────── */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

/* ── Post Header ────────────────────────────────────────────────────────── */
.post-header-wrap {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.post-featured-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

.post-header-body { padding: 30px 34px 24px; }

.post-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--text-faint);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.post-breadcrumb a { color: var(--brand-mid); text-decoration: none; }
.post-breadcrumb a:hover { text-decoration: underline; }
.post-breadcrumb i { font-size: .6rem; }

.post-cat-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
  text-decoration: none;
}

.post-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 16px;
}

.post-meta-bar {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: .8rem;
  color: var(--text-muted);
}

.post-meta-bar a { color: var(--brand-mid); text-decoration: none; }
.post-meta-bar a:hover { text-decoration: underline; }

.post-meta-bar .meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── Article Body ───────────────────────────────────────────────────────── */
.post-article {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 34px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text-body);
}

/* Headings inside content */
.post-article h1,
.post-article h2,
.post-article h3,
.post-article h4,
.post-article h5,
.post-article h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.3;
  margin: 2rem 0 1rem;
}

.post-article h2 {
  font-size: 1.45rem;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.post-article h3 { font-size: 1.2rem; font-weight: 700; }
.post-article h4 { font-size: 1.05rem; font-weight: 600; }

/* Paragraph */
.post-article p { margin: 1rem 0; }

/* Links */
.post-article a {
  color: var(--brand-mid);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-article a:hover { color: var(--brand); }

/* Lists */
.post-article ul,
.post-article ol {
  margin: 1rem 0;
  padding-left: 1.6rem;
}

.post-article li { margin: .45rem 0; }

.post-article ul li::marker { color: var(--accent); }

/* Images */
.post-article img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1.5rem auto;
  display: block;
  border: 1px solid var(--border);
}

.post-article figure {
  margin: 1.5rem 0;
  text-align: center;
}

.post-article figcaption {
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-style: italic;
}

/* Blockquote */
.post-article blockquote {
  margin: 1.5rem 0;
  padding: 18px 24px;
  border-left: 4px solid var(--brand-mid);
  background: var(--surface-3);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-primary);
  position: relative;
}

.post-article blockquote::before {
  content: '\201C';
  font-size: 3.5rem;
  color: var(--brand-light);
  line-height: 0;
  position: absolute;
  top: 24px;
  left: 10px;
  opacity: .3;
  font-family: Georgia, serif;
}

.post-article blockquote p { margin: 0; padding-left: 10px; }

.post-article blockquote cite {
  display: block;
  font-size: .8rem;
  font-style: normal;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 8px;
  padding-left: 10px;
}

/* Code */
.post-article code {
  background: #f1f5f9;
  color: #c7254e;
  font-size: .88em;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Fira Code', 'Cascadia Code', monospace;
}

.post-article pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 20px 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: .9rem;
  line-height: 1.6;
}

.post-article pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

/* Tables */
.post-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .92rem;
  overflow-x: auto;
  display: block;
}

.post-article thead th {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  padding: 11px 16px;
  text-align: left;
  font-size: .85rem;
  letter-spacing: .03em;
}

.post-article tbody tr { border-bottom: 1px solid var(--border); }
.post-article tbody tr:hover { background: var(--surface-3); }

.post-article td {
  padding: 10px 16px;
  color: var(--text-body);
}

/* Horizontal rule */
.post-article hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 2.5rem 0;
}

/* Info / Note boxes */
.post-article .note,
.post-article .info-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 1.5rem 0;
  font-size: .92rem;
}

.post-article .note-warning {
  background: #fffbeb;
  border-color: #fde68a;
}

.post-article .note-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.post-article .note-danger {
  background: #fef2f2;
  border-color: #fecaca;
}

/* Embeds */
.post-article iframe,
.post-article video {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 1rem 0;
  display: block;
}

/* ── Share Bar ───────────────────────────────────────────────────────────── */
.share-bar {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 18px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.share-label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-right: 4px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  transition: opacity var(--transition), transform var(--transition);
}

.share-btn:hover { opacity: .88; transform: translateY(-1px); }
.share-btn.twitter  { background: #1da1f2; }
.share-btn.facebook { background: #1877f2; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.linkedin { background: #0a66c2; }
.share-btn.copy-link { background: var(--text-muted); }

/* ── Author Box ─────────────────────────────────────────────────────────── */
.author-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 26px 28px;
  margin-bottom: 24px;
  display: flex;
  gap: 22px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
}

.author-avatar-wrap {
  flex-shrink: 0;
}

.author-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
}

.author-avatar-initials {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}

.author-info h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.author-info h4 a { color: var(--text-primary); text-decoration: none; }
.author-info h4 a:hover { color: var(--brand-mid); }

.author-role {
  font-size: .78rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}

.author-bio {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 10px;
}

.author-socials {
  display: flex;
  gap: 8px;
}

.author-social {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: .8rem;
  transition: background var(--transition), color var(--transition);
}

.author-social:hover { background: var(--brand); color: #fff; }

/* ── Related Posts ───────────────────────────────────────────────────────── */
.related-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.related-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  background: var(--surface);
}

.related-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.related-card-thumb {
  height: 120px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.5);
}

.related-card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.related-card-body { padding: 12px; }

.related-card-body h4 {
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 5px;
}

.related-card-body h4 a { color: var(--text-primary); text-decoration: none; }
.related-card-body h4 a:hover { color: var(--brand-mid); }

.related-card-body .date { font-size: .72rem; color: var(--text-faint); }

/* ── Tool CTA Block ─────────────────────────────────────────────────────── */
.tool-cta-block {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-mid) 100%);
  border-radius: var(--radius-lg);
  padding: 30px 32px;
  text-align: center;
  color: #fff;
  margin-bottom: 24px;
}

.tool-cta-block h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.tool-cta-block p { font-size: .9rem; color: rgba(255,255,255,.8); margin-bottom: 18px; }

.btn-cta {
  display: inline-block;
  background: #fff;
  color: var(--brand);
  font-weight: 700;
  font-size: .9rem;
  padding: 11px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

/* ── Related Tools Grid ─────────────────────────────────────────────────── */
.related-tools-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.related-tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.tool-mini-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
  text-decoration: none;
  color: var(--text-body);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.tool-mini-card:hover {
  border-color: var(--brand-mid);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  color: var(--brand-mid);
}

.tool-mini-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .9rem;
}

.tool-mini-name {
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

.tool-mini-card:hover .tool-mini-name { color: var(--brand-mid); }

.tool-mini-desc {
  font-size: .7rem;
  color: var(--text-faint);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Comments Section ───────────────────────────────────────────────────── */
.comments-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 32px 34px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.comments-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
}

.comment-item {
  display: flex;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.comment-item:last-child { border-bottom: none; }

.comment-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  font-size: .95rem;
  flex-shrink: 0;
}

.comment-body { flex: 1; }

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.comment-author {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.comment-date {
  font-size: .75rem;
  color: var(--text-faint);
}

.comment-text {
  font-size: .9rem;
  color: var(--text-body);
  line-height: 1.65;
}

/* Comment Form */
.comment-form-wrap {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 28px;
  border: 1px solid var(--border);
}

.comment-form-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group { margin-bottom: 14px; }

.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-body);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--text-primary);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--brand-mid);
  box-shadow: 0 0 0 3px rgba(45,95,158,.12);
}

.form-group textarea { min-height: 110px; }

.submit-btn {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.submit-btn:hover { background: var(--brand-mid); transform: translateY(-1px); }
.submit-btn:active { transform: none; }

.comment-notice {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--surface-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* ── TOC (Table of Contents) ────────────────────────────────────────────── */
.toc-widget {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 22px;
}

.toc-title {
  font-family: var(--font-display);
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}

.toc-list li {
  counter-increment: toc;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: .83rem;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.toc-list li:last-child { border-bottom: none; }

.toc-list li::before {
  content: counter(toc);
  color: var(--brand-mid);
  font-weight: 700;
  font-size: .75rem;
  min-width: 16px;
  flex-shrink: 0;
}

.toc-list a { color: var(--text-body); text-decoration: none; }
.toc-list a:hover { color: var(--brand-mid); }

/* ── Profile Page ───────────────────────────────────────────────────────── */
.profile-hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-mid) 60%, var(--brand-light) 100%);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  display: flex;
  gap: 32px;
  align-items: center;
  margin-bottom: 40px;
  color: #fff;
}

.profile-avatar-wrap {
  flex-shrink: 0;
  text-align: center;
}

.profile-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.profile-socials-hero {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.profile-social-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-size: .85rem;
  transition: background var(--transition);
}

.profile-social-btn:hover { background: rgba(255,255,255,.35); color: #fff; }

.profile-info h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.profile-role {
  font-size: .88rem;
  font-weight: 600;
  opacity: .78;
  margin-bottom: 14px;
  letter-spacing: .04em;
}

.profile-bio {
  font-size: .97rem;
  line-height: 1.7;
  opacity: .88;
  max-width: 560px;
  margin-bottom: 18px;
}

.profile-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.p-stat { text-align: center; }
.p-stat strong { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; }
.p-stat span { font-size: .78rem; opacity: .75; }

.profile-posts-section {
  max-width: 900px;
  margin: 0 auto;
}

/* ── Notices / Alerts ───────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: .9rem;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ── No Results ─────────────────────────────────────────────────────────── */
.no-results {
  text-align: center;
  padding: 64px 24px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.no-results i { font-size: 3rem; color: var(--text-faint); margin-bottom: 16px; display: block; }
.no-results h3 { font-family: var(--font-display); color: var(--text-primary); margin-bottom: 8px; }
.no-results p { color: var(--text-muted); font-size: .9rem; margin-bottom: 18px; }

.btn-primary {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  transition: background var(--transition), transform var(--transition);
}

.btn-primary:hover { background: var(--brand-mid); transform: translateY(-1px); }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .home-layout,
  .post-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; }
  .categories-grid { grid-template-columns: repeat(4, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .related-tools-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .hero-slider { height: 320px; }
  .slide-content { padding: 24px 20px; }
  .blog-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .related-grid { grid-template-columns: 1fr; }
  .related-tools-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-post-card { grid-template-columns: 1fr; }
  .featured-post-card .thumb { min-height: 200px; }
  .form-row { grid-template-columns: 1fr; }
  .post-header-body { padding: 20px; }
  .post-article { padding: 20px; }
  .author-box { flex-direction: column; }
  .profile-hero { flex-direction: column; text-align: center; }
  .profile-bio { margin: 0 auto; }
  .profile-stats { justify-content: center; }
  .share-bar { gap: 8px; }
  .share-btn { font-size: .75rem; padding: 7px 10px; }
}

@media (max-width: 480px) {
  .hero-slider { height: 260px; border-radius: var(--radius-lg); }
  .slide-title { font-size: 1.15rem; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-wrap { padding: 0 14px; }
  .post-meta-bar { gap: 10px; font-size: .75rem; }
  .comments-section { padding: 20px; }
}

/* ── Utility Classes ────────────────────────────────────────────────────── */
.mt-0  { margin-top: 0; }
.mb-24 { margin-bottom: 24px; }
.mb-40 { margin-bottom: 40px; }
.text-center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
