/* style/blog.css */
/* body đã padding-top: var(--header-offset) từ shared.css; trang này không cần lặp lại */

:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --button-login: #EA7C07;
}

.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Mặc định cho nền sáng */
}

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

.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Chỉ một khoảng đệm nhỏ, body đã xử lý offset */
  overflow: hidden;
  color: var(--text-light);
  background: var(--primary-color); /* Sử dụng màu thương hiệu cho nền */
}

.page-blog__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.page-blog__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5); /* Làm tối ảnh nền để văn bản dễ đọc hơn */
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.4); /* Nền tối nhẹ để tăng độ tương phản */
  border-radius: 8px;
}

.page-blog__main-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.page-blog__hero-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: var(--secondary-color);
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background-color: var(--button-login);
  color: var(--secondary-color);
  border: 2px solid var(--button-login);
}

.page-blog__btn-primary:hover {
  background-color: darken(var(--button-login), 10%);
  border-color: darken(var(--button-login), 10%);
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-blog__btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

.page-blog__articles-overview,
.page-blog__featured-article,
.page-blog__cta-section,
.page-blog__faq-section {
  padding: 60px 0;
}

.page-blog__light-bg {
  background-color: var(--secondary-color);
  color: var(--text-dark);
}

.page-blog__dark-section {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-blog__dark-section .page-blog__section-title,
.page-blog__dark-section .page-blog__section-description {
  color: var(--text-light);
}

.page-blog__section-title {
  text-align: center;
  font-size: 2.2em;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.page-blog__section-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  font-size: 1.1em;
  color: #555;
}

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

.page-blog__article-card {
  background-color: var(--secondary-color);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease;
  color: var(--text-dark);
}

.page-blog__article-card:hover {
  transform: translateY(-5px);
}

.page-blog__article-image {
  width: 100%;
  height: 225px;
  object-fit: cover;
  display: block;
}

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

.page-blog__article-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__article-title a {
  color: var(--primary-color);
  text-decoration: none;
}

.page-blog__article-title a:hover {
  text-decoration: underline;
}

.page-blog__article-meta {
  font-size: 0.9em;
  color: #888;
  margin-bottom: 15px;
}

.page-blog__article-excerpt {
  font-size: 1em;
  color: #666;
  margin-bottom: 20px;
}

.page-blog__read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

.page-blog__read-more:hover {
  text-decoration: underline;
}

.page-blog__view-all-wrapper {
  text-align: center;
  margin-top: 50px;
}

.page-blog__featured-article .page-blog__section-title {
  color: var(--secondary-color);
}

.page-blog__featured-content {
  display: flex;
  flex-direction: row;
  gap: 40px;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 30px;
}

.page-blog__featured-image {
  width: 100%;
  max-width: 600px;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.page-blog__featured-text {
  flex-grow: 1;
}

.page-blog__featured-title {
  font-size: 1.8em;
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-blog__featured-title a {
  color: var(--secondary-color);
  text-decoration: none;
}

.page-blog__featured-title a:hover {
  text-decoration: underline;
}

.page-blog__featured-excerpt {
  font-size: 1.05em;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.9);
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

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

.page-blog__faq-item {
  background-color: var(--secondary-color);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-blog__faq-item[open] {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15em;
  font-weight: bold;
  cursor: pointer;
  color: var(--primary-color);
  list-style: none; /* For details/summary */
}

.page-blog__faq-question::-webkit-details-marker {
  display: none; /* For details/summary */
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #666;
}

.page-blog__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1em;
  color: #555;
}

.page-blog__faq-answer p {
  margin: 0;
  padding-top: 10px;
}

.page-blog__faq-answer a {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .page-blog__featured-content {
    flex-direction: column;
    text-align: center;
  }

  .page-blog__featured-image {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
  }

  .page-blog__main-title {
    font-size: 2em;
  }

  .page-blog__hero-description {
    font-size: 1em;
  }

  .page-blog__section-title {
    font-size: 1.8em;
  }

  .page-blog__section-description {
    margin-bottom: 30px;
  }

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

  .page-blog__article-image {
    height: 180px;
  }

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

  .page-blog__featured-text .page-blog__article-meta {
    text-align: center;
  }

  .page-blog__featured-title {
    font-size: 1.5em;
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__articles-overview,
  .page-blog__featured-article,
  .page-blog__cta-section,
  .page-blog__faq-section {
    padding: 40px 0;
  }

  /* Mobile image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__hero-section,
  .page-blog__articles-overview,
  .page-blog__featured-article,
  .page-blog__cta-section,
  .page-blog__faq-section,
  .page-blog__article-card,
  .page-blog__featured-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-blog__featured-content {
    padding: 20px;
  }

  .page-blog__faq-question {
    padding: 15px 20px;
    font-size: 1em;
  }

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

/* Ensure content area images are not too small */
.page-blog__article-image,
.page-blog__featured-image {
  min-width: 200px;
  min-height: 200px;
}

/* Contrast fixes for general text on default light background */
.page-blog p, .page-blog li, .page-blog__article-excerpt {
  color: #333333;
}

.page-blog__faq-answer p {
  color: #555;
}

.page-blog__faq-question .page-blog__faq-qtext {
  color: var(--primary-color);
}