/* ============================================
   SIMPLE BLOG SYSTEM - CORECLASSES
   Individual Blog Post Styles (SEO Optimized 2026)
   ============================================ */

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
  padding: var(--spacing-md) 0;
  background-color: #f9fafb;
  border-bottom: 1px solid var(--color-gray-200);
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
}

.breadcrumb-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-gray-600);
}

.breadcrumb-list li a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-list li a:hover {
  color: var(--color-secondary);
  text-decoration: underline;
}

.breadcrumb-list li.active {
  color: var(--color-dark);
  font-weight: 500;
}

.breadcrumb-list svg {
  color: var(--color-gray-400);
  width: 14px; height: 14px;
  flex-shrink: 0;
}

/* ===== BACK LINK ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 1.5rem 0;
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  transition: gap 0.2s ease;
}

.back-link:hover { gap: 12px; }

/* ===== POST HEADER ===== */
.post-header {
  padding: 3rem 0;
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);
  text-align: center;
}

.post-category {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
}

.post-category.languages { background-color: #fbbf24; color: #78350f; }
.post-category.exams { background-color: #60a5fa; color: #1e3a8a; }
.post-category.careers { background-color: #a78bfa; color: #4c1d95; }
.post-category.skills { background-color: #34d399; color: #064e3b; }

.post-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 1.5rem;
  line-height: 1.2;
  font-family: var(--font-heading);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--color-gray-600);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-divider { color: var(--color-gray-400); }

/* ===== FEATURED IMAGE ===== */
.post-featured-image { margin-bottom: 3rem; }

.post-featured-image img {
  width: 100%;
  max-height: 550px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* ===== TABLE OF CONTENTS (Desktop Sticky) ===== */
.table-of-contents {
  position: fixed;
  top: 100px;
  right: max(20px, calc(50% - 700px)); /* Smart centering logic */
  width: 260px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border: 1px solid var(--color-gray-200);
  z-index: 10;
  display: none; /* Hidden by default, shown on large screens */
}

@media (min-width: 1400px) {
  .table-of-contents { display: block; }
}

.table-of-contents h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-dark);
}

.table-of-contents nav ul { list-style: none; padding: 0; margin: 0; }
.table-of-contents nav li { margin-bottom: 8px; }

.table-of-contents nav a {
  display: block;
  color: var(--color-gray-600);
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 1.4;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  border-left: 2px solid transparent;
}

.table-of-contents nav a:hover,
.table-of-contents nav a.active {
  color: var(--color-primary);
  background-color: #f0f7ff;
  border-left-color: var(--color-primary);
}

/* ===== POST CONTENT ===== */
.post-content {
  padding: 2rem 0 4rem;
  position: relative;
}

.post-content .container { max-width: 800px; }

.post-content .lead {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-gray-600);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.post-content p {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--color-gray-800);
  margin-bottom: 1.5rem;
}

.post-content h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-top: 3rem;
  margin-bottom: 1rem;
  scroll-margin-top: 100px; /* Important for anchor links */
}

.post-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.post-content ul, .post-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.post-content li {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
  color: var(--color-gray-800);
}

.post-content blockquote {
  margin: 2.5rem 0;
  padding: 2rem;
  background: #f8fafc;
  border-left: 5px solid var(--color-primary);
  border-radius: 8px;
  font-size: 1.25rem;
  font-style: italic;
  color: var(--color-dark);
}

.post-content blockquote cite {
  display: block;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 600;
  color: var(--color-gray-600);
}

/* ===== CALLOUT BOXES ===== */
.tip-box, .warning-box, .cta-box {
  padding: 2rem;
  border-radius: 12px;
  margin: 2.5rem 0;
}

.tip-box { background: #ecfdf5; border: 1px solid #a7f3d0; }
.warning-box { background: #fff7ed; border: 1px solid #fed7aa; }
.cta-box { 
  background: #eff6ff; 
  border: 1px solid #bfdbfe;
  text-align: center;
}

.tip-box h4 { color: #047857; margin-bottom: 0.5rem; }
.warning-box h4 { color: #c2410c; margin-bottom: 0.5rem; }
.cta-box h3 { color: #1e40af; margin-bottom: 0.5rem; }

.btn-cta {
  display: inline-block;
  margin-top: 1rem;
  padding: 12px 24px;
  background: var(--color-primary);
  color: white !important;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s;
}

.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

/* ===== TABLES ===== */
.comparison-table {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: 8px;
  border: 1px solid var(--color-gray-200);
}

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; /* Forces scroll on mobile */
}

.comparison-table th, .comparison-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-gray-200);
}

.comparison-table th {
  background: var(--color-gray-100);
  font-weight: 700;
}

/* ===== SHARE BUTTONS ===== */
.post-share {
  padding: 3rem 0;
  background: #f8fafc;
  border-top: 1px solid var(--color-gray-200);
  text-align: center;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}

.share-btn:hover { transform: translateY(-2px); }

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0a66c2; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.copy { background: #4b5563; }

/* ===== RELATED POSTS ===== */
.related-posts {
  padding: 4rem 0;
  background: white;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.related-card {
  text-decoration: none;
  background: white;
  border: 1px solid var(--color-gray-200);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s;
  display: block;
}

.related-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.related-content { padding: 1.5rem; }

.related-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .post-title { font-size: 2rem; }
  .post-content { padding: 1rem 0 3rem; }
  .post-content p { font-size: 1rem; }
  
  .share-buttons { flex-direction: column; }
  .share-btn { width: 100%; justify-content: center; }
  
  .table-of-contents { display: none; } /* Ensure TOC is hidden on mobile */
}