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

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

.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--page-blog-text-main); /* Default text color for dark background */
  background-color: var(--page-blog-background);
}

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

.page-blog__dark-section {
  background-color: var(--page-blog-background);
  color: var(--page-blog-text-main);
}

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

.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  text-align: center;
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 675px;
  overflow: hidden;
  position: relative;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.7);
}

.page-blog__hero-content {
  position: relative; /* Ensure content is above image */
  z-index: 1;
  max-width: 900px;
  padding: 20px;
  margin-top: -150px; /* Pull content up slightly over the bottom of the image for visual flow */
  background: rgba(8, 22, 15, 0.8); /* Semi-transparent background for text readability */
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: bold;
  color: var(--page-blog-gold-color);
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-blog__description {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: var(--page-blog-text-secondary);
}

.page-blog__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background: var(--page-blog-button-gradient);
  color: var(--page-blog-light-text);
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-blog__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__section-title {
  font-size: 2.5rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: var(--page-blog-gold-color);
}

.page-blog__introduction .page-blog__section-title,
.page-blog__featured-posts .page-blog__section-title,
.page-blog__faq-section .page-blog__section-title {
  color: var(--page-blog-deep-green);
}

.page-blog__text-block {
  font-size: 1rem;
  margin-bottom: 20px;
  line-height: 1.7;
  text-align: justify;
}

.page-blog__text-block a {
  color: var(--page-blog-primary-color);
  text-decoration: underline;
}

.page-blog__text-secondary {
  color: var(--page-blog-text-secondary);
}

.page-blog__categories,
.page-blog__featured-posts,
.page-blog__why-follow,
.page-blog__faq-section,
.page-blog__cta-section {
  padding: 60px 0;
}

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

.page-blog__card {
  background-color: var(--page-blog-card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--page-blog-text-main);
  display: flex;
  flex-direction: column;
}

.page-blog__light-bg .page-blog__card {
  background-color: #ffffff;
  color: var(--page-blog-dark-text);
  border: 1px solid var(--page-blog-border-color);
}

.page-blog__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.page-blog__category-card .page-blog__category-image {
  height: 200px;
}

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

.page-blog__category-title,
.page-blog__post-title {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-blog__category-title a,
.page-blog__post-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__category-title a:hover,
.page-blog__post-title a:hover {
  color: var(--page-blog-gold-color);
}

.page-blog__light-bg .page-blog__category-title a,
.page-blog__light-bg .page-blog__post-title a {
  color: var(--page-blog-deep-green);
}

.page-blog__light-bg .page-blog__category-title a:hover,
.page-blog__light-bg .page-blog__post-title a:hover {
  color: var(--page-blog-primary-color);
}

.page-blog__category-description,
.page-blog__post-excerpt {
  font-size: 0.95rem;
  color: var(--page-blog-text-secondary);
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-blog__light-bg .page-blog__category-description,
.page-blog__light-bg .page-blog__post-excerpt {
  color: var(--page-blog-dark-text);
}

.page-blog__post-meta {
  font-size: 0.85rem;
  color: var(--page-blog-text-secondary);
  margin-bottom: 10px;
}

.page-blog__btn-secondary {
  display: inline-block;
  padding: 10px 20px;
  background-color: transparent;
  color: var(--page-blog-primary-color);
  border: 2px solid var(--page-blog-primary-color);
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  margin-top: auto;
}

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

.page-blog__read-more {
  color: var(--page-blog-gold-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-top: auto;
}

.page-blog__light-bg .page-blog__read-more {
  color: var(--page-blog-primary-color);
}

.page-blog__read-more:hover {
  color: var(--page-blog-glow-color);
}

.page-blog__light-bg .page-blog__read-more:hover {
  color: var(--page-blog-deep-green);
}

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

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

.page-blog__feature-item {
  text-align: center;
  padding: 25px;
  background-color: var(--page-blog-card-bg);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

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

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

.page-blog__feature-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--page-blog-gold-color);
  margin-bottom: 10px;
}

.page-blog__feature-description {
  font-size: 0.95rem;
  color: var(--page-blog-text-secondary);
}

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

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.15rem;
  font-weight: bold;
  color: var(--page-blog-deep-green);
  cursor: pointer;
  background-color: var(--page-blog-light-bg-contrast);
  border-bottom: 1px solid var(--page-blog-border-color);
}

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

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

.page-blog__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  color: var(--page-blog-primary-color);
}

.page-blog__faq-answer {
  padding: 15px 25px;
  font-size: 1rem;
  color: var(--page-blog-dark-text);
  line-height: 1.7;
  background-color: #ffffff;
}

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

.page-blog__cta-section {
  text-align: center;
  padding: 80px 0;
}

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

.page-blog__cta-buttons .page-blog__btn-primary,
.page-blog__cta-buttons .page-blog__btn-secondary {
  min-width: 180px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
  }
  .page-blog__description {
    font-size: 1rem;
  }
  .page-blog__section-title {
    font-size: 2rem;
  }
  .page-blog__hero-content {
    margin-top: -100px;
  }
}

@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-blog__container {
    padding: 0 15px;
  }
  .page-blog__hero-section {
    padding-bottom: 40px;
  }
  .page-blog__hero-image {
    filter: brightness(0.6);
  }
  .page-blog__hero-content {
    margin-top: -80px;
    padding: 15px;
  }
  .page-blog__main-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
    margin-bottom: 10px;
  }
  .page-blog__description {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }
  .page-blog__btn-primary {
    padding: 10px 20px;
  }
  .page-blog__section-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
  }
  .page-blog__categories, .page-blog__featured-posts, .page-blog__why-follow, .page-blog__faq-section, .page-blog__cta-section {
    padding: 40px 0;
  }
  .page-blog__category-grid, .page-blog__post-grid, .page-blog__feature-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-blog__card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  .page-blog__category-title, .page-blog__post-title {
    font-size: 1.25rem;
  }
  .page-blog__category-description, .page-blog__post-excerpt, .page-blog__post-meta, .page-blog__feature-description {
    font-size: 0.9rem;
  }
  .page-blog__faq-question {
    font-size: 1rem;
    padding: 15px 20px;
  }
  .page-blog__faq-answer {
    padding: 10px 20px;
    font-size: 0.95rem;
  }
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-blog__cta-buttons .page-blog__btn-primary,
  .page-blog__cta-buttons .page-blog__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Mobile image and video responsive adaptation */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-blog__hero-image-wrapper,
  .page-blog__category-card,
  .page-blog__post-card,
  .page-blog__feature-item,
  .page-blog__introduction,
  .page-blog__categories,
  .page-blog__featured-posts,
  .page-blog__why-follow,
  .page-blog__faq-section,
  .page-blog__cta-section,
  .page-blog__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Ensure no overflow for sections/containers */
  }
  .page-blog__hero-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }
}