/* Blog Post Enhancements */

/* 1. Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.reading-progress__bar {
  height: 100%;
  background-color: var(--color-accent, #2563EB);
  width: 0%;
  transition: width 0.1s ease-out;
}

/* 2. Estimated Reading Time */
.blog-post-meta__read-time {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--color-text, #6B7280);
}

.blog-post-meta__read-time i {
  width: 14px;
  height: 14px;
}

/* 3. Social Share Buttons */
.social-share {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 100;
}

.social-share__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.social-share__button:hover {
  transform: scale(1.1);
  text-decoration: none;
}

.social-share__button--twitter {
  background-color: #1DA1F2;
}

.social-share__button--facebook {
  background-color: #1877F2;
}

.social-share__button--linkedin {
  background-color: #0A66C2;
}

.social-share__button--copy {
  background-color: var(--color-primary, #374151);
}

.social-share__button svg {
  width: 20px;
  height: 20px;
}

/* Mobile social share bar */
.social-share-mobile {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 12px;
  z-index: 100;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.social-share-mobile__buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.social-share-mobile__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.social-share-mobile__button:hover {
  transform: scale(1.05);
  text-decoration: none;
}

.social-share-mobile__button svg {
  width: 22px;
  height: 22px;
}

/* 4. Author Bio Box */
.author-bio {
  background: var(--color-bg, #FFFFFF);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.author-bio__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary, #374151), var(--color-accent, #2563EB));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: 600;
  flex-shrink: 0;
}

.author-bio__content {
  flex: 1;
}

.author-bio__name {
  font-family: var(--font-display, 'Inter', sans-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-primary, #374151);
  margin: 0 0 4px 0;
}

.author-bio__title {
  font-size: 0.875rem;
  color: var(--color-accent, #2563EB);
  margin: 0 0 12px 0;
  font-weight: 500;
}

.author-bio__description {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text, #374151);
  margin: 0;
}

/* 5. Enhanced Table of Contents */
.blog-toc {
  background: var(--color-bg, #FFFFFF);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.blog-toc__heading {
  font-family: var(--font-display, 'Inter', sans-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary, #374151);
  margin: 0 0 16px 0;
}

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

.blog-toc__item {
  margin-bottom: 8px;
}

.blog-toc__item--h3 {
  margin-left: 16px;
  font-size: 0.9rem;
}

.blog-toc__link {
  display: block;
  color: var(--color-text, #374151);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.blog-toc__link:hover,
.blog-toc__link--active {
  background-color: rgba(var(--color-accent-rgb, 37, 99, 235), 0.1);
  border-left-color: var(--color-accent, #2563EB);
  text-decoration: none;
}

.blog-toc__link--active {
  color: var(--color-accent, #2563EB);
  font-weight: 500;
}

/* Desktop TOC sidebar */
.blog-toc--desktop {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

/* Mobile TOC toggle */
.blog-toc--mobile {
  margin-bottom: 24px;
}

.blog-toc__toggle {
  width: 100%;
  background: var(--color-bg, #FFFFFF);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  justify-content: between;
  align-items: center;
  font-family: var(--font-display, 'Inter', sans-serif);
  font-weight: 600;
  color: var(--color-primary, #374151);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.blog-toc__toggle:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.blog-toc__toggle i {
  transition: transform 0.2s ease;
}

.blog-toc__toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.blog-toc__toggle span {
  flex: 1;
  text-align: left;
}

/* 6. Enhanced Breadcrumbs */
.blog-breadcrumbs {
  margin-bottom: 24px;
}

.blog-breadcrumbs__list {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}

.blog-breadcrumbs__item {
  display: flex;
  align-items: center;
}

.blog-breadcrumbs__link {
  color: var(--color-text, #6B7280);
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-breadcrumbs__link:hover {
  color: var(--color-accent, #2563EB);
  text-decoration: none;
}

.blog-breadcrumbs__item--current {
  color: var(--color-primary, #374151);
  font-weight: 500;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blog-breadcrumbs__separator {
  color: var(--color-text, #9CA3AF);
  margin: 0 4px;
}

.blog-breadcrumbs__separator i {
  width: 12px;
  height: 12px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  /* Hide desktop social share buttons */
  .social-share {
    display: none;
  }
  
  /* Show mobile social share bar */
  .social-share-mobile {
    display: block;
  }
  
  /* Add padding to main content for mobile share bar */
  .blog-post-container {
    padding-bottom: 80px;
  }
  
  /* Hide desktop TOC */
  .blog-toc--desktop {
    display: none;
  }
}

@media (min-width: 1025px) {
  /* Hide mobile TOC */
  .blog-toc--mobile {
    display: none;
  }
  
  /* Hide mobile social share bar */
  .social-share-mobile {
    display: none;
  }
}

@media (max-width: 768px) {
  .author-bio {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .author-bio__avatar {
    align-self: center;
  }
  
  .social-share-mobile__buttons {
    gap: 12px;
  }
  
  .social-share-mobile__button {
    width: 44px;
    height: 44px;
  }
  
  .social-share-mobile__button svg {
    width: 20px;
    height: 20px;
  }
}

/* Copy link success indicator */
.social-share__button--copy.copied {
  background-color: #10B981;
}

.social-share__button--copy.copied::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: bold;
}

.social-share__button--copy.copied svg {
  opacity: 0;
}