/* Blog listing + article layout (load after style.css) */

.blog-read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 1080;
  background: transparent;
  pointer-events: none;
}

.blog-read-progress-fill {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--accent));
  transition: transform 0.12s ease-out;
}

.blog-post-main {
  background: linear-gradient(180deg, var(--bg-section) 0%, var(--bg-body) 18rem, var(--bg-body) 100%);
  min-height: 50vh;
}

.blog-post-container {
  max-width: 1140px;
}

.blog-breadcrumb-nav .breadcrumb {
  margin-bottom: 0;
  font-size: 0.875rem;
}

.blog-breadcrumb-card {
  padding: 0.65rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.blog-hero-card {
  position: relative;
  overflow: hidden;
  padding: 1.75rem 1.75rem 1.5rem;
  border-radius: var(--card-radius);
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(27, 67, 50, 0.06);
}

.blog-hero-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--accent));
}

.blog-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(64, 145, 108, 0.12);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.blog-hero-card h1 {
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  line-height: 1.15;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.blog-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.blog-meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.blog-meta-dot::before {
  content: "·";
  margin-right: 0.35rem;
  opacity: 0.5;
}

.blog-dek {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 0;
  max-width: 42rem;
}

.blog-ad-slot {
  border-radius: 12px;
  min-height: 90px;
}

.blog-article-shell {
  padding: 2rem 1.75rem 2.25rem;
  border-radius: var(--card-radius);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.blog-prose {
  font-size: 1.0625rem;
  line-height: 1.78;
  color: var(--text-secondary);
}

.blog-prose > p {
  margin-bottom: 1.15rem;
}

.blog-prose > p:last-child {
  margin-bottom: 0;
}

.blog-prose .lead {
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--text-primary);
  font-weight: 500;
}

.blog-prose h2 {
  font-size: 1.35rem;
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
  padding-top: 0.5rem;
  color: var(--text-primary);
  scroll-margin-top: 5.5rem;
}

.blog-prose h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
}

.blog-prose h3 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.65rem;
  color: var(--text-primary);
}

.blog-prose ul,
.blog-prose ol {
  margin-bottom: 1.15rem;
  padding-left: 1.35rem;
}

.blog-prose li {
  margin-bottom: 0.45rem;
}

.blog-prose a {
  color: var(--primary);
  font-weight: 500;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.blog-prose a:hover {
  color: var(--primary-light);
}

.blog-insight-card {
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
  margin: 1.75rem 0;
  border: 1px solid rgba(64, 145, 108, 0.35);
  background: linear-gradient(135deg, rgba(64, 145, 108, 0.08) 0%, rgba(244, 162, 97, 0.06) 100%);
}

.blog-insight-card .blog-insight-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.blog-insight-card p:last-child {
  margin-bottom: 0;
}

.blog-key-points {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 1.25rem 1.35rem;
  margin: 1.75rem 0;
}

.blog-key-points h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.blog-key-points ul {
  margin: 0;
}

.blog-pullquote {
  margin: 2rem 0;
  padding: 1.25rem 0 1.25rem 1.25rem;
  border-left: 4px solid var(--accent);
  font-family: "Sora", sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary);
  background: rgba(244, 162, 97, 0.08);
  border-radius: 0 12px 12px 0;
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.blog-tag {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-section);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.blog-sidebar {
  position: sticky;
  top: 5.75rem;
}

.blog-sidebar-card {
  padding: 1.25rem 1.35rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.blog-sidebar-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary);
  margin-bottom: 0.85rem;
}

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

.blog-toc-list a {
  display: block;
  font-size: 0.9rem;
  padding: 0.4rem 0;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.blog-toc-list a:hover {
  color: var(--primary);
  border-bottom-color: rgba(64, 145, 108, 0.35);
}

.blog-share-aside .blog-share-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.blog-share-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.blog-share-chip:hover {
  background: rgba(64, 145, 108, 0.1);
  border-color: var(--primary-light);
  color: var(--primary);
}

.blog-share-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.blog-share-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-body);
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.blog-share-icon-btn svg {
  flex-shrink: 0;
}

.blog-share-icon-btn:hover {
  color: var(--primary);
  border-color: var(--primary-light);
  background: rgba(64, 145, 108, 0.08);
  transform: translateY(-1px);
}

.blog-share-icon-btn.is-copied {
  color: var(--primary);
  border-color: var(--primary-light);
}

.blog-related-sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-related-sidebar-list li + li {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.blog-related-sidebar-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.blog-related-sidebar-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  transition: color 0.15s ease;
}

.blog-related-sidebar-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.blog-related-sidebar-link:hover .blog-related-sidebar-title {
  color: var(--primary);
}

.blog-ad-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.blog-sidebar-mrec {
  min-height: 250px;
  max-width: 300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-section);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.blog-sidebar-ad-slot .blog-sidebar-mrec:empty::after {
  content: "AdSense unit (e.g. 300×250)";
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1rem;
}

.blog-related-section {
  margin-top: 2rem;
}

.blog-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.blog-related-card {
  display: block;
  padding: 1.15rem 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  background: var(--bg-card);
  height: 100%;
}

.blog-related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  border-color: var(--primary-light);
}

.blog-related-card .small {
  color: var(--text-muted);
}

.blog-cta-bottom {
  border-radius: var(--card-radius);
  padding: 1.5rem 1.5rem;
  border: 1px dashed var(--border);
  background: var(--bg-section);
  text-align: center;
  margin-top: 2rem;
}

/* ——— Blog index (listing) ——— */
.blog-landing-hero {
  position: relative;
  padding: 2.5rem 0 2rem;
  margin-bottom: 0.5rem;
}

.blog-landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 0% 0%, rgba(64, 145, 108, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 20%, rgba(244, 162, 97, 0.15), transparent 50%);
  pointer-events: none;
  border-radius: 0 0 24px 24px;
}

.blog-landing-inner {
  position: relative;
  z-index: 1;
}

.blog-landing-kicker {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.blog-landing-title {
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  line-height: 1.12;
  margin-bottom: 0.65rem;
}

.blog-landing-lead {
  font-size: 1.1rem;
  max-width: 36rem;
  color: var(--text-secondary);
}

.blog-featured-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--card-radius);
  border: 1px solid var(--border);
  padding: 0;
  box-shadow: 0 24px 60px rgba(27, 67, 50, 0.08);
}

.blog-featured-card-inner {
  padding: 2rem 2rem 1.75rem;
  position: relative;
}

.blog-featured-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(64, 145, 108, 0.07) 0%, rgba(244, 162, 97, 0.05) 100%);
  pointer-events: none;
}

.blog-post-card {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 1.35rem 1.4rem 1.25rem;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: var(--bg-card);
  overflow: hidden;
}

.blog-post-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary-light), var(--accent));
  opacity: 0.85;
}

.blog-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.09);
}

.blog-post-card h3 {
  font-size: 1.1rem;
  margin: 0.35rem 0 0.5rem;
  padding-left: 0.35rem;
}

.blog-post-card .blog-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-left: 0.35rem;
}

.blog-post-card .badge {
  margin-left: 0.35rem;
}

@media (max-width: 991.98px) {
  .blog-sidebar {
    position: relative;
    top: auto;
  }

  .blog-landing-hero {
    padding-bottom: 1.5rem;
  }
}

/* Blog index: two-column listing + decorative thumbs + pagination */
.blog-listing-layout {
  align-items: flex-start;
}

.blog-listing-grid .blog-post-card {
  display: flex;
  flex-direction: column;
}

/* Before JS: avoid flashing all cards; show first page only */
.blog-listing-grid:not(.blog-listing-ready) > .col-md-6:nth-child(n + 13) {
  display: none !important;
}

.blog-card-thumb {
  height: 4.25rem;
  margin: -1.35rem -1.4rem 0.85rem;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(118deg, rgba(64, 145, 108, 0.2) 0%, rgba(244, 162, 97, 0.14) 55%, rgba(27, 67, 50, 0.08) 100%);
  pointer-events: none;
}

.blog-aside-card a {
  color: var(--primary);
  font-weight: 500;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.blog-aside-ad {
  border-radius: 12px;
  min-height: 250px;
}

@media (min-width: 992px) {
  .blog-listing-layout > aside {
    position: sticky;
    top: 5.5rem;
    align-self: flex-start;
  }
}

.blog-pagination-nav .btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}
