/* Blog Post Single Page Styles */

/* Breadcrumb */
.breadcrumb {
  background: #f8f9fa;
  padding: 1rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.breadcrumb-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.breadcrumb a {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: #667eea;
}

.breadcrumb .separator {
  color: #9ca3af;
}

.breadcrumb .current {
  color: #1f2937;
  font-weight: 600;
}

/* Post Main */
.post-main {
  padding: 3rem 0;
  background: #f8f9fa;
}

.post-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
}

/* Article */
.post-article {
  background: white;
  border-radius: 16px;
  padding: 3rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Post Header */
.post-header {
  margin-bottom: 2rem;
}

.post-categories {
  margin-bottom: 1rem;
}

.post-category-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.post-category-badge:hover {
  transform: translateY(-2px);
}

.post-main-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: #1f2937;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.post-meta-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #667eea;
}

.author-details {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 700;
  color: #1f2937;
  font-size: 1rem;
}

.post-date {
  font-size: 0.875rem;
  color: #6b7280;
}

.post-stats {
  display: flex;
  gap: 1.5rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: #6b7280;
}

/* Featured Image */
.post-featured-image {
  margin: 2rem 0;
  border-radius: 12px;
  overflow: hidden;
}

.post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Post Body */
.post-body {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #374151;
}

.post-body .lead {
  font-size: 1.375rem;
  font-weight: 500;
  color: #1f2937;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.post-body h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #667eea;
}

.post-body h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.post-body p {
  margin-bottom: 1.5rem;
}

.post-body ul,
.post-body ol {
  margin: 1.5rem 0;
  padding-right: 2rem;
}

.post-body li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.post-body strong {
  font-weight: 700;
  color: #1f2937;
}

.post-body em {
  font-style: italic;
}

.post-body code {
  background: #f3f4f6;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: #e11d48;
}

.post-body pre {
  background: #1f2937;
  color: #f9fafb;
  padding: 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  margin: 2rem 0;
  border-right: 4px solid #667eea;
}

.post-body pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.post-body blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-right: 4px solid #667eea;
  border-radius: 8px;
}

.post-body blockquote p {
  font-size: 1.25rem;
  font-style: italic;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.post-body blockquote cite {
  font-size: 0.9375rem;
  color: #6b7280;
  font-style: normal;
}

.post-body .post-image {
  margin: 2rem 0;
  text-align: center;
}

.post-body .post-image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.post-body figcaption {
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: #6b7280;
  font-style: italic;
}

/* Table */
.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.post-body table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.post-body table th,
.post-body table td {
  padding: 1rem;
  text-align: right;
  border-bottom: 1px solid #e5e7eb;
}

.post-body table th {
  font-weight: 700;
}

.post-body table tbody tr:hover {
  background: #f9fafb;
}

/* Info Boxes */
.info-box {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 12px;
  margin: 2rem 0;
  border-right: 4px solid;
}

.info-box-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.info-box-content {
  flex: 1;
}

.info-box.info {
  background: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
}

.info-box.warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
}

.info-box.success {
  background: rgba(16, 185, 129, 0.1);
  border-color: #10b981;
}

/* Post Footer */
.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #e5e7eb;
}

.post-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.tags-label {
  font-weight: 700;
  color: #1f2937;
}

.post-tag {
  padding: 0.5rem 1rem;
  background: #f3f4f6;
  color: #4b5563;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.post-tag:hover {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
}

.post-share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.share-label {
  font-weight: 700;
  color: #1f2937;
}

.share-buttons {
  display: flex;
  gap: 0.75rem;
}

.share-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.share-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.share-btn.twitter { background: #1da1f2; }
.share-btn.telegram { background: #0088cc; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.copy { background: #6b7280; }

/* Author Box */
.author-box {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  border-radius: 12px;
  margin-top: 3rem;
  border: 2px solid #e5e7eb;
}

.author-box-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #667eea;
  flex-shrink: 0;
}

.author-box-content {
  flex: 1;
}

.author-box-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.author-box-bio {
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.author-box-social {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
  color: #667eea;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.social-link:hover {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
}

/* Related Posts */
.related-posts {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 2px solid #e5e7eb;
}

.related-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 2rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.related-card {
  display: block;
  text-decoration: none;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.related-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.related-card h4 {
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.4;
}

.related-date {
  display: block;
  padding: 0 1rem 1rem;
  font-size: 0.875rem;
  color: #6b7280;
}

/* Sidebar */
.post-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-widget {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sidebar-widget.sticky {
  position: sticky;
  top: 100px;
}

.widget-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #667eea;
}

/* Table of Contents */
.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc li {
  margin-bottom: 0.75rem;
}

.toc a {
  color: #4b5563;
  text-decoration: none;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
  display: block;
  padding: 0.5rem;
  border-radius: 6px;
}

.toc a:hover {
  background: #f3f4f6;
  color: #667eea;
  transform: translateX(-4px);
}

/* Recent Posts List */
.recent-posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-posts-list li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.recent-posts-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.recent-posts-list a {
  display: flex;
  gap: 1rem;
  text-decoration: none;
  color: #1f2937;
  transition: opacity 0.3s ease;
}

.recent-posts-list a:hover {
  opacity: 0.7;
}

.recent-posts-list img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.recent-posts-list span {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 1024px) {
  .post-container {
    grid-template-columns: 1fr;
  }
  
  .post-sidebar {
    position: static;
  }
  
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .breadcrumb-container {
    padding: 0 1rem;
  }
  
  .post-container {
    padding: 0 1rem;
  }
  
  .post-article {
    padding: 2rem 1.5rem;
  }
  
  .post-main-title {
    font-size: 1.75rem;
  }
  
  .post-meta-info {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .post-body {
    font-size: 1rem;
  }
  
  .post-body .lead {
    font-size: 1.125rem;
  }
  
  .post-body h2 {
    font-size: 1.5rem;
  }
  
  .post-body h3 {
    font-size: 1.25rem;
  }
  
  .author-box {
    flex-direction: column;
    text-align: center;
  }
  
  .author-box-avatar {
    margin: 0 auto;
  }
  
  .author-box-social {
    justify-content: center;
  }
  
  .related-grid {
    grid-template-columns: 1fr;
  }
  
  .post-share {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .post-article {
    padding: 1.5rem 1rem;
  }
  
  .post-main-title {
    font-size: 1.5rem;
  }
  
  .post-body pre {
    padding: 1rem;
    font-size: 0.875rem;
  }
  
  .info-box {
    padding: 1rem;
  }
}

/* Sidebar Widgets */
.sidebar-widget {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
}

.widget-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid #667eea;
}

/* Table of Contents */
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: 0.75rem;
}

.toc-list a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: #4b5563;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-size: 0.9375rem;
}

.toc-list a:hover {
  background: #f3f4f6;
  color: #667eea;
  transform: translateX(-4px);
}

/* Related Posts Sidebar */
.related-posts-sidebar {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-posts-sidebar li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.related-posts-sidebar li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.related-posts-sidebar a {
  display: flex;
  gap: 0.75rem;
  text-decoration: none;
  color: #1f2937;
  transition: opacity 0.3s ease;
  align-items: center;
}

.related-posts-sidebar a:hover {
  opacity: 0.7;
}

.related-posts-sidebar img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.related-posts-sidebar span {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
}

/* Share Buttons in Sidebar */
.sidebar-widget .share-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.sidebar-widget .share-btn {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  text-decoration: none;
}

.sidebar-widget .share-btn.twitter {
  background: #1da1f2;
  color: white;
}

.sidebar-widget .share-btn.linkedin {
  background: #0077b5;
  color: white;
}

.sidebar-widget .share-btn.telegram {
  background: #0088cc;
  color: white;
}

.sidebar-widget .share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================ */

/* Tablet - 768px and below */
@media (max-width: 768px) {
  /* Post Container */
  .post-container {
    grid-template-columns: 1fr !important;
    padding: 0 1rem !important;
  }

  /* Post Sidebar - Move to bottom on mobile */
  .post-sidebar {
    order: 2;
    margin-top: 3rem;
  }

  .post-article {
    order: 1;
  }

  /* Post Header */
  .post-main-title {
    font-size: 1.75rem;
    line-height: 1.3;
  }

  .post-meta-info {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .author-info {
    width: 100%;
  }

  .post-stats {
    width: 100%;
    justify-content: flex-start;
  }

  /* Featured Image */
  .post-featured-image {
    height: 250px;
    margin: 1.5rem -1rem;
    border-radius: 0;
  }

  /* Post Body */
  .post-body {
    padding: 1.5rem 0;
    font-size: 1rem;
  }

  .post-body h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
  }

  .post-body h3 {
    font-size: 1.25rem;
  }

  .post-body h4 {
    font-size: 1.125rem;
  }

  /* Code Blocks */
  .post-body pre {
    margin: 1.5rem -1rem;
    border-radius: 0;
    padding: 1rem;
    font-size: 0.875rem;
  }

  /* Tables */
  .post-body table {
    font-size: 0.875rem;
  }

  .post-body th,
  .post-body td {
    padding: 0.75rem 0.5rem;
  }

  /* Sidebar Widgets */
  .sidebar-widget {
    padding: 1.25rem;
  }

  .widget-title {
    font-size: 1.125rem;
  }

  /* Related Posts */
  .related-posts-sidebar img {
    width: 60px;
    height: 45px;
  }

  .related-posts-sidebar span {
    font-size: 0.875rem;
  }
}

/* Mobile - 480px and below */
@media (max-width: 480px) {
  /* Post Main */
  .post-main {
    padding: 2rem 0 !important;
  }

  .post-container {
    padding: 0 0.75rem !important;
    grid-template-columns: 1fr !important;
  }

  /* Post Header */
  .post-main-title {
    font-size: 1.5rem;
  }

  .post-category-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }

  .author-avatar {
    width: 40px;
    height: 40px;
  }

  .author-name {
    font-size: 0.9375rem;
  }

  .post-date {
    font-size: 0.8125rem;
  }

  .stat-item {
    font-size: 0.8125rem;
  }

  /* Featured Image */
  .post-featured-image {
    height: 200px;
  }

  /* Post Body */
  .post-body {
    font-size: 0.9375rem;
  }

  .post-body h2 {
    font-size: 1.375rem;
  }

  .post-body h3 {
    font-size: 1.125rem;
  }

  .post-body h4 {
    font-size: 1rem;
  }

  .post-body ul,
  .post-body ol {
    padding-right: 1.5rem;
  }

  /* Code */
  .post-body pre {
    padding: 0.75rem;
    font-size: 0.8125rem;
  }

  /* Sidebar */
  .sidebar-widget {
    padding: 1rem;
  }

  .widget-title {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .toc-list a {
    font-size: 0.875rem;
    padding: 0.375rem 0.5rem;
  }

  /* Related Posts */
  .related-posts-sidebar li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .related-posts-sidebar img {
    width: 50px;
    height: 40px;
  }

  .related-posts-sidebar span {
    font-size: 0.8125rem;
  }
}

/* Blog List Page Responsive */
@media (max-width: 768px) {
  /* Blog Container */
  .blog-container {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }

  /* Sidebar - Move to bottom */
  .blog-sidebar {
    order: 2;
    margin-top: 3rem;
  }

  .blog-content {
    order: 1;
  }

  /* Blog Hero */
  .blog-hero {
    padding: 6rem 1rem 3rem;
  }

  .blog-hero-title {
    font-size: 2rem;
  }

  .blog-hero-description {
    font-size: 1rem;
  }

  /* Blog Post Cards */
  .blog-post {
    margin-bottom: 2rem;
  }

  .post-thumbnail {
    height: 250px;
  }

  .post-content {
    padding: 1.5rem;
  }

  .post-title {
    font-size: 1.25rem;
  }

  .post-excerpt {
    font-size: 0.9375rem;
  }

  .post-meta {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .post-meta span {
    font-size: 0.8125rem;
  }

  /* Pagination */
  .pagination {
    gap: 0.5rem;
  }

  .page-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  /* Blog Hero */
  .blog-hero {
    padding: 5rem 0.75rem 2rem;
  }

  .blog-hero-title {
    font-size: 1.75rem;
  }

  .blog-hero-description {
    font-size: 0.9375rem;
  }

  /* Blog Post Cards */
  .post-thumbnail {
    height: 200px;
  }

  .post-content {
    padding: 1.25rem;
  }

  .post-title {
    font-size: 1.125rem;
  }

  .post-excerpt {
    font-size: 0.875rem;
    line-height: 1.6;
  }

  .read-more {
    font-size: 0.875rem;
  }

  /* Sidebar Widgets */
  .sidebar-widget {
    padding: 1rem;
  }

  .widget-title {
    font-size: 1rem;
  }

  /* Search Box */
  .search-box input {
    font-size: 0.875rem;
  }

  /* Category List */
  .category-list a {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
  }

  /* Recent Posts */
  .recent-post-item img {
    width: 60px;
    height: 45px;
  }

  .recent-post-info h4 {
    font-size: 0.875rem;
  }

  .recent-post-date {
    font-size: 0.75rem;
  }

  /* Tags */
  .tag {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }
}

/* Post Featured Image */
.post-featured-image {
  width: 100%;
  max-width: 100%;
  margin: 2rem 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.post-featured-image img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  display: block;
}
