/* style/blog.css */
/* body đã padding-top: var(--header-offset) từ shared.css; trang này không cần thêm */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #F2FFF6; /* Text Main */
  background-color: #08160F; /* Background */
}

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

.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Nhỏ để không bị trùng với body padding-top */
  padding-bottom: 60px;
  overflow: hidden;
  background-color: #08160F;
}

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

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.7); /* Slightly dim the image for text contrast */
  min-width: 200px; /* Global image size requirement */
  min-height: 200px; /* Global image size requirement */
}

.page-blog__hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  max-width: 800px;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
  z-index: 10;
  color: #F2FFF6;
}

.page-blog__hero-title {
  font-size: clamp(2em, 4vw, 3.5em); /* H1 font size constraint */
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #F2FFF6;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-blog__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #A7D9B8; /* Text Secondary */
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.page-blog__hero-cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button color */
  color: #F2FFF6;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.3s ease;
  border: none;
  cursor: pointer;
  min-width: 200px; /* Ensure button is not too small */
  box-sizing: border-box;
}

.page-blog__hero-cta-button:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  transform: translateY(-2px);
}

.page-blog__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: #F2FFF6;
  position: relative;
  padding-bottom: 10px;
}

.page-blog__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: #2AD16F;
  border-radius: 2px;
}

.page-blog__intro-section,
.page-blog__categories-section,
.page-blog__featured-posts-section,
.page-blog__benefits-section,
.page-blog__faq-section,
.page-blog__cta-section {
  padding: 60px 0;
  background-color: #08160F;
}

.page-blog__text-block {
  font-size: 1.1em;
  line-height: 1.8;
  margin-bottom: 20px;
  text-align: justify;
  color: #F2FFF6;
}

.page-blog__categories-section {
  background-color: #11271B; /* Card BG */
}

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

.page-blog__category-item {
  background-color: #0A4B2C; /* Deep Green */
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  border: 1px solid #2E7A4E; /* Border */
}

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

.page-blog__category-title {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 15px;
  color: #F2FFF6;
}

.page-blog__category-title a {
  color: #F2FFF6;
  text-decoration: none;
}

.page-blog__category-title a:hover {
  color: #2AD16F;
  text-decoration: underline;
}

.page-blog__category-description {
  color: #A7D9B8;
  font-size: 0.95em;
}

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

.page-blog__post-card {
  background-color: #11271B; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  border: 1px solid #2E7A4E; /* Border */
  display: flex;
  flex-direction: column;
}

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

.page-blog__post-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  min-width: 200px; /* Global image size requirement */
  min-height: 200px; /* Global image size requirement */
}

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

.page-blog__post-title {
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
  color: #F2FFF6;
}

.page-blog__post-title a {
  color: #F2FFF6;
  text-decoration: none;
}

.page-blog__post-title a:hover {
  color: #2AD16F;
  text-decoration: underline;
}

.page-blog__post-date {
  font-size: 0.9em;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 15px;
  display: block;
}

.page-blog__post-excerpt {
  font-size: 1em;
  color: #A7D9B8;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__post-readmore-button {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button color */
  color: #F2FFF6;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s ease;
  align-self: flex-start;
  min-width: 100px; /* Ensure button is not too small */
  box-sizing: border-box;
}

.page-blog__post-readmore-button:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
}

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

.page-blog__view-all-posts-button {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button color */
  color: #F2FFF6;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.3s ease;
  border: none;
  cursor: pointer;
  min-width: 200px; /* Ensure button is not too small */
  box-sizing: border-box;
}

.page-blog__view-all-posts-button:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  transform: translateY(-2px);
}

.page-blog__benefits-section {
  background-color: #0A4B2C; /* Deep Green */
}

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

.page-blog__benefits-item {
  text-align: center;
  background-color: #11271B; /* Card BG */
  padding: 30px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid #2E7A4E; /* Border */
}

.page-blog__benefits-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
  min-width: 200px; /* Global image size requirement - but this is an icon, so I'll adjust the image source to be larger */
  min-height: 200px;
}

.page-blog__benefits-heading {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 10px;
  color: #F2FFF6;
}

.page-blog__benefits-item p {
  color: #A7D9B8;
  font-size: 0.95em;
}

.page-blog__faq-section {
  background-color: #08160F;
}

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

.page-blog__faq-item {
  background-color: #11271B; /* Card BG */
  border: 1px solid #2E7A4E; /* Border */
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #F2FFF6;
}

.page-blog__faq-item summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-weight: bold;
  font-size: 1.15em;
  cursor: pointer;
  color: #F2FFF6;
  background-color: #0A4B2C; /* Deep Green */
  border-bottom: 1px solid #2E7A4E; /* Divider */
}

.page-blog__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

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

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

.page-blog__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  color: #A7D9B8;
  background-color: #11271B;
}

.page-blog__faq-answer p {
  margin-bottom: 0;
}

.page-blog__cta-section {
  text-align: center;
  padding: 80px 0;
  background-color: #0A4B2C; /* Deep Green */
}

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

.page-blog__cta-button {
  display: inline-block;
  padding: 18px 35px;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button color */
  color: #F2FFF6;
  text-decoration: none;
  border-radius: 10px;
  font-weight: bold;
  font-size: 1.1em;
  transition: background 0.3s ease, transform 0.3s ease;
  border: none;
  cursor: pointer;
  min-width: 250px; /* Ensure button is not too small */
  box-sizing: border-box;
}

.page-blog__cta-button:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  transform: translateY(-2px);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-title {
    font-size: clamp(1.8em, 5vw, 3em);
  }
  .page-blog__hero-description {
    font-size: 1.1em;
  }
  .page-blog__section-title {
    font-size: 2em;
  }
  .page-blog__post-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-blog__benefits-list {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-blog__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__hero-section,
  .page-blog__intro-section,
  .page-blog__categories-section,
  .page-blog__featured-posts-section,
  .page-blog__benefits-section,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__hero-content {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    padding: 20px;
    margin-top: -80px; /* Adjust if needed to overlap image less */
  }

  .page-blog__hero-image {
    filter: brightness(0.5); /* More dim for better text contrast on mobile */
  }

  .page-blog__hero-title {
    font-size: clamp(1.5em, 6vw, 2.5em); /* Adjust for smaller screens */
    margin-bottom: 15px;
  }

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

  .page-blog__hero-cta-button,
  .page-blog__view-all-posts-button,
  .page-blog__cta-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    min-width: unset !important; /* Allow button to shrink */
  }

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

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

  .page-blog__category-list,
  .page-blog__post-grid,
  .page-blog__benefits-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

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