.page-faq {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Dark text for light body background */
  background: #FFFFFF; /* Body background from shared.css */
  line-height: 1.6;
}

.page-faq__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

/* Hero Section */
.page-faq__hero-section {
  padding: 10px 0 40px; /* Small top padding, relying on body for header offset */
  background-color: #f8f8f8;
  border-bottom: 1px solid #eee;
}

.page-faq__hero-section .page-faq__container {
  display: flex;
  align-items: center;
  gap: 40px;
}

.page-faq__hero-content {
  flex: 1;
  text-align: left;
}

.page-faq__main-title {
  font-size: clamp(28px, 4vw, 42px); /* Responsive font size */
  font-weight: 700;
  color: #017439;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-faq__intro-description {
  font-size: 18px;
  margin-bottom: 30px;
  max-width: 700px;
}

.page-faq__cta-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure buttons adapt */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-faq__btn-primary {
  background: #C30808; /* Custom color for register/login */
  color: #FFFF00; /* Custom font color for register/login */
  border: 2px solid #C30808;
}

.page-faq__btn-primary:hover {
  background: #a80707;
  border-color: #a80707;
}

.page-faq__btn-secondary {
  background: #FFFFFF;
  color: #017439;
  border: 2px solid #017439;
}

.page-faq__btn-secondary:hover {
  background: #f0f0f0;
  color: #005f2e;
  border-color: #005f2e;
}

.page-faq__btn-small {
  padding: 8px 15px;
  font-size: 14px;
}

.page-faq__hero-image-wrapper {
  flex: 0 0 500px; /* Fixed width for desktop, adjust for mobile */
  max-width: 50%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

/* FAQ List Section */
.page-faq__faq-list-section {
  padding: 60px 0;
  background-color: #017439; /* Dark background */
  color: #ffffff; /* Light text */
}

.page-faq__section-title {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: #FFFF00; /* Yellow for titles on dark background */
}

.page-faq__section-description {
  font-size: 17px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px;
  color: #f0f0f0;
}

.page-faq__category {
  margin-bottom: 30px;
}

.page-faq__category-title {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 600;
  margin-bottom: 25px;
  color: #ffffff;
  border-bottom: 2px solid #FFFF00; /* Yellow underline for categories */
  padding-bottom: 10px;
}

details.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05); /* Slightly transparent white for items */
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
details.page-faq__faq-item summary.page-faq__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: #ffffff;
}
details.page-faq__faq-item summary.page-faq__faq-question::-webkit-details-marker {
  display: none;
}
details.page-faq__faq-item summary.page-faq__faq-question:hover {
  background: rgba(255, 255, 255, 0.1);
}
.page-faq__faq-qtext {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #ffffff;
}
.page-faq__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #FFFF00; /* Yellow toggle icon */
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-faq__faq-item .page-faq__faq-answer {
  padding: 0 20px 20px;
  background: rgba(0, 0, 0, 0.2); /* Darker background for answer */
  border-radius: 0 0 8px 8px;
  color: #f0f0f0;
}
.page-faq__faq-answer p {
  margin: 0;
  font-size: 16px;
}
.page-faq__faq-answer a {
  color: #FFFF00; /* Yellow links within answers */
  text-decoration: underline;
}
.page-faq__faq-answer a:hover {
  color: #fff;
}

/* Contact Promo Section */
.page-faq__contact-promo-section {
  padding: 60px 0;
  background-color: #FFFFFF; /* Light background */
  color: #333333; /* Dark text */
  text-align: center;
}

.page-faq__footer {
  padding: 20px 0;
  background-color: #017439;
  color: #f0f0f0;
  text-align: center;
  font-size: 14px;
}

.page-faq__copyright {
  margin: 0;
}

/* Global Image & Button Responsiveness for FAQ page */
.page-faq img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mobile Responsive */
@media (max-width: 1023px) {
  /* Boilerplate for homepage elements - must be included as per instructions */
  .page-faq__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-faq__hero-brand,
  .page-faq__hero-jackpot {
    display: none !important;
  }
  .page-faq__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-faq__game-trial-shell {
    height: auto !important;
    max-height: none !important;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-faq__game-trial-topbar,
  .page-faq__game-trial-bottombar {
    display: none !important;
  }
  .page-faq__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-faq__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-faq__game-trial-overlay {
    z-index: 5 !important;
    pointer-events: auto !important;
  }
  .page-faq__game-trial-start {
    z-index: 6 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
  }
}

@media (min-width: 1024px) {
  /* Boilerplate for homepage elements - must be included as per instructions */
  .page-faq__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-faq__hero-brand,
  .page-faq__hero-jackpot,
  .page-faq__game-trial {
    height: 300px;
    max-height: 300px;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-faq__game-trial {
    max-width: none !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .page-faq__game-trial-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 300px;
    box-sizing: border-box;
  }
  .page-faq__game-trial-viewport {
    flex: 1;
    min-height: 0;
    position: relative;
    width: 100%;
  }
  .page-faq__game-trial-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
  }
  .page-faq__hero-jackpot-claim {
    background: #c62828 !important;
    color: #fff !important;
  }
  .page-faq__promo-strip {
    margin-top: 16px;
  }
}

@media (max-width: 768px) {
  .page-faq__hero-section .page-faq__container {
    flex-direction: column;
    gap: 20px;
    padding: 0 15px;
  }

  .page-faq__hero-content {
    order: 2; /* Content below image on mobile */
    text-align: center;
  }

  .page-faq__hero-image-wrapper {
    order: 1; /* Image above content on mobile */
    flex: none;
    max-width: 100%;
    width: 100%;
  }

  .page-faq__main-title {
    font-size: 28px;
    margin-bottom: 15px;
  }

  .page-faq__intro-description {
    font-size: 16px;
    margin-bottom: 20px;
  }

  .page-faq__cta-buttons {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 0 15px; /* Add padding to buttons container */
  }

  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    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-faq__faq-list-section,
  .page-faq__contact-promo-section {
    padding: 40px 0;
  }

  .page-faq__section-title {
    font-size: 24px;
    margin-bottom: 30px;
  }

  .page-faq__section-description {
    font-size: 15px;
    margin-bottom: 30px;
    padding: 0 15px;
  }

  .page-faq__category-title {
    font-size: 20px;
    padding-left: 15px;
    padding-right: 15px;
  }

  details.page-faq__faq-item summary.page-faq__faq-question {
    padding: 15px;
  }

  .page-faq__faq-qtext {
    font-size: 15px;
  }

  details.page-faq__faq-item .page-faq__faq-answer {
    padding: 0 15px 15px;
  }

  .page-faq__faq-answer p {
    font-size: 14px;
  }

  /* Boilerplate for homepage elements - must be included as per instructions */
  .page-faq__promo-strip-track { /* 优惠 __promo-strip */
    grid-template-columns: repeat(2, 1fr) !important; /* Changed from 4 to 2 for mobile */
    overflow-x: hidden !important;
    padding: 0 15px !important; /* Add padding */
    gap: 15px !important;
  }
  .page-faq__promo-strip-item {
    flex-direction: column !important; /* 上图下文 */
    text-align: center;
  }
  .page-faq__promo-strip-item img {
    max-width: 100% !important;
    height: auto !important;
    width: 100% !important;
    object-fit: cover;
  }
  .page-faq__promo-strip-item-content {
    padding: 10px;
  }
  .page-faq__promo-strip-item-title {
    font-size: 16px;
    margin-bottom: 5px;
  }
  .page-faq__promo-strip-item-desc {
    font-size: 13px;
  }
  .page-faq__promo-strip-item .page-faq__btn-primary {
    width: auto !important; /* Adjust if needed */
    max-width: 100% !important;
    margin-top: 10px;
    font-size: 14px;
    padding: 8px 15px;
  }

  .page-faq__hot-games-grid { /* 热门 __hot-games */
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    padding: 0 15px !important;
  }
  .page-faq__hot-games-item {
    text-align: center;
  }
  .page-faq__hot-games-item img {
    max-width: 100% !important;
    height: auto !important;
    width: 100% !important;
    object-fit: cover;
    border-radius: 8px;
  }
  .page-faq__hot-games-name,
  .page-faq__hot-games-rtp,
  .page-faq__hot-games-desc {
    display: none !important; /* Hide name/rtp/desc */
  }

  .page-faq__brand-intro { /* 品牌 __brand-intro */
    padding: 20px 15px !important;
    text-align: center;
  }
  .page-faq__brand-intro-content {
    margin-top: 20px;
  }
  .page-faq__brand-intro-title {
    font-size: 22px;
    margin-bottom: 10px;
  }
  .page-faq__brand-intro-text {
    font-size: 15px;
  }
  .page-faq__brand-intro-trust-items {
    flex-direction: column !important; /* Trust items vertical */
    gap: 10px;
    margin-top: 20px;
  }
  .page-faq__brand-intro-trust-item {
    font-size: 14px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
  }

  .page-faq__winner-ticker { /* 中奖条 __winner-ticker */
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background: rgba(0,0,0,0.8) !important;
    color: #fff !important;
    padding: 10px 15px !important;
    z-index: 1000 !important;
    display: block !important;
  }
  body {
    padding-bottom: 50px !important; /* Adjust body padding for fixed ticker */
  }
  main.page-content {
    padding-bottom: 0 !important; /* Reset main padding if needed */
  }

  /* General image and container responsiveness */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-faq__section,
  .page-faq__card,
  .page-faq__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Boilerplate for game trial specific elements */
.page-faq__game-trial-overlay{z-index:5;pointer-events:auto;}.page-faq__game-trial-overlay.is-hidden{display:none!important;pointer-events:none!important;}.page-faq__game-trial-start{z-index:6;pointer-events:auto;touch-action:manipulation;}.page-faq__game-trial-shell{border:1px solid rgba(212,175,55,.45);border-radius:10px;overflow:hidden;}.page-faq__reward-modal{position:fixed;inset:0;z-index:10000;}
.page-faq__reward-modal.is-hidden { display: none !important; } /* For reward modal */
.page-faq__reward-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 10001;
}