/* 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: #ffffff; /* Body background #121212 is dark, so text is light */
  background-color: transparent; /* Main content background is handled by sections */
}

.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px; /* Adjust padding as needed */
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: #1a1a1a; /* Dark background for hero section */
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.page-blog__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.4); /* Darken image for text readability */
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  color: #ffffff;
}

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

.page-blog__hero-description {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #f0f0f0;
}

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

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

.page-blog__btn-primary {
  background-color: #26A9E0;
  color: #ffffff;
  border: 2px solid #26A9E0;
}

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

.page-blog__btn-secondary {
  background-color: transparent;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-blog__btn-secondary:hover {
  background-color: #26A9E0;
  color: #ffffff;
}

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

.page-blog__section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.3;
}

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

.page-blog__dark-section {
  background-color: #121212;
  color: #ffffff;
}

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

.page-blog__light-bg .page-blog__section-title,
.page-blog__light-bg .page-blog__sub-title,
.page-blog__light-bg .page-blog__card-title,
.page-blog__light-bg .page-blog__post-title a,
.page-blog__light-bg .page-blog__news-title a {
  color: #333333;
}

.page-blog__light-bg .page-blog__paragraph,
.page-blog__light-bg .page-blog__card-description,
.page-blog__light-bg .page-blog__post-meta,
.page-blog__light-bg .page-blog__post-excerpt,
.page-blog__light-bg .page-blog__news-date,
.page-blog__light-bg .page-blog__news-excerpt {
  color: #555555;
}

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

.page-blog__category-card,
.page-blog__post-card {
  background-color: rgba(255, 255, 255, 0.1); /* Light background for dark section cards */
  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;
  display: flex;
  flex-direction: column;
}

.page-blog__light-bg .page-blog__category-card,
.page-blog__light-bg .page-blog__post-card {
  background-color: #f8f8f8;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

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

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

.page-blog__card-title,
.page-blog__post-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
  color: #ffffff; /* For dark section */
}

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

.page-blog__post-title a:hover {
  color: #26A9E0;
}

.page-blog__card-description,
.page-blog__post-meta,
.page-blog__post-excerpt {
  font-size: 0.95rem;
  color: #cccccc; /* For dark section */
  margin-bottom: 10px;
}

.page-blog__post-meta {
  font-size: 0.85rem;
  opacity: 0.8;
}

.page-blog__card-link,
.page-blog__read-more-btn {
  display: inline-block;
  margin-top: auto;
  padding: 8px 15px;
  border-radius: 5px;
  background-color: #26A9E0;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  align-self: flex-start;
  transition: background-color 0.3s ease;
}

.page-blog__card-link:hover,
.page-blog__read-more-btn:hover {
  background-color: #1e87b3;
}

.page-blog__light-bg .page-blog__card-link,
.page-blog__light-bg .page-blog__read-more-btn {
  background-color: #26A9E0;
  color: #ffffff;
}

.page-blog__light-bg .page-blog__card-link:hover,
.page-blog__light-bg .page-blog__read-more-btn:hover {
  background-color: #1e87b3;
}

.page-blog__sub-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 25px;
  color: #ffffff;
  text-align: center;
}

.page-blog__image-full-width {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: cover;
  border-radius: 8px;
  margin: 30px 0;
  display: block;
}

.page-blog__news-list {
  list-style: none;
  padding: 0;
  margin-top: 30px;
}

.page-blog__news-item {
  background-color: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 20px;
  transition: box-shadow 0.3s ease;
}

.page-blog__news-item:hover {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.page-blog__news-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.page-blog__news-title a {
  color: #333333;
  text-decoration: none;
}

.page-blog__news-title a:hover {
  color: #26A9E0;
}

.page-blog__news-date {
  font-size: 0.85rem;
  color: #777777;
  margin-bottom: 10px;
}

.page-blog__news-excerpt {
  font-size: 1rem;
  color: #555555;
}

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

.page-blog__faq-section {
  background-color: #1a1a1a;
  color: #ffffff;
}

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

.page-blog__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  color: #ffffff;
  background-color: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  list-style: none;
}

.page-blog__faq-item[open] > .page-blog__faq-question {
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

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

.page-blog__faq-question .page-blog__faq-toggle {
  font-size: 1.5rem;
  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: 1rem;
  color: #f0f0f0;
}

.page-blog__faq-answer p {
  margin-top: 10px;
  margin-bottom: 0;
  text-align: left;
}

.page-blog__faq-answer a {
  color: #26A9E0;
  text-decoration: none;
}

.page-blog__faq-answer a:hover {
  text-decoration: underline;
}

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

.page-blog__copyright {
  text-align: center;
  padding: 30px 20px;
  font-size: 0.9rem;
  color: #aaaaaa;
  background-color: #0d0d0d;
}

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

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

  .page-blog__category-grid,
  .page-blog__post-grid {
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important; /* body đã承担 --header-offset */
  }

  .page-blog__main-title {
    font-size: 2.2rem;
  }

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

  .page-blog__section-title {
    font-size: 2rem;
  }

  .page-blog__sub-title {
    font-size: 1.5rem;
  }

  .page-blog__paragraph {
    font-size: 0.95rem;
  }

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

  .page-blog__category-card,
  .page-blog__post-card {
    margin: 0 auto;
    max-width: 400px; /* Constrain single column cards */
  }

  .page-blog__image-full-width {
    max-height: 300px;
  }

  .page-blog__news-item {
    padding: 20px;
  }

  .page-blog__news-title {
    font-size: 1.2rem;
  }

  .page-blog__faq-question {
    font-size: 1rem;
    padding: 18px 20px;
  }

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

  /* Mobile responsive for all containers with images/content */
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-content,
  .page-blog__category-card,
  .page-blog__post-card,
  .page-blog__news-item,
  .page-blog__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Mobile responsive for buttons */
  .page-blog__cta-buttons {
    flex-direction: column !important;
    gap: 10px;
  }

  .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;
  }

  /* Ensure no content causes horizontal scroll */
  .page-blog {
    overflow-x: hidden;
  }
}

@media (max-width: 480px) {
  .page-blog__main-title {
    font-size: 1.8rem;
  }

  .page-blog__section-title {
    font-size: 1.6rem;
  }

  .page-blog__sub-title {
    font-size: 1.3rem;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    padding: 10px 20px;
  }
}