/* ================================================================
   BLOG DETAILS – refined & consistent with main blog
   ================================================================ */

:root {
  /* ----- Brand colours (match your main theme) ----- */
  --primary: #00A86B;
  --primary-dark: #008A56;
  --primary-light: #E8F5EE;
  --primary-gradient: linear-gradient(135deg, #00A86B 0%, #7BC47F 100%);

  /* ----- Neutrals ----- */
  --bg: #F8FAFB;
  --surface: #FFFFFF;
  --text-primary: #0B1A1F;
  --text-secondary: #3A4B53;
  --text-tertiary: #6B7D86;
  --border: rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 20px 60px rgba(0, 168, 107, 0.10);

  /* ----- Typography ----- */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* ----- Transitions ----- */
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ----- Dark mode (optional) ----- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D1A1F;
    --surface: #1A2A30;
    --text-primary: #E8EDEE;
    --text-secondary: #B0C0C6;
    --text-tertiary: #7A8E96;
    --border: rgba(255, 255, 255, 0.06);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 20px 60px rgba(0, 168, 107, 0.15);
  }
}

/* ================================================================
   ARTICLE HEADER
   ================================================================ */

.article-header {
  max-width: 900px;
  margin: 40px auto 20px;
  padding: 0 24px;
  animation: fadeUp 0.8s var(--spring) forwards;
  opacity: 0;
  transform: translateY(20px);
}

.article-category {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 16px;
  background: var(--primary-light);
  border-radius: 40px;
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 20px;
  line-height: 1.4;
}

.article-header h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.author-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.author-avatar-large {
  width: 56px;
  height: 56px;
  background: var(--primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  font-weight: 700;
  flex-shrink: 0;
}

.author-details h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.author-details p {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin: 0;
}

.meta-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

.meta-stats i {
  color: var(--primary);
  margin-right: 6px;
}

.share-buttons {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s var(--ease);
  border: 1px solid var(--border);
}

.share-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.share-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ================================================================
   FEATURED IMAGE
   ================================================================ */

.featured-image-container {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 24px;
}

.featured-image-large {
  width: 100%;
  height: 500px;
  background: var(--primary-light);
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.image-caption {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.85rem;
  margin-top: 12px;
}

/* ================================================================
   ARTICLE CONTENT
   ================================================================ */

.article-content {
  max-width: 800px;
  margin: 0 auto 60px;
  padding: 0 24px;
}

.content-section {
  margin-bottom: 40px;
}

.article-content h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2.5rem 0 1.2rem;
  letter-spacing: -0.01em;
}

.article-content h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 1rem;
}

.article-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.article-content p.lead {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-primary);
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  margin: 2rem 0;
}

.article-content ul,
.article-content ol {
  margin: 1.5rem 0 1.5rem 1.5rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.8;
}

.article-content li {
  margin-bottom: 0.75rem;
}

.article-content li::marker {
  color: var(--primary);
}

/* Pull Quote */
.pull-quote {
  margin: 3rem 0;
  padding: 2rem 2.5rem;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  position: relative;
  border-left: 4px solid var(--primary);
}

.pull-quote i {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 2.5rem;
  color: var(--primary);
  opacity: 0.15;
}

.pull-quote p {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 0.5rem;
  font-style: italic;
}

.pull-quote cite {
  font-size: 0.95rem;
  color: var(--text-tertiary);
  font-style: normal;
}

/* Stats Card */
.stats-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  margin: 2.5rem 0;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  border: 1px solid var(--border);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-top: 4px;
}

/* Info Box */
.info-box {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 1.5rem 2rem;
  border-radius: var(--radius-md);
  margin: 2rem 0;
}

.info-box h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-box h4 i {
  color: var(--primary);
}

.info-box p {
  margin-bottom: 0;
}

/* Image Grid */
.image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 2.5rem 0;
}

.grid-image {
  height: 200px;
  background: var(--primary-light);
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-md);
}

/* ================================================================
   TABLE OF CONTENTS
   ================================================================ */

.table-of-contents {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2.5rem 0;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.toc-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-title i {
  color: var(--primary);
}

.toc-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin: 0;
}

.toc-list li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.toc-list li a:hover {
  color: var(--primary);
}

.toc-list li a i {
  font-size: 0.75rem;
  opacity: 0.4;
}

/* ================================================================
   AUTHOR BIO
   ================================================================ */

.author-bio {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 3rem 0;
  box-shadow: var(--shadow-md);
  display: flex;
  gap: 24px;
  align-items: center;
  border: 1px solid var(--border);
}

.bio-avatar {
  width: 80px;
  height: 80px;
  background: var(--primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  font-weight: 700;
  flex-shrink: 0;
}

.bio-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.bio-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.bio-social {
  display: flex;
  gap: 12px;
}

.bio-social a {
  width: 36px;
  height: 36px;
  background: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid var(--border);
}

.bio-social a:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ================================================================
   COMMENTS SECTION
   ================================================================ */

.comments-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 3rem 0;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.comments-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.comment-form {
  margin-bottom: 2rem;
}

.comment-input {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 1rem;
  background: var(--bg);
  color: var(--text-primary);
  transition: all 0.2s;
  margin-bottom: 12px;
}

.comment-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 168, 107, 0.08);
}

.comment-btn {
  padding: 12px 28px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 40px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 168, 107, 0.2);
}

.comment-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 168, 107, 0.3);
}

.comment-btn:active {
  transform: scale(0.96);
}

.comment {
  display: flex;
  gap: 16px;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.comment:last-child {
  border-bottom: none;
}

.comment-avatar {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  font-weight: 600;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 8px;
}

.comment-name {
  font-weight: 600;
  color: var(--text-primary);
}

.comment-date {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.comment-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 8px;
}

.comment-reply {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
}

.comment-reply:hover {
  text-decoration: underline;
}

/* ================================================================
   RELATED ARTICLES
   ================================================================ */

.related-section {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 24px;
}

.related-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.related-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.35s var(--spring);
  text-decoration: none;
  border: 1px solid var(--border);
  display: block;
}

.related-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.related-image {
  height: 180px;
  background: var(--primary-light);
  background-size: cover;
  background-position: center;
}

.related-content {
  padding: 20px;
}

.related-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.related-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.related-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

.related-meta i {
  margin-right: 4px;
}

/* ================================================================
   BACK TO BLOG BUTTON (if used)
   ================================================================ */

.back-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 40px;
  color: var(--text-secondary);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s var(--ease);
  box-shadow: var(--shadow-sm);
}

.back-home-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.back-home-btn i {
  transition: transform 0.2s;
}

.back-home-btn:hover i {
  transform: translateX(-4px);
}

/* ================================================================
   ANIMATIONS
   ================================================================ */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .article-header,
  .featured-image-large,
  .related-card,
  .comment-btn {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }
  .related-card:hover {
    transform: none;
  }
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 992px) {
  .featured-image-large {
    height: 400px;
  }

  .stats-card {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .article-header {
    margin: 30px auto 15px;
    padding: 0 16px;
  }

  .article-header h1 {
    font-size: clamp(1.8rem, 5vw, 2.4rem);
  }

  .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 1.5rem;
  }

  .meta-stats {
    flex-wrap: wrap;
    gap: 12px;
  }

  .share-buttons {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }

  .share-btn {
    width: 36px;
    height: 36px;
  }

  .featured-image-large {
    height: 280px;
  }

  .article-content {
    padding: 0 16px;
  }

  .article-content p {
    font-size: 1rem;
  }

  .article-content p.lead {
    font-size: 1.1rem;
    padding-left: 1rem;
  }

  .stats-card {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .toc-list {
    grid-template-columns: 1fr;
  }

  .author-bio {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }

  .bio-social {
    justify-content: center;
  }

  .image-grid {
    grid-template-columns: 1fr;
  }

  .pull-quote {
    padding: 1.5rem;
  }

  .pull-quote p {
    font-size: 1.2rem;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .comments-section {
    padding: 1.5rem;
  }

  .comment {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .article-header h1 {
    font-size: 1.6rem;
  }

  .featured-image-large {
    height: 200px;
  }

  .article-content h2 {
    font-size: 1.4rem;
  }

  .article-content h3 {
    font-size: 1.2rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .pull-quote p {
    font-size: 1.1rem;
  }

  .author-avatar-large {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  .bio-avatar {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
  }
}

/* ================================================================
   UTILITY – touch targets & focus
   ================================================================ */

.comment-btn,
.share-btn,
.back-home-btn,
.bio-social a {
  touch-action: manipulation;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}