/**
 * Shared styles for DataFrugal blog posts and blog index.
 * Scoped under .blog-post-body / .blog-index-page where needed.
 */

/* --------------------------------------------------------------------------
   Design tokens (SaaS-style blue palette, matches site accent)
   -------------------------------------------------------------------------- */
.blog-post-body,
.blog-index-page {
  --blog-primary: #0b4f8c;
  --blog-primary-dark: #063a6b;
  --blog-accent: #1a7fd4;
  --blog-surface-tint: #e8f2fc;
  --blog-surface-card: #ffffff;
  --blog-border: #d9e6f2;
  --blog-text: #2d3748;
  --blog-text-muted: #5a6578;
  --blog-radius: 12px;
  --blog-radius-sm: 10px;
  --blog-shadow: 0 4px 24px rgba(11, 79, 140, 0.08);
  --blog-shadow-hover: 0 12px 32px rgba(11, 79, 140, 0.12);
  --blog-font: "Open Sans", sans-serif;
  --blog-callout: #fff8e6;
  --blog-callout-border: #f0e0a8;
}

.blog-post-body {
  font-family: var(--blog-font);
  background: #f9f9f9;
  color: var(--blog-text);
  line-height: 1.65;
}

.blog-post-body .blog-back-bar {
  margin: 0 0 18px;
}

.blog-post-body .blog-back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--blog-font);
  color: var(--blog-accent);
  text-decoration: none;
  padding: 8px 16px 8px 6px;
  margin-left: -6px;
  border-radius: 999px;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.blog-post-body .blog-back-link .bi {
  font-size: 1.15rem;
}

.blog-post-body .blog-back-link:hover {
  background: var(--blog-surface-tint);
  color: var(--blog-primary-dark);
  text-decoration: none;
}

.blog-post-body .blog-back-link:focus-visible {
  outline: 2px solid var(--blog-accent);
  outline-offset: 3px;
}

.blog-post-body .blog-post-layout {
  max-width: 1220px;
  margin: 0 auto;
  padding: 28px 20px 72px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
}

@media (min-width: 1100px) {
  .blog-post-body .blog-post-layout {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 40px;
    padding: 36px 28px 88px;
  }
}

/* Sticky TOC */
.blog-post-body .blog-toc {
  display: none;
}

@media (min-width: 1100px) {
  .blog-post-body .blog-toc {
    display: block;
    position: sticky;
    top: 24px;
    padding-right: 8px;
  }
}

.blog-post-body .blog-toc-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blog-text-muted);
  margin: 0 0 14px;
}

.blog-post-body .blog-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-post-body .blog-toc a {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--blog-text-muted);
  text-decoration: none;
  padding: 8px 0;
  border-left: 2px solid transparent;
  padding-left: 10px;
  margin-left: 0;
  line-height: 1.35;
  transition:
    color 0.2s,
    border-color 0.2s;
}

.blog-post-body .blog-toc a:hover,
.blog-post-body .blog-toc a:focus-visible {
  color: var(--blog-accent);
  border-left-color: var(--blog-accent);
}

.blog-post-body .blog-toc .bi {
  flex-shrink: 0;
  font-size: 14px;
  color: var(--blog-accent);
  margin-top: 2px;
}

.blog-post-body .blog-post-main {
  min-width: 0;
}

.blog-post-body .blog-post-inner {
  max-width: 860px;
}

/* Hero */
.blog-post-body .blog-hero-panel {
  background: linear-gradient(
    135deg,
    var(--blog-surface-tint) 0%,
    #f0f6fd 100%
  );
  border: 1px solid var(--blog-border);
  border-radius: var(--blog-radius);
  padding: 32px 28px;
  margin-bottom: 36px;
  box-shadow: var(--blog-shadow);
}

/* Magazine-style article hero (#3498db) — two-column visual + feature cards */
.blog-post-body .blog-hero-panel--magazine {
  --mag-blue: #3498db;
  --mag-blue-dark: #2980b9;
  --mag-navy: #2c3e50;
  --mag-muted: #5d6d7e;

  background: #ffffff;
  border: none;
  border-radius: 18px;
  padding: 36px 32px 32px;
  margin-bottom: 40px;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.06),
    0 14px 40px rgba(15, 23, 42, 0.08);
}

.blog-post-body .blog-hero-masthead {
  margin-bottom: 28px;
}

.blog-post-body .blog-hero-title--masthead {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  color: var(--mag-navy);
  margin: 0 0 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.blog-post-body .blog-hero-title-accent {
  width: 72px;
  height: 4px;
  margin: 16px 0 20px;
  border-radius: 2px;
  background: var(--mag-blue);
}

.blog-post-body .blog-hero-lead {
  margin: 0;
  max-width: 52rem;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--mag-muted);
}

.blog-post-body .blog-hero-lead a {
  color: var(--mag-blue);
  font-weight: 600;
  text-decoration: none;
}

.blog-post-body .blog-hero-lead a:hover {
  text-decoration: underline;
}

.blog-post-body .blog-hero-visual {
  display: grid;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 36px rgba(52, 152, 219, 0.22);
}

.blog-post-body .blog-hero-visual-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 20px 24px;
  background: linear-gradient(
    155deg,
    #1a5276 0%,
    var(--mag-blue-dark) 38%,
    var(--mag-blue) 100%
  );
}

.blog-post-body .blog-hero-visual-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image:
    radial-gradient(
      circle at 20% 30%,
      rgba(255, 255, 255, 0.35) 0,
      transparent 28%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 255, 255, 0.2) 0,
      transparent 22%
    ),
    radial-gradient(
      circle at 60% 85%,
      rgba(255, 255, 255, 0.18) 0,
      transparent 25%
    );
  pointer-events: none;
}

.blog-post-body .blog-hero-visual-logo {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 40px;
  height: 40px;
  padding: 5px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.blog-post-body .blog-hero-visual-kicker {
  position: relative;
  z-index: 1;
  margin: 36px 0 0;
  padding: 0 12px;
  font-size: clamp(0.78rem, 2.1vw, 0.95rem);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  max-width: 26ch;
}

.blog-post-body .blog-hero-visual-pill {
  position: relative;
  z-index: 1;
  margin-top: auto;
  align-self: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mag-blue-dark);
  background: #fff;
  padding: 9px 16px;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.blog-post-body .blog-hero-visual-photo {
  position: relative;
  min-height: 280px;
  background: #0b1520;
}

.blog-post-body .blog-hero-visual-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  object-position: center;
}

/* Body images (exclude magazine hero assets) */
.blog-post-body
  .blog-post-inner
  img:not(.blog-hero-visual-photo img):not(.blog-hero-visual-logo) {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.blog-post-body .blog-section p img:only-child,
.blog-post-body .blog-post-inner p img:only-child {
  display: block;
  margin: 12px auto 20px;
  max-width: 100%;
}

/* Feature row under split hero */
.blog-post-body .blog-hero-panel--magazine .blog-hero-badges {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.blog-post-body .blog-hero-panel--magazine .badge-box {
  flex: none;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 22px 16px 20px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e8edf3;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 22px rgba(15, 23, 42, 0.06);
}

.blog-post-body .blog-hero-panel--magazine .badge-box:hover {
  transform: translateY(-3px);
  box-shadow:
    0 4px 12px rgba(52, 152, 219, 0.15),
    0 12px 28px rgba(15, 23, 42, 0.08);
}

.blog-post-body .blog-hero-panel--magazine .badge-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  background: rgba(52, 152, 219, 0.14);
}

.blog-post-body .blog-hero-panel--magazine .badge-icon .bi {
  color: var(--mag-blue);
  font-size: 24px;
}

.blog-post-body .badge-box .badge-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1.25;
}

.blog-post-body .badge-box .badge-desc {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 400;
  color: #5d6d7e;
}

/* Base badge row (fallback) */
.blog-post-body .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

.blog-post-body .badge-box {
  flex: 1;
  min-width: 120px;
  background: var(--blog-surface-card);
  padding: 16px 14px;
  border-radius: var(--blog-radius-sm);
  text-align: center;
  border: 1px solid var(--blog-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.blog-post-body .badge-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--blog-shadow-hover);
}

.blog-post-body .badge-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--blog-surface-tint);
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-post-body .badge-icon .bi {
  font-size: 22px;
  color: var(--blog-accent);
}

/* Sections */
.blog-post-body .blog-section {
  margin-bottom: 56px;
}

.blog-post-body .blog-section h2,
.blog-post-body .blog-post-inner > h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--blog-primary-dark);
  margin: 48px 0 16px;
  line-height: 1.25;
  scroll-margin-top: 24px;
}

.blog-post-body .blog-section h2:first-child,
.blog-post-body .blog-post-inner > h2:first-of-type {
  margin-top: 0;
}

.blog-post-body .blog-intro {
  font-size: 1.05rem;
  color: var(--blog-text-muted);
  margin-bottom: 1rem;
}

.blog-post-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--blog-primary);
  margin: 28px 0 12px;
}

.blog-post-body .blog-post-inner > p {
  color: var(--blog-text);
  margin-bottom: 1rem;
}

/* Grids */
.blog-post-body .grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.blog-post-body .grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

@media (max-width: 991px) {
  .blog-post-body .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .blog-post-body .grid-4,
  .blog-post-body .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Icon cards */
.blog-post-body .card-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 22px 20px;
  min-height: 120px;
  border-radius: var(--blog-radius-sm);
  background: var(--blog-surface-card);
  border: 1px solid var(--blog-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.blog-post-body .card-box:hover {
  border-color: color-mix(in srgb, var(--blog-accent), transparent 55%);
  box-shadow: var(--blog-shadow-hover);
}

.blog-post-body .card-box .icon {
  font-size: 26px;
  margin-bottom: 12px;
  color: var(--blog-accent);
}

.blog-post-body .card-box p {
  margin: 0;
  line-height: 1.5;
  font-size: 14px;
  color: var(--blog-text);
}

.blog-post-body .card-box b {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--blog-primary-dark);
}

/* Key insight strip */
.blog-post-body .strip {
  margin-top: 22px;
  background: var(--blog-callout);
  border: 1px solid var(--blog-callout-border);
  padding: 18px 20px;
  border-radius: var(--blog-radius-sm);
  font-size: 15px;
  color: var(--blog-text);
  line-height: 1.55;
}

/* FAQ / accordion grid */
.blog-post-body .faq-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .blog-post-body .faq-container {
    grid-template-columns: 1fr;
  }
}

.blog-post-body .faq-item {
  background: var(--blog-surface-card);
  border-radius: var(--blog-radius-sm);
  border: 1px solid var(--blog-border);
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

.blog-post-body .faq-item:hover {
  box-shadow: var(--blog-shadow);
}

.blog-post-body .faq-question {
  width: 100%;
  padding: 16px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--blog-font);
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: var(--blog-primary-dark);
}

.blog-post-body .faq-question .faq-q-badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blog-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
}

.blog-post-body .faq-question .faq-question-text {
  flex: 1;
  display: flex;
  align-items: center;
}

.blog-post-body .faq-question .bi-chevron-down {
  flex-shrink: 0;
  color: var(--blog-text-muted);
  transition: transform 0.3s ease;
}

.blog-post-body .faq-item.active .faq-question .bi-chevron-down {
  transform: rotate(180deg);
}
.faq-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}
.blog-post-body .faq-answer {
  padding: 0 18px 18px;
  padding-left: 18px;
  font-size: 14px;
  color: var(--blog-text-muted);
  display: none;
  line-height: 1.55;
  border-top: 1px solid transparent;
}

.blog-post-body .faq-item.active .faq-answer {
  display: block;
  border-top-color: var(--blog-border);
  padding-top: 12px;
}

/* Lists */
.blog-post-body ul {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.blog-post-body .blog-checklist li {
  position: relative;
  padding-left: 8px;
  margin-bottom: 10px;
}

.blog-post-body .blog-checklist li::marker {
  color: var(--blog-accent);
}

/* Comparison table */
.blog-post-body .blog-table-wrap {
  overflow-x: auto;
  margin: 20px 0 8px;
  border-radius: var(--blog-radius-sm);
  border: 1px solid var(--blog-border);
  box-shadow: var(--blog-shadow);
}

.blog-post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 14px;
}

.blog-post-body .blog-table-wrap table {
  margin: 0;
}

.blog-post-body th {
  background: var(--blog-primary);
  color: #fff;
  padding: 14px 16px;
  font-weight: 600;
  text-align: left;
}

.blog-post-body td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--blog-border);
  vertical-align: top;
}

.blog-post-body tbody tr:nth-child(even) {
  background: #f7fafd;
}

.blog-post-body tbody tr:last-child td {
  border-bottom: none;
}

.blog-post-body table.table {
  margin-top: 0;
}

.blog-post-body table.table th {
  background: var(--blog-primary);
  color: #fff;
}

.blog-post-body table.table td {
  border: none;
  border-bottom: 1px solid var(--blog-border);
}

/* Conclusion card */
.blog-post-body .blog-highlight {
  background: var(--blog-surface-tint);
  border: 1px solid var(--blog-border);
  border-radius: var(--blog-radius-sm);
  padding: 22px 24px;
  margin: 20px 0 24px;
  box-shadow: var(--blog-shadow);
}

.blog-post-body .blog-highlight ul {
  margin-bottom: 0;
}

.blog-post-body .blog-highlight p:last-child {
  margin-bottom: 0;
}

.blog-post-body .blog-conclusion {
  background: var(--blog-surface-card);
  border: 1px solid var(--blog-border);
  border-radius: var(--blog-radius);
  padding: 28px 24px;
  margin: 40px 0 24px;
  box-shadow: var(--blog-shadow);
}

.blog-post-body .blog-conclusion h3 {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.blog-post-body .blog-conclusion h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blog-accent);
}

/* CTA */
.blog-post-body .cta,
.blog-post-body .blog-cta {
  margin-top: 32px;
  padding: 36px 32px;
  border-radius: var(--blog-radius);
  background: linear-gradient(
    135deg,
    var(--blog-primary-dark) 0%,
    var(--blog-primary) 55%,
    var(--blog-accent) 100%
  );
  color: #fff;
  box-shadow: 0 16px 40px rgba(6, 58, 107, 0.25);
}

.blog-post-body .cta h3,
.blog-post-body .blog-cta h3 {
  color: #fff;
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.blog-post-body .cta p,
.blog-post-body .blog-cta p {
  margin: 0;
  opacity: 0.95;
  font-size: 1rem;
}

.blog-post-body .cta a,
.blog-post-body .blog-cta a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-post-body .cta a:hover,
.blog-post-body .blog-cta a:hover {
  opacity: 0.92;
}

.blog-post-body .blog-cta-actions {
  margin-top: 20px;
}

.blog-post-body .blog-cta .btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--blog-primary-dark);
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 15px;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.blog-post-body .blog-cta .btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  color: var(--blog-primary-dark);
}

/* Solution blocks (numbered h3 + ul) */
.blog-post-body .blog-solution-block {
  background: var(--blog-surface-card);
  border: 1px solid var(--blog-border);
  border-radius: var(--blog-radius-sm);
  padding: 20px 22px;
  margin-bottom: 18px;
}

.blog-post-body .blog-solution-block h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

.blog-post-body .blog-solution-block ul {
  margin-bottom: 0;
}

/* Two-column list sections */
.blog-post-body .blog-columns-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .blog-post-body .blog-columns-2 {
    grid-template-columns: 1fr;
  }
}

.blog-post-body .blog-list-card {
  background: var(--blog-surface-card);
  border: 1px solid var(--blog-border);
  border-radius: var(--blog-radius-sm);
  padding: 20px 22px;
}

.blog-post-body .blog-list-card h2 {
  margin-top: 0;
}

.blog-post-body .blog-list-card ul {
  margin-bottom: 0;
}

/* Mobile: magazine hero stacks; badges 2×2 */
@media (max-width: 768px) {
  .blog-post-body .blog-hero-panel--magazine {
    padding: 24px 18px 22px;
  }

  .blog-post-body .blog-hero-visual {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .blog-post-body .blog-hero-visual-brand {
    min-height: 200px;
    padding: 24px 16px 20px;
  }

  .blog-post-body .blog-hero-visual-kicker {
    margin-top: 28px;
    max-width: 100%;
  }

  .blog-post-body .blog-hero-visual-photo,
  .blog-post-body .blog-hero-visual-photo img {
    min-height: 220px;
  }

  .blog-post-body .blog-hero-panel--magazine .blog-hero-badges {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .blog-post-body .badges:not(.blog-hero-badges) {
    flex-direction: column;
  }

  .blog-post-body .badge-box {
    min-width: 0;
  }

  .blog-post-body .blog-hero-panel:not(.blog-hero-panel--magazine) {
    padding: 24px 20px;
  }
}

@media (max-width: 480px) {
  .blog-post-body .blog-hero-panel--magazine .blog-hero-badges {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Blog index page (.blog-index-page) — hero + featured list
   -------------------------------------------------------------------------- */
.blog-index-page {
  --blog-ui-blue: #3498db;
  --blog-ui-blue-hover: #2980b9;
  --blog-ui-blue-soft: rgba(52, 152, 219, 0.12);
  --blog-ui-blue-ring: rgba(52, 152, 219, 0.28);
  --blog-ui-heading: #2c3e50;
  --blog-ui-muted: #7f8c8d;
  --blog-ui-chip-border: #aed6f1;
  --blog-ui-page-bg: #fff;
  --blog-ui-card-bg: #ffffff;
  --blog-site-header: 72px;

  font-family: var(--blog-font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--blog-site-header);
  background: var(--blog-ui-page-bg);
}

/* Site header: same structure as FAQ/home (placeholder is sibling of #main, not inside it) */
.blog-index-page #header-placeholder {
  flex-shrink: 0;
}

.blog-index-page #header {
  z-index: 997;
  transition: all 0.5s;
  padding: 22px 0;
  background: #fff;
  width: 100%;
}

.blog-index-page #header.header-scrolled {
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.blog-index-page #header .logo a,
.blog-index-page #header .logo a:hover {
  color: #222222 !important;
  text-decoration: none !important;
}

.blog-index-page #header .navbar a,
.blog-index-page #header .navbar a:focus {
  color: #555555;
}

.blog-index-page #header .navbar a:hover,
.blog-index-page #header .navbar .active,
.blog-index-page #header .navbar li:hover > a {
  color: #3498db;
}

.blog-index-page #header .navbar .getstarted,
.blog-index-page #header .navbar .getstarted:focus {
  background: #3498db;
  color: #fff;
}

.blog-index-page #header .mobile-nav-toggle {
  color: #222222;
}

.blog-index-page #footer-placeholder {
  flex-shrink: 0;
}

.blog-index-page .blog-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Fills viewport; clears fixed site header */
.blog-index-page #main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
  padding-bottom: 3.5rem;
}

/* Top region: intro card (index) or sticky article bar (posts) */
.blog-index-page .blog-index-landing {
  width: 100%;
  box-sizing: border-box;
}

.blog-index-page .blog-index-landing-inner {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 860px;
  padding: 0 1.25rem;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .blog-index-page .blog-index-landing-inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Blog index listing intro card (when present) */
.blog-index-page:not(.blog-article-page) .blog-index-intro-card {
  background: var(--blog-ui-card-bg);
  padding: 22px 28px;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.06),
    0 12px 32px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(52, 152, 219, 0.12);
  border-radius: 16px;
}

/* Article pages: sticky title bar — does not scroll with body */
.blog-article-page {
  --blog-article-bar: 4.5rem;
}

.blog-article-page #main {
  margin-top: 0 !important;
  padding-top: 0;
}

.blog-article-page .blog-index-landing {
  position: sticky;
  top: var(--blog-site-header);
  z-index: 1020;
  flex-shrink: 0;
  background: var(--blog-ui-card-bg, #fff);
  /* border-bottom: 1px solid rgba(52, 152, 219, 0.12);
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.06),
    0 8px 24px rgba(15, 23, 42, 0.06); */
}

.blog-article-page .blog-index-intro-card {
  position: static;
  width: auto;
  margin: 0;
  padding: 14px 0 16px;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

.blog-article-page .blog-index-landing h1.blog-article-title-with-back {
  margin: 0;
  font-size: clamp(1.15rem, 3.2vw, 1.65rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--blog-ui-heading, #2c3e50);
  text-align: left;
}

.blog-article-page section,
.blog-article-page h2,
.blog-article-page h3 {
  scroll-margin-top: calc(
    var(--blog-site-header) + var(--blog-article-bar) + 16px
  );
}

.blog-article-page .blog-article-title-with-back .blog-article-title-text {
  display: block;
  word-break: break-word;
}

.blog-article-page .pricing {
  flex: 1 1 auto;
  min-height: 0;
}

.blog-article-page .pricing .container {
  padding-top: 1.25rem;
}

.blog-article-page .pricing .container > h2:first-child,
.blog-article-page .pricing .container > h3:first-child {
  margin-top: 0;
}

.blog-article-page .hero-img {
  margin-top: 0;
}

@media (max-width: 991px) {
  .blog-article-page {
    --blog-site-header: 64px;
    --blog-article-bar: 4rem;
  }

  .blog-article-page .blog-index-intro-card {
    padding: 12px 0 14px;
  }

  .blog-article-page .blog-back-nav {
    width: 2rem;
    height: 2rem;
  }
}

.blog-index-page .blog-index-intro-row {
  display: grid;
  grid-template-columns: auto 1px minmax(0, 1.15fr) 1px minmax(0, 1fr);
  gap: 20px 24px;
  align-items: center;
}

.blog-index-page .blog-index-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.blog-index-page .blog-index-brand-mark {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.blog-index-page .blog-index-brand-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--blog-ui-blue);
  letter-spacing: -0.02em;
}

.blog-index-page .blog-index-intro-divider {
  display: block;
  width: 1px;
  min-height: 52px;
  align-self: stretch;
  background: #dce4ec;
  border-radius: 1px;
}

.blog-index-page .blog-index-intro-title {
  margin: 0;
  font-size: clamp(1.25rem, 2.8vw, 1.65rem);
  font-weight: 700;
  color: var(--blog-ui-heading);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.blog-index-page .blog-index-intro-lead {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--blog-ui-muted);
}

.blog-index-page:not(.blog-article-page) .blog-index-chips-wrap {
  display: flex;
  justify-content: center;
  padding: 1.25rem 1.25rem 6px;
  box-sizing: border-box;
}

.blog-article-page .blog-index-chips-wrap {
  display: none;
}

@media (max-width: 991px) {
  .blog-index-page .blog-index-intro-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .blog-index-page .blog-index-intro-divider {
    display: none;
  }

  .blog-index-page .blog-index-brand {
    padding-bottom: 4px;
    border-bottom: 1px solid #e8edf3;
  }

  .blog-index-page .blog-index-intro-main {
    border-bottom: 1px solid #e8edf3;
    padding-bottom: 4px;
  }

  .blog-index-page .blog-index-intro-card {
    padding: 18px 20px;
  }
}

.blog-index-page .blog-index-search {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 520px;
  margin-bottom: 22px;
}

.blog-index-page .blog-index-search .bi {
  position: absolute;
  left: 18px;
  font-size: 1.05rem;
  color: #94a3b8;
  pointer-events: none;
}

.blog-index-page .blog-index-search input {
  width: 100%;
  border: 1px solid var(--blog-ui-chip-border);
  border-radius: 999px;
  padding: 14px 18px 14px 48px;
  font-size: 15px;
  font-family: var(--blog-font);
  color: var(--blog-text);
  background: #fff;
  box-shadow: 0 4px 18px rgba(52, 152, 219, 0.08);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.blog-index-page .blog-index-search input::placeholder {
  color: #94a3b8;
}

.blog-index-page .blog-index-search input:focus {
  outline: none;
  border-color: var(--blog-ui-blue);
  box-shadow: 0 0 0 3px var(--blog-ui-blue-ring);
}

.blog-index-page .blog-index-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.blog-index-page .filter-chip {
  font-family: var(--blog-font);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--blog-ui-chip-border);
  background: var(--blog-ui-card-bg);
  color: var(--blog-ui-blue);
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.blog-index-page .filter-chip:hover {
  border-color: var(--blog-ui-blue);
  box-shadow: 0 4px 14px rgba(52, 152, 219, 0.2);
}

.blog-index-page .filter-chip.active {
  background: var(--blog-ui-blue);
  border-color: var(--blog-ui-blue);
  color: #fff;
  box-shadow: 0 6px 22px rgba(52, 152, 219, 0.38);
}

/* Standalone article HTML: legacy .pricing + .container (align with index landing) */
.blog-index-page .pricing {
  width: 100%;
  padding: 0;
  box-sizing: border-box;
}

.blog-index-page .pricing .container {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  padding: 2rem 1.25rem 3rem;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .blog-index-page .pricing .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Article title row: back to blog listing */
.blog-index-page .blog-article-title-with-back {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.65rem;
}

.blog-index-page .blog-article-title-with-back .blog-article-title-text {
  flex: 1 1 auto;
  min-width: 0;
}

.blog-index-page .blog-back-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--blog-radius-sm);
  color: var(--blog-accent);
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.blog-index-page .blog-back-nav:hover {
  background: var(--blog-surface-tint);
  text-decoration: none;
  color: var(--blog-primary);
}

.blog-index-page .blog-back-nav:focus-visible {
  outline: 2px solid var(--blog-accent);
  outline-offset: 2px;
}

.blog-index-page .blog-back-nav .bi {
  font-size: 1.35rem;
  line-height: 1;
}

.blog-index-page .pricing .highlight {
  background: linear-gradient(165deg, #f5f8fd 0%, #e8f2fc 50%, #f0f6fd 100%);
  border: 1px solid var(--blog-border);
  border-radius: var(--blog-radius-sm);
  padding: 1.25rem 1.35rem;
  margin: 1.25rem 0 1.5rem;
  box-shadow: var(--blog-shadow);
}

.blog-index-page .pricing .highlight ul {
  margin: 0 0 0.85rem;
  padding-left: 1.25rem;
}

.blog-index-page .pricing .highlight ul:last-child {
  margin-bottom: 0;
}

.blog-index-page .pricing .highlight p:last-child {
  margin-bottom: 0;
}

/* Featured block */
.blog-index-page .blog-index-featured {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  max-width: min(1200px, 100%);
  margin-left: auto;
  margin-right: auto;
  padding: 28px 1.25rem 0;
  background: transparent;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .blog-index-page .blog-index-featured {
    padding: 25px 1.5rem 0;
  }
}

.blog-index-page .blog-index-featured-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.blog-index-page .blog-index-featured-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blog-ui-heading);
  margin: 0;
}

.blog-index-page .blog-index-featured-title .bi {
  color: var(--blog-ui-blue);
  font-size: 1.15rem;
}

.blog-index-page .blog-index-view-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--blog-ui-blue);
  text-decoration: none;
}

.blog-index-page .blog-index-view-all:hover {
  color: var(--blog-ui-blue-hover);
  text-decoration: underline;
}

.blog-index-page .blog-index-view-all .bi {
  font-size: 1rem;
}

/* Centered grid — three cards per row on wide viewports */
.blog-index-page .blogs-list--featured {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: center;
  gap: 24px;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  align-items: stretch;
}

@media (max-width: 992px) {
  .blog-index-page .blogs-list--featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 860px;
  }
}

@media (max-width: 640px) {
  .blog-index-page .blogs-list--featured {
    grid-template-columns: 1fr;
    max-width: 440px;
  }
}

/* Vertical card: 16:9 media band + content (mockup style) */
.blog-index-page .blog-cards--featured {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  background: var(--blog-ui-card-bg);
  border-radius: 16px;
  overflow: hidden;
  border: none;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.06),
    0 10px 28px rgba(52, 152, 219, 0.1);
  isolation: isolate;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.blog-index-page .blog-cards--featured:hover {
  transform: translateY(-4px);
  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.07),
    0 16px 40px rgba(52, 152, 219, 0.18);
}

.blog-index-page .blog-card-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
  overflow: hidden;
  line-height: 0;
  background: #e8edf3;
  border-bottom: 1px solid rgba(52, 152, 219, 0.15);
  text-decoration: none;
  color: inherit;
}

.blog-index-page .blog-card-media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  object-position: center;
}

.blog-index-page .blog-card-df {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  padding: 7px 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2980b9, var(--blog-ui-blue));
  box-shadow:
    0 2px 10px rgba(41, 128, 185, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  line-height: 1;
}

.blog-index-page .blog-cards--featured .blog-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px 24px 26px;
}

.blog-index-page .blog-content .badge {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 10px;
  align-self: flex-start;
}

.blog-index-page .badge--cloud {
  background: var(--blog-ui-blue-soft);
  color: var(--blog-ui-blue-hover);
}

.blog-index-page .badge--security {
  background: rgba(52, 152, 219, 0.1);
  color: #1e6b8f;
}

.blog-index-page .blog-cards--featured .blog-content h3 {
  font-size: clamp(1.05rem, 2.2vw, 1.18rem);
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 12px;
  color: var(--blog-ui-heading);
  overflow-wrap: anywhere;
}

.blog-index-page .blog-card-excerpt {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--blog-ui-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  flex: 1 1 auto;
}

.blog-index-page .blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  font-size: 13px;
  color: var(--blog-ui-muted);
  margin-bottom: 16px;
}

.blog-index-page .blog-card-meta .bi {
  margin-right: 6px;
  color: #94a3b8;
  vertical-align: -0.1em;
}

.blog-index-page .read-more {
  margin-top: auto;
  align-self: flex-start;
  color: var(--blog-ui-blue);
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.blog-index-page .read-more:hover {
  color: var(--blog-ui-blue-hover);
  text-decoration: underline;
}

.blog-index-page .read-more::after {
  content: "";
  display: inline-block;
  width: 0.35em;
  height: 0.35em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  margin-top: -1px;
}

.blog-index-page .blog-content h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-index-page .blog-content h3 a:hover {
  color: var(--blog-ui-blue);
}

.blog-index-page .blog-index-empty {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 15px;
  line-height: 1.5;
  color: var(--blog-text-muted);
  margin: 8px 0 0;
  padding: 48px 28px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--blog-radius);
  border: 1px dashed var(--blog-border);
  background: linear-gradient(180deg, #f8fafc 0%, #f0f4f8 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.blog-index-page .blog-index-empty[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .blog-index-page .blog-cards--featured,
  .blog-index-page .blog-cards--featured:hover {
    transition: none;
    transform: none;
  }
}
