/* 智能文字颜色选择器 - Sử dụng màu chữ phù hợp với độ sáng nền */
.page-blog__dark-bg {
  color: var(--text-main); /* Deep Navy background, light text */
  background: var(--color-deep-navy);
}

.page-blog__light-bg {
  color: var(--text-secondary); /* Light background, dark text */
  background: #ffffff;
}

.page-blog__medium-bg {
  color: #000000; /* Default dark text for medium backgrounds */
  background: var(--color-auxiliary);
}

/* 正文内容区域 - Highest priority */
.page-blog__content-area,
.page-blog__text-block {
  color: var(--text-secondary); /* Ensure readability on most backgrounds */
  background: #ffffff; /* Default white background */
}

/* Page content paragraphs and list items */
.page-blog p,
.page-blog li {
  color: var(--text-secondary); /* Ensure readability on most backgrounds */
}

/* Cards and containers - Smart background selection */
.page-blog__card {
  background: var(--card-bg); /* Use specified card background */
  color: var(--text-main);
  border: 1px solid var(--border-color); /* Add border for readability */
}

/* Dark sections special handling */
.page-blog__dark-section {
  background: var(--color-deep-navy);
  color: var(--text-main); /* Force white text */
}

/* Button text contrast guarantee */
.page-blog__btn-primary {
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  color: #ffffff; /* Button text always white */
  border: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

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

.page-blog__btn-secondary {
  background: #ffffff;
  color: var(--color-primary); /* Use brand color for contrast */
  border: 2px solid var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-blog__btn-secondary:hover {
  background: var(--color-primary);
  color: #ffffff;
}

/* Variables for colors */
:root {
  --color-primary: #113B7A;
  --color-auxiliary: #1D5FD1;
  --card-bg: #10233F;
  --text-main: #F3F8FF;
  --text-secondary: #AFC4E8;
  --border-color: #244D84;
  --color-glow: #4FA8FF;
  --color-gold: #F2C14E;
  --color-divider: #1B3357;
  --color-deep-navy: #08162B;
}

.page-blog__hero-section {
  padding-top: 20px; /* Small top padding, body handles header offset */
  padding-bottom: 50px;
  text-align: center;
}

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

.page-blog__main-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-main);
}

.page-blog__hero-description {
  font-size: 18px;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto 30px;
  color: var(--text-secondary);
}

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

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

.page-blog__section-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--color-primary);
}

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

.page-blog__article-card {
  background: var(--card-bg);
  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 6px 20px rgba(0, 0, 0, 0.3);
}

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

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

.page-blog__article-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-blog__article-title a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
  color: var(--color-gold);
}

.page-blog__article-meta {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.page-blog__article-excerpt {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  color: var(--color-auxiliary);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  align-self: flex-start;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: var(--color-gold);
  text-decoration: underline;
}

.page-blog__pagination {
  display: flex;
  justify-content: center;
  margin-top: 50px;
  gap: 10px;
}

.page-blog__pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.page-blog__pagination-link:hover:not(.page-blog__pagination-link--disabled):not(.page-blog__pagination-link--active) {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

.page-blog__pagination-link--active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
  cursor: default;
}

.page-blog__pagination-link--disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.page-blog__about-hh88 {
  padding: 60px 0;
}

.page-blog__about-content {
  display: flex;
  gap: 40px;
  align-items: center;
}

.page-blog__about-image {
  flex-shrink: 0;
  width: 45%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  max-width: 100%;
  display: block;
}

.page-blog__about-text {
  flex-grow: 1;
  text-align: left;
}

.page-blog__about-text p {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

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

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

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-bg);
}

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

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: rgba(var(--color-primary), 0.1);
}

.page-blog__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--text-main);
}

.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--color-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: rgba(var(--color-primary), 0.05);
  border-radius: 0 0 10px 10px;
  color: var(--text-secondary);
}

/* GLOBAL IMAGE AND BUTTON RESPONSIVE STYLES */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-blog__section,
.page-blog__card,
.page-blog__container,
.page-blog__articles-grid {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* Homepage-specific CSS (included as per strict instructions, though this is a blog page) */
@media (max-width: 1023px) {
  .page-blog__home-hero {
    display: block !important;
    grid-template-columns: none !important;
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .page-blog__hero-brand,
  .page-blog__hero-jackpot {
    display: none !important;
  }
  .page-blog__game-trial {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
    margin: 0 auto;
    padding: 0 0 12px !important;
    box-sizing: border-box;
  }
  .page-blog__game-trial-shell {
    height: auto !important;
    max-height: none !important;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-blog__game-trial-topbar,
  .page-blog__game-trial-bottombar {
    display: none !important;
  }
  .page-blog__game-trial-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1024 / 768;
    flex: none !important;
    min-height: 240px;
    max-height: none !important;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-blog__game-trial-frame {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    max-width: 100%;
    border: none;
    z-index: 1;
    overflow: hidden;
  }
  .page-blog__game-trial-overlay {
    z-index: 5 !important;
    pointer-events: auto !important;
  }
  .page-blog__game-trial-start {
    z-index: 6 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
  }
}

@media (min-width: 1024px) {
  .page-blog__home-hero {
    display: grid;
    grid-template-columns: 26% 48% 26%;
    gap: 16px;
    align-items: stretch;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 16px 24px;
    box-sizing: border-box;
  }
  .page-blog__hero-brand,
  .page-blog__hero-jackpot,
  .page-blog__game-trial {
    height: 300px;
    max-height: 300px;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-blog__game-trial {
    max-width: none !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .page-blog__game-trial-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 300px;
    box-sizing: border-box;
  }
  .page-blog__game-trial-viewport {
    flex: 1;
    min-height: 0;
    position: relative;
    width: 100%;
  }
  .page-blog__game-trial-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
  }
  .page-blog__hero-jackpot-claim {
    background: #c62828 !important;
    color: #fff !important;
  }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .page-blog__hero-section {
    padding-bottom: 30px;
  }
  .page-blog__main-title {
    font-size: 28px;
  }
  .page-blog__hero-description {
    font-size: 16px;
  }
  .page-blog__cta-group {
    flex-direction: column;
    gap: 15px;
  }
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-blog__section-title {
    font-size: 28px;
  }
  .page-blog__articles-section {
    padding: 40px 0;
  }
  .page-blog__articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-blog__article-image {
    height: 180px;
  }
  .page-blog__article-title {
    font-size: 18px;
  }
  .page-blog__article-excerpt {
    font-size: 14px;
  }
  .page-blog__pagination {
    margin-top: 30px;
  }
  .page-blog__about-hh88 {
    padding: 40px 0;
  }
  .page-blog__about-content {
    flex-direction: column;
    gap: 30px;
  }
  .page-blog__about-image {
    width: 100%;
  }
  .page-blog__about-text {
    text-align: center;
  }
  .page-blog__about-text p {
    font-size: 15px;
  }
  .page-blog__faq-section {
    padding: 40px 0;
  }
  details.page-blog__faq-item summary.page-blog__faq-question {
    padding: 15px;
  }
  .page-blog__faq-qtext {
    font-size: 15px;
  }
  details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 15px 15px;
  }
  /* Ensure images and containers are responsive */
  .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;
  }
  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }
  .page-blog__cta-buttons {
    display: flex;
    flex-direction: column; /* Mobile vertical stacking */
  }
  /* Homepage specific media queries (as per instructions) */
  .page-blog__promo-strip-track {
    grid-template-columns: repeat(4, 1fr);
    overflow-x: hidden;
  }
  .page-blog__hot-games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Additional homepage specific CSS for game trial and reward modal (as per instructions) */
.page-blog__game-trial-overlay {
  z-index: 5;
  pointer-events: auto;
}
.page-blog__game-trial-overlay.is-hidden {
  display: none !important;
  pointer-events: none !important;
}
.page-blog__game-trial-start {
  z-index: 6;
  pointer-events: auto;
  touch-action: manipulation;
}
.page-blog__game-trial-shell {
  border: 1px solid rgba(212, 175, 55, .45);
  border-radius: 10px;
  overflow: hidden;
}
.page-blog__reward-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.page-blog__reward-modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}
.page-blog__reward-modal-content {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  position: relative;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  color: var(--text-main);
}
.page-blog__reward-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
  padding: 5px;
  transition: color 0.3s ease;
}
.page-blog__reward-modal-close:hover {
  color: #ffffff;
}
.page-blog__reward-modal h3 {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--color-gold);
}
.page-blog__reward-modal p {
  font-size: 16px;
  margin-bottom: 25px;
  color: var(--text-secondary);
}
.page-blog__reward-modal .page-blog__btn-primary {
  width: auto;
  padding: 10px 30px;
}