/* LeadsMerchant blog article pages — works with styles.css + pages-fix.css */
.article-main {
  background: #f8fafc;
  padding: 0 0 3rem;
}
.article-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  color: #fff;
  padding: 2.5rem 0 2rem;
}
.article-hero .container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.article-breadcrumb {
  font-size: 0.875rem;
  opacity: 0.85;
  margin-bottom: 1rem;
}
.article-breadcrumb a {
  color: #93c5fd;
  text-decoration: none;
}
.article-breadcrumb a:hover { text-decoration: underline; }
.article-breadcrumb span { margin: 0 0.35rem; opacity: 0.7; }
.article-h1 {
  font-family: Inter, system-ui, sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 1rem;
  color: #fff;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.9rem;
  opacity: 0.9;
}
.article-meta .meta-category {
  background: rgba(37, 99, 235, 0.35);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.8rem;
}
.article-layout {
  max-width: 760px;
  margin: -1.5rem auto 0;
  padding: 0 1.25rem;
  position: relative;
  z-index: 1;
}
.article-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  padding: 2rem 1.75rem 2.5rem;
}
@media (min-width: 640px) {
  .article-card { padding: 2.5rem 2.75rem 3rem; }
}
.article-featured-img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 10px;
  margin: 0 0 1.75rem;
  display: block;
}
.article-body {
  font-family: Merriweather, Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.75;
  color: #1e293b;
}
.article-body p {
  margin: 0 0 1.15rem;
}
.article-body h2 {
  font-family: Inter, system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin: 2rem 0 0.85rem;
  line-height: 1.3;
}
.article-body h3 {
  font-family: Inter, system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 1.5rem 0 0.6rem;
}
.article-body ul,
.article-body ol {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
}
.article-body li {
  margin-bottom: 0.45rem;
}
.article-body a {
  color: #2563eb;
  font-weight: 500;
}
.article-body .lede {
  font-size: 1.12rem;
  color: #334155;
  border-left: 3px solid #2563eb;
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}
.article-cta-box {
  margin-top: 2.25rem;
  padding: 1.5rem 1.35rem;
  background: #f1f5f9;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  font-family: Inter, system-ui, sans-serif;
}
.article-cta-box h2 {
  margin-top: 0;
  font-size: 1.2rem;
}
.article-cta-box p { margin-bottom: 0.75rem; }
.article-cta-box .cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}
.article-cta-box .cta-btn {
  display: inline-block;
  padding: 0.65rem 1.15rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}
.article-cta-box .cta-btn.primary {
  background: #2563eb;
  color: #fff;
}
.article-cta-box .cta-btn.secondary {
  background: #fff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
}
.article-related {
  margin-top: 1.75rem;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.95rem;
}
.article-related h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #0f172a;
}
.article-related ul {
  margin: 0;
  padding-left: 1.2rem;
}
.article-related a { color: #2563eb; }

/* -------------------------------------------------------------------------
   Blog layout corrections — loaded after pages-fix.css
   ------------------------------------------------------------------------- */

/* Keep the blog footer on the same 1200px/padding grid as the homepage/legal footer. */
.site-footer {
  padding: 60px 0 30px;
}

.site-footer .footer-content {
  grid-template-columns: minmax(180px, 1fr) minmax(0, 2.4fr) minmax(160px, 1fr);
  align-items: start;
}

.site-footer .footer-brand,
.site-footer .footer-links,
.site-footer .footer-social,
.site-footer .footer-column {
  min-width: 0;
}

/* The blog footer has three columns nested inside .footer-links. */
.site-footer .footer-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.site-footer .footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer .social-icons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.site-footer .social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  text-decoration: none;
}

/* Give every card CTA visible separation from its image/content above it. */
.featured-card,
.post-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.featured-content,
.post-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.featured-content .featured-link,
.post-content .post-link {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 1rem;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Keep the footer's two bottom lines aligned, then stack them cleanly on phones. */
.site-footer .footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
}

.site-footer .footer-bottom .copyright {
  margin: 0;
}

.site-footer .footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.site-footer .legal-link {
  color: #cbd5e1;
  text-decoration: none;
}

@media (max-width: 1024px) {
  .site-footer .footer-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer .footer-social {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .site-footer {
    padding: 48px 0 24px;
  }

  .site-footer .footer-content,
  .site-footer .footer-links {
    grid-template-columns: 1fr;
  }

  .site-footer .footer-social {
    grid-column: auto;
  }

  .site-footer .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .site-footer .footer-legal {
    justify-content: center;
  }
}

/* -------------------------------------------------------------------------
   Blog listing hard overrides — loaded after styles.css + pages-fix.css
   ------------------------------------------------------------------------- */

/* pages-fix.css can collapse the image/content boundary on listing cards. */
body:has(.blog-main) .blog-main .featured-card .featured-image-wrapper,
body:has(.blog-main) .blog-main .post-card .post-image-wrapper {
  margin: 0 0 1.25rem !important;
}

body:has(.blog-main) .blog-main .featured-card .featured-content,
body:has(.blog-main) .blog-main .post-card .post-content {
  padding: 1.25rem 1.25rem 1.5rem !important;
}

/* Keep the CTA below the metadata instead of flush against it. */
body:has(.blog-main) .blog-main .featured-card .featured-content .featured-link,
body:has(.blog-main) .blog-main .post-card .post-content .post-link {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 1.25rem !important;
}

/* Restore the blog footer's intended three-column layout and spacing. */
body:has(.blog-main) .blog-main ~ .site-footer,
body:has(.blog-main) .site-footer {
  width: 100%;
  margin-top: 0;
  padding: 60px 0 30px !important;
  background-color: #1e293b;
  color: #fff;
  box-sizing: border-box;
}

body:has(.blog-main) .site-footer > .container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

body:has(.blog-main) .site-footer .footer-content {
  display: grid !important;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 2.4fr) minmax(160px, 1fr) !important;
  gap: 2rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto 2rem;
}

body:has(.blog-main) .site-footer .footer-links {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 2rem;
  min-width: 0;
}

body:has(.blog-main) .site-footer .footer-bottom {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
}

@media (max-width: 1024px) {
  body:has(.blog-main) .site-footer .footer-content {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body:has(.blog-main) .site-footer .footer-social {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  body:has(.blog-main) .site-footer {
    padding: 48px 0 24px !important;
  }

  body:has(.blog-main) .site-footer .footer-content,
  body:has(.blog-main) .site-footer .footer-links {
    grid-template-columns: 1fr !important;
  }

  body:has(.blog-main) .site-footer .footer-social {
    grid-column: auto;
  }

  body:has(.blog-main) .site-footer .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* -------------------------------------------------------------------------
   Blog CTA block hard override — photo first, with clear copy/button spacing
   ------------------------------------------------------------------------- */
body:has(.blog-main) .blog-main .cta-section > .container {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
}

/* Keep the CTA fully above the footer border: real bottom padding, no overlap. */
body:has(.blog-main) .blog-main .cta-section {
  margin: 0 !important;
  padding-bottom: 4rem !important;
  overflow: visible !important;
}

/* Make the image-to-copy boundary unambiguous even if earlier CSS uses grid. */
body:has(.blog-main) .blog-main .cta-section .cta-image-container {
  order: 1 !important;
  display: block !important;
  width: 100% !important;
  margin: 0 0 2.5rem !important;
}

body:has(.blog-main) .blog-main .cta-section .cta-image {
  display: block !important;
  width: 100% !important;
}

body:has(.blog-main) .blog-main .cta-section .cta-content {
  order: 2 !important;
  margin: 0 !important;
  padding-top: 0 !important;
}

/* Keep the buttons separated from the copy as well as from the photo above. */
body:has(.blog-main) .blog-main .cta-section .cta-buttons {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem !important;
}

/* -------------------------------------------------------------------------
   Blog listing pagination spacing — keep cards, controls, and CTA distinct
   ------------------------------------------------------------------------- */
body:has(.blog-main) .blog-main .posts-grid {
  margin-bottom: 2.5rem !important;
}

body:has(.blog-main) .blog-main .pagination {
  margin-top: 0 !important;
  margin-bottom: 3.5rem !important;
}

body:has(.blog-main) .blog-main .cta-section {
  margin-top: 0 !important;
}

/* -------------------------------------------------------------------------
   Blog listing card image boundaries + sidebar breathing room
   ------------------------------------------------------------------------- */

/* Keep the image edge clean: no inherited outlines/borders, and let the
   wrapper own the crop and corner treatment. */
body:has(.blog-main) .blog-main .featured-card .featured-image-wrapper,
body:has(.blog-main) .blog-main .post-card .post-image-wrapper {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 !important;
  padding: 0;
  border: none !important;
  border-radius: 12px 12px 0 0 !important;
  overflow: hidden !important;
  box-sizing: border-box;
  z-index: 0;
}

body:has(.blog-main) .blog-main .featured-card .featured-image,
body:has(.blog-main) .blog-main .post-card .post-image {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none;
}

/* Establish a separate, non-overlapping content block below each image. */
body:has(.blog-main) .blog-main .featured-card .featured-content,
body:has(.blog-main) .blog-main .post-card .post-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  margin: 0 !important;
  padding: 1.25rem 1.25rem 1.5rem !important;
  background: #fff;
  border: none !important;
  box-sizing: border-box;
  clear: both;
}

/* Add comfortable vertical rhythm to the right-rail links and signup block. */
body:has(.blog-main) .blog-main .blog-sidebar .sidebar-widget {
  margin-bottom: 2rem;
}

body:has(.blog-main) .blog-main .blog-sidebar .categories-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
}

body:has(.blog-main) .blog-main .blog-sidebar .category-item {
  margin: 0;
}

body:has(.blog-main) .blog-main .blog-sidebar .category-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  line-height: 1.5;
  padding: 0.1rem 0;
}

body:has(.blog-main) .blog-main .blog-sidebar .popular-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

body:has(.blog-main) .blog-main .blog-sidebar .popular-item {
  margin: 0;
  padding: 0;
}

body:has(.blog-main) .blog-main .blog-sidebar .popular-title {
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

body:has(.blog-main) .blog-main .blog-sidebar .popular-meta {
  line-height: 1.4;
}

body:has(.blog-main) .blog-main .blog-sidebar #newsletterWidget .widget-text {
  margin: 0 0 1.25rem;
  line-height: 1.65;
}

body:has(.blog-main) .blog-main .blog-sidebar #newsletterWidget .sidebar-newsletter {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Final blog listing polish: clean card edges, breathing room, and title rhythm. */
body:has(.blog-main) .blog-main .featured-card,
body:has(.blog-main) .blog-main .post-card {
  background: #fff;
  border: 0 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}

body:has(.blog-main) .blog-main .featured-card .featured-image-wrapper,
body:has(.blog-main) .blog-main .post-card .post-image-wrapper {
  border: 0 !important;
  border-radius: 12px 12px 0 0 !important;
  background: transparent;
  overflow: hidden !important;
}

body:has(.blog-main) .blog-main .featured-card .featured-image,
body:has(.blog-main) .blog-main .post-card .post-image {
  border: 0 !important;
  border-radius: 12px 12px 0 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}

/* Keep the white copy area in normal flow directly below the image. */
body:has(.blog-main) .blog-main .featured-card .featured-content,
body:has(.blog-main) .blog-main .post-card .post-content {
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 0 12px 12px !important;
  background: #fff;
  transform: none !important;
}

/* Add clear separation between the Featured Articles heading and its cards. */
body:has(.blog-main) .blog-main .featured-posts > .container > .section-title {
  margin-bottom: 2rem !important;
}

/* Give the right rail a calmer, more readable vertical rhythm. */
body:has(.blog-main) .blog-main .blog-sidebar .sidebar-widget {
  margin-bottom: 2.5rem !important;
}

body:has(.blog-main) .blog-main .blog-sidebar .categories-list {
  gap: 1rem !important;
}

body:has(.blog-main) .blog-main .blog-sidebar .category-link {
  line-height: 1.55;
  padding: 0.2rem 0;
}

body:has(.blog-main) .blog-main .blog-sidebar .popular-list {
  gap: 1.5rem !important;
}

body:has(.blog-main) .blog-main .blog-sidebar .popular-title {
  margin-bottom: 0.65rem;
  line-height: 1.55;
}

body:has(.blog-main) .blog-main .blog-sidebar #newsletterWidget .widget-title {
  margin-bottom: 1rem !important;
}

body:has(.blog-main) .blog-main .blog-sidebar #newsletterWidget .widget-text {
  margin-bottom: 1.5rem !important;
  line-height: 1.7;
}

body:has(.blog-main) .blog-main .blog-sidebar #newsletterWidget .sidebar-newsletter {
  gap: 1rem !important;
}

body:has(.blog-main) .blog-main .blog-sidebar .sidebar-widget:last-child {
  margin-bottom: 0 !important;
}

/* Add generous separation above Featured Articles after the blog hero. */
body:has(.blog-main) .featured-posts {
  padding-top: 3rem !important;
}

/* Recent Articles heading rhythm: add space above the title and before topic filters. */
body:has(.blog-main) .blog-main .recent-posts > .section-title {
  margin-top: 3rem !important;
  margin-bottom: 1.5rem !important;
}
