/* style/blog.css */
/* body đã padding-top: var(--header-offset)；trang này cấm viết lại biến đó */
.page-blog {
  background-color: #08160F; /* Nền tối theo custom color */
  color: #F2FFF6; /* Chữ sáng theo custom color */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Hình ảnh trên, nội dung dưới */
  align-items: center;
  padding-bottom: 60px;
  padding-top: 10px; /* Top padding nhỏ, body đã xử lý header offset */
  background-color: #08160F; /* Đảm bảo nền khớp */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%; /* Đảm bảo ảnh chiếm hết chiều rộng */
  overflow: hidden;
  box-sizing: border-box;
  margin-bottom: 30px; /* Khoảng cách giữa ảnh và nội dung */
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-height: 200px;
}

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

.page-blog__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem); /* Sử dụng clamp cho responsive H1 */
  font-weight: 700;
  color: #F2C14E; /* Màu vàng Gold cho tiêu đề chính */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__lead-text {
  font-size: 1.25rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 30px;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%; /* Quan trọng cho responsive */
  white-space: normal; /* Cho phép xuống dòng */
  word-wrap: break-word; /* Cho phép ngắt từ */
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(17, 168, 78, 0.4);
}

.page-blog__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(17, 168, 78, 0.6);
}

.page-blog__btn-secondary {
  background: transparent;
  color: #F2FFF6; /* Text Main */
  border: 2px solid #2E7A4E; /* Border */
  margin-left: 20px;
}

.page-blog__btn-secondary:hover {
  background: #2E7A4E; /* Border color on hover */
  color: #ffffff;
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Cho phép các nút xuống dòng */
}

/* Section titles and descriptions */
.page-blog__section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  color: #F2C14E; /* Gold */
  text-align: center;
  margin-bottom: 15px;
}

.page-blog__section-description {
  font-size: 1.1rem;
  color: #A7D9B8; /* Text Secondary */
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

/* Latest Articles Section */
.page-blog__latest-articles {
  padding: 80px 0;
  background-color: #08160F; /* Background */
}

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

.page-blog__article-card {
  background-color: #11271B; /* Card BG */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 200px;
}

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

.page-blog__article-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

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

.page-blog__article-content {
  padding: 25px;
}

.page-blog__article-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #F2FFF6; /* Text Main */
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-blog__article-title:hover {
  color: #2AD16F; /* Button gradient start color */
}

.page-blog__article-excerpt {
  font-size: 1rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-blog__article-date {
  font-size: 0.9rem;
  color: #A7D9B8; /* Text Secondary */
  opacity: 0.8;
}

.page-blog__cta-container {
  text-align: center;
  margin-top: 60px;
}

/* Categories Section */
.page-blog__categories-section {
  padding: 80px 0;
  background-color: #08160F; /* Background */
  border-top: 1px solid #1E3A2A; /* Divider */
}

.page-blog__category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.page-blog__category-card {
  background-color: #11271B; /* Card BG */
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background-color 0.3s ease;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  background-color: #1a3528; /* Slightly lighter Card BG on hover */
}

.page-blog__category-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #F2FFF6; /* Text Main */
  margin-bottom: 10px;
}

.page-blog__category-title:hover {
  color: #2AD16F; /* Button gradient start color */
}

.page-blog__category-count {
  font-size: 1rem;
  color: #A7D9B8; /* Text Secondary */
}

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(180deg, #11A84E 0%, #0A4B2C 100%); /* Deep Green gradient */
  color: #F2FFF6; /* Text Main */
}

.page-blog__cta-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-blog__cta-section .page-blog__section-title {
  color: #F2FFF6; /* Text Main */
}

.page-blog__cta-section .page-blog__section-description {
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 40px;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 0;
  background-color: #08160F; /* Background */
  border-top: 1px solid #1E3A2A; /* Divider */
}

.page-blog__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__faq-item {
  background-color: #11271B; /* Card BG */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-blog__faq-item summary {
  list-style: none; /* Hide default marker */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 600;
  color: #F2FFF6; /* Text Main */
  background-color: #11271B; /* Card BG */
  border-bottom: 1px solid #1E3A2A; /* Divider */
  transition: background-color 0.3s ease;
}

.page-blog__faq-item summary:hover {
  background-color: #1a3528; /* Slightly lighter Card BG on hover */
}

.page-blog__faq-item summary::-webkit-details-marker {
  display: none; /* Hide default marker for webkit */
}

.page-blog__faq-qtext {
  flex-grow: 1;
}

.page-blog__faq-toggle {
  font-size: 1.8rem;
  line-height: 1;
  margin-left: 15px;
  color: #2AD16F; /* Button gradient start color */
}

.page-blog__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1rem;
  color: #A7D9B8; /* Text Secondary */
  line-height: 1.7;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }

  .page-blog__section-title {
    font-size: clamp(1.6rem, 4vw, 2.5rem);
  }
  
  .page-blog__lead-text,
  .page-blog__section-description {
    font-size: 1.1rem;
  }

  .page-blog__article-title {
    font-size: 1.3rem;
  }

  .page-blog__category-title {
    font-size: 1.4rem;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding: 40px 0;
    padding-top: 10px !important; /* body đã xử lý header offset */
  }

  .page-blog__hero-content {
    padding: 0 15px;
  }

  .page-blog__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .page-blog__lead-text {
    font-size: 1rem;
  }

  .page-blog__btn-primary,
.page-blog__btn-secondary {
    padding: 12px 20px;
    font-size: 0.9rem;
    width: 100% !important; /* Quan trọng cho responsive */
    margin: 0 0 10px 0 !important; /* Stack buttons */
  }

  .page-blog__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px;
    padding: 0 15px;
  }

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

  .page-blog__latest-articles,
  .page-blog__categories-section,
  .page-blog__cta-section,
  .page-blog__faq-section {
    padding: 50px 0;
  }

  .page-blog__article-grid {
    grid-template-columns: 1fr; /* Single column for articles */
    gap: 20px;
  }

  .page-blog__category-grid {
    grid-template-columns: 1fr; /* Single column for categories */
    gap: 15px;
  }

  .page-blog__article-image,
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-height: 200px !important;
  }

  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-image-wrapper,
  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-blog__faq-item summary {
    font-size: 1.1rem;
    padding: 15px 20px;
  }

  .page-blog__faq-answer {
    padding: 0 20px 15px 20px;
  }
}

/* Ensure images within content areas are always large enough */
.page-blog__article-image,
.page-blog__category-card img,
.page-blog__faq-illustration {
  min-width: 200px;
  min-height: 200px;
}

/* No CSS filter for images */
.page-blog img {
  filter: none !important;
}