/* style/blog.css */
/* body đã padding-top: var(--header-offset) từ shared.css, không lặp lại tại đây */

:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg: #11271B;
  --background-color-dark: #08160F;
  --text-main-color: #F2FFF6;
  --text-secondary-color: #A7D9B8;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green-color: #0A4B2C;
}

.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main-color); /* Mặc định chữ sáng trên nền tối */
  background-color: var(--background-color-dark);
}

.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Đảm bảo khoảng cách nhỏ với header */
  overflow: hidden;
  text-align: center;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 20px;
}

.page-blog__hero-content {
  max-width: 900px;
  margin: 0 auto;
  z-index: 1;
  position: relative; /* Đảm bảo nội dung nằm trên lớp phủ nếu có */
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.2em); /* H1: Sử dụng clamp để hạn chế kích thước */
  font-weight: bold;
  color: var(--text-main-color);
  margin-bottom: 15px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-blog__hero-description {
  font-size: 1.1em;
  color: var(--text-secondary-color);
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background: var(--button-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(34, 199, 104, 0.4);
}

.page-blog__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-blog__btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: 0 2px 10px rgba(17, 168, 78, 0.2);
}

.page-blog__btn-secondary:hover {
  background: var(--primary-color);
  color: #ffffff;
  transform: translateY(-2px);
}

.page-blog__section {
  padding: 60px 20px;
  text-align: center;
}

.page-blog__dark-bg {
  background-color: var(--background-color-dark);
  color: var(--text-main-color);
}

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

.page-blog__section-title {
  font-size: clamp(1.8em, 3.5vw, 2.5em);
  color: var(--text-main-color);
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.3;
}

.page-blog__light-bg .page-blog__section-title {
  color: #333333;
}

.page-blog__section-description {
  font-size: 1.05em;
  color: var(--text-secondary-color);
  max-width: 800px;
  margin: 0 auto 40px;
}

.page-blog__light-bg .page-blog__section-description {
  color: #666666;
}

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

.page-blog__article-card {
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  color: var(--text-main-color);
  border: 1px solid var(--border-color);
}

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

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

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

.page-blog__card-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
}

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

.page-blog__card-title a:hover {
  color: var(--primary-color);
}

.page-blog__card-meta {
  font-size: 0.9em;
  color: var(--text-secondary-color);
  margin-bottom: 15px;
}

.page-blog__card-text {
  font-size: 1em;
  color: var(--text-secondary-color);
  margin-bottom: 20px;
}

.page-blog__card-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
}

.page-blog__card-link:hover {
  text-decoration: underline;
}

.page-blog__view-all-button-container {
  margin-top: 40px;
}

.page-blog__feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-blog__feature-item {
  background: #ffffff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  color: #333333;
  text-align: center;
  transition: transform 0.3s ease;
  border: 1px solid #e0e0e0;
}

.page-blog__feature-item:hover {
  transform: translateY(-5px);
}

.page-blog__feature-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
}

.page-blog__feature-title {
  font-size: 1.3em;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.page-blog__feature-text {
  font-size: 0.95em;
  color: #555555;
}

.page-blog__featured-articles-list {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-blog__list-item {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  text-align: left;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
  border: 1px solid var(--border-color);
}

.page-blog__list-item:hover {
  transform: translateX(5px);
}

.page-blog__list-image {
  width: 150px;
  min-width: 150px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
}

.page-blog__list-content {
  flex-grow: 1;
}

.page-blog__list-title {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 5px;
}

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

.page-blog__list-title a:hover {
  color: var(--primary-color);
}

.page-blog__list-text {
  font-size: 0.9em;
  color: var(--text-secondary-color);
  margin-bottom: 10px;
}

.page-blog__list-meta {
  font-size: 0.8em;
  color: var(--text-secondary-color);
}

.page-blog__faq-list {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.page-blog__faq-item {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  color: #333333;
  border: 1px solid #e0e0e0;
  overflow: hidden;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  color: #333333;
  background-color: #f9f9f9;
  border-bottom: 1px solid #eee;
  list-style: none; /* For details tag */
}

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

.page-blog__faq-item[open] .page-blog__faq-question {
  border-bottom: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.page-blog__faq-qtext {
  flex-grow: 1;
  pointer-events: none; /* Allow click on entire summary */
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  pointer-events: none; /* Allow click on entire summary */
  color: var(--primary-color);
}

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

.page-blog__cta-bottom {
  background-color: var(--deep-green-color);
  padding: 80px 20px;
}

.page-blog__cta-bottom .page-blog__section-title {
  color: var(--text-main-color);
}

.page-blog__cta-bottom .page-blog__section-description {
  color: var(--text-secondary-color);
}

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    padding: 0 15px;
  }

  .page-blog__articles-grid,
  .page-blog__feature-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }
}

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

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

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

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 15px 20px;
  }

  .page-blog__section {
    padding: 40px 15px;
  }

  .page-blog__section-title {
    font-size: clamp(1.5em, 6vw, 2em);
  }

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

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

  .page-blog__article-card {
    text-align: center;
  }

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

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

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

  .page-blog__card-text {
    font-size: 0.9em;
  }

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

  .page-blog__feature-item {
    padding: 25px;
  }

  .page-blog__list-item {
    flex-direction: column;
    text-align: center;
    gap: 15px;
    padding: 15px;
  }

  .page-blog__list-image {
    width: 100%;
    height: 150px;
    min-width: unset;
  }

  .page-blog__list-title {
    font-size: 1.1em;
  }

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

  .page-blog__faq-answer {
    padding: 10px 20px 15px;
    font-size: 0.95em;
  }

  /* Responsive image and container overrides */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

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

  .page-blog__hero-section {
    padding-top: 10px !important; /* body đã xử lý header offset */
  }

  .page-blog__video-section {
    padding-top: 10px !important;
  }
}

@media (max-width: 480px) {
  .page-blog__main-title {
    font-size: clamp(1.6em, 8vw, 2.2em);
  }

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

  .page-blog__card-title {
    font-size: 1.1em;
  }
}