/*--------------------------------------------------------------
# Blogs hub + article pages
--------------------------------------------------------------*/
.page-cat-blog .page-hero.is-compact,
.page-cat-article .page-hero.is-compact {
  background: transparent;
  border-bottom: 0;
}

.page-cat-blog #main {
  background: var(--surface);
}

.page-cat-article #main {
  background:
    radial-gradient(900px 280px at 100% 0, rgba(26, 143, 168, 0.08), transparent 55%),
    var(--bg);
}

.article-progress {
  position: fixed;
  top: var(--header-height, 72px);
  left: 0;
  right: 0;
  z-index: 40;
  height: 3px;
  background: transparent;
  pointer-events: none;
}

.article-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #3eb8cc);
  transition: width 0.08s linear;
}

/* Hub — Speciality Chemicals card layout + search/filter */
.page-inner .inner-page.blog-hub {
  padding: 36px 0 80px;
  background: var(--surface);
}

.blog-hub .speciality-head h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 10px;
  color: var(--heading);
}

.blog-hub .speciality-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.blog-hub .speciality-card {
  text-decoration: none;
}

.blog-hub .speciality-grid[hidden],
.blog-hub .speciality-card.is-hidden {
  display: none;
}

.blog-hub-toolbar__filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.blog-hub-toolbar__filters .blog-hub-sort select {
  min-width: 150px;
}

.blog-hub-chip i {
  font-size: 14px;
  color: var(--accent);
}

.blog-hub-chip.is-active i {
  color: #fff;
}

.blog-hub-empty {
  text-align: center;
  padding: 56px 20px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 16px;
}

.blog-cta-band {
  padding: 56px 0 72px;
  background:
    radial-gradient(800px 260px at 0 100%, rgba(26, 143, 168, 0.22), transparent 60%),
    linear-gradient(180deg, #0A1830 0%, var(--navy) 100%);
  color: #fff;
}

.blog-cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.blog-cta-band__copy {
  max-width: 40rem;
}

.blog-cta-band h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.blog-cta-band p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

.blog-cta-band .btn-primary {
  flex-shrink: 0;
}

/* Article */
.page-inner .inner-page.article-page {
  padding: 8px 0 36px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: start;
}

.article-layout__main,
.page-cat-article .article-layout__main.article-content {
  min-width: 0;
  max-width: none;
  width: 100%;
  margin: 0;
}

.article-header {
  margin-bottom: 28px;
  padding-bottom: 8px;
}

.article-header__kicker {
  margin: 0 0 12px;
}

.article-header__kicker span {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.article-header .topic-title,
.page-cat-article h1.topic-title {
  margin: 0 0 16px;
  font-size: clamp(1.85rem, 3vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--heading);
}

.article-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.article-header__meta i {
  margin-right: 6px;
  color: var(--accent);
}

.article-content .article-intro {
  margin: 0;
  padding: 18px 20px 18px 22px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 12px 12px 0;
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--text);
}

.article-body {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text);
}

.article-body h2 {
  scroll-margin-top: calc(var(--header-height, 72px) + 28px);
  margin: 2.15rem 0 0.85rem;
  padding-top: 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--heading);
}

.article-body h2:first-child {
  margin-top: 0.5rem;
}

.article-body p {
  margin: 0 0 1rem;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.15rem;
  padding-left: 1.2rem;
}

.article-body li + li {
  margin-top: 0.35rem;
}

.article-body a {
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-decoration: none;
}

.article-body a:hover {
  color: inherit;
  text-decoration: none;
}

.article-page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.article-layout__aside {
  position: sticky;
  top: calc(var(--header-height, 72px) + 22px);
}

.article-toc {
  margin-bottom: 18px;
  padding: 18px 18px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.article-toc p,
.article-toc summary {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: default;
  list-style: none;
}

.article-toc summary {
  cursor: pointer;
}

.article-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-toc li + li {
  margin-top: 2px;
}

.article-toc a {
  display: block;
  padding: 7px 10px;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}

.article-toc a:hover,
.article-toc a.is-active {
  background: var(--accent-soft);
  border-left-color: var(--accent);
  color: var(--heading);
}

.article-toc--mobile {
  display: none;
  margin-bottom: 24px;
}

.article-toc--mobile summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
}

.article-toc--mobile summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.article-toc--mobile[open] summary {
  margin-bottom: 12px;
}

.article-toc--mobile[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.article-body {
  overflow-x: auto;
}

.article-aside-cta {
  padding: 22px 20px 20px;
  background: var(--navy);
  color: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-hover);
}

.article-aside-cta__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
}

.article-aside-cta h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
}

.article-aside-cta p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  line-height: 1.6;
}

.article-aside-cta .btn-primary {
  width: 100%;
}

.article-aside-cta__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: #7ad0df;
  font-size: 13px;
  font-weight: 700;
}

.article-aside-cta__link:hover {
  color: #fff;
}

.article-related {
  padding: 40px 0 48px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.article-related__head {
  margin-bottom: 24px;
}

.article-related__head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.article-related__grid {
  margin-top: 0;
}

@media (max-width: 1199px) {
  .blog-hub .speciality-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .blog-hub-toolbar {
    grid-template-columns: 1fr;
  }

  .blog-hub-toolbar__filters {
    width: 100%;
  }

  .blog-hub-toolbar__filters .blog-hub-sort {
    flex: 1 1 0;
  }

  .blog-hub .speciality-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .article-layout__main {
    max-width: none;
  }

  .article-layout__aside {
    display: none;
  }

  .article-toc--mobile {
    display: block;
  }
}

@media (max-width: 767px) {
  .blog-cta-band__inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }

  .blog-hub .speciality-head h1 {
    font-size: 26px;
  }

  .blog-hub .speciality-grid {
    grid-template-columns: 1fr;
  }

  .blog-hub-filters {
    scrollbar-width: none;
  }

  .blog-hub-filters::-webkit-scrollbar {
    height: 0;
  }

  .blog-cta-band .btn-primary {
    width: 100%;
  }

  .page-inner .inner-page.blog-hub {
    padding-top: 16px;
    padding-bottom: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-hub .speciality-card,
  .blog-hub .speciality-card__media img,
  .blog-hub .speciality-card__body span i,
  .article-progress span {
    transition: none;
  }

  .blog-hub .speciality-card:hover,
  .blog-hub .speciality-card:focus-visible {
    transform: none;
  }
}

html[data-theme="dark"] .blog-hub .speciality-head h1,
html[data-theme="dark"] .article-header .topic-title,
html[data-theme="dark"] .article-body h2,
html[data-theme="dark"] .article-related__head h2,
html[data-theme="dark"] .article-toc a:hover,
html[data-theme="dark"] .article-toc a.is-active,
html[data-theme="dark"] .blog-hub-chip,
html[data-theme="dark"] .article-btn-outline {
  color: var(--heading);
}

html[data-theme="dark"] .article-toc,
html[data-theme="dark"] .article-content .article-intro,
html[data-theme="dark"] .blog-hub-chip,
html[data-theme="dark"] .article-btn-outline {
  background: var(--card);
  border-color: var(--line);
}

html[data-theme="dark"] .article-header__kicker span {
  color: #7ad0df;
}

html[data-theme="dark"] .blog-hub-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

html[data-theme="dark"] .blog-hub-chip i {
  color: #7ad0df;
}

html[data-theme="dark"] .blog-hub-chip.is-active i {
  color: #fff;
}
