/* ============================================
   Blog-specific styles for Wenti Labs
   Built on top of site.css
   ============================================ */

/* ============================================
   Background Pattern
   ============================================ */

.pattern-bg {
  background-image: url('../images/pattern-pages.svg');
  background-position: 50% 0px;
  background-repeat: no-repeat;
  background-size: auto;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  pointer-events: none;
}

/* ============================================
   Blog Header Section
   ============================================ */

.blog-header {
  padding: 100px 20px 60px;
  background-color: rgb(246, 245, 251);
  text-align: center;
}

.blog-header-container {
  max-width: 1200px;
  margin: 0 auto;
}

.blog-header-title {
  font-size: 60px;
  font-weight: 500;
  color: rgb(77, 75, 180);
  margin-bottom: 16px;
  line-height: 1.2;
}

.blog-header-subtitle {
  font-size: 18px;
  color: rgb(94, 80, 160);
  margin-top: 16px;
  margin-bottom: 0;
}

/* ============================================
   Blog Listing Section
   ============================================ */

.blog-listing-section {
  padding: 80px 20px 120px;
  background-color: #fff;
}

.blog-listing-container {
  max-width: 1260px;
  margin: 0 auto;
}

/* ============================================
   Category Filter Tabs
   ============================================ */

.blog-category-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.blog-category-tab {
  padding: 10px 20px;
  background-color: rgb(241, 240, 245);
  color: rgb(94, 80, 160);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.4s cubic-bezier(0.215, 0.61, 0.355, 1),
              color 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
  cursor: pointer;
  display: inline-block;
}

.blog-category-tab:hover {
  background-color: rgb(230, 228, 238);
}

.blog-category-tab.active {
  background-color: rgb(77, 75, 180);
  color: #fff;
}

/* ============================================
   Blog Posts Grid
   ============================================ */

.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 80px 40px;
  row-gap: 80px;
  column-gap: 40px;
}

/* ============================================
   Blog Post Card
   ============================================ */

.blog-post-card {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.blog-post-card.hidden {
  display: none;
}

.blog-post-link {
  display: grid;
  grid-template-rows: auto auto;
  gap: 16px;
  text-decoration: none;
  color: rgb(15, 13, 25);
  transition: color 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.blog-post-link:hover .blog-post-title {
  color: rgb(77, 75, 180);
}

.blog-post-image-wrapper {
  width: 100%;
  height: auto;
  overflow: hidden;
  border-radius: 10px;
}

.blog-post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  transition: transform 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
}

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

.blog-post-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.blog-post-category {
  padding: 10px 20px;
  background-color: rgb(241, 240, 245);
  color: rgb(94, 80, 160);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  display: inline-block;
  width: fit-content;
}

.blog-post-title {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  color: rgb(22, 22, 22);
  margin: 8px 0 0 0;
  transition: color 0.3s ease;
}

.blog-post-date {
  font-size: 14px;
  color: rgb(120, 120, 120);
  margin-top: 4px;
}

/* ============================================
   Blog Post Page Styles
   ============================================ */

.blog-post {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 20px 100px;
}

.blog-post-header {
  margin-bottom: 40px;
  text-align: center;
}

.blog-post-title-large {
  font-size: 48px;
  font-weight: 600;
  color: rgb(22, 22, 22);
  line-height: 1.2;
  margin-bottom: 24px;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

.blog-post-category-badge {
  padding: 8px 16px;
  background-color: rgb(241, 240, 245);
  color: rgb(94, 80, 160);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
}

.blog-post-date-text {
  font-size: 14px;
  color: rgb(120, 120, 120);
}

.blog-post-feature-image {
  width: 100%;
  margin-bottom: 48px;
  border-radius: 12px;
  overflow: hidden;
}

.blog-feature-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   Blog Post Rich Text Content
   ============================================ */

.blog-post-content {
  font-size: 16px;
  line-height: 1.8;
  color: rgb(50, 50, 50);
}

.blog-post-content h2 {
  font-size: 32px;
  font-weight: 600;
  color: rgb(22, 22, 22);
  margin-top: 48px;
  margin-bottom: 20px;
  line-height: 1.3;
}

.blog-post-content h3 {
  font-size: 24px;
  font-weight: 600;
  color: rgb(22, 22, 22);
  margin-top: 36px;
  margin-bottom: 16px;
  line-height: 1.4;
}

.blog-post-content h4 {
  font-size: 20px;
  font-weight: 600;
  color: rgb(22, 22, 22);
  margin-top: 28px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.blog-post-content p {
  margin-bottom: 20px;
  line-height: 1.8;
}

.blog-post-content ul,
.blog-post-content ol {
  margin-bottom: 24px;
  padding-left: 32px;
}

.blog-post-content li {
  margin-bottom: 12px;
  line-height: 1.8;
}

.blog-post-content a {
  color: rgb(77, 75, 180);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.blog-post-content a:hover {
  color: rgb(94, 80, 160);
}

.blog-post-content blockquote {
  border-left: 4px solid rgb(77, 75, 180);
  padding-left: 24px;
  margin: 32px 0;
  font-style: italic;
  color: rgb(80, 80, 80);
}

.blog-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 32px 0;
  display: block;
}

.blog-post-content figure {
  margin: 40px 0;
}

.blog-post-content figcaption {
  font-size: 14px;
  color: rgb(120, 120, 120);
  text-align: center;
  margin-top: 12px;
  font-style: italic;
}

.blog-post-content code {
  background-color: rgb(246, 245, 251);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: rgb(77, 75, 180);
}

.blog-post-content pre {
  background-color: rgb(246, 245, 251);
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 24px 0;
}

.blog-post-content pre code {
  background-color: transparent;
  padding: 0;
  font-size: 14px;
  color: rgb(50, 50, 50);
}

.blog-post-content hr {
  border: none;
  border-top: 1px solid rgb(230, 230, 230);
  margin: 48px 0;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet */
@media screen and (max-width: 991px) {
  .blog-header-title {
    font-size: 48px;
  }

  .blog-posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 60px 30px;
  }

  .blog-post-title-large {
    font-size: 40px;
  }

  .blog-post-content h2 {
    font-size: 28px;
  }

  .blog-post-content h3 {
    font-size: 22px;
  }
}

/* Mobile Landscape */
@media screen and (max-width: 767px) {
  .blog-header {
    padding: 80px 20px 40px;
  }

  .blog-header-title {
    font-size: 36px;
  }

  .blog-header-subtitle {
    font-size: 16px;
  }

  .blog-listing-section {
    padding: 60px 20px 80px;
  }

  .blog-category-tabs {
    margin-bottom: 40px;
  }

  .blog-posts-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .blog-post-title-large {
    font-size: 32px;
  }

  .blog-post-content h2 {
    font-size: 24px;
    margin-top: 36px;
  }

  .blog-post-content h3 {
    font-size: 20px;
    margin-top: 28px;
  }
}

/* Mobile Portrait */
@media screen and (max-width: 479px) {
  .blog-header-title {
    font-size: 32px;
  }

  .blog-category-tab {
    font-size: 13px;
    padding: 8px 16px;
  }

  .blog-post-title {
    font-size: 16px;
  }

  .blog-post-title-large {
    font-size: 28px;
  }

  .blog-post {
    padding: 40px 16px 80px;
  }
}
