/* =============================================
   MEDIUM.COM / SUBSTACK MINIMALIST BLOG STYLE (CLEANED)
   ============================================= */

body .tff-blog-single {
  padding-bottom: 60px;
}

/* 1. Centered Header */
body .tff-blog-single .tff-blog-header {
  padding: 60px 0 40px;
  text-align: center;
}

body .tff-blog-single .tff-blog-header-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body .tff-blog-single .tff-blog-category {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  color: var(--color-primary, #1A7F4B);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  text-decoration: none;
}

body .tff-blog-single .tff-blog-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-text, #1a1a1a);
  margin: 0 0 24px 0;
}

/* Author Byline - Perfect Horizontal One-Line Layout */
body .tff-blog-single .tff-blog-byline {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  width: 100%;
}

body .tff-blog-single .tff-author-avatar {
  border-radius: 50%;
  width: 44px;
  height: 44px;
  min-width: 44px;
  max-width: 44px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

body .tff-blog-single .tff-byline-text {
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body .tff-blog-single .tff-blog-author {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--color-text, #1a1a1a);
  line-height: 1.2;
  margin: 0;
}

body .tff-blog-single .tff-blog-date {
  font-size: 12.5px;
  color: var(--color-text-3, #7A917E);
  line-height: 1.3;
  margin-top: 2px;
}

/* 2. Wide Featured Image */
body .tff-blog-single .tff-blog-image-container {
  max-width: 1000px;
  margin: 0 auto 40px;
}

body .tff-blog-single .tff-blog-featured-img img {
  width: 100%;
  height: auto;
  max-height: 550px;
  object-fit: cover;
  border-radius: var(--radius-xl, 20px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* 3. Focused Reading Column */
body .tff-blog-single .tff-blog-content-container {
  max-width: 720px;
  margin: 0 auto;
}

/* Inline TOC Box Container */
body .tff-blog-single .tff-inline-toc {
  background: var(--color-bg-2, #F7F9F7);
  border: 1.5px solid var(--color-border, #E2EBE4);
  border-radius: var(--radius-lg, 16px);
  padding: 16px 24px;
  margin-bottom: 40px;
}

body .tff-blog-single .tff-toc-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

body .tff-blog-single .tff-inline-toc-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-2, #4A5C4E);
  margin-bottom: 0;
}

body .tff-blog-single .tff-toc-icon {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-primary, #1A7F4B);
  line-height: 1;
}


/* =============================================
   COLLAPSIBLE TOC WITH H2/H3 HIERARCHY
   ============================================= */

body .tff-blog-single .tff-inline-toc ul {
  margin-top: 16px;
  border-top: 1px solid var(--color-border, #E2EBE4);
  padding-top: 16px;
  list-style: none;
  display: none; /* Band rahega by default */
  flex-direction: column;
  gap: 8px;
}

body .tff-blog-single .tff-inline-toc.open ul {
  display: flex;
}

/* H2 Style - Bold and Prominent */
body .tff-blog-single .tff-inline-toc li.tff-toc-h2 {
  font-weight: 800;
  margin-top: 6px;
}

body .tff-blog-single .tff-inline-toc li.tff-toc-h2 > a {
  color: var(--color-text, #1a1a1a);
  font-size: 15.5px;
}

/* H3 Style - Indented with a Bullet */
body .tff-blog-single .tff-inline-toc li.tff-toc-h3 {
  font-weight: 500;
  padding-left: 20px;
  position: relative;
}

body .tff-blog-single .tff-inline-toc li.tff-toc-h3 > a {
  color: var(--color-text-2, #4A5C4E);
  font-size: 14.5px;
}

body .tff-blog-single .tff-inline-toc li.tff-toc-h3::before {
  content: "•";
  position: absolute;
  left: 6px;
  color: var(--color-primary, #1A7F4B);
  font-size: 18px;
  line-height: 1;
  top: 0;
}

/* General Link Hover */
body .tff-blog-single .tff-inline-toc a {
  text-decoration: none;
  transition: color 0.15s ease;
  display: inline-block;
}

body .tff-blog-single .tff-inline-toc a:hover {
  color: var(--color-primary, #1A7F4B);
  text-decoration: underline;
}


/* Content Typography Overrides for Blog */
body .tff-blog-single .tff-blog-content {
  font-family: var(--font-reading, Georgia, serif);
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.8;
  color: var(--color-text, #1a1a1a);
}

body .tff-blog-single .tff-blog-content h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  margin: 48px 0 20px;
  color: var(--color-text, #1a1a1a);
}

body .tff-blog-single .tff-blog-content h3 {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 24px);
  font-weight: 700;
  margin: 36px 0 16px;
}

body .tff-blog-single .tff-blog-content p {
  margin-bottom: 24px;
}

body .tff-blog-single .tff-blog-content img {
  border-radius: var(--radius-lg, 12px);
  margin: 32px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* 4. Elegant Author Box */
body .tff-blog-single .tff-blog-author-container {
  max-width: 720px;
  margin: 60px auto 0;
}

body .tff-blog-single .tff-blog-author-bio {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 32px;
  background: var(--color-surface, #ffffff);
  border: 1.5px solid var(--color-border, #E2EBE4);
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.03);
}

body .tff-blog-single .tff-bio-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

body .tff-blog-single .tff-bio-name {
  font-size: 14px;
  color: var(--color-text-3, #7A917E);
  margin-bottom: 6px;
}

body .tff-blog-single .tff-bio-name strong {
  font-size: 18px;
  color: var(--color-text, #1a1a1a);
  font-weight: 800;
  display: block;
}

body .tff-blog-single .tff-bio-desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--color-text-2, #4A5C4E);
  margin: 0;
  font-family: var(--font-body);
}

@media (max-width: 600px) {
  body .tff-blog-single .tff-blog-author-bio {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }
}

/* =============================================
   BLOG BREADCRUMBS & RELATED POSTS
   ============================================= */

/* Breadcrumbs */
body .tff-blog-single .tff-blog-breadcrumbs {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}

body .tff-blog-single .tff-blog-breadcrumbs .breadcrumbs ol {
  justify-content: center;
}

/* Post Tags */
body .tff-blog-single .tff-post-tags {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border, #E2EBE4);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

body .tff-blog-single .tff-tag-chip {
  background: var(--color-bg-2, #F7F9F7);
  color: var(--color-text-2, #4A5C4E);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--color-border, #E2EBE4);
  transition: all 0.2s ease;
}

body .tff-blog-single .tff-tag-chip:hover {
  background: var(--color-primary, #1A7F4B);
  color: #ffffff;
  border-color: var(--color-primary, #1A7F4B);
}

/* Related Blogs */
body .tff-blog-single .tff-related-blogs-container {
  max-width: 800px;
  margin: 60px auto 0;
  padding-top: 40px;
  border-top: 2px solid var(--color-border, #E2EBE4);
}

body .tff-blog-single .tff-related-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 20px;
  text-align: center;
}

/* =============================================
   UNIVERSAL COLLAPSIBLE TOC CARD STYLES
   ============================================= */
.tff-inline-toc {
  background: var(--color-bg-2, #F7F9F7) !important;
  border: 1.5px solid var(--color-border, #E2EBE4) !important;
  border-radius: var(--radius-lg, 16px) !important;
  padding: 16px 20px !important;
  margin-bottom: 32px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
}

.tff-toc-toggle {
  width: 100% !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  cursor: pointer !important;
  outline: none !important;
}

.tff-inline-toc-title {
  font-family: var(--font-body) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  color: var(--color-text, #1a1a1a) !important;
  margin: 0 !important;
}

.tff-toc-icon {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: var(--color-primary, #1A7F4B) !important;
  line-height: 1 !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  border: 1px solid var(--color-border, #E2EBE4) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  transition: all 0.2s ease !important;
}

.tff-inline-toc.open .tff-toc-icon {
  background: var(--color-primary, #1A7F4B) !important;
  color: #ffffff !important;
  border-color: var(--color-primary, #1A7F4B) !important;
}

.tff-inline-toc ul {
  margin: 16px 0 0 0 !important;
  padding: 16px 0 0 0 !important;
  border-top: 1px dashed var(--color-border, #E2EBE4) !important;
  list-style: none !important;
  display: none;
  flex-direction: column !important;
  gap: 10px !important;
}

.tff-inline-toc.open ul {
  display: flex !important;
}

.tff-inline-toc li {
  margin: 0 !important;
  padding: 0 !important;
}

.tff-inline-toc li.tff-toc-h2 {
  font-weight: 700 !important;
  font-size: 15px !important;
}

.tff-inline-toc li.tff-toc-h3 {
  font-weight: 500 !important;
  font-size: 14px !important;
  padding-left: 18px !important;
  position: relative !important;
}

.tff-inline-toc li.tff-toc-h3::before {
  content: "•" !important;
  position: absolute !important;
  left: 4px !important;
  color: var(--color-primary, #1A7F4B) !important;
}

.tff-inline-toc a {
  color: var(--color-text-2, #4A5C4E) !important;
  text-decoration: none !important;
  transition: color 0.15s ease !important;
}

.tff-inline-toc a:hover {
  color: var(--color-primary, #1A7F4B) !important;
  text-decoration: underline !important;
}

/* =============================================
   RELATED BLOGS CONTAINER & RESPONSIVE SLIDER
   ============================================= */

.tff-related-blogs-container {
  max-width: 1000px !important;
  margin: 50px auto 0 !important;
  padding-top: 36px !important;
  border-top: 1.5px solid var(--color-border, #E2EBE4) !important;
}

.tff-related-title {
  font-family: var(--font-display) !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  margin-bottom: 20px !important;
  color: var(--color-text, #1a1a1a) !important;
}

/* Desktop: 3-Column Grid */
.tff-related-blog-track {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 20px !important;
}

.tff-related-blog-card {
  height: 100% !important;
}

/* Mobile: Horizontal Touch Slider */
@media (max-width: 768px) {
  .tff-related-blog-track {
    display: flex !important;
    gap: 14px !important;
    overflow-x: auto !important;
    padding-bottom: 16px !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important; /* Hide scrollbar Firefox */
  }

  .tff-related-blog-track::-webkit-scrollbar {
    display: none !important; /* Hide scrollbar Chrome/Safari */
  }

  .tff-related-blog-card {
    scroll-snap-align: start !important;
    flex: 0 0 280px !important; /* Fixed width per card on mobile */
    width: 280px !important;
  }
}