/* 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 is #121212 (dark), so text should be light */
  background-color: transparent; /* Main content background is transparent to show body 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-bottom: 60px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: #1a1a1a; /* Dark background for hero section */
}

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

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.7); /* Slightly dim the image for text readability */
}

.page-blog__hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 40px 20px;
  max-width: 900px;
  margin-top: -150px; /* Pull content up over the image, but not overlapping text */
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5));
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

.page-blog__hero-description {
  font-size: 1.1em;
  color: #f0f0f0;
  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: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1em;
  transition: background-color 0.3s ease, transform 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
  width: auto;
}

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

.page-blog__btn-primary:hover {
  background-color: #1e87bb;
  transform: translateY(-2px);
}

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

.page-blog__btn-secondary:hover {
  background-color: #26A9E0;
  color: #FFFFFF;
  transform: translateY(-2px);
}

.page-blog__intro-section,
.page-blog__categories-section,
.page-blog__faq-section {
  padding: 60px 0;
  background-color: #f8f8f8; /* Light background for contrast */
  color: #333333; /* Dark text on light background */
}

.page-blog__featured-articles,
.page-blog__cta-section-bottom {
  padding: 60px 0;
  background-color: #1e1e1e; /* Dark background */
  color: #ffffff; /* Light text on dark background */
}

.page-blog__section-title {
  font-size: clamp(1.8em, 3vw, 2.8em);
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: #26A9E0;
}

.page-blog__intro-section .page-blog__section-title {
  color: #333333;
}

.page-blog__text-block {
  font-size: 1.05em;
  margin-bottom: 20px;
  text-align: justify;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-blog__article-card {
  background-color: #2a2a2a;
  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__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

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

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

.page-blog__article-title a {
  color: #26A9E0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
  color: #FFFFFF;
}

.page-blog__article-excerpt {
  font-size: 0.95em;
  color: #cccccc;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-blog__article-date {
  font-size: 0.85em;
  color: #888888;
  margin-top: auto; /* Push date to bottom */
  margin-bottom: 10px;
}

.page-blog__read-more {
  display: inline-block;
  color: #26A9E0;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9em;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: #FFFFFF;
}

.page-blog__view-all-button {
  text-align: center;
}

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

.page-blog__category-card {
  background-color: #FFFFFF;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  padding: 20px;
  text-decoration: none;
  color: #333333;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 180px;
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__category-image {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 15px;
}

.page-blog__category-title {
  font-size: 1.1em;
  font-weight: 600;
  color: #26A9E0;
}

.page-blog__cta-section-bottom .page-blog__text-block {
  color: #cccccc;
}

.page-blog__faq-section .page-blog__section-title {
  color: #333333;
}

.page-blog__faq-item {
  background-color: #FFFFFF;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

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

.page-blog__faq-item[open] .page-blog__faq-question {
  border-bottom: 1px solid #d0d0d0;
}

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

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #26A9E0;
}

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

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    margin-top: -100px;
    padding: 30px 20px;
  }
  .page-blog__main-title {
    font-size: clamp(2em, 5vw, 3em);
  }
  .page-blog__hero-description {
    font-size: 1em;
  }
  .page-blog__articles-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-blog__container {
    padding: 0 15px;
  }
  .page-blog__hero-section {
    padding-bottom: 40px;
  }
  .page-blog__hero-image {
    filter: brightness(0.5); /* Increase dimming for mobile readability */
  }
  .page-blog__hero-content {
    margin-top: -80px; /* Adjust for smaller screen */
    padding: 25px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-blog__main-title {
    font-size: clamp(1.8em, 6vw, 2.5em);
    margin-bottom: 15px;
  }
  .page-blog__hero-description {
    font-size: 0.95em;
    margin-bottom: 25px;
  }
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 0.95em;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-blog__intro-section,
  .page-blog__featured-articles,
  .page-blog__categories-section,
  .page-blog__cta-section-bottom,
  .page-blog__faq-section {
    padding: 40px 0;
  }

  .page-blog__section-title {
    font-size: clamp(1.6em, 5vw, 2.2em);
    margin-bottom: 30px;
  }

  .page-blog__text-block {
    font-size: 1em;
    padding: 0 15px;
  }

  .page-blog__articles-grid {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 0 15px;
  }

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

  .page-blog__category-card {
    padding: 15px;
    min-height: 150px;
  }

  .page-blog__category-image {
    width: 80px;
    height: 80px;
  }

  .page-blog__category-title {
    font-size: 1em;
  }

  .page-blog__categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    padding: 0 15px;
  }

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

  /* Ensure all images are responsive on mobile */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  /* Ensure all containers are responsive on mobile */
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__intro-section,
  .page-blog__featured-articles,
  .page-blog__categories-section,
  .page-blog__cta-section-bottom,
  .page-blog__faq-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* padding-left: 15px;
    padding-right: 15px; */ /* Handled by .page-blog__container or specific elements */
  }
  .page-blog__hero-section {
    padding-top: 10px !important;
  }
}

/* Desktop video container width (if video was present, ensuring width: 100% alongside max-width) */
.page-blog__video-container {
  width: 100%;
  max-width: 1200px; /* Example max-width */
}

/* Color contrast adjustments for specific elements */
.page-blog__light-bg p, .page-blog__light-bg li, .page-blog__light-bg h2, .page-blog__light-bg h3 {
  color: #333333;
}
.page-blog__dark-bg p, .page-blog__dark-bg li, .page-blog__dark-bg h2, .page-blog__dark-bg h3 {
  color: #ffffff;
}
.page-blog__dark-bg .page-blog__article-title a {
  color: #26A9E0;
}
.page-blog__dark-bg .page-blog__article-title a:hover {
  color: #ffffff;
}
.page-blog__dark-bg .page-blog__read-more {
  color: #26A9E0;
}
.page-blog__dark-bg .page-blog__read-more:hover {
  color: #ffffff;
}
.page-blog__dark-bg .page-blog__article-date {
  color: #888888;
}

/* Specific color for Login button */
.page-blog__btn-login {
  background-color: #EA7C07;
  color: #FFFFFF;
  border: 2px solid #EA7C07;
}
.page-blog__btn-login:hover {
  background-color: #d16b06;
  transform: translateY(-2px);
}