/* style/blog.css */
/* 智能文字颜色选择器 - Mặc định cho nền tối */
.page-blog {
  color: #FFF5E1; /* Text Main */
  background: #B71C1C; /* Body Background */
}

.page-blog h1,
.page-blog h2,
.page-blog h3,
.page-blog h4,
.page-blog h5,
.page-blog h6 {
  color: #FFF5E1; /* Text Main */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
}

.page-blog p {
  line-height: 1.6;
  margin-bottom: 15px;
}

.page-blog a {
  color: #F4D34D; /* Gold */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog a:hover {
  color: #FFD86A;
  text-decoration: underline;
}

/* 页面内容区域样式 */
.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* HERO：主图必须用 <img src="[GALLERY:hero:...]">，禁止用 background-image 显示主图；区块衬底可用纯色/渐变，但不得替代主图 img */
.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; /* 小额顶距 */
  overflow: hidden; /* Ensure content doesn't overflow */
}

.page-blog__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%; /* Flex item needs full width */
}

.page-blog__hero-image {
  width: 100%;
  margin-bottom: 30px;
  border-radius: 8px;
  overflow: hidden;
}

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

.page-blog__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 900px; /* Constrain content width */
}

/* Page H1 font size - do not hardcode large font-size */
.page-blog__hero-content h1 {
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size */
  margin-top: 0;
}

.page-blog__hero-content p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.page-blog__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button color */
  color: #333333; /* Dark text for contrast on gold button */
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__cta-button:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* General section styling */
.page-blog__section {
  padding: 60px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-blog__section:last-of-type {
  border-bottom: none;
}

/* Quick Access Section */
.page-blog__quick-access-section {
  background: #D32F2F; /* Card BG */
  text-align: center;
}

.page-blog__quick-access-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  justify-content: center;
}

.page-blog__quick-access-image {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__quick-access-image img {
  width: 100%;
  height: auto;
  display: block;
}

.page-blog__quick-access-links {
  flex: 1;
  min-width: 300px;
  text-align: left;
}

.page-blog__quick-access-links p {
  font-size: 1.1em;
  margin-bottom: 30px;
}

.page-blog__button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center; /* Center buttons in group */
  width: 100%; /* Ensure group takes full width */
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-blog__button-group .page-blog__btn-primary,
.page-blog__button-group .page-blog__btn-secondary {
  flex: 1 1 auto; /* Allow buttons to grow and shrink */
  min-width: 180px; /* Minimum width for buttons */
  padding: 12px 25px;
  font-size: 16px;
  text-align: center;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button color */
  color: #333333; /* Dark text for contrast */
  border: none;
}

.page-blog__btn-primary:hover {
  filter: brightness(1.1);
}

.page-blog__btn-secondary {
  background: #7A0E0E; /* Deep Red */
  color: #FFF5E1; /* Text Main */
  border: 1px solid #F2B544; /* Border color */
}

.page-blog__btn-secondary:hover {
  background: #E53935; /* Auxiliary color */
  border-color: #FFD86A;
}

/* Game Categories Section */
.page-blog__games-section {
  text-align: center;
}

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

.page-blog__game-card {
  background: #D32F2F; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-blog__game-card img {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  margin-bottom: 15px;
}

.page-blog__game-card h3 {
  font-size: 1.4em;
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-blog__game-card h3 a {
  color: #FFF5E1;
}

.page-blog__game-card h3 a:hover {
  color: #FFD86A;
}

.page-blog__game-card p {
  font-size: 0.95em;
  line-height: 1.5;
  padding: 0 15px;
  color: rgba(255, 245, 225, 0.8); /* Slightly lighter text */
}

/* Promotions Section */
.page-blog__promotions-section {
  text-align: center;
  background: #7A0E0E; /* Deep Red */
}

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

.page-blog__promotion-card {
  background: #D32F2F; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-blog__promotion-card img {
  width: 100%;
   /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  margin-bottom: 15px;
}

.page-blog__promotion-card h3 {
  font-size: 1.4em;
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-blog__promotion-card h3 a {
  color: #FFF5E1;
}

.page-blog__promotion-card h3 a:hover {
  color: #FFD86A;
}

.page-blog__promotion-card p {
  font-size: 0.95em;
  line-height: 1.5;
  padding: 0 15px;
  color: rgba(255, 245, 225, 0.8);
}

.page-blog__cta-wrapper {
  margin-top: 50px;
  text-align: center;
}

/* Security & Support Section */
.page-blog__security-support-section {
  text-align: center;
}

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

.page-blog__security-item {
  background: #D32F2F; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-blog__security-item img {
  width: 100%;
   /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  margin-bottom: 15px;
}

.page-blog__security-item h3 {
  font-size: 1.4em;
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-blog__security-item p {
  font-size: 0.95em;
  line-height: 1.5;
  padding: 0 15px;
  color: rgba(255, 245, 225, 0.8);
}

/* FAQ Section */
.page-blog__faq-section {
  background: #D32F2F; /* Card BG */
}

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

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #F2B544; /* Border color */
  overflow: hidden;
  background: #7A0E0E; /* Deep Red */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: #FFF5E1;
}
details.page-blog__faq-item summary.page-blog__faq-question::-webkit-details-marker {
  display: none;
}
details.page-blog__faq-item summary.page-blog__faq-question:hover {
  background: #E53935; /* Auxiliary color */
}
.page-blog__faq-qtext {
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #FFF5E1;
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #F4D34D; /* Gold */
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 20px 20px;
  background: #7A0E0E; /* Deep Red */
  border-radius: 0 0 8px 8px;
  color: rgba(255, 245, 225, 0.8);
}
.page-blog__faq-answer p {
  margin-bottom: 0;
}


/* Latest Blog Section */
.page-blog__latest-blog-section {
  text-align: center;
}

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

.page-blog__blog-card {
  background: #D32F2F; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-blog__blog-card img {
  width: 100%;
  height: 220px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-blog__blog-card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-blog__blog-card h3 {
  font-size: 1.3em;
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__blog-card h3 a {
  color: #FFF5E1;
}

.page-blog__blog-card h3 a:hover {
  color: #FFD86A;
}

.page-blog__blog-card p {
  font-size: 0.9em;
  line-height: 1.5;
  color: rgba(255, 245, 225, 0.8);
  margin-bottom: 15px;
  flex-grow: 1; /* Allows content to push date to bottom */
}

.page-blog__blog-date {
  font-size: 0.85em;
  color: #F4D34D; /* Gold */
  display: block;
  margin-top: auto; /* Pushes date to bottom */
}


/* 🚨 移动端响应式设计（必须严格遵守） */
@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-blog__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-blog__hero-image img {
    border-radius: 4px;
  }
  
  .page-blog__hero-content h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .page-blog__hero-content p {
    font-size: 1em;
  }

  .page-blog__cta-button {
    padding: 12px 30px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin-left: auto;
    margin-right: auto;
  }

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

  .page-blog__container {
    padding: 20px 15px; /* Adjust container padding for mobile */
  }

  .page-blog__quick-access-content {
    flex-direction: column;
    gap: 30px;
  }

  .page-blog__quick-access-image {
    min-width: unset;
    max-width: 100%;
  }

  .page-blog__quick-access-links {
    min-width: unset;
    text-align: center; /* Center text for mobile */
  }

  .page-blog__quick-access-links p {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-blog__button-group {
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px;
    padding: 0 15px;
  }
  
  .page-blog__button-group .page-blog__btn-primary,
  .page-blog__button-group .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 15px;
    font-size: 15px;
  }

  .page-blog__game-categories,
  .page-blog__promotions-grid,
  .page-blog__security-grid,
  .page-blog__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__game-card img,
  .page-blog__promotion-card img,
  .page-blog__security-item img,
  .page-blog__blog-card img {
     /* Smaller fixed height for mobile cards */
  }

  .page-blog__game-card h3,
  .page-blog__promotion-card h3,
  .page-blog__security-item h3,
  .page-blog__blog-card h3 {
    font-size: 1.2em;
  }

  .page-blog__game-card p,
  .page-blog__promotion-card p,
  .page-blog__security-item p,
  .page-blog__blog-card p {
    font-size: 0.9em;
  }

  details.page-blog__faq-item summary.page-blog__faq-question {
    padding: 15px;
  }
  .page-blog__faq-qtext {
    font-size: 1em;
  }
  .page-blog__faq-toggle {
    font-size: 20px;
    width: 24px;
  }
  details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 15px 15px;
  }

  /* General image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}