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

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

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

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

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

.page-blog__light-bg {
  background-color: #ffffff;
  color: #333333; /* Chữ tối trên nền sáng */
}

/* HERO Section */
.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; /* Nhỏ để tránh bị che bởi header, body đã có padding-top */
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 70vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.page-blog__hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.5); /* Nền bán trong suốt để chữ nổi bật */
  border-radius: 8px;
}

.page-blog__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 700;
  color: var(--page-blog-gold);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__hero-description {
  font-size: 1.1rem;
  color: var(--page-blog-text-main);
  margin-bottom: 30px;
  line-height: 1.6;
}

/* General Section Styling */
.page-blog__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: inherit;
}

.page-blog__section-description {
  font-size: 1rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: inherit;
  line-height: 1.6;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-sizing: border-box;
  text-align: center;
}

.page-blog__btn-primary {
  background: var(--page-blog-btn-gradient);
  color: #ffffff; /* Luôn dùng chữ trắng trên nút gradient */
  border: none;
}

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

.page-blog__btn-secondary {
  background: #ffffff;
  color: var(--page-blog-deep-green); /* Chữ màu xanh đậm trên nền trắng */
  border: 2px solid var(--page-blog-deep-green);
}

.page-blog__btn-secondary:hover {
  background: var(--page-blog-deep-green);
  color: #ffffff;
}

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 60px 0;
}

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

.page-blog__post-card {
  background-color: var(--page-blog-card-bg); /* Nền thẻ tối */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  color: var(--page-blog-text-main); /* Chữ sáng trên nền thẻ tối */
}

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

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

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

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

.page-blog__post-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 15px;
  line-height: 1.4;
}

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

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

.page-blog__post-excerpt {
  font-size: 1rem;
  color: var(--page-blog-text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.page-blog__read-more-btn {
  color: var(--page-blog-gold);
  text-decoration: none;
  font-weight: 600;
}

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

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

/* Featured Topics Section */
.page-blog__featured-topics {
  padding: 60px 0;
  background-color: var(--page-blog-deep-green);
}

.page-blog__featured-topics .page-blog__section-title,
.page-blog__featured-topics .page-blog__section-description {
  color: #ffffff;
}

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

.page-blog__topic-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: var(--page-blog-card-bg);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: var(--page-blog-text-main);
  padding-bottom: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__topic-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__topic-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  margin-bottom: 15px;
}

.page-blog__topic-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--page-blog-gold);
  padding: 0 15px;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
}

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

.page-blog__faq-item {
  background-color: var(--page-blog-card-bg);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: var(--page-blog-text-main);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  background-color: var(--page-blog-deep-green);
  color: #ffffff;
  border-bottom: 1px solid var(--page-blog-divider);
}

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

.page-blog__faq-question::marker {
  display: none;
}

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

.page-blog__faq-toggle {
  font-size: 1.5rem;
  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;
  font-size: 1rem;
  color: var(--page-blog-text-secondary);
  line-height: 1.6;
}

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  text-align: center;
  background-color: var(--page-blog-deep-green);
}

.page-blog__cta-section .page-blog__section-title,
.page-blog__cta-section .page-blog__section-description {
  color: #ffffff;
}

.page-blog__cta-section .page-blog__btn-primary {
  margin-top: 30px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    max-width: 600px;
  }
  .page-blog__post-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-blog__topics-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-blog__container {
    padding: 0 15px;
  }
  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
  }
  .page-blog__hero-image-wrapper {
    max-height: 50vh;
    margin-bottom: 20px;
  }
  .page-blog__hero-content {
    padding: 15px;
  }
  .page-blog__main-title {
    font-size: 2rem;
  }
  .page-blog__hero-description {
    font-size: 1rem;
  }
  .page-blog__section-title {
    font-size: 1.8rem;
  }
  .page-blog__section-description {
    font-size: 0.95rem;
    margin-bottom: 30px;
  }
  .page-blog__latest-posts, .page-blog__featured-topics, .page-blog__faq-section, .page-blog__cta-section {
    padding: 40px 0;
  }

  /* Mobile Image Responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__post-card,
  .page-blog__topic-card,
  .page-blog__hero-image-wrapper,
  .page-blog__hero-section,
  .page-blog__latest-posts,
  .page-blog__featured-topics,
  .page-blog__faq-section,
  .page-blog__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  /* Mobile Button Responsiveness */
  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog a[class*="button"],
  .page-blog a[class*="btn"] {
    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;
    margin-bottom: 10px;
  }
  .page-blog__hero-content .page-blog__btn-primary {
    margin-top: 20px;
  }
  .page-blog__view-all-posts .page-blog__btn-secondary {
    margin-bottom: 0;
  }
  .page-blog__cta-section .page-blog__btn-primary {
    margin-top: 20px;
  }

  /* For multiple buttons in a row, stack them */
  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .page-blog__post-image {
    height: 180px;
  }
  .page-blog__topic-image {
    height: 120px;
  }
  .page-blog__faq-question {
    font-size: 1rem;
    padding: 15px;
  }
  .page-blog__faq-answer {
    font-size: 0.95rem;
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .page-blog__main-title {
    font-size: 1.8rem;
  }
  .page-blog__section-title {
    font-size: 1.5rem;
  }
  .page-blog__post-title {
    font-size: 1.1rem;
  }
  .page-blog__topic-title {
    font-size: 1rem;
  }
}