/* ============================================================
   ZAlebs — Single post (article) enhancements
   Share buttons, Related Posts, author box, Table of Contents.
   Scoped to `.single-post`; loaded after style.css to override.
   ============================================================ */

/* --- hero image: sit flush inside the card (override the generic
   .article-content img rule that otherwise adds a 12px margin + 8px radius,
   which read as a sloppy white border around the featured image) --- */
.single-post .article-main-img { margin: -24px -26px 18px; }
.single-post .article-main-img img { display: block; width: 100%; margin: 0; border-radius: var(--z-radius) var(--z-radius) 0 0; }

/* --- byline: separators + Last Updated --- */
.single-post .article-header__meta-descr { gap: 8px; }
.single-post .article-header__author { color: var(--z-purple); font-weight: 700; }
.single-post .article-header__author:hover { text-decoration: underline; }
.single-post .z-sep { color: var(--z-line); }
.single-post .article-header__updated { display: inline-flex; align-items: center; gap: 5px; margin-left: 4px; padding: 3px 10px; border-radius: 20px; background: var(--z-tint); color: var(--z-purple-deep); font-weight: 600; font-size: 12px; }

/* ============================================================
   Share buttons (top + bottom) — clean, even, round
   ============================================================ */
.single-post .article__share-links { display: flex; align-items: center; gap: 10px; margin: 14px 0 18px; flex-wrap: wrap; }
.single-post .article__share-label { font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--z-muted); margin-right: 2px; }
.single-post .z-share { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; line-height: 1; transition: transform .12s ease, opacity .12s ease; text-decoration: none; }
.single-post .z-share:hover { transform: translateY(-2px); opacity: .92; }
.single-post .z-share--fb { background: #1877f2; }
.single-post .z-share--x { background: #000; }
.single-post .z-share--wa { background: #25d366; }
.single-post .z-share--email { background: var(--z-purple); }

/* ============================================================
   Author box (end of article)
   ============================================================ */
.single-post .z-author-box { display: flex; gap: 16px; align-items: center; margin: 26px 0 6px; padding: 14px 18px; background: #fff; border-radius: var(--z-radius); }
.single-post .z-author-box__media { flex: 0 0 auto; line-height: 0; }
.single-post .z-author-box__avatar { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; display: block; border: 2px solid #fff; box-shadow: 0 0 0 2px var(--z-purple-soft, var(--z-purple)); }
.single-post .z-author-box__avatar--initials { display: flex; align-items: center; justify-content: center; font-family: var(--z-display); font-size: 22px; letter-spacing: 1px; color: #fff; background: linear-gradient(135deg, var(--z-purple), var(--z-purple-deep)); }
.single-post .z-author-box__body { min-width: 0; }
.single-post .z-author-box__eyebrow { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .7px; color: var(--z-purple); font-weight: 800; margin-bottom: 1px; }
.single-post .z-author-box__headrow { gap: 8px; }
.single-post .z-author-box__name { display: inline-block; font-family: var(--z-display); font-size: 17px; letter-spacing: .3px; color: var(--z-purple-deep); margin: 0; }
.single-post .z-author-box__name:hover { color: var(--z-purple); }
.single-post .z-author-box__linkedin { width: 22px; height: 22px; font-size: 11px; }
.single-post .z-author-box__position { font-size: 12px; margin: 2px 0 4px; }
.single-post .z-author-box__bio { font-size: 12.5px; line-height: 1.5; color: #555; margin: 0 0 4px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.single-post .z-author-box__bio p { margin: 0; display: inline; }
.single-post .z-author-box__date { font-size: 11.5px; color: var(--z-muted); }

/* ============================================================
   Preferred source — "Add ZAlebs to Google" CTA (reuses ZCT bg)
   ============================================================ */
.single-post .preferred-source { position: relative; overflow: hidden; display: flex; align-items: center; gap: 28px; margin: 18px 0 6px; padding: 22px 30px; border-radius: var(--z-radius); color: #fff;
  background-color: var(--z-purple-deep);
  background-image: linear-gradient(110deg, rgba(30,10,40,.92) 34%, rgba(106,50,127,.45) 100%), url('../img/zct-bg.png');
  background-size: cover; background-position: center; background-repeat: no-repeat; }
.single-post .preferred-source__action { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 12px; max-width: 260px; padding: 12px 18px; background: #17171a; color: #fff; font-size: 14px; font-weight: 600; line-height: 1.25; text-decoration: none; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.3); transition: background .15s ease, transform .15s ease; }
.single-post .preferred-source__action:hover { background: #26262b; transform: translateY(-1px); }
.single-post .preferred-source__action-chip { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; background: #fff; border-radius: 50%; }
.single-post .preferred-source__action-chip .preferred-source__action-icon { display: block; width: 18px; height: 18px; }
.single-post .preferred-source__action-text { white-space: normal; }
.single-post .preferred-source__info { position: relative; flex: 1 1 auto; min-width: 0; margin-left: auto; display: flex; flex-direction: column; gap: 4px; text-align: right; }
.single-post .preferred-source__heading { font-family: var(--z-display); font-size: 30px; line-height: 1.1; letter-spacing: .3px; color: #fff; }
.single-post .preferred-source__description { font-size: 15px; line-height: 1.4; color: rgba(255,255,255,.82); }

@media (max-width: 991px) {
  .single-post .preferred-source__heading { font-size: 24px; }
}
@media (max-width: 767px) {
  .single-post .preferred-source { flex-direction: column-reverse; align-items: stretch; gap: 14px; padding: 20px 18px; }
  .single-post .preferred-source__info { margin-left: 0; text-align: center; gap: 5px; }
  .single-post .preferred-source__heading { font-size: 22px; }
  .single-post .preferred-source__action { max-width: none; justify-content: center; text-align: left; }
}

/* ============================================================
   Related Posts — image / title / date · author
   ============================================================ */
.single-post .z-related { margin: 28px 0 10px; border-top: 1px solid var(--z-line); padding-top: 18px; }
.single-post .z-related__title { font-family: var(--z-display); font-size: 24px; letter-spacing: .5px; color: var(--z-purple-deep); margin: 0 0 16px; }
.single-post .z-related__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.single-post .z-related__card { display: flex; flex-direction: column; }
.single-post .z-related__thumb { display: block; aspect-ratio: 16/10; border-radius: 8px; overflow: hidden; background: var(--z-tint-2); margin-bottom: 10px; }
.single-post .z-related__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.single-post .z-related__thumb-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-family: var(--z-display); font-size: 22px; letter-spacing: 1px; color: #fff; background: linear-gradient(135deg, var(--z-purple), var(--z-purple-deep)); }
.single-post .z-related__name { font-weight: 700; font-size: 15px; line-height: 1.3; color: var(--z-purple-deep); margin-bottom: 6px; }
.single-post .z-related__card:hover .z-related__name { color: var(--z-purple); }
.single-post .z-related__meta { font-size: 12px; color: var(--z-muted); margin-top: auto; }

/* ============================================================
   Table of Contents (col-lg-4) — sticky + scrollspy
   ============================================================ */
.single-post .z-toc { position: sticky; top: calc(var(--z-header-h, 96px) + 10px); background: #fff; border: 1px solid var(--z-line); border-radius: var(--z-radius); padding: 16px 18px; margin-top: 24px; margin-bottom: 22px; max-height: calc(100vh - var(--z-header-h, 96px) - 30px); overflow-y: auto; }
.single-post .z-toc__title { font-family: var(--z-display); font-size: 16px; letter-spacing: .6px; text-transform: uppercase; color: var(--z-purple-deep); margin-bottom: 10px; }
.single-post .z-toc__list { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--z-line); }
.single-post .z-toc__list li { margin: 0; }
.single-post .z-toc__link { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: #555; font-size: 13.5px; line-height: 1.4; text-decoration: none; transition: color .15s ease, border-color .15s ease, font-size .15s ease, transform .15s ease; transform-origin: left center; }
.single-post .z-toc__link:hover { color: var(--z-purple); }
.single-post .z-toc__link.is-active { color: var(--z-purple); font-weight: 700; font-size: 14.5px; border-left-color: var(--z-purple); transform: scale(1.04); }

/* offset anchored headings so the sticky header doesn't cover them */
.single-post .article-content h2[id] { scroll-margin-top: calc(var(--z-header-h, 96px) + 10px); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 991px) {
  .single-post .z-toc { position: static; max-height: none; }
}
@media (max-width: 767px) {
  .single-post .z-related__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .single-post .z-author-box { flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 14px; }
  .single-post .z-author-box__avatar { width: 54px; height: 54px; }
  .single-post .z-author-box__avatar--initials { font-size: 20px; }
  .single-post .z-author-box__headrow { justify-content: center; }
  .single-post .z-author-box__bio { -webkit-line-clamp: 4; text-align: left; }
}
@media (max-width: 420px) {
  .single-post .z-related__grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}
