/* style/blog.css */
/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  color: #1F2D3D; /* Text Main */
  background-color: #F4F7FB; /* Background */
  line-height: 1.6;
}

.page-blog__container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 16px;
}

.page-blog__section-title {
  font-size: 32px;
  color: #1F2D3D; /* Text Main */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-blog__section-description {
  font-size: 18px;
  color: #1F2D3D; /* Text Main */
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* HERO Section */
.page-blog__hero-section {
  padding-top: 10px; /* Small top padding, relying on body for header offset */
  padding-bottom: 60px;
  background-color: #F4F7FB; /* Background */
}

.page-blog__hero-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  padding-top: 40px;
  padding-bottom: 40px;
}

.page-blog__hero-content {
  flex: 1 1 50%;
  min-width: 300px;
  color: #1F2D3D; /* Text Main */
}

.page-blog__main-title {
  font-size: clamp(28px, 4vw, 48px); /* H1 font size with clamp */
  color: #000000; /* Custom Color_1776249996415 */
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: 700;
}

.page-blog__hero-description {
  font-size: 18px;
  margin-bottom: 30px;
  color: #1F2D3D; /* Text Main */
}

.page-blog__cta-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  width: 100%; /* Ensure container takes full width */
  max-width: 100%; /* Ensure container takes full width */
  box-sizing: border-box;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Button responsive */
  box-sizing: border-box; /* Button responsive */
  white-space: normal; /* Button text wrap */
  word-wrap: break-word; /* Button text wrap */
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Button color */
  color: #ffffff;
  border: 2px solid transparent;
}

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

.page-blog__btn-secondary {
  background: #ffffff; /* Card BG */
  color: #2F6BFF; /* Main color for text */
  border: 2px solid #2F6BFF; /* Border color */
}

.page-blog__btn-secondary:hover {
  background: #F4F7FB; /* Background */
  transform: translateY(-2px);
}

.page-blog__hero-image {
  flex: 1 1 40%;
  min-width: 300px;
  text-align: center;
}

.page-blog__hero-side-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block; /* Ensure no extra space below image */
}

/* Latest Posts Section */
.page-blog__latest-posts-section {
  padding: 60px 0;
  background-color: #F4F7FB; /* Background */
}

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

.page-blog__post-card {
  background: #ffffff; /* Card BG */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-blog__post-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.page-blog__post-thumbnail {
  width: 100%;
  height: 200px; /* Fixed height for thumbnails */
  object-fit: cover;
  display: block;
}

.page-blog__post-card h3 {
  font-size: 22px;
  color: #000000; /* Custom Color_1776249996415 */
  margin: 20px 20px 10px;
  line-height: 1.3;
}

.page-blog__post-meta {
  font-size: 14px;
  color: #666;
  margin: 0 20px 10px;
}

.page-blog__post-summary {
  font-size: 16px;
  color: #1F2D3D; /* Text Main */
  margin: 0 20px 20px;
  flex-grow: 1; /* Push read more button to bottom */
}

.page-blog__read-more-btn {
  display: inline-block;
  background-color: #F4F7FB; /* Background */
  color: #2F6BFF; /* Main color */
  padding: 8px 15px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  margin: 0 20px 20px;
  align-self: flex-start;
  transition: background-color 0.3s ease;
}

.page-blog__read-more-btn:hover {
  background-color: #D6E2FF; /* Border color */
}

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

/* Call to Action Section */
.page-blog__cta-section {
  padding: 80px 0;
  text-align: center;
  background-color: #2F6BFF; /* Main color */
  color: #ffffff;
}

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

.page-blog__cta-section .page-blog__cta-buttons {
  justify-content: center;
  margin-top: 30px;
}

.page-blog__cta-section .page-blog__btn-primary {
  background: #ffffff; /* Card BG */
  color: #2F6BFF; /* Main color */
  border: 2px solid transparent;
}

.page-blog__cta-section .page-blog__btn-primary:hover {
  background: #F4F7FB; /* Background */
}

.page-blog__cta-section .page-blog__btn-secondary {
  background: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}

.page-blog__cta-section .page-blog__btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
  background-color: #F4F7FB; /* Background */
}

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

.page-blog__faq-item {
  background: #ffffff; /* Card BG */
  border: 1px solid #D6E2FF; /* 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: 18px;
  font-weight: bold;
  color: #000000; /* Custom Color_1776249996415 */
  cursor: pointer;
  list-style: none; /* Hide default details marker */
}

.page-blog__faq-item summary::-webkit-details-marker {
  display: none; /* Hide default details marker for webkit browsers */
}

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

.page-blog__faq-toggle {
  font-size: 24px;
  line-height: 1;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg); /* Rotate for 'x' effect */
}

.page-blog__faq-answer {
  padding: 0 25px 18px;
  font-size: 16px;
  color: #1F2D3D; /* Text Main */
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-container {
    flex-direction: column;
    text-align: center;
  }
  .page-blog__hero-content {
    order: 2; /* Content below image */
  }
  .page-blog__hero-image {
    order: 1; /* Image above content */
  }
  .page-blog__cta-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  /* 1. HERO Section */
  .page-blog__hero-section {
    padding-top: 10px !important; /* Rely on body padding for header offset */
    padding-bottom: 40px;
  }
  .page-blog__main-title {
    font-size: clamp(24px, 6vw, 36px);
    margin-bottom: 15px;
  }
  .page-blog__hero-description {
    font-size: 16px;
    margin-bottom: 25px;
  }
  .page-blog__hero-container {
    padding-top: 20px;
    padding-bottom: 20px;
    gap: 20px;
  }
  .page-blog__hero-content,
  .page-blog__hero-image {
    min-width: unset;
    flex-basis: 100%;
  }

  /* 2. Placeholder for Module 1 Three-column round images (if applicable) */
  .page-blog__icon-box-media { /* Placeholder for module 1, if it were present */
    width: 200px !important;
    height: 200px !important;
    margin: 0 auto 10px !important;
    border-radius: 50% !important;
  }
  .page-blog__icon-box-media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
  }

  /* 3. Placeholder for Seven Tab Game Area (if applicable) */
  .page-blog__game-tabs { /* Placeholder for game tabs, if they were present */
    flex-direction: column !important;
  }
  .page-blog__tab-nav {
    flex-direction: column !important;
    gap: 10px;
    margin-bottom: 20px;
  }
  .page-blog__tab-nav button {
    width: 100% !important;
  }

  /* 4. Content Modules (Latest Posts, CTA, FAQ) 排版 */
  .page-blog__latest-posts-section,
  .page-blog__cta-section,
  .page-blog__faq-section {
    padding: 40px 0;
  }
  .page-blog__section-title {
    font-size: 28px;
    margin-bottom: 15px;
  }
  .page-blog__section-description {
    font-size: 16px;
    margin-bottom: 30px;
    padding: 0 10px;
  }
  .page-blog__posts-grid {
    grid-template-columns: 1fr; /* Single column for blog posts */
    gap: 20px;
  }
  .page-blog__post-card h3 {
    font-size: 20px;
    margin: 15px 15px 8px;
  }
  .page-blog__post-meta,
  .page-blog__post-summary,
  .page-blog__read-more-btn {
    margin-left: 15px;
    margin-right: 15px;
  }
  .page-blog__faq-question {
    padding: 15px 20px;
    font-size: 16px;
  }
  .page-blog__faq-answer {
    padding: 0 20px 15px;
    font-size: 15px;
  }

  /* 5. Thông tin chung về hình ảnh và vùng chứa */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
  }
  /* For general containers within blog page */
  .page-blog__container,
  .page-blog__hero-container,
  .page-blog__posts-grid,
  .page-blog__post-card,
  .page-blog__faq-list,
  .page-blog__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* padding-left: 15px; */ /* Removed to avoid double padding if container already has it */
    /* padding-right: 15px; */ /* Removed to avoid double padding if container already has it */
  }
  /* Apply padding directly to sections that need it for mobile responsiveness */
  .page-blog__latest-posts-section .page-blog__container,
  .page-blog__cta-section .page-blog__container,
  .page-blog__faq-section .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 6. Nút và vùng chứa nút */
  .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;
  }
  .page-blog__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column !important;
    gap: 10px;
  }
}