/* Enhanced Article Styles */

/* Enhanced header section */
.post-header {
  margin-bottom: 1rem;
  padding: 1.5rem;
  background-color: #f9f9f9;
  border-radius: 0.5rem;
  border-bottom: 1px solid #eee;
}

/* Improved title styling */
.post-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  color: #333;
}

/* Enhanced author section - original version */
.author-info {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  padding: 1rem;
  background-color: #f0f0f0;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.author-info .bg-gray-200 {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e0e0e0;
  color: #444;
  font-weight: bold;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  margin-right: 0.75rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* New compact author section */
.author-info-compact {
  display: flex;
  align-items: center;
  margin: 0.75rem 0 0.5rem 0;
  padding: 0.5rem 0.75rem;
  background-color: #f9f9f9;
  border-radius: 0.5rem;
  max-height: 50px;
  border-left: 3px solid #e0e0e0;
  margin-bottom: 0.75rem; /* Reduced space after author info */
}

.author-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e0e0e0;
  color: #444;
  font-weight: bold;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.author-details {
  flex: 1;
  line-height: 1.2;
}

.author-name {
  font-weight: 500;
  margin-bottom: 0;
  font-size: 0.9rem;
}

.author-bio {
  font-size: 0.8rem;
  color: #666;
  margin: 0;
}

/* Better tag styling */
.post-meta-tags a {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: 9999px;
  background-color: #e9f5ff;
  color: #0066cc;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s;
}

.post-meta-tags a:hover {
  background-color: #cce5ff;
}

/* Improve spacing between metadata items */
.post-meta-item {
  margin-right: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Post content container */
.post-content-container {
  position: relative;
  margin-top: 1rem;
}

/* Feature image container with responsive layout */
.post-feature-container {
  width: 100%;
  margin-bottom: 0.75rem;
}

/* Medium screens and up */
@media (min-width: 768px) {
  .post-feature-container {
    float: right;
    width: 40%;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    margin-top: 0;
  }
}

/* Feature image enhancement */
.post-feature-image {
  max-height: 320px;
  width: 100%;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.post-feature-image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: center;
}

/* Helper class for clearing floats */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* Typography improvements for better readability */
.post-content {
  font-size: 1.0rem;  /* Adjusted for slight decrease */
  line-height: 1.8; /* Increased line height for better readability */
  max-width: 100%; /* Full width for better alignment with image */
  padding-top: 0; /* No space at the top */
}

/* Improved link styling for better visibility */
.post-content a {
  color: #0066cc;
  text-decoration: underline;
  font-weight: 500;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

.post-content a:hover {
  color: #004d99;
  border-bottom-color: #004d99;
}

/* Enhanced heading styles to make them more distinctive */
.post-content h2 {
  font-size: 1.675rem;
  font-weight: 700;
  color: #333;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.post-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #444;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.post-content h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #555;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

/* Paragraph spacing */
.post-content p {
  margin-bottom: 1.5rem;
}

/* List styling */
.post-content ul, 
.post-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.post-content ul {
  list-style-type: disc;
}

.post-content ol {
  list-style-type: decimal;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content li > ul,
.post-content li > ol {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.post-content li > ul {
  list-style-type: circle;
}

.post-content li > ol {
  list-style-type: lower-alpha;
}

/* Blockquote styling */
.post-content blockquote {
  border-left: 4px solid #ddd;
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #555;
}

/* Code block styling */
.post-content pre {
  background-color: #f5f5f5;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-content code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875rem;
}

/* Table of contents styling */
.toc {
  background-color: #f5f7fa;
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
  border-left: 4px solid #0066cc;
  font-size: 0.9rem;
}

.toc ul {
  list-style-type: none;
  padding-left: 1rem;
}

.toc a {
  text-decoration: none;
  color: #555;
  transition: color 0.2s;
  display: block;
  padding: 0.25rem 0;
}

.toc a:hover {
  color: #000;
}

/* Navigation styling */
.post-nav-link {
  display: block;
  padding: 1rem;
  background-color: #f5f7fa;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
  width: 100%;
}

@media (min-width: 768px) {
  .post-nav-link {
    width: 48%;
    margin-bottom: 0;
  }
}

.post-nav-link:hover {
  transform: translateY(-2px);
  background-color: #edf2f7;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Related posts styling */
.related-post {
  display: block;
  padding: 1rem;
  background-color: #f5f7fa;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.related-post:hover {
  transform: translateY(-2px);
  background-color: #edf2f7;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* First paragraph styling for better alignment */
.post-content > p:first-of-type {
  margin-top: 0;
  padding-top: 0;
  margin-bottom: 1rem;
}

/* Improve article flow on mobile */
@media (max-width: 767px) {
  .post-feature-container {
    margin-bottom: 1rem;
    margin-top: 0;
  }
  
  .post-content-container {
    margin-top: 0;
  }
  
  .post-content {
    padding-top: 0;
  }
}
