.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light body background */
  background-color: #FFFFFF; /* Explicitly set for clarity, though shared.css defines body */
}

/* Fixed header offset */
.page-blog {
  padding-top: var(--header-offset, 120px);
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, #e0f2f7, #ffffff); /* Light gradient background */
  overflow: hidden;
}

.page-blog__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1; /* Ensure content is above any potential background effects */
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 30px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-blog__hero-content {
  text-align: center;
  width: 100%;
  padding: 0 20px;
}

.page-blog__hero-title {
  font-size: 3.2em;
  color: #26A9E0;
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: bold;
}

.page-blog__hero-description {
  font-size: 1.2em;
  color: #555555;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__hero-cta-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-blog__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  min-width: 180px;
  text-align: center;
}

.page-blog__cta-button--primary {
  background: #26A9E0;
  color: #ffffff;
  border: 2px solid #26A9E0;
}

.page-blog__cta-button--primary:hover {
  background: #1e87c0;
  border-color: #1e87c0;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-blog__cta-button--secondary {
  background: #ffffff;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-blog__cta-button--secondary:hover {
  background: #f0f8ff;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* General Section Styling */
.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.page-blog__section-title {
  font-size: 2.5em;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 50px;
  font-weight: bold;
}

.page-blog__section-intro {
  text-align: center;
  font-size: 1.1em;
  color: #555555;
  max-width: 900px;
  margin: -30px auto 50px auto;
}

.page-blog__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-blog__dark-bg {
  background-color: #26A9E0;
  color: #ffffff;
}

.page-blog__dark-bg .page-blog__section-title {
  color: #ffffff;
}

.page-blog__medium-bg {
  background-color: #f8f8f8; /* A light grey to differentiate from pure white */
  color: #333333;
}

/* Latest Articles Section */
.page-blog__latest-articles {
  padding: 80px 20px;
}

.page-blog__articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-blog__article-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-blog__article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-blog__article-image {
  width: 100%;
  height: 220px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-blog__article-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-blog__article-title {
  font-size: 1.4em;
  margin-top: 0;
  margin-bottom: 15px;
  line-height: 1.4;
  font-weight: 600;
}

.page-blog__article-title a {
  color: #26A9E0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
  color: #1e87c0;
  text-decoration: underline;
}

.page-blog__article-summary {
  font-size: 0.95em;
  color: #666666;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  display: inline-block;
  color: #26A9E0;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease, transform 0.3s ease;
  margin-top: auto; /* Push to bottom */
}

.page-blog__read-more:hover {
  color: #1e87c0;
  transform: translateX(5px);
}

/* Categories Section */
.page-blog__categories-section {
  padding: 60px 20px;
}

.page-blog__categories-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.page-blog__category-item {
  display: inline-block;
  background: #ffffff;
  color: #26A9E0;
  padding: 12px 25px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-blog__category-item:hover {
  background: #1e87c0;
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* About Blog Section */
.page-blog__about-blog {
  padding: 80px 20px;
}

.page-blog__about-blog-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.page-blog__about-blog-text {
  flex: 1;
}

.page-blog__about-blog-text p {
  margin-bottom: 15px;
  color: #555555;
  font-size: 1.05em;
}

.page-blog__about-blog-image-wrapper {
  flex: 0 0 500px; /* Fixed width for desktop */
  max-width: 50%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-blog__about-blog-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Why Read Our Blog Section */
.page-blog__why-read {
  padding: 80px 20px;
}

.page-blog__why-read .page-blog__section-title {
  margin-bottom: 60px;
}

.page-blog__why-read-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-blog__why-read-item {
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__why-read-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-blog__why-read-item-title {
  font-size: 1.3em;
  color: #26A9E0;
  margin-top: 0;
  margin-bottom: 15px;
  font-weight: 600;
}

.page-blog__why-read-item p {
  color: #666666;
}

/* Call to Action Section */
.page-blog__cta-section {
  padding: 80px 20px;
}

.page-blog__cta-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.page-blog__cta-text {
  flex: 1;
  text-align: left;
}

.page-blog__cta-text .page-blog__section-title {
  color: #ffffff;
  text-align: left;
  margin-bottom: 20px;
}

.page-blog__cta-text p {
  color: #f0f8ff;
  font-size: 1.1em;
  margin-bottom: 30px;
}

.page-blog__cta-image-wrapper {
  flex: 0 0 600px; /* Fixed width for desktop */
  max-width: 50%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-blog__cta-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 20px;
}

.page-blog__faq-section .page-blog__section-title {
  margin-bottom: 60px;
}

.page-blog__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

/* FAQ容器样式 */
.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* FAQ默认状态 - 答案隐藏 */
.page-blog__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 25px; /* Adjusted padding */
  opacity: 0;
}

/* FAQ展开状态 - ⚠️ 使用!important và đủ lớn max-height để đảm bảo có thể mở rộng */
.page-blog__faq-item.active .page-blog__faq-answer {
  max-height: 2000px !important; /* ⚠️ Sử dụng!important để đảm bảo ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
  padding: 20px 25px !important; /* Adjusted padding */
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #555555;
}

/* 问题样式 */
.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px; /* Adjusted padding */
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease, border-bottom-left-radius 0.3s ease, border-bottom-right-radius 0.3s ease;
  position: relative;
}

.page-blog__faq-item.active .page-blog__faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}

.page-blog__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-blog__faq-question:active {
  background: #eeeeee;
}

/* 问题标题样式 */
.page-blog__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
  color: #26A9E0;
}

/* 切换图标 */
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* 防止图标阻止点击事件 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-blog__faq-item.active .page-blog__faq-toggle {
  color: #333;
  transform: rotate(45deg); /* Rotate for 'X' effect or simply change to '-' */
}

/* --- Responsive Design --- */

/* Mobile adaptation */
@media (max-width: 768px) {
  .page-blog {
    font-size: 15px;
    line-height: 1.55;
  }

  /* Adjust padding-top for fixed header on mobile */
  .page-blog {
    padding-top: var(--header-offset, 120px) !important;
  }

  .page-blog__hero-section {
    padding: 40px 15px;
  }

  .page-blog__hero-title {
    font-size: 2em;
    margin-bottom: 15px;
  }

  .page-blog__hero-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-blog__hero-cta-group {
    flex-direction: column;
    gap: 15px;
  }

  .page-blog__cta-button {
    width: 100%;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px;
    font-size: 1em;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-blog__container {
    padding: 30px 15px;
  }

  .page-blog__section-title {
    font-size: 1.8em;
    margin-bottom: 40px;
  }

  .page-blog__section-intro {
    font-size: 1em;
    margin: -20px auto 40px auto;
  }

  .page-blog__articles-grid {
    grid-template-columns: 1fr;
  }

  .page-blog__article-image {
    height: 180px; /* Adjust height for mobile */
  }

  .page-blog__article-title {
    font-size: 1.2em;
  }

  .page-blog__categories-list {
    flex-direction: column;
    gap: 10px;
  }

  .page-blog__category-item {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 10px 20px;
    font-size: 0.95em;
  }

  .page-blog__about-blog-content,
  .page-blog__cta-content {
    flex-direction: column;
    gap: 30px;
  }

  .page-blog__about-blog-image-wrapper,
  .page-blog__cta-image-wrapper {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
  }

  .page-blog__cta-text .page-blog__section-title {
    text-align: center;
  }

  .page-blog__cta-text p {
    text-align: center;
  }

  .page-blog__cta-text .page-blog__cta-button {
    margin-left: auto;
    margin-right: auto;
    display: block;
  }

  .page-blog__why-read-list {
    grid-template-columns: 1fr;
  }

  /* FAQ mobile adaptation */
  .page-blog__faq-question {
    padding: 15px 20px;
    flex-wrap: wrap;
  }
  
  .page-blog__faq-question h3 {
    font-size: 1em;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-blog__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-blog__faq-answer {
    padding: 0 15px;
  }
  
  .page-blog__faq-item.active .page-blog__faq-answer {
    padding: 15px !important;
  }

  /* Ensure all images are responsive */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__articles-grid,
  .page-blog__categories-list,
  .page-blog__about-blog-content,
  .page-blog__why-read-list,
  .page-blog__cta-content,
  .page-blog__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Ensure no filter on images */
.page-blog img {
  filter: none;
}