/* Blog-specific styles */

/* Blog Listing Page */
.blog-header {
  text-align: center;
  margin-bottom: 50px;
}

.blog-header h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: var(--primary);
}

.blog-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 10px 20px;
  border: 2px solid var(--light-gray);
  background: var(--white);
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-dark);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--bg-gradient-accent);
  color: var(--text-light);
  border-color: var(--primary);
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

/* Blog Card */
.blog-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--light-gray);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.blog-card-image {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  background: var(--bg-light);
}

.blog-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}

.blog-card-category {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--bg-gradient-accent);
  color: var(--text-light);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-card-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 12px;
  font-size: 0.875rem;
  color: var(--text-medium);
}

.blog-card-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.3;
}

.blog-card-title a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-card-title a:hover {
  color: var(--accent);
}

.blog-card-excerpt {
  color: var(--text-medium);
  line-height: 1.7;
  margin-bottom: 16px;
  flex: 1;
}

.blog-card-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.blog-card-link:hover {
  color: var(--accent);
  padding-left: 5px;
}

/* Pagination */
.blog-pagination {
  display: flex;
  justify-content: center;
  margin-top: 50px;
}

.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pagination-btn {
  padding: 10px 16px;
  border: 2px solid var(--light-gray);
  background: var(--white);
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-dark);
}

.pagination-btn:hover,
.pagination-btn.active {
  background: var(--bg-gradient-accent);
  color: var(--text-light);
  border-color: var(--primary);
}

.pagination-ellipsis {
  padding: 0 8px;
  color: var(--text-medium);
}

/* Blog Post Page */
.blog-hero {
  padding: 30px 0 50px;
}

.blog-post-section {
  padding: 40px 0;
}

.blog-post-header {
  max-width: 800px;
  margin: 0 auto 40px;
}

.breadcrumb {
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--text-medium);
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.post-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.post-category {
  background: var(--bg-gradient-accent);
  color: var(--text-light);
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.post-date,
.post-reading-time {
  color: var(--text-medium);
}

.post-title {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.post-excerpt {
  font-size: 1.25rem;
  color: var(--text-medium);
  line-height: 1.7;
  margin-bottom: 30px;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 0;
  border-top: 1px solid var(--light-gray);
  border-bottom: 1px solid var(--light-gray);
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-info strong {
  color: var(--primary);
  font-weight: 600;
}

.author-info span {
  color: var(--text-medium);
  font-size: 0.9rem;
}

.post-featured-image {
  max-width: 1000px;
  margin: 0 auto 40px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.post-content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.post-content {
  min-width: 0;
}

.table-of-contents {
  background: var(--bg-light);
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 40px;
  border-left: 4px solid var(--accent);
}

.table-of-contents h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: var(--primary);
}

.table-of-contents ul {
  list-style: none;
  padding: 0;
}

.table-of-contents li {
  margin-bottom: 10px;
}

.table-of-contents a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.3s ease;
  display: block;
  padding: 6px 0;
}

.table-of-contents a.h2 {
  font-weight: 600;
  padding-left: 0;
}

.table-of-contents a.h3 {
  font-weight: 400;
  padding-left: 20px;
  font-size: 0.95rem;
}

.table-of-contents a:hover {
  color: var(--accent);
}

.post-body {
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--text-dark);
}

.post-body h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  margin: 40px 0 20px;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.post-body h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 30px 0 15px;
  color: var(--primary);
}

.post-body p {
  margin-bottom: 20px;
}

.post-body ul,
.post-body ol {
  margin: 20px 0;
  padding-left: 30px;
}

.post-body li {
  margin-bottom: 10px;
}

.post-body a {
  color: var(--primary);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.post-body a:hover {
  color: var(--accent);
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 30px 0;
  box-shadow: var(--shadow-md);
}

.post-body blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 20px;
  margin: 30px 0;
  font-style: italic;
  color: var(--text-medium);
}

/* Social Sharing */
.social-sharing {
  margin: 50px 0;
  padding: 30px;
  background: var(--bg-light);
  border-radius: 12px;
}

.social-sharing h4 {
  margin-bottom: 20px;
  color: var(--primary);
}

.share-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--white);
  border: 2px solid var(--light-gray);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: all 0.3s ease;
}

.share-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Sidebar */
.post-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-cta {
  background: var(--bg-gradient-accent);
  color: var(--text-light);
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.sidebar-cta h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.sidebar-cta p {
  margin-bottom: 20px;
  opacity: 0.95;
}

.sidebar-cta .btn {
  width: 100%;
  text-align: center;
}

.related-posts {
  background: var(--white);
  padding: 24px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--light-gray);
}

.related-posts h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--primary);
}

.related-post-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--light-gray);
}

.related-post-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.related-post-item a {
  text-decoration: none;
  color: var(--text-dark);
  transition: color 0.3s ease;
}

.related-post-item h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--primary);
  line-height: 1.4;
}

.related-post-item:hover h4 {
  color: var(--accent);
}

.related-post-date {
  font-size: 0.85rem;
  color: var(--text-medium);
}

/* Responsive Design */
@media (max-width: 992px) {
  .post-content-wrapper {
    grid-template-columns: 1fr;
  }

  .post-sidebar {
    position: static;
  }

  .post-title {
    font-size: 2.2rem;
  }

  .blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .post-title {
    font-size: 1.8rem;
  }

  .post-excerpt {
    font-size: 1.1rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-filters {
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  .share-buttons {
    flex-direction: column;
  }

  .share-btn {
    width: 100%;
    justify-content: center;
  }
}
