/* Blog listing + article page additions (images, article typography) */

/* ===== Blog listing hero — dark rounded banner with a background photo,
   scoped to the blog listing page only (doesn't touch the shared
   .page-hero used site-wide). ===== */
.blog-hero {
  position: relative;
  margin: 96px auto 0;
  max-width: 1280px;
  padding: 0 24px;
}

.blog-hero__inner {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 24px;
}

.blog-hero__inner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.blog-hero__inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,14,0.55) 0%, rgba(10,10,14,0.72) 100%);
  z-index: 1;
}

.blog-hero__content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.blog-hero .breadcrumb {
  justify-content: center;
  margin-bottom: 18px;
}
.blog-hero .breadcrumb a,
.blog-hero .breadcrumb span:not(.breadcrumb__current) { color: rgba(255,255,255,0.6); }
.blog-hero .breadcrumb__current { color: #fff; }

.blog-hero__title {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #fff;
}

@media (max-width: 640px) {
  .blog-hero { margin-top: 84px; padding: 0 16px; }
  .blog-hero__inner { min-height: 260px; padding: 40px 20px; border-radius: 20px; }
}

/* ===== Latest Updates — one big post + a compact list of the next 3 ===== */
.blog-latest {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .blog-latest { grid-template-columns: 1fr; }
}

.blog-latest__main {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 10px 26px rgba(16,24,40,0.05);
}

.blog-latest__main-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.blog-latest__main-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}
.blog-latest__main:hover .blog-latest__main-media img { transform: scale(1.05); }

.blog-latest__main-body { padding: 26px 28px 28px; }

.blog-latest__main-title {
  font-size: clamp(19px, 2vw, 23px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin: 12px 0 10px;
}

.blog-latest__main-text {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-latest__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.blog-latest__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
}
.blog-latest__item:hover { background: var(--bg-alt, #F6F8FB); }

.blog-latest__item-thumb {
  width: 84px; height: 60px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--surface, #F0F3F8);
}
.blog-latest__item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.blog-latest__item-title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-latest__item-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 5px;
}

.blog-load-more {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

#blogSeeMoreBtn {
  position: relative;
  min-width: 180px;
}

#blogSeeMoreBtn.is-loading .blog-load-more__label {
  visibility: hidden;
}

.blog-load-more__spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(0,0,0,0.15);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: blog-spin 0.7s linear infinite;
}

#blogSeeMoreBtn.is-loading .blog-load-more__spinner {
  display: block;
}

@keyframes blog-spin {
  to { transform: rotate(360deg); }
}

/* Featured post — image + content side by side */
.blog-featured {
  padding: 0;
  overflow: hidden;
}

.blog-featured__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.blog-featured__media {
  position: relative;
  min-height: 280px;
}

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

.blog-featured__content {
  padding: 44px 44px 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 900px) {
  .blog-featured__inner { grid-template-columns: 1fr; }
  .blog-featured__media { min-height: 220px; }
  .blog-featured__content { padding: 32px 28px; }
}

.blog-featured__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-featured__text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-featured__readmore {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-weight: 600;
  font-size: 14px;
  color: var(--primary-dark, #D4900A);
}

.blog-featured__readmore i {
  font-size: 12px;
  transition: transform 0.25s ease;
}

.blog-featured:hover .blog-featured__readmore i {
  transform: translateX(4px);
}

/* Blog card image */
.blog-card-v2 {
  padding: 0;
  overflow: hidden;
}

.blog-card-v2__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface, #F0F3F8);
}

.blog-card-v2__category--overlay {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--primary-dark, #D4900A);
  background: rgba(255,255,255,0.92);
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.blog-card-v2__byline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-tertiary);
  margin-top: 8px;
}
.blog-card-v2__byline-dot { opacity: 0.6; }

.blog-card-v2__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.blog-card-v2:hover .blog-card-v2__media img {
  transform: scale(1.05);
}

.blog-card-v2__body {
  padding: 26px 26px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-v2__meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.blog-card-v2__meta-row .blog-card-v2__category { margin-bottom: 0; }

.blog-card-v2__date {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
  white-space: nowrap;
}

.blog-card-v2__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-v2__text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-v2__footer {
  justify-content: space-between;
}

.blog-card-v2__readmore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--primary-dark, #D4900A) !important;
}

.blog-card-v2__readmore i {
  font-size: 10px;
  transition: transform 0.25s ease;
}

.blog-card-v2:hover .blog-card-v2__readmore i {
  transform: translateX(4px);
}

.blog-card-v2__link {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ========== Article (single post) page ========== */
.article-hero {
  /* Clear the fixed header — 44px tucked the breadcrumb under it. */
  padding: clamp(104px, 11vw, 132px) 0 0;
  position: relative;
  overflow: hidden;
}
/* Soft brand glow behind the hero text for depth (subtle, not a banner). */
.article-hero::before {
  content: '';
  position: absolute; top: -80px; right: -120px; width: 620px; height: 460px;
  background: radial-gradient(circle, rgba(245,184,0,0.16), rgba(245,184,0,0) 62%);
  pointer-events: none; z-index: 0;
}
.article-hero > .container { position: relative; z-index: 1; }
/* Keep the breadcrumb on its own line so the category chip drops below it. */
.article-hero .breadcrumb { display: flex; width: fit-content; }

.article-hero__category {
  display: inline-block;
  padding: 7px 16px;
  background: var(--primary-surface, rgba(245,184,0,0.08));
  border: 1px solid var(--primary-border, rgba(245,184,0,0.2));
  color: var(--primary-dark, #D4900A);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 50px;
  margin-bottom: 20px;
}

.article-hero__title {
  font-size: clamp(32px, 4.6vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  max-width: 940px;
  margin-bottom: 20px;
}

.article-hero__excerpt {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 760px;
  margin-bottom: 28px;
}

/* Byline — avatar + Shareide Team + date · read time */
.article-byline {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 36px;
}
.article-byline__avatar {
  width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: linear-gradient(145deg, var(--primary-light), var(--primary));
  border: 2px solid #fff; box-shadow: 0 4px 12px -4px rgba(245,184,0,0.6);
  display: flex; align-items: center; justify-content: center;
}
.article-byline__avatar img { width: 100%; height: 100%; object-fit: cover; }
.article-byline__tx { display: flex; flex-direction: column; gap: 2px; }
.article-byline__name { font-family: var(--font-heading); font-size: 14.5px; font-weight: 700; color: var(--text); }
.article-byline__meta { font-size: 13px; color: var(--text-tertiary, #94A3B8); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.article-byline__meta i { font-size: 11px; }
.article-byline__dot { margin: 0 2px; }

.article-hero__media {
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 1200 / 630;
  box-shadow: 0 34px 70px -30px rgba(20,20,30,0.30);
  border: 1px solid rgba(0,0,0,0.05);
}

.article-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== Article + sidebar layout ===== */
.reading-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  z-index: 9999; transition: width .1s linear;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 52px;
  align-items: start;
}
@media (max-width: 980px) { .article-layout { grid-template-columns: 1fr; gap: 40px; } }

.article-main { min-width: 0; }
.article-main .article-body { max-width: none; margin: 0; }

.article-sidebar__sticky { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 980px) { .article-sidebar__sticky { position: static; } }

.sidebar-card {
  background: #fff; border: 1px solid var(--border, #E8ECF1); border-radius: 16px;
  padding: 20px; box-shadow: 0 6px 22px -16px rgba(20,20,30,0.18);
}
.sidebar-card__title {
  display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--text, #0E0E10); margin-bottom: 14px;
}
.sidebar-card__title i { color: var(--primary-dark); font-size: 12px; }

/* TOC */
.sidebar-toc__list { display: flex; flex-direction: column; gap: 2px; }
.sidebar-toc__link {
  font-size: 13.5px; line-height: 1.4; color: var(--text-secondary, #64748B); font-weight: 500;
  padding: 7px 10px; border-radius: 8px; border-left: 2px solid transparent; transition: all .15s ease;
}
.sidebar-toc__link:hover { background: var(--primary-surface); color: var(--text); }
.sidebar-toc__link.active { color: var(--primary-dark); background: var(--primary-surface); border-left-color: var(--primary); font-weight: 600; }

/* Recent mini-list */
.sidebar-recent { display: flex; flex-direction: column; gap: 4px; }
.sidebar-recent__item { display: flex; gap: 12px; padding: 8px; border-radius: 12px; transition: background .15s ease; }
.sidebar-recent__item:hover { background: var(--bg-alt, #F6F8FB); }
.sidebar-recent__thumb { width: 60px; height: 60px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: #eee; }
.sidebar-recent__thumb img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-recent__tx { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.sidebar-recent__title {
  font-family: var(--font-heading); font-size: 13.5px; font-weight: 600; line-height: 1.35; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sidebar-recent__meta { font-size: 11.5px; color: var(--text-tertiary, #94A3B8); margin-top: 3px; }

/* Sidebar CTA */
.sidebar-cta {
  display: block; text-align: left; color: #fff;
  background: linear-gradient(150deg, #14151a 0%, #23252d 100%); border: none;
}
.sidebar-cta__icon {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, var(--primary-light), var(--primary)); color: #14151a; font-size: 20px; margin-bottom: 14px;
}
.sidebar-cta__title { display: block; font-family: var(--font-heading); font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.sidebar-cta__desc { display: block; font-size: 13px; line-height: 1.55; color: rgba(255,255,255,0.72); margin-bottom: 14px; }
.sidebar-cta__btn { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; color: var(--primary-light); }
.sidebar-cta:hover .sidebar-cta__btn { gap: 10px; }

/* Share bar under the article */
.article-sharebar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border, #E8ECF1);
}
.article-sharebar__label { font-size: 14px; font-weight: 700; color: var(--text); }
.article-sharebar__links { display: flex; gap: 10px; }
.share-btn {
  width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff; border: none; cursor: pointer; transition: transform .15s ease, opacity .15s ease;
}
.share-btn:hover { transform: translateY(-2px); }
.share-btn--wa { background: #25D366; }
.share-btn--fb { background: #1877F2; }
.share-btn--x  { background: #14151a; }
.share-btn--copy { background: var(--primary); color: #14151a; }
.share-btn--copy.copied { background: #16A34A; color: #fff; }

.article-body {
  max-width: 760px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.85;
  color: var(--text-secondary, #334155);
}

.article-body h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin: 44px 0 16px;
}

.article-body h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 32px 0 12px;
}

.article-body p { margin-bottom: 20px; }

.article-body ul,
.article-body ol {
  margin: 0 0 20px;
  padding-left: 24px;
}

.article-body li { margin-bottom: 10px; }

.article-body a {
  color: var(--primary-dark, #D4900A);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(212,144,10,0.35);
}

.article-body strong { color: var(--text); }

/* Related posts */
.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  max-width: 1040px;
  margin: 0 auto;
}

/* 3 → 2 (tablet) → 1 (mobile) instead of jumping straight to one column. */
@media (max-width: 900px) {
  .related-posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .related-posts-grid { grid-template-columns: 1fr; }
}

/* ── Premium polish, scoped to the "Keep Reading" cards only so the main
   blog listing stays untouched. ── */
.related-posts-grid .blog-card-v2 {
  border-radius: 18px;
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 10px 26px rgba(16,24,40,0.05);
  overflow: hidden;
}
.related-posts-grid .blog-card-v2:hover {
  transform: translateY(-6px);
  border-color: rgba(245,184,0,0.35);
  box-shadow: 0 12px 22px rgba(245,184,0,0.10), 0 26px 50px rgba(16,24,40,0.10);
}

/* Soft bottom sheen on the cover so light images keep their edge. */
.related-posts-grid .blog-card-v2__media { position: relative; }
.related-posts-grid .blog-card-v2__media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 58%, rgba(0,0,0,0.07));
  pointer-events: none;
}

/* Category → gold pill badge. */
.related-posts-grid .blog-card-v2__category {
  align-self: flex-start;
  display: inline-block;
  padding: 5px 12px;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary-dark, #D4900A);
  background: linear-gradient(135deg, rgba(245,184,0,0.14), rgba(245,184,0,0.05));
  border: 1px solid rgba(245,184,0,0.22);
  border-radius: 999px;
}

.related-posts-grid .blog-card-v2__title {
  font-size: 18px;
  line-height: 1.35;
  margin-bottom: 16px;
}

/* Footer: read-time (left) + "Read →" (right), split by a hairline. */
.related-posts-grid .blog-card-v2__footer {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.related-posts-grid .blog-card-v2__readtime {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
}
.related-posts-grid .blog-card-v2__readmore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark, #D4900A);
}
.related-posts-grid .blog-card-v2__readmore i {
  font-size: 10px;
  transition: transform 0.25s ease;
}
.related-posts-grid .blog-card-v2:hover .blog-card-v2__readmore i {
  transform: translateX(4px);
}


/* Crawlable archive pagination + category nav.
   These exist so Googlebot can walk the whole archive; they are styled to
   match the outline buttons already used on this page. */
.blog-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}
.blog-pagination__page,
.blog-pagination__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--border-color, #E1E3E5);
    border-radius: 10px;
    color: var(--text-primary, #1A1A1A);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease;
}
.blog-pagination__page:hover,
.blog-pagination__step:hover { border-color: #FCC014; background: rgba(252, 192, 20, .10); }
.blog-pagination__page.is-current {
    background: #FCC014;
    border-color: #FCC014;
    color: #1A1A1A;
    cursor: default;
}
.blog-pagination__gap { padding: 0 4px; color: var(--text-tertiary, #8A8F98); }

.blog-cats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}
.blog-cats__label {
    width: 100%;
    text-align: center;
    margin-bottom: 2px;
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-tertiary, #8A8F98);
}
.blog-cats__link {
    padding: 7px 15px;
    border: 1px solid var(--border-color, #E1E3E5);
    border-radius: 999px;
    color: var(--text-secondary, #4B5058);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.blog-cats__link:hover { border-color: #FCC014; color: var(--text-primary, #1A1A1A); }
.blog-cats__link.is-current { background: #FCC014; border-color: #FCC014; color: #1A1A1A; }
