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

.page-blog {
  color: #ffffff; /* Vì body background là #000000 (dark), text color mặc định là #ffffff */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

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

.page-blog__dark-bg {
  background-color: #000000;
  color: #ffffff;
}

.page-blog__light-bg {
  background-color: #1a1a1a; /* Một màu tối nhẹ hơn để tạo sự phân biệt với nền body */
  color: #ffffff;
}

.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ỏ hơn so với --header-offset để tránh trùng lặp */
  overflow: hidden;
  min-height: 500px;
}

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

.page-blog__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3; /* Làm mờ ảnh nền để chữ dễ đọc hơn */
}

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

.page-blog__main-title {
  font-size: 3.2em;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #26A9E0;
  max-width: 100%; /* Đảm bảo không tràn */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-blog__description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-blog__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Đảm bảo nút xuống dòng trên mobile */
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.3s ease, color 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

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

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

.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__read-more-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  background-color: #EA7C07;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-blog__read-more-btn:hover {
  background-color: #c46500;
}

.page-blog__section-title {
  font-size: 2.5em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: #26A9E0;
}

.page-blog__text-block {
  font-size: 1.1em;
  margin-bottom: 20px;
  text-align: justify;
}

.page-blog__highlight {
  color: #26A9E0;
  font-weight: 700;
}

.page-blog__introduction-section,
.page-blog__articles-section,
.page-blog__featured-games-section,
.page-blog__why-choose-us-section,
.page-blog__faq-section,
.page-blog__cta-bottom-section,
.page-blog__about-us-summary {
  padding: 60px 0;
}

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

.page-blog__article-card {
  background-color: rgba(255, 255, 255, 0.1); /* Dark card background */
  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;
  height: 100%;
}

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

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

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

.page-blog__card-title {
  font-size: 1.5em;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
  flex-grow: 1;
}

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

.page-blog__card-title a:hover {
  color: #EA7C07;
}

.page-blog__card-meta {
  font-size: 0.9em;
  color: #aaa;
  margin-bottom: 15px;
}

.page-blog__card-excerpt {
  font-size: 1em;
  color: #f0f0f0;
  margin-bottom: 20px;
}

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

/* Featured Games Section */
.page-blog__game-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.page-blog__game-card {
  background-color: rgba(255, 255, 255, 0.08); /* Darker card background */
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

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

.page-blog__game-card h3 {
  font-size: 1.8em;
  color: #26A9E0;
  margin-bottom: 15px;
}

.page-blog__game-card h3 a {
  color: #26A9E0;
  text-decoration: none;
}

.page-blog__game-card p {
  font-size: 1em;
  color: #f0f0f0;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Why Choose Us Section */
.page-blog__advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-blog__advantage-item {
  background-color: rgba(255, 255, 255, 0.1); /* Dark card background */
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
  height: 100%;
}

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

.page-blog__advantage-item h3 {
  font-size: 1.6em;
  color: #26A9E0;
  margin-bottom: 15px;
}

.page-blog__advantage-item h3 a {
  color: #26A9E0;
  text-decoration: none;
}

.page-blog__advantage-item p {
  font-size: 1em;
  color: #f0f0f0;
}

/* FAQ Section */
.page-blog__faq-list {
  margin-top: 30px;
}

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

.page-blog__faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: 600;
  color: #26A9E0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

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

.page-blog__faq-item summary:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  font-weight: 700;
  margin-left: 15px;
  color: #EA7C07;
}

.page-blog__faq-answer {
  padding: 0 25px 20px;
  font-size: 1.05em;
  color: #f0f0f0;
}

/* CTA Bottom Section */
.page-blog__cta-bottom-section {
  text-align: center;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.page-blog__cta-image {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0.2;
  z-index: 0;
}

.page-blog__cta-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  background-color: rgba(0, 0, 0, 0.7); /* Darker overlay for text */
  padding: 40px;
  border-radius: 10px;
}

.page-blog__cta-content .page-blog__section-title {
  color: #26A9E0;
  margin-bottom: 25px;
}

.page-blog__cta-content .page-blog__text-block {
  color: #f0f0f0;
  margin-bottom: 30px;
}

/* About Us Summary */
.page-blog__about-us-summary {
  text-align: center;
}

.page-blog__about-us-summary .page-blog__section-title {
  color: #26A9E0;
}

.page-blog__about-us-summary .page-blog__text-block {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: 2.8em;
  }
  .page-blog__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-blog__container {
    padding: 0 15px;
  }

  .page-blog__hero-section {
    padding: 40px 15px;
    min-height: 400px;
  }

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

  .page-blog__main-title {
    font-size: clamp(2em, 8vw, 2.5em); /* Sử dụng clamp cho H1 */
    margin-bottom: 15px;
  }

  .page-blog__description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog__read-more-btn {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px !important;
    font-size: 1em;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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

  .page-blog__article-grid,
  .page-blog__game-categories,
  .page-blog__advantages-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__article-card,
  .page-blog__game-card,
  .page-blog__advantage-item {
    padding: 20px;
  }

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

  .page-blog__card-title {
    font-size: 1.3em;
  }

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

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

  .page-blog__cta-bottom-section {
    padding: 60px 0;
  }

  .page-blog__cta-content {
    padding: 30px;
  }

  /* Mobile image adaptation */
  .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__hero-section,
  .page-blog__introduction-section,
  .page-blog__articles-section,
  .page-blog__featured-games-section,
  .page-blog__why-choose-us-section,
  .page-blog__faq-section,
  .page-blog__cta-bottom-section,
  .page-blog__about-us-summary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-blog__hero-section {
    padding-top: 10px !important; /* body đã承担 --header-offset，此处禁止 var(--header-offset) */
  }

  /* 确保按钮容器在移动端换行 */
  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    flex-direction: column !important; /* Hoặc flex-wrap: wrap !important; */
    gap: 10px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
}