/* Blog Page Specific Styles */

/* Blog Layout */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 3rem;
  max-width: 112rem;
  margin: 0 auto;
}

/* Featured Post */
.featured-post-card {
  background: white;
  border: 2px solid var(--gray-100);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.featured-post-card:hover {
  border-color: var(--gold-400);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.featured-post-image {
  position: relative;
  height: 20rem;
  overflow: hidden;
}

.featured-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.featured-post-card:hover .featured-post-image img {
  transform: scale(1.05);
}

.featured-post-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--zaffre-600);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.featured-post-content {
  padding: 2rem;
}

.featured-post-title {
  font-size: 1.875rem;
  color: var(--zaffre-900);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.featured-post-excerpt p {
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.featured-post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.post-meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--gray-600);
}

.post-meta-item i {
  width: 1rem;
  height: 1rem;
}

.featured-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.post-tag {
  background: var(--gray-100);
  color: var(--gray-700);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Blog Sidebar */
.blog-sidebar {
  width: 100%;
}

.sidebar-sticky {
  position: sticky;
  top: 6rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.sidebar-title {
  font-size: 1.125rem;
  color: var(--zaffre-900);
  margin-bottom: 1rem;
}

.sidebar-description {
  color: var(--gray-600);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* Category List */
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-item {
  margin-bottom: 0.5rem;
}

.category-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  color: var(--gray-600);
  text-decoration: none;
  border-radius: 0.25rem;
  transition: all 0.3s ease;
}

.category-link:hover,
.category-link.active {
  background: var(--zaffre-50);
  color: var(--zaffre-600);
}

.category-count {
  background: var(--gray-100);
  color: var(--gray-600);
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
}

.category-link.active .category-count {
  background: var(--zaffre-100);
  color: var(--zaffre-800);
}

/* Newsletter Form */
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.newsletter-input {
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: border-color 0.3s ease;
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--zaffre-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.newsletter-btn {
  width: 100%;
  justify-content: center;
  font-size: 0.875rem;
}

/* Blog Main Content */
.blog-main {
  width: 100%;
}

.blog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.blog-main-title {
  font-size: 2rem;
  color: var(--zaffre-900);
}

.blog-trending {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-600);
  font-size: 0.875rem;
}

/* Blog Posts Grid */
.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.blog-post-card {
  background: white;
  border: 2px solid var(--gray-100);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.blog-post-card:hover {
  border-color: var(--gold-400);
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

.blog-post-image {
  position: relative;
  height: 12rem;
  overflow: hidden;
}

.blog-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-post-card:hover .blog-post-image img {
  transform: scale(1.05);
}

.blog-post-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--zaffre-600);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

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

.blog-post-title {
  font-size: 1.25rem;
  color: var(--zaffre-900);
  margin-bottom: 0.75rem;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.blog-post-card:hover .blog-post-title {
  color: var(--zaffre-700);
}

.blog-post-excerpt {
  color: var(--gray-600);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
}

.blog-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.blog-post-btn {
  width: 100%;
  justify-content: center;
  margin-top: auto;
}

/* Load More */
.blog-load-more {
  text-align: center;
  margin-top: 3rem;
}

/* Blog Post Page Styles */
.blog-post-hero {
  background: linear-gradient(135deg, var(--zaffre-900) 0%, var(--zaffre-700) 100%);
  color: white;
  padding: 3rem 0;
}

.blog-post-hero-content {
  max-width: 4rem;
  margin: 0 auto;
}

.back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--zaffre-200);
  text-decoration: none;
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.back-to-blog:hover {
  color: white;
}

.blog-post-category {
  background: var(--zaffre-600);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
  display: inline-block;
}

.blog-post-hero-title {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.blog-post-hero-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--zaffre-100);
  flex-wrap: wrap;
}

/* Blog Post Content */
.blog-post-content-section {
  padding: 3rem 0;
  background: white;
}

.blog-post-layout {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 3rem;
  max-width: 64rem;
  margin: 0 auto;
}

.blog-post-main {
  width: 100%;
}

.blog-post-image {
  position: relative;
  height: 24rem;
  margin-bottom: 2rem;
  border-radius: 0.5rem;
  overflow: hidden;
}

.blog-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-post-content {
  max-width: none;
}

.blog-post-intro {
  font-size: 1.125rem;
  color: var(--gray-700);
  line-height: 1.6;
  margin-bottom: 2rem;
  font-weight: 500;
}

.blog-post-content h2 {
  font-size: 1.875rem;
  color: var(--zaffre-900);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.blog-post-content h3 {
  font-size: 1.5rem;
  color: var(--zaffre-900);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.blog-post-content p {
  color: var(--gray-700);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.blog-post-content ul,
.blog-post-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.blog-post-content li {
  color: var(--gray-700);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.blog-post-content strong {
  color: var(--zaffre-900);
  font-weight: 600;
}

/* Blog Post Sidebar */
.blog-post-sidebar {
  width: 100%;
}

.author-info-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.author-avatar {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 4px solid var(--gray-100);
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-details h4 {
  font-size: 1.125rem;
  color: var(--zaffre-900);
  margin-bottom: 0.25rem;
}

.author-role {
  color: var(--zaffre-600);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.author-bio {
  color: var(--gray-600);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Related Articles */
.related-articles {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.related-article {
  display: block;
  padding: 1rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.375rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.related-article:hover {
  border-color: var(--zaffre-300);
  background: var(--zaffre-50);
}

.related-article h4 {
  font-size: 0.875rem;
  color: var(--zaffre-900);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.related-article-meta {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin: 0;
}

/* Newsletter Card */
.newsletter-card {
  background: var(--zaffre-50);
}

/* Blog Post Tags and Share */
.blog-post-tags-section,
.blog-post-share-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

.blog-post-tags-section h3,
.blog-post-share-section h3 {
  font-size: 1.125rem;
  color: var(--zaffre-900);
  margin-bottom: 1rem;
}

.blog-post-share-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Blog Post Navigation */
.blog-post-navigation {
  padding: 3rem 0;
  background: var(--gray-50);
}

.blog-nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 64rem;
  margin: 0 auto;
}

.blog-nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--zaffre-600);
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-nav-link:hover {
  color: var(--zaffre-800);
}

.blog-nav-text {
  display: flex;
  flex-direction: column;
}

.blog-nav-label {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.blog-nav-title {
  font-weight: 500;
  color: var(--gray-900);
}

.blog-nav-next {
  text-align: right;
}

/* No Results Message */
.no-results-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--gray-500);
}

.no-results-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.no-results-content i {
  width: 3rem;
  height: 3rem;
  color: var(--gray-400);
}

.no-results-content h3 {
  color: var(--gray-700);
  margin: 0;
}

.no-results-content p {
  margin: 0;
}

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gray-200);
  z-index: 100;
}

.reading-progress-bar {
  height: 100%;
  background: var(--zaffre-600);
  width: 0%;
  transition: width 0.1s ease;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .blog-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .blog-sidebar {
    order: -1;
  }

  .sidebar-sticky {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 1rem;
  }

  .sidebar-card {
    min-width: 250px;
    flex-shrink: 0;
  }

  .blog-post-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .blog-post-hero-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .blog-posts-grid {
    grid-template-columns: 1fr;
  }

  .featured-post-content {
    padding: 1.5rem;
  }

  .featured-post-title {
    font-size: 1.5rem;
  }

  .blog-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .blog-post-hero-title {
    font-size: 2rem;
  }

  .blog-post-hero-meta {
    gap: 1rem;
  }

  .blog-nav-content {
    flex-direction: column;
    gap: 2rem;
  }

  .blog-nav-link {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .featured-post-content {
    padding: 1rem;
  }

  .blog-post-content {
    padding: 1rem;
  }

  .sidebar-sticky {
    flex-direction: column;
  }

  .sidebar-card {
    min-width: auto;
  }

  .blog-post-hero-title {
    font-size: 1.75rem;
  }

  .blog-post-image {
    height: 16rem;
  }
}

/* Animation classes */
.blog-post-card,
.featured-post-card {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.blog-post-card.visible,
.featured-post-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Search and filter animations */
.search-match,
.category-match {
  animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
