/* ============================================================
   single-styles.css — Red Digitals Single Post
   Depends on global.css (root variables already defined)
   ============================================================ */

/* ── ARTICLE WRAPPER ── */
.article-wrap {
  max-width: var(--page-narrow-width);
  margin: 0 auto;
  padding: 0 var(--sec-padding);
}

/* ── BREADCRUMB ── */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 0 20px;
  font-size: 13px;
  color: var(--mid);
}
.breadcrumb a {
  color: var(--mid);
  transition: color 0.15s;
}
.breadcrumb a:hover {
  color: var(--white);
}
.breadcrumb .sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 11px;
}
.breadcrumb .current {
  color: var(--light);
}

/* ── POST HEADER ── */
.post-header {
  padding-bottom: 20px;
}
.post-cat-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  margin-bottom: 16px;
}
.post-title {
  font-family: var(--fs);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--white);
  margin-bottom: 20px;
}
.post-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.post-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.author-av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--red-d));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--fs);
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}
.author-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
}
.author-date {
  font-size: 12px;
  color: var(--mid);
  margin-top: 1px;
}
.meta-sep {
  color: var(--border);
  margin: 0 4px;
}
.read-time {
  font-size: 12px;
  color: var(--mid);
}

/* Share buttons */
.share-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--light);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.share-btn:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
}
.share-btn.linkedin {
  border-color: #0a66c2;
  color: #0a66c2;
}
.share-btn.linkedin:hover {
  background: rgba(10, 102, 194, 0.1);
}
.share-btn.twitter {
  border-color: #1da1f2;
  color: #1da1f2;
}
.share-btn.twitter:hover {
  background: rgba(29, 161, 242, 0.1);
}

/* ── HERO IMAGE ── */
.post-hero-img {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  margin: 24px 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-hero-img-text {
  font-family: var(--fs);
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: -1px;
  position: absolute;
  bottom: 32px;
  left: 40px;
  line-height: 1;
}
.post-hero-img-emoji {
  font-size: 100px;
  opacity: 0.2;
  user-select: none;
}

/* ── TWO-COLUMN LAYOUT ── */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
  margin-top: 8px;
}

/* ── ARTICLE CONTENT ── */
.post-content {
}
/* Key Takeaways box */
.takeaways {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 36px;
}
.takeaways-title {
  font-family: var(--fs);
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.takeaways-title::before {
  content: "🔑";
  font-size: 14px;
}
.takeaways ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.takeaways li {
  font-size: 14px;
  color: var(--light);
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
}
.takeaways li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 700;
  font-size: 13px;
}

/* Article typography */
.post-content h2 {
  font-family: var(--fs);
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  margin: 36px 0 14px;
  line-height: 1.25;
}
.post-content h3 {
  font-family: var(--fs);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  margin: 28px 0 12px;
  line-height: 1.3;
}
.post-content p {
  font-size: 15px;
  color: var(--light);
  line-height: 1.8;
  margin-bottom: 18px;
}
/* Step number */
.post-content .step-num {
  font-family: var(--fs);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
  display: block;
}
.post-content strong {
  color: var(--white);
  font-weight: 600;
}
.post-content a {
  color: var(--red);
  text-decoration: underline;
  text-decoration-color: rgba(232, 25, 44, 0.3);
  transition: text-decoration-color 0.15s;
}
.post-content a:hover {
  text-decoration-color: var(--red);
}
.post-content ul,
.post-content ol {
  padding-left: 20px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.post-content li {
  font-size: 15px;
  color: var(--light);
  line-height: 1.7;
}
.post-content li::marker {
  color: var(--red);
}
.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}
/* Inline image grids */
.img-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 24px 0;
}
.img-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 24px 0;
}
.img-grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 24px 0;
}
.post-img {
  border-radius: 8px;
  overflow: hidden;
  background: var(--card);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: rgba(255, 255, 255, 0.1);
}
.post-img.wide {
  aspect-ratio: 16/7;
}
.post-img.tall {
  aspect-ratio: 3/4;
}

/* Callout box */
.callout {
  background: rgba(232, 25, 44, 0.06);
  border: 1px solid rgba(232, 25, 44, 0.15);
  border-radius: 8px;
  padding: 18px 22px;
  margin: 24px 0;
}
.callout p {
  color: var(--light);
  font-size: 14px;
  margin: 0;
  line-height: 1.7;
}
.callout strong {
  color: var(--white);
}

/* ── TABLE OF CONTENTS (sticky right) ── */
.toc-wrap {
  position: sticky;
  top: 80px;
}
.toc-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 22px;
  margin-bottom: 20px;
}
.toc-title {
  font-family: var(--fs);
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}
.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toc-list li a {
  font-size: 13px;
  color: var(--mid);
  display: block;
  padding: 5px 8px;
  border-radius: 5px;
  border-left: 2px solid transparent;
  transition: all 0.15s;
  line-height: 1.4;
}
.toc-list li a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
  border-left-color: var(--red);
}
.toc-list li a.active {
  color: var(--white);
  border-left-color: var(--red);
  background: rgba(232, 25, 44, 0.06);
}
/* Share sidebar */
.share-sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 22px;
}
.share-sidebar-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 14px;
}
.share-sidebar-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ssb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: 7px;
  border: 1px solid var(--border);
  color: var(--light);
  cursor: pointer;
  transition: all 0.15s;
}
.ssb:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
}
.ssb.li {
  border-color: rgba(10, 102, 194, 0.3);
  color: #5b9bd5;
}
.ssb.li:hover {
  background: rgba(10, 102, 194, 0.08);
  border-color: #0a66c2;
}
.ssb.tw {
  border-color: rgba(29, 161, 242, 0.25);
  color: #6bb8ef;
}
.ssb.tw:hover {
  background: rgba(29, 161, 242, 0.08);
  border-color: #1da1f2;
}
.ssb.cp {
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--mid);
}

/* ── AUTHOR BIO ── */
.author-bio {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 32px;
  margin: 48px 0 0;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.bio-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--red-d));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--fs);
  font-size: 24px;
  color: #fff;
  flex-shrink: 0;
}
.bio-right {
}
.bio-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 6px;
}
.bio-name {
  font-family: var(--fs);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}
.bio-role {
  font-size: 13px;
  color: var(--mid);
  margin-bottom: 14px;
}
.bio-desc {
  font-size: 14px;
  color: var(--light);
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 18px;
}
.bio-socials {
  display: flex;
  gap: 10px;
  align-items: center;
}
.post-content .bio-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 7px;
  border: 1px solid var(--border);
  color: var(--light);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.bio-social-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--white);
}
.bio-social-btn.linkedin {
  border-color: rgba(10, 102, 194, 0.4);
  color: #5b9bd5;
}
.bio-social-btn.linkedin:hover {
  background: rgba(10, 102, 194, 0.1);
  border-color: #0a66c2;
  color: #7ab8f5;
}
.bio-stats {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border2);
}
.bio-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.bio-stat-n {
  font-family: var(--fs);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
}
.bio-stat-l {
  font-size: 12px;
  color: var(--mid);
  margin-top: 2px;
}

/* ── RELATED POSTS ── */
.related-section {
  padding: 48px 0 0;
}
.related-title {
  font-family: var(--fs);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 24px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.rel-card {
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.2s;
  display: block;
}
.rel-card:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}
.rel-thumb {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  background: var(--card2);
}
.rel-thumb img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.rel-body {
  padding: 14px 16px 18px;
}
.rel-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 7px;
}
.rel-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* image bg helpers */
.bg1 {
  background: linear-gradient(135deg, #0d1a12, #0a140e);
}
.bg2 {
  background: linear-gradient(135deg, #1a0d12, #120810);
}
.bg3 {
  background: linear-gradient(135deg, #0d0f1a, #080a14);
}
.bg4 {
  background: linear-gradient(135deg, #1a160d, #14100a);
}
.bg5 {
  background: linear-gradient(135deg, #1a0d0d, #140808);
}
.bg6 {
  background: linear-gradient(135deg, #0d1a1a, #081414);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ── Tablet: 1024px ── */
@media (max-width: 1024px) {
  .post-layout {
    grid-template-columns: 1fr 240px;
    gap: 32px;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Tablet: 768px ── */
@media (max-width: 767px) {
  /* TOC moves above content on tablet */
  .post-layout {
    grid-template-columns: 1fr;
  }

  .toc-wrap {
    position: static;
    order: -1;
  }

  .share-btns {
    display: none; /* hide header share on mobile — sidebar still shows */
  }

  .author-bio {
    flex-direction: column;
    padding: 24px;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .post-hero-img {
    aspect-ratio: 16/8;
  }
}

/* ── Mobile: 480px ── */
@media (max-width: 480px) {
  .post-meta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .bio-stats {
    gap: 16px;
    justify-content: space-between;
  }

  .post-hero-img {
    aspect-ratio: 4/3;
    border-radius: 8px;
  }
}
