/* style/blog.css */
/* body đã padding-top: var(--header-offset) từ shared.css; trang này không cần thêm padding-top cho body hoặc các phần tử đầu tiên */

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

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

.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Chỉ một khoảng đệm nhỏ, không dùng var(--header-offset) */
  text-align: center;
  overflow: hidden;
  box-sizing: border-box;
}

.page-blog__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 40px;
  background: rgba(0, 0, 0, 0.5); /* Lớp phủ để chữ dễ đọc trên ảnh */
  border-radius: 10px;
  color: var(--text-light);
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Sử dụng clamp cho kích thước H1 */
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--text-light);
}

.page-blog__description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: var(--text-light);
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  cursor: pointer;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal; /* Cho phép xuống dòng */
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background-color: var(--primary-color);
  color: var(--text-light);
  border: 2px solid var(--primary-color);
  margin-right: 15px;
}

.page-blog__btn-primary:hover {
  background-color: #1e87b6;
  border-color: #1e87b6;
}

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

.page-blog__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #1e87b6;
  border-color: #1e87b6;
}

.page-blog__articles-section {
  padding: 60px 20px;
  background-color: var(--background-light);
  color: var(--text-dark);
  box-sizing: border-box;
}

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

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

.page-blog__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-dark);
}

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

.page-blog__article-card {
  background-color: var(--secondary-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

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

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

.page-blog__article-title {
  font-size: 1.4em;
  font-weight: 600;
  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: #666;
  margin-bottom: 15px;
}

.page-blog__article-excerpt {
  font-size: 1em;
  color: var(--text-dark);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  align-self: flex-start;
}

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

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

.page-blog__faq-section {
  padding: 60px 20px;
  background-color: #f9f9f9;
  color: var(--text-dark);
  box-sizing: border-box;
}

.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 summary {
  list-style: none; /* Hide default marker */
  cursor: pointer;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: 600;
  color: var(--primary-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg);
}

.page-blog__faq-answer {
  padding: 0 25px 20px;
  font-size: 1em;
  color: var(--text-dark);
}

.page-blog__cta-section {
  padding: 80px 20px;
  background-color: var(--background-dark);
  color: var(--text-light);
  text-align: center;
  box-sizing: border-box;
}

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

.page-blog__cta-title {
  font-size: 2.8em;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-light);
}

.page-blog__cta-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  color: var(--text-light);
}

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

/* --- Responsive Styles --- */

/* Desktop large (default) */
@media (min-width: 1201px) {
  .page-blog__hero-content {
    padding: 60px 80px;
  }
}

/* Tablet and smaller desktop */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: clamp(2em, 5vw, 3em);
  }
  .page-blog__section-title {
    font-size: 2em;
  }
  .page-blog__cta-title {
    font-size: 2.2em;
  }
}

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

  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
  }

  .page-blog__hero-content {
    padding: 30px 20px;
  }

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

  .page-blog__description {
    font-size: 1em;
  }

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

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

  .page-blog__articles-section,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 15px;
  }

  .page-blog__container,
  .page-blog__faq-list,
  .page-blog__cta-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
  }

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

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

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

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

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

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

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

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

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

  /* Ensure all images are responsive */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__article-card {
    box-sizing: border-box !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}