/* General styles for .page-g */
.page-g {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFF1E8; /* Text Main color from custom palette, for dark background #140C0C */
  background-color: #140C0C; /* Background color from custom palette */
}

.page-g__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.page-g__section-title {
  font-size: 2.5em;
  color: #F3C54D; /* Gold color for titles */
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
  line-height: 1.2;
}

.page-g__text-block {
  font-size: 1.1em;
  margin-bottom: 20px;
  color: #FFF1E8;
  text-align: justify;
}

.page-g__highlight-text {
  color: #F3C54D;
  font-weight: bold;
}

.page-g__text-link {
  color: #F3C54D;
  text-decoration: underline;
}

/* Buttons */
.page-g__btn-primary,
.page-g__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-g__btn-primary {
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%); /* Button color from custom palette */
  color: #140C0C; /* Dark text for light button */
  border: none;
}

.page-g__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.page-g__btn-secondary {
  background: #2A1212; /* Card BG color from custom palette */
  color: #FFF1E8; /* Text Main color */
  border: 2px solid #6A1E1E; /* Border color from custom palette */
}

.page-g__btn-secondary:hover {
  background: #6A1E1E; /* Deep Red color from custom palette */
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Card styles */
.page-g__card {
  background-color: #2A1212; /* Card BG color from custom palette */
  border: 1px solid #6A1E1E; /* Border color from custom palette */
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: #FFF1E8;
}

.page-g__dark-section {
  background-color: #140C0C; /* Background color from custom palette */
  color: #FFF1E8;
  padding: 60px 0;
}

/* Hero Section */
.page-g__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding, assuming body handles header-offset */
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.page-g__hero-image-wrapper {
  width: 100%;
  height: auto;
  max-height: 600px; /* Limit height for aesthetic */
  overflow: hidden;
}

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

.page-g__hero-content-wrapper {
  padding: 40px 20px;
  max-width: 900px;
  width: 100%;
}

.page-g__hero-title {
  font-weight: bold;
  color: #F3C54D; /* Gold color */
  margin-bottom: 20px;
  line-height: 1.2;
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size for H1 */
}

.page-g__hero-description {
  font-size: 1.2em;
  color: #FFF1E8;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-g__hero-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

/* Introduction Section */
.page-g__introduction-section {
  padding: 60px 0;
}

/* Why Choose Section */
.page-g__why-choose-section {
  padding: 60px 0;
}

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

.page-g__feature-card {
  text-align: center;
}

.page-g__feature-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-g__feature-title {
  font-size: 1.8em;
  color: #F3C54D;
  margin-bottom: 15px;
}

.page-g__feature-description {
  font-size: 1em;
  color: #FFF1E8;
  text-align: justify;
}

/* Types Section */
.page-g__types-section {
  padding: 60px 0;
}

.page-g__list-items {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-g__list-item {
  background-color: #2A1212;
  border: 1px solid #6A1E1E;
  border-radius: 10px;
  padding: 25px;
  color: #FFF1E8;
}

.page-g__list-title {
  font-size: 1.6em;
  color: #F3C54D;
  margin-bottom: 10px;
}

.page-g__list-description {
  font-size: 1em;
  color: #FFF1E8;
  text-align: justify;
}

/* How to Play Section */
.page-g__how-to-play-section {
  padding: 60px 0;
  text-align: center;
}

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

.page-g__step-card {
  text-align: center;
}

.page-g__step-icon {
  font-size: 2em;
  font-weight: bold;
  color: #140C0C; /* Dark text for light background */
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
}

.page-g__step-title {
  font-size: 1.5em;
  color: #F3C54D;
  margin-bottom: 10px;
}

.page-g__step-description {
  font-size: 1em;
  color: #FFF1E8;
  text-align: justify;
}

.page-g__how-to-play-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  margin-top: 40px;
}

/* Live Betting Section */
.page-g__live-betting-section {
  padding: 60px 0;
  text-align: center;
}

/* FAQ Section */
.page-g__faq-section {
  padding: 60px 0;
}

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

.page-g__faq-item {
  background-color: #2A1212; /* Card BG color */
  border: 1px solid #6A1E1E; /* Border color */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-g__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: #F3C54D; /* Gold color */
  cursor: pointer;
  list-style: none;
  position: relative;
  user-select: none; /* Prevent text selection on toggle */
}

.page-g__faq-question::-webkit-details-marker {
  display: none;
}

.page-g__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: #F3C54D;
  margin-left: 15px;
}

.page-g__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1em;
  color: #FFF1E8;
  text-align: justify;
}

.page-g__faq-answer p {
  margin-top: 0;
  margin-bottom: 0;
}

/* CTA Section */
.page-g__cta-section {
  padding: 60px 0;
  text-align: center;
}

.page-g__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

/* Image responsiveness for all images */
.page-g img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .page-g__hero-title {
    font-size: clamp(2em, 5vw, 3em);
  }
  .page-g__section-title {
    font-size: 2em;
  }
  .page-g__feature-grid, .page-g__steps-grid, .page-g__list-items {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-g__hero-section {
    padding-top: 10px !important;
  }
  .page-g__hero-content-wrapper {
    padding: 30px 15px;
  }
  .page-g__hero-title {
    font-size: clamp(1.8em, 7vw, 2.5em) !important;
  }
  .page-g__hero-description {
    font-size: 1em;
  }
  .page-g__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  /* 产品展示图区域 (How to Play image is an example of content image) */
  .page-g__how-to-play-image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  .page-g__steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* 通用图片与容器 */
  .page-g img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-g__container,
  .page-g__introduction-section .page-g__container,
  .page-g__why-choose-section .page-g__container,
  .page-g__types-section .page-g__container,
  .page-g__how-to-play-section .page-g__container,
  .page-g__live-betting-section .page-g__container,
  .page-g__faq-section .page-g__container,
  .page-g__cta-section .page-g__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* 按钮与按钮容器 */
  .page-g__btn-primary,
  .page-g__btn-secondary,
  .page-g a[class*="button"],
  .page-g 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 !important;
    padding-right: 15px !important; /* Ensure padding inside button */
  }
  .page-g__hero-cta-buttons,
  .page-g__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 10px !important;
  }

  /* Other content modules */
  .page-g__section-title {
    font-size: 1.8em !important;
    margin-bottom: 25px;
  }
  .page-g__text-block, .page-g__feature-description, .page-g__list-description, .page-g__step-description, .page-g__faq-answer p {
    font-size: 0.95em;
  }
  .page-g__feature-grid, .page-g__list-items {
    grid-template-columns: 1fr;
  }
  .page-g__feature-card, .page-g__list-item, .page-g__step-card, .page-g__faq-item {
    padding: 20px;
  }
  .page-g__faq-question {
    font-size: 1.1em;
    padding: 15px 20px;
  }
  .page-g__faq-answer {
    padding: 0 20px 15px 20px;
  }
}