/* MicroHub Blog — visual enhancement layer */

:root {
  --enh-accent: #0d9488;
  --enh-accent-2: #6366f1;
  --enh-ink: #0f172a;
}

/* ---------- Reading progress ---------- */
.reading-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: rgba(15, 23, 42, 0.07);
  z-index: 2000;
}
.reading-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--enh-accent), var(--enh-accent-2));
  transition: width 0.12s linear;
}

/* ---------- Back to top ---------- */
.article-top-btn {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px; height: 44px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--enh-accent), var(--enh-accent-2));
  color: #fff;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.25s ease;
  box-shadow: 0 10px 26px rgba(13, 148, 136, 0.35);
  z-index: 1500;
  cursor: pointer;
}
.article-top-btn.show { opacity: 1; visibility: visible; transform: none; }
.article-top-btn:hover { transform: translateY(-3px); }

/* ---------- Hero polish ---------- */
.article-hero-shell {
  position: relative;
  overflow: hidden;
}
.article-hero-shell::after {
  content: "";
  position: absolute;
  width: 520px; height: 520px;
  right: -140px; top: -180px;
  background: radial-gradient(circle, rgba(13,148,136,0.35), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}

.article-hero-grid {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 48px;
  align-items: center;
  width: 100%;
}

.article-hero-grid--text {
  max-width: none;
}

.article-hero-grid--text .article-hero-copy {
  align-content: start;
}

.article-hero-copy {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.article-hero-copy .article-back-link,
.article-hero-copy .blog-tag {
  justify-self: start;
}

.article-hero-media {
  min-height: 360px;
  display: flex;
}

.article-hero-media .blog-visual {
  width: 100%;
  min-height: 360px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #FFFFFF 0%, #F7FAFF 100%);
  border: 1px solid rgba(99, 102, 241, 0.14);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.10);
}

.article-hero-media .blog-visual.has-image::after {
  display: none;
}

.article-hero-media .blog-visual__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 991.98px) {
  .article-hero-grid {
    grid-template-columns: 1fr;
  }

  .article-hero-grid > .article-hero-copy {
    order: 1;
  }

  .article-hero-grid > .article-hero-media {
    order: 2;
  }
}

.article-hero-copy h1 {
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.article-hero-media .blog-visual--article {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(2, 12, 27, 0.38);
  transform: perspective(1200px) rotateY(-3deg);
  transition: transform 0.5s ease;
}
.article-hero-media .blog-visual--article:hover { transform: perspective(1200px) rotateY(0deg) translateY(-4px); }

.article-highlight-row span {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
}

/* ---------- Article body ---------- */
.article-content { font-size: 1.02rem; }
.article-content p { line-height: 1.85; color: #334155; }

.article-section {
  position: relative;
  padding: 1.6rem 0 1.5rem;
  border-bottom: 1px dashed rgba(15,23,42,0.08);
}
.article-section:last-of-type { border-bottom: none; }

.article-section h2 {
  position: relative;
  padding-left: 1rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--enh-ink);
  scroll-margin-top: 90px;
}
.article-section h2::before {
  content: "";
  position: absolute;
  left: 0; top: 0.2em; bottom: 0.2em;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--enh-accent), var(--enh-accent-2));
}

.article-keypoints {
  list-style: none;
  padding: 1rem 1.1rem;
  margin: 1rem 0 0;
  background: linear-gradient(180deg, rgba(13,148,136,0.06), rgba(99,102,241,0.05));
  border: 1px solid rgba(13,148,136,0.16);
  border-radius: 14px;
}
.article-keypoints li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: 0.55rem;
  color: #334155;
  line-height: 1.6;
}
.article-keypoints li:last-child { margin-bottom: 0; }
.article-keypoints li::before {
  content: "\F26E";
  font-family: "bootstrap-icons";
  position: absolute;
  left: 0; top: 0;
  color: var(--enh-accent);
  font-size: 1rem;
}

.article-takeaway {
  margin-top: 2rem;
  padding: 1.5rem 1.6rem;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #4338ca);
  box-shadow: 0 20px 45px rgba(67, 56, 202, 0.25);
}
.article-takeaway strong {
  display: inline-block;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  opacity: 0.85;
}
.article-takeaway p { margin: 0; color: rgba(255,255,255,0.92); line-height: 1.75; }

/* ---------- Sidebar rail ---------- */
.article-rail-card {
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.article-rail-card:hover { box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1); }

.article-rail-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-radius: 9px;
  padding: 0.45rem 0.6rem;
  transition: all 0.2s ease;
}
.article-rail-link:hover { background: rgba(13,148,136,0.08); color: var(--enh-accent); }
.article-rail-link.is-active {
  background: linear-gradient(90deg, rgba(13,148,136,0.14), rgba(99,102,241,0.1));
  color: var(--enh-accent);
  font-weight: 600;
}

.article-rail-related-item {
  display: block;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.07);
  margin-bottom: 0.6rem;
  transition: all 0.22s ease;
}
.article-rail-related-item:hover {
  transform: translateX(3px);
  border-color: rgba(13,148,136,0.35);
  background: rgba(13,148,136,0.05);
}

/* ---------- Listing cards ---------- */
.blog-shell-section .container {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.blog-listing-intro {
  display: flex;
  justify-content: center;
  text-align: center;
}

.blog-listing-intro > div {
  max-width: 760px;
}

.blog-listing-intro .section-subtitle {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #5D5FEF;
  font-size: 1.23rem;
  margin-bottom: 12px;
}

.blog-listing-intro .section-title {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.08;
}

#blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

@media (max-width: 1199.98px) {
  #blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  #blog-grid {
    grid-template-columns: 1fr;
  }
}

article.blog-render-item {
  margin: 0;
  display: block;
  width: auto;
  float: none;
}

.blog-card-link {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #E8EAF4;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.blog-card:hover {
  transform: translateY(-8px);
  border-color: #5D5FEF;
  box-shadow: 0 28px 60px rgba(93, 95, 239, 0.18);
}

.blog-card .blog-visual {
  border-radius: 20px 20px 0 0;
  min-height: 220px;
  overflow: hidden;
}

.blog-visual--card {
  border-bottom: none;
}

.blog-card .blog-visual__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-visual__image {
  transform: scale(1.05);
}

.blog-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 18px;
  padding: 28px 30px 30px;
  min-height: 0;
}

.blog-tag {
  display: inline-flex;
  align-items: center;
  background: #F2ECFF;
  color: #5D5FEF;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  width: fit-content;
  margin-top: 0;
}

.blog-card-title {
  font-size: clamp(28px, 2.5vw, 32px);
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-body > p {
  font-size: 17px;
  color: #666;
  line-height: 1.75;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  align-items: center;
  margin-top: auto;
  color: #666;
  font-size: 0.95rem;
  flex-wrap: wrap;
}

.blog-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.blog-card-meta i {
  color: #5D5FEF;
  font-size: 0.95rem;
}

.blog-card-title a:hover {
  color: inherit;
}

.blog-filter-btn {
  transition: all 0.2s ease;
  border-radius: 999px;
}

.blog-filter-btn.active {
  background: linear-gradient(135deg, var(--enh-accent), var(--enh-accent-2));
  color: #fff;
  border-color: transparent;
}

.blog-filter-btn { transition: all 0.2s ease; border-radius: 999px; }
.blog-filter-btn.active {
  background: linear-gradient(135deg, var(--enh-accent), var(--enh-accent-2));
  color: #fff;
  border-color: transparent;
}

@media (max-width: 640px) {
  .article-hero-media .blog-visual--article { transform: none; }
  .article-top-btn { right: 1rem; bottom: 1rem; }
}

/* ============================================================
   ARTICLE EXTRAS — author byline, share row, prev/next nav
   (markup injected by insights/assets/js/article-extras.js)
   ============================================================ */
.article-meta-row { flex-wrap: wrap; row-gap: 10px; }
.article-author { display: inline-flex; align-items: center; gap: 10px; padding-right: 14px; margin-right: 4px; border-right: 1px solid rgba(15,23,42,.12); }
.article-author-avatar {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #0F766E, #2563EB); color: #fff;
  font-size: 12px; font-weight: 800; letter-spacing: .04em; flex-shrink: 0;
}
.article-author-copy { display: grid; line-height: 1.35; }
.article-author-copy strong { font-size: 13.5px; color: #0F172A; }
.article-author-copy small { font-size: 11.5px; color: #64748B; }

.article-share {
  margin-top: 40px; padding: 22px; border-radius: 18px;
  background: #fff; border: 1px solid rgba(15,23,42,.08);
  box-shadow: 0 18px 40px -32px rgba(15,23,42,.6);
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px; justify-content: space-between;
}
.article-share-label { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #64748B; }
.article-share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.article-share-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10); background: #F8FAFC; cursor: pointer;
  font-size: 13px; font-weight: 700; color: #334155; text-decoration: none;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.article-share-btn:hover { transform: translateY(-2px); color: #0F172A; border-color: rgba(15,23,42,.2); }
.article-share-btn.is-linkedin:hover { background: #0A66C2; color: #fff; border-color: #0A66C2; }
.article-share-btn.is-x:hover { background: #0F172A; color: #fff; border-color: #0F172A; }
.article-share-btn.is-whatsapp:hover { background: #25D366; color: #fff; border-color: #25D366; }
.article-share-btn.is-done { background: #0F766E; color: #fff; border-color: #0F766E; }

.article-prevnext { margin-top: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.article-prevnext-link {
  display: grid; gap: 6px; padding: 20px; border-radius: 18px; text-decoration: none;
  background: #fff; border: 1px solid rgba(15,23,42,.08);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.article-prevnext-link:hover { transform: translateY(-3px); box-shadow: 0 20px 44px -30px rgba(15,23,42,.55); border-color: rgba(37,99,235,.35); }
.article-prevnext-link small { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #2563EB; }
.article-prevnext-link strong { font-size: 15px; line-height: 1.5; color: #0F172A; }
.article-prevnext-link.is-next { text-align: right; }
.article-prevnext-link.is-empty { background: transparent; border: 1px dashed rgba(15,23,42,.10); }

@media (max-width: 767.98px) {
  .article-share { flex-direction: column; align-items: flex-start; }
  .article-prevnext { grid-template-columns: 1fr; }
  .article-prevnext-link.is-next { text-align: left; }
  .article-prevnext-link.is-empty { display: none; }
}

/* ============================================================
   BLOG LISTING — filter chips + result count
   ============================================================ */
.mhb-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mhb-filter {
  padding: 10px 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(15,23,42,.12); background: #fff;
  font-size: 13px; font-weight: 700; color: #475569;
  transition: all .22s ease;
}
.mhb-filter:hover { border-color: rgba(37,99,235,.4); color: #2563EB; transform: translateY(-1px); }
.mhb-filter.active { background: linear-gradient(135deg, #2563EB, #0E7490); border-color: transparent; color: #fff; box-shadow: 0 14px 30px -18px rgba(37,99,235,.9); }
.mhb-result-count { margin: 14px 0 0; font-size: 13px; font-weight: 600; color: #64748B; }
.blog-render-item[hidden] { display: none !important; }
