/* Smooth scrolling for anchor links (Content Table) */
html {
  scroll-behavior: smooth;
}

.blog-edit-shortcut {
  position: fixed;
  top: calc(var(--navbar-offset) + 118px);
  right: 12px;
  z-index: 20000;
}

.blog-edit-shortcut.blog-edit-shortcut--top {
  top: calc(var(--navbar-offset) + 58px);
}

.blog-edit-shortcut .theme-icon {
  position: relative;
  left: 0;
  top: 0;
  transform: none;
  opacity: 1;
}

@media (max-width: 750px) {
  .blog-edit-shortcut {
    display: none;
  }
}

/* Blog Article Header Styles */
.blog-private-preview-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 980px;
  margin: 0 auto 16px auto;
  padding: 14px 16px;
  border: 1px solid #f59e0b;
  border-radius: 10px;
  background: #fff7e6;
  color: #7a4b00;
  box-shadow: 0 8px 24px rgba(122, 75, 0, 0.08);
}

.blog-private-preview-notice__icon {
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 24px;
  margin-top: 1px;
}

.blog-private-preview-notice__content {
  min-width: 0;
}

.blog-private-preview-notice__title {
  font-weight: 700;
  font-size: 20px;
  line-height: 26px;
  margin: 0 0 4px 0;
}

.blog-private-preview-notice__text {
  margin: 0;
  font-size: 17px;
  line-height: 25px;
}

.blog-private-preview-notice code {
  font-size: 15px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(122, 75, 0, 0.12);
  color: inherit;
}

.blog-private-preview-notice--floating {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  z-index: 9999;
  width: min(760px, calc(100vw - 24px));
  margin: 0;
}

body.theme-dark .blog-private-preview-notice {
  background: #2f2412;
  border-color: #f7b733;
  color: #ffe3a6;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

body.theme-dark .blog-private-preview-notice__icon i {
  color: #ffd372;
}

body.theme-dark .blog-private-preview-notice code {
  background: #4a3720;
  color: #ffeec8;
}

@media (max-width: 640px) {
  .blog-private-preview-notice {
    gap: 10px;
    padding: 12px 14px;
  }

  .blog-private-preview-notice__title {
    font-size: 18px;
    line-height: 24px;
  }

  .blog-private-preview-notice__text {
    font-size: 15px;
    line-height: 22px;
  }

  .blog-private-preview-notice--floating {
    left: 12px;
    right: 12px;
    transform: none;
    bottom: 12px;
    width: auto;
  }
}

.blog-article-header {
  margin-bottom: 32px;
  text-align: center;
}

.blog-article-header h1 {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: var(--heading-color);
  margin: 0 auto;
  max-width: 900px;
  position: relative;
  overflow: visible;
  display: block;
}

/* Blog article meta cards (date/read time/back/author) */
.blog-article-meta-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 900px;
  margin: 20px auto 0 auto;
  text-align: left;
}

.blog-article-hero-wrap {
  width: 100%;
  max-width: 1024px;
  margin: 14px auto 0 auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-medium);
  overflow: hidden;
  background: transparent;
  line-height: 0;
}

.blog-article-hero-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}

.page-last-updated-wrap {
  display: flex;
  justify-content: center;
  margin: 36px 0 8px 0;
}

.page-last-updated-card {
  width: 100%;
  max-width: 360px;
}

.page-last-updated-notice {
  width: 100%;
  max-width: 720px;
  padding: 16px 20px;
  border-radius: 10px;
  background: var(--card-bg, rgba(127, 127, 127, 0.08));
  border: 1px solid var(--border-color, rgba(127, 127, 127, 0.18));
  text-align: center;
}

@media (max-width: 520px) {
  .page-last-updated-wrap {
    margin-top: 28px;
  }

  .page-last-updated-card {
    max-width: 100%;
  }

  .page-last-updated-notice {
    text-align: left;
  }
}

@media (max-width: 968px) {
  .blog-article-meta-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .blog-article-meta-cards {
    grid-template-columns: 1fr;
  }
}

.blog-meta-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-medium);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 74px;
  box-sizing: border-box;
  text-decoration: none !important;
  color: inherit;
}

/* base_style.css has `a { border-bottom: none !important; }` which removes ONLY the
   bottom border on our clickable meta cards. Re-apply it for consistent card borders. */
.blog-meta-card.blog-meta-card-link {
  border-bottom-style: solid !important;
  border-bottom-width: 1px !important;
  border-bottom-color: var(--border-color) !important;
}

.blog-meta-card i {
  color: var(--primary-blue);
  font-size: 22px;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.95;
}

.blog-meta-card-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.blog-meta-card-label {
  font-size: 14px;
  letter-spacing: normal;
  color: var(--muted-text);
  line-height: 1.1;
}

.blog-meta-card-value {
  font-size: 15px;
  font-weight: 650;
  color: var(--heading-color);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Primary card (Back to blog) */
.blog-meta-card-primary {
  border-color: color-mix(in srgb, var(--primary-blue) 45%, transparent);
  background: color-mix(in srgb, var(--primary-blue) 6%, transparent);
}

.blog-meta-card-primary.blog-meta-card-link {
  border-bottom-color: color-mix(
    in srgb,
    var(--primary-blue) 45%,
    transparent
  ) !important;
}

.blog-meta-card-link {
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.blog-meta-card-link:hover {
  transform: translateY(-1px);
  border-color: var(--primary-blue) !important;
  border-bottom-color: var(--primary-blue) !important;
  background: color-mix(in srgb, var(--primary-blue) 8%, transparent);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.blog-meta-card-link:active {
  transform: translateY(0);
}

.blog-meta-card-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-blue) 25%, transparent);
}

@media (max-width: 520px) {
  .blog-meta-card {
    padding: 16px 18px;
  }

  .blog-meta-card-label {
    font-size: 13px;
  }

  .blog-meta-card-value {
    font-size: 14px;
  }
}

/* Blog article content headings */
.blog-post-content h2 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  margin: 36px 0 16px 0;
  letter-spacing: -0.02em;
  color: var(--heading-color);
}

.blog-post-content h3 {
  font-size: 1.3em;
  margin: 20px 0 10px 0;
  color: var(--text-color);
  font-weight: 400;
  line-height: 1.4;
}

.blog-post-content h4 {
  font-size: 17px;
  margin: 16px 0 8px 0;
  color: var(--text-color);
  font-weight: 300;
  line-height: 1.4;
}

.blog-post-content h4 strong,
.blog-post-content h4 b {
  font-weight: 400;
}

@media (max-width: 640px) {
  .blog-post-content h3 {
    font-size: 1.2em;
  }

  .blog-post-content h4 {
    font-size: 16px;
  }
}

/* Inline prose links in the article body need to clearly stand out from the
   surrounding text. base_elements.css gives links a dotted underline, but
   base_style.css strips it again with `a { border-bottom: none !important }`,
   which left body links reading as plain (purple) text that blends into the
   near-black copy. Give them a real underline + stronger weight + clear hover.
   Kept at single-class specificity and placed BEFORE the .blog-toc / promo-card
   blocks so those component links keep their own styling. */
.blog-post-content a {
  color: var(--link);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--link) 50%, transparent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
  border-bottom: none;
  transition:
    color 0.15s ease,
    text-decoration-color 0.15s ease;
}

.blog-post-content a:hover {
  color: var(--link-hover);
  text-decoration-color: var(--link-hover);
}

/* Code block + copy button styling lives in css/code_block.css
   (shared component, injected via the blog_article -> code_block dependency). */

/* Content Table (Table of Contents) */
.blog-toc {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-medium);
  padding: 18px 20px;
  margin: 20px 0;
  color: var(--text-color);
}

.blog-toc p {
  color: var(--heading-color);
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 1.05em;
}

.blog-toc ul {
  margin: 0;
  padding-left: 20px;
}

.blog-toc li {
  margin: 8px 0;
  line-height: 1.6;
}

.blog-toc a {
  color: var(--primary-blue);
  text-decoration: none;
  transition:
    color 0.15s ease,
    opacity 0.15s ease;
  font-weight: 500;
}

.blog-toc a:hover {
  opacity: 0.75;
}

/* Blog article content tables: no duplicate rules here - base_data_table.css
   is registered for every <table> tag site-wide (see component_registry.py),
   so its plain .data-table/.data-table-wrap selectors already apply inside
   .blog-post-content with nothing to override. Keeping one definition avoids
   the two drifting into different designs over time. */

@media (max-width: 968px) {
  .blog-article-header h1 {
    font-size: 34px;
  }
}

@media (max-width: 768px) {
  .blog-article-header h1 {
    font-size: 32px;
    line-height: 1.2;
  }
}

.blog-article-meta {
  color: var(--muted-text);
  font-size: 0.9em;
}

.blog-article-meta-separator {
  margin: 0 8px;
}

.blog-article-author {
  margin-top: 12px;
  font-size: 0.95em;
  color: var(--muted-text);
}

.blog-article-author-link,
.blog-article-author-name {
  font-weight: 600;
}

/* Scroll-to-top button (desktop only) */
.blog-scroll-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: none;
  background: radial-gradient(
    ellipse at 50% 40%,
    #ff7482 0%,
    #d93a52 55%,
    #a11f34 100%
  );
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 12000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);

  /* hidden by default (JS toggles .is-visible) */
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 220ms ease;
}

.blog-scroll-to-top i {
  font-size: 18px;
  line-height: 1;
}

.blog-scroll-to-top.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.blog-scroll-to-top:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.blog-scroll-to-top:active {
  transform: translateY(0) scale(0.98);
}

body.theme-dark .blog-scroll-to-top {
  background: radial-gradient(
    ellipse at 50% 40%,
    #ff8993 0%,
    #ff7482 55%,
    #d93a52 100%
  );
}

@media (prefers-reduced-motion: reduce) {
  .blog-scroll-to-top {
    transition: none;
  }
}

/* Hide on smaller devices */
@media (max-width: 768px) {
  .blog-scroll-to-top {
    display: none !important;
  }
}

/* Blog post images */
.blog-post-content img {
  display: block;
  max-width: 100%;
  max-height: 700px;
  width: auto;
  height: auto;
  margin: 24px auto;
  border-radius: var(--radius-small, 4px);
  object-fit: contain;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.blog-post-content img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Blog post videos */
.blog-post-content video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 24px auto;
  border-radius: var(--radius-small, 4px);
}

/* Blog Image Preview Modal */
#blogImagePreviewModal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(4px);
}

#blogImagePreviewModal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hide theme toggle when preview modal is open */
body:has(#blogImagePreviewModal.show) #theme-toggle {
  display: none !important;
}

.blog-image-preview-content {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
}

.blog-image-preview-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  cursor: default;
  transform: none;
}

/* Same design for both themes since backdrop is always dark */
.blog-image-preview-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(40, 40, 40, 0.9) !important;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  font-size: 32px;
  font-weight: 300;
  font-family: Arial, sans-serif;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 0 0 0;
  margin: 0;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
  z-index: 10001;
}

.blog-image-preview-close:hover {
  background: rgba(60, 60, 60, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
}

/* Handle paragraphs and lists within blog alerts */
.blog-post-content .alert > p {
  margin: 0 0 12px 0;
}

.blog-post-content .alert > p:last-child {
  margin-bottom: 0;
}

.blog-post-content .alert > ul {
  margin: 8px 0;
  padding-left: 24px;
}

.blog-post-content .alert > ul:last-child {
  margin-bottom: 0;
}

/* Blog promotional card (in-content) - branded via --primary-blue so it
   automatically picks up each project's own accent color. Frame/lift on
   hover only, no leftover baroque shadows or oversized type.
   Scoped as ".blog-post-content a.blog-promo-card" (not just the bare
   class) so this reliably outranks the generic ".blog-post-content a"
   link styling above (which has higher specificity than a single class
   and would otherwise clobber this card's own color/transition/border).
   border/border-color use !important because the global link reset
   (base_style.css: "a:not(:where([class*='nb-'])) { border-bottom: none
   !important; }") would otherwise always win regardless of specificity. */
.blog-post-content a.blog-promo-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  border: 1px solid var(--border-color) !important;
  border-radius: 20px;
  background: var(--card-bg);
  padding: 22px 24px;
  margin: 40px 0;
  text-decoration: none !important;
  color: inherit;
  box-shadow: 0 0 0 0 transparent;
  transition:
    color 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.blog-post-content a.blog-promo-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-blue) !important;
  box-shadow: 0 16px 32px -22px
    color-mix(in srgb, var(--primary-blue) 45%, transparent);
  text-decoration: none !important;
  color: inherit;
}

.blog-promo-media {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px;
  background: color-mix(in srgb, var(--primary-blue) 10%, var(--card-bg));
}

.blog-promo-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

/* Same neutral tile treatment as the navbar brand badge (.nb-brand__badge):
   surface fill + hairline border, no gradient/shadow painted over the mark. */
.blog-promo-media-home {
  border: 1px solid var(--border-color);
}

.blog-promo-media-home i {
  font-size: 28px;
  color: var(--primary-blue);
}

.blog-promo-media-home img {
  width: 56%;
  height: 56%;
  object-fit: contain;
  border-radius: 0;
}

.blog-promo-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  justify-content: center;
}

.blog-promo-eyebrow {
  display: block;
  margin: 0 0 2px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary-blue);
  line-height: 1.3;
}

.blog-promo-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--heading-color);
  line-height: 1.3;
  letter-spacing: -0.2px;
}

.blog-promo-text {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted-text);
}

.blog-promo-cta {
  margin: 8px 0 0;
  color: var(--primary-blue);
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Promo row: when a content-authored promo card is paired with the
   auto-injected "back to homepage" card (see blog_article.js), lay both
   out side by side instead of stacked. */
.blog-promo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 40px 0;
}

.blog-promo-row .blog-post-content a.blog-promo-card,
.blog-post-content .blog-promo-row a.blog-promo-card {
  margin: 0;
  height: 100%;
}

@media (max-width: 768px) {
  .blog-promo-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px;
  }

  .blog-promo-media {
    order: -1;
    width: 72px;
    height: 72px;
  }

  .blog-promo-title {
    font-size: 19px;
  }

  .blog-promo-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Footer blog recommendations carousel (blog articles only) */
.footer-blog-recommendations {
  --footer-rec-per-view: 3;
  --footer-rec-gap: 16px;
  --footer-rec-gutter: 76px;
  --footer-rec-btn-size: 40px;

  margin: 20px -40px 92px -40px;
  padding: 18px 20px 20px 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-large);
  background: var(--container-bg);
  box-shadow: var(--shadow-strong);
  position: relative;
}

.footer-blog-recommendations + .footer-nav-grid {
  padding-top: 40px;
}

.footer:has(.footer-blog-recommendations) {
  margin-top: 36px;
}

.footer-navigation:has(.footer-blog-recommendations) {
  padding-top: 22px;
  padding-bottom: 26px;
}

@media (max-width: 750px) {
  .footer-navigation:has(.footer-blog-recommendations) {
    padding-top: 18px;
    padding-bottom: 22px;
  }
}

.footer-blog-recommendations-carousel {
  position: relative;
  padding: 0 var(--footer-rec-gutter);
}

.footer-blog-recommendations-btn {
  width: var(--footer-rec-btn-size);
  height: var(--footer-rec-btn-size);
  min-width: var(--footer-rec-btn-size);
  min-height: var(--footer-rec-btn-size);
  padding: 0;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--info-item-bg);
  color: var(--heading-color);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.footer-blog-recommendations-btn-prev {
  left: calc((var(--footer-rec-gutter) - var(--footer-rec-btn-size)) / 2);
}

.footer-blog-recommendations-btn-next {
  right: calc((var(--footer-rec-gutter) - var(--footer-rec-btn-size)) / 2);
}

.footer-blog-recommendations-btn:hover {
  transform: translateY(calc(-50% - 1px));
  border-color: var(--primary-blue);
  background: color-mix(in srgb, var(--primary-blue) 8%, transparent);
}

.footer-blog-recommendations-btn:active {
  transform: translateY(-50%);
}

.footer-blog-recommendations-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-blue) 25%, transparent);
}

.footer-blog-recommendations-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: translateY(-50%);
  box-shadow: none;
}

.footer-blog-recommendations-viewport {
  overflow: hidden;
  width: 100%;
  padding: 0;
}

.footer-blog-recommendations-viewport:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-blue) 20%, transparent);
  border-radius: var(--radius-medium);
}

.footer-blog-recommendations-track {
  display: flex;
  gap: var(--footer-rec-gap);
  will-change: transform;
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.footer-blog-recommendations-card {
  flex: 0 0
    calc(
      (100% - (var(--footer-rec-gap) * (var(--footer-rec-per-view) - 1))) /
        var(--footer-rec-per-view)
    );
  box-sizing: border-box;
  padding: 0;
  min-width: 0;
  border: none;
  border-radius: var(--radius-medium);
  background: var(--card-bg);
  color: inherit;
  text-decoration: none !important;
  border-bottom-style: none !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: auto;
  position: relative;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition:
    background 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.footer-blog-recommendations-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

.footer-blog-recommendations-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--info-item-bg);
  display: block;
  overflow: hidden;
}

.footer-blog-recommendations-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer-blog-recommendations-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-text);
}

.footer-blog-recommendations-thumb-placeholder i {
  font-size: 36px;
  opacity: 0.5;
}

.footer-blog-recommendations-card-body {
  padding: 14px 16px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.footer-blog-recommendations-card:hover {
  background: color-mix(in srgb, var(--primary-blue) 4%, var(--card-bg));
}

.footer-blog-recommendations-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-blue) 25%, transparent);
}

.footer-blog-recommendations-card-meta {
  font-size: 14px;
  color: var(--muted-text);
}

.footer-blog-recommendations-card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--heading-color);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.footer-blog-recommendations-card-excerpt {
  color: var(--muted-text);
  opacity: 0.95;
  line-height: 1.55;
  font-size: 13px;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

@media (max-width: 920px) {
  .footer-blog-recommendations {
    --footer-rec-per-view: 2;
  }
}

@media (max-width: 750px) {
  .footer-blog-recommendations {
    margin-left: -20px;
    margin-right: -20px;
  }
}

@media (max-width: 620px) {
  .footer-blog-recommendations {
    --footer-rec-per-view: 1;
    --footer-rec-gutter: 64px;
    --footer-rec-btn-size: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer-blog-recommendations-track {
    transition: none;
  }

  .footer-blog-recommendations-btn,
  .footer-blog-recommendations-card {
    transition: none;
  }
}

/* Blog listing */
.blog-pagination {
  margin-top: 48px;
  text-align: center;
}

.blog-overview-toolbar {
  margin: 14px 0 22px 0;
}

.blog-overview-title {
  margin: 0 0 6px 0;
  font-size: clamp(34px, 4.2vw, 50px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.8px;
  color: var(--heading-color);
  text-wrap: balance;
  text-align: center;
}

.blog-overview-subtitle {
  margin: 10px auto 0 auto;
  font-size: 17px;
  line-height: 1.45;
  color: var(--muted-text);
  max-width: 740px;
  text-align: center;
}

.blog-overview-search {
  max-width: 420px;
  width: 100%;
}

.blog-overview-filter-empty {
  text-align: center;
  padding: 32px;
}

/* Blog overview grid */
/* 3-column card grid */
.blog-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}

.blog-post-card {
  display: flex;
  flex-direction: column;
  border: none;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0 !important;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.blog-post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  background: color-mix(in srgb, var(--primary-blue) 8%, var(--card-bg));
}

/* Square image on top — fills full card width at 1:1 */
.blog-post-card-thumb-wrap {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  flex-shrink: 0;
  text-decoration: none;
}

.blog-post-card-thumb {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* FA icon placeholder when no image */
.blog-post-card-thumb-placeholder,
a.blog-post-card-thumb-placeholder {
  display: flex !important;
  width: 100%;
  aspect-ratio: 1 / 1;
  align-items: center;
  justify-content: center;
  background: var(--info-item-bg);
  color: var(--muted-text);
  font-size: 48px;
  text-decoration: none;
  flex-shrink: 0;
}

/* Card content below the image */
.blog-post-card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 13px 15px 14px;
  gap: 6px;
}

.blog-post-card-meta {
  font-size: 12px;
  color: var(--muted-text);
  line-height: 1;
}

.blog-post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.blog-post-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  color: var(--heading-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-post-card-excerpt {
  font-size: 13px;
  color: var(--muted-text);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-post-read-more {
  color: var(--primary-blue);
  font-weight: 600;
  white-space: nowrap;
}

.blog-post-card:hover .blog-post-read-more {
  text-decoration: underline;
}

@media (max-width: 860px) {
  .blog-overview-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 520px) {
  .blog-overview-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.blog-pagination__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.blog-pagination__item {
  margin: 0;
}

.blog-pagination .blog-pagination__button {
  padding: 5px 12px;
  margin: 0;
  border: 1px solid var(--border-color) !important;
  border-bottom-style: solid !important;
  background: transparent;
  color: var(--text-color);
  text-decoration: none;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.2;
  border-radius: var(--radius-small);
  min-width: 36px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background 0.15s ease;
}

.blog-pagination .blog-pagination__button:hover {
  border-color: var(--primary-blue) !important;
  color: var(--primary-blue);
  background: var(--info-item-bg);
}

.blog-pagination .blog-pagination__button.current {
  border-color: var(--primary-blue) !important;
  color: var(--primary-blue);
  background: color-mix(in srgb, var(--primary-blue) 8%, transparent);
  font-weight: 600;
}

.blog-pagination .blog-pagination__button.disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

.blog-pagination .blog-pagination__button-nav {
  min-width: 36px;
  font-weight: 600;
}

.blog-pagination .blog-pagination__ellipsis {
  min-width: 24px;
}

@media (max-width: 767px) {
  .blog-pagination__list {
    justify-content: flex-start;
    width: 100%;
  }
}

/* "Was this helpful?" feedback widget under a blog article. The widget styles
   itself (.sf-fb); this only positions it. Centering is done with flex (not
   margin:auto) and ALL spacing uses padding (not margin), so it survives projects
   that force `margin: 0 !important` in a global reset (e.g. eduloo) - no per-site
   override needed. Full-width wrapper centers the child, which keeps the 420px cap. */
.blog-feedback {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 72px;
  margin-top: 8px;
}
.blog-feedback > * {
  width: 100%;
  max-width: 420px;
}

.blog-feedback .sf-fb {
  border-color: var(--border-color);
  background: var(--card-bg);
  color: var(--text-color);
  font-family: inherit;
}

.blog-feedback .sf-fb__q,
.blog-feedback .sf-fb__btn {
  color: inherit;
}

.blog-feedback .sf-fb__btn {
  border-color: var(--border-color);
  border-radius: 999px;
  background: color-mix(in srgb, currentcolor 6%, transparent);
}

.blog-feedback .sf-fb__btn:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.blog-feedback .sf-fb__btn.is-active {
  background: var(--primary-blue) !important;
  border-color: var(--primary-blue) !important;
  color: #fff !important;
}

.blog-feedback .sf-fb__star.is-lit {
  color: var(--primary-blue);
}

.blog-feedback .sf-fb__textarea {
  border-color: var(--border-color);
  background: var(--input-bg, var(--container-bg));
  color: var(--text-color);
}

.blog-feedback .sf-fb__textarea:focus {
  border-color: var(--primary-blue);
}

.blog-feedback .sf-fb__send {
  border-radius: 999px;
  background: var(--primary-blue);
}

.blog-feedback .sf-fb__by,
.blog-feedback .sf-fb__by a {
  color: var(--muted-text);
}
