
/* Inherit styles from the main site */
@import url('../styles.css');

/* Blog specific styles */

.blog-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  margin: 2rem auto;
  max-width: 1200px;
  padding: 0 2rem;
}

.main-content {
  max-width: 100%;
}

.sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}

.blog-hero-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.post-meta {
  color: #666;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.main-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.main-content h2 {
  font-size: 1.8rem;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #eee;
}

.main-content h3 {
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.main-content p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.main-content ul, .main-content ol {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

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

.main-content pre {
    background-color: #f4f4f4;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.toc {
  background-color: #fff7ed;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border-left: 4px solid #f97316;
}

.toc h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: #c2410c;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc ul li a {
  color: #333;
  text-decoration: none;
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid #fed7aa;
  transition: color 0.3s;
}

.toc ul li a:hover {
  color: #ea580c;
}

.ad-space {
    background-color: #f0f0f0;
    padding: 2rem;
    text-align: center;
    border-radius: 8px;
}

.share-links {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    text-align: center;
}

.share-links p {
    font-weight: bold;
    margin-bottom: 1rem;
}

.share-links a {
    display: inline-block;
    margin: 0 0.5rem;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    color: #fff;
    font-weight: bold;
}

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

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


/* Blog Index Page */
.blog-header {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
}

.blog-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.blog-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.blog-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
}

.blog-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-content h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.4rem;
    border-bottom: none;
    padding-bottom: 0;
}

.blog-content h2 a {
    text-decoration: none;
    color: #333;
}

.blog-content time {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 1rem;
    display: block;
}

.article-summary {
    font-size: 0.9rem;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    text-decoration: none;
    color: #ea580c;
    font-weight: bold;
}

.read-more:hover {
    color: #f97316;
}

/* Responsive */
@media (max-width: 1024px) {
  .blog-container {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    margin-top: 3rem;
  }
}

@media (max-width: 768px) {
    .main-content h1 {
        font-size: 2rem;
    }
    .main-content h2 {
        font-size: 1.6rem;
    }
    .blog-header h1 {
        font-size: 2rem;
    }
    .blog-list {
        grid-template-columns: 1fr;
    }
}
