.page-game-rules {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: #121212; /* Inherited from shared.css, ensure contrast */
}

.page-game-rules__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-game-rules__section {
  padding: 60px 0;
  text-align: center;
}

.page-game-rules__section-title {
  font-size: 2.5em;
  color: #ffc107; /* Auxiliary color for titles */
  margin-bottom: 30px;
  font-weight: bold;
}

.page-game-rules__text-block {
  font-size: 1.1em;
  color: #f0f0f0;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Section */
.page-game-rules__hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 700px;
  padding: 120px 0 60px; /* Default padding-top for desktop */
  color: #ffffff;
  overflow: hidden;
  text-align: center;
  background-color: #007bff; /* Main brand color for hero background */
}

.page-game-rules__hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Overlay for readability */
  z-index: 1;
}

.page-game-rules__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 0 20px;
}

.page-game-rules__hero-title {
  font-size: 3.8em;
  margin-bottom: 20px;
  color: #ffc107;
  line-height: 1.2;
}

.page-game-rules__hero-description {
  font-size: 1.4em;
  margin-bottom: 40px;
  color: #f0f0f0;
}

.page-game-rules__hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-game-rules__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.page-game-rules__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7); /* Subtle darkening for background image */
}

/* Buttons */
.page-game-rules__btn-primary,
.page-game-rules__btn-secondary,
.page-game-rules__btn-tertiary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

.page-game-rules__btn-primary {
  background-color: #ffc107;
  color: #121212;
  border: 2px solid #ffc107;
}

.page-game-rules__btn-primary:hover {
  background-color: #e0a800;
  border-color: #e0a800;
}

.page-game-rules__btn-secondary {
  background-color: transparent;
  color: #ffc107;
  border: 2px solid #ffc107;
}

.page-game-rules__btn-secondary:hover {
  background-color: #ffc107;
  color: #121212;
}

.page-game-rules__btn-tertiary {
  background-color: #007bff;
  color: #ffffff;
  border: 2px solid #007bff;
  font-size: 0.95em;
  padding: 10px 20px;
}

.page-game-rules__btn-tertiary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
}

.page-game-rules__btn-primary--large,
.page-game-rules__btn-secondary--large {
  padding: 18px 35px;
  font-size: 1.2em;
}

/* Image Styling */
.page-game-rules__image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 30px auto;
  display: block;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-game-rules__image--large-inset {
  margin: 60px auto;
  max-width: 80%;
}

/* Dark Background Section */
.page-game-rules__dark-bg {
  background-color: #0d0d0d; /* Slightly darker than body for contrast */
  color: #f0f0f0;
}

.page-game-rules__dark-bg .page-game-rules__section-title {
  color: #ffc107;
}

.page-game-rules__dark-bg .page-game-rules__text-block {
  color: #e0e0e0;
}

/* Light Background for Cards */
.page-game-rules__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-game-rules__light-bg .page-game-rules__card-title {
  color: #007bff;
}

/* Grid Layout */
.page-game-rules__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

/* Card Styling */
.page-game-rules__card {
  background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark bg */
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  text-align: left;
  display: flex;
  flex-direction: column;
  color: #f0f0f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.page-game-rules__card-title {
  font-size: 1.6em;
  color: #ffc107;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-game-rules__card p {
  font-size: 1em;
  color: #e0e0e0;
  margin-bottom: 15px;
}

.page-game-rules__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-game-rules__list li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 25px;
  font-size: 1em;
  color: #e0e0e0;
}

.page-game-rules__list li::before {
  content: '✓';
  color: #ffc107;
  position: absolute;
  left: 0;
  font-weight: bold;
}

.page-game-rules__list--styled li::before {
  content: '▶';
  color: #ffc107;
}

/* Specific Game Rules Section */
.page-game-rules__game-type-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-game-rules__game-card {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 25px;
  text-align: left;
  color: #f0f0f0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-game-rules__game-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-game-rules__game-card-title {
  font-size: 1.5em;
  color: #ffc107;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-game-rules__game-card-text {
  font-size: 0.95em;
  color: #e0e0e0;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* FAQ Section */
.page-game-rules__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-game-rules__faq-item {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  color: #ffc107;
  background-color: rgba(0, 123, 255, 0.2); /* Main color subtle background */
  transition: background-color 0.3s ease;
}

.page-game-rules__faq-question:hover {
  background-color: rgba(0, 123, 255, 0.3);
}

.page-game-rules__faq-title {
  margin: 0;
  color: #ffc107;
}

.page-game-rules__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
  color: #ffc107;
}

.page-game-rules__faq-item.active .page-game-rules__faq-toggle {
  transform: rotate(45deg);
}

.page-game-rules__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 30px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #e0e0e0;
  text-align: left;
}

.page-game-rules__faq-item.active .page-game-rules__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show content */
  padding: 20px 30px;
}

.page-game-rules__faq-answer p {
  margin: 0;
  font-size: 1em;
  color: #e0e0e0;
}

/* CTA Section */
.page-game-rules__cta-section {
  background-color: #007bff; /* Main brand color */
  padding: 80px 0;
  color: #ffffff;
}

.page-game-rules__cta-section .page-game-rules__section-title {
  color: #ffc107;
}

.page-game-rules__cta-section .page-game-rules__text-block {
  color: #e0e0e0;
  margin-bottom: 50px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-game-rules__hero-title {
    font-size: 3em;
  }
  .page-game-rules__hero-description {
    font-size: 1.2em;
  }
  .page-game-rules__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-game-rules__hero-section {
    min-height: 600px;
    padding-top: var(--header-offset, 120px) !important; /* Apply header offset */
    padding-bottom: 40px;
  }
  .page-game-rules__hero-title {
    font-size: 2.5em;
  }
  .page-game-rules__hero-description {
    font-size: 1.1em;
  }
  .page-game-rules__section {
    padding: 40px 0;
  }
  .page-game-rules__section-title {
    font-size: 1.8em;
  }
  .page-game-rules__text-block {
    font-size: 1em;
    padding: 0 15px;
  }
  .page-game-rules__btn-primary,
  .page-game-rules__btn-secondary,
  .page-game-rules__btn-tertiary {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 10px;
    padding: 12px 20px;
    font-size: 1em;
  }
  .page-game-rules__hero-buttons {
    flex-direction: column;
    gap: 10px;
  }
  .page-game-rules__grid,
  .page-game-rules__game-type-card-grid {
    grid-template-columns: 1fr;
    padding: 0 15px;
  }
  .page-game-rules__card,
  .page-game-rules__game-card {
    padding: 20px;
  }
  .page-game-rules__faq-question {
    font-size: 1.1em;
    padding: 15px 20px;
  }
  .page-game-rules__faq-answer {
    padding: 15px 20px;
  }
  .page-game-rules__image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  .page-game-rules__image-wrapper,
  .page-game-rules__game-card-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  .page-game-rules__introduction-section,
  .page-game-rules__general-rules,
  .page-game-rules__specific-game-rules,
  .page-game-rules__dispute-resolution,
  .page-game-rules__responsible-gaming,
  .page-game-rules__faq-section,
  .page-game-rules__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    padding-left: 0;
    padding-right: 0;
  }
  .page-game-rules__container {
    padding: 0 15px;
  }
  .page-game-rules__list li {
    font-size: 0.95em;
  }
  .page-game-rules__card-title {
    font-size: 1.4em;
  }
  .page-game-rules__game-card-title {
    font-size: 1.3em;
  }
  .page-game-rules__faq-list {
    padding: 0 15px;
  }
  .page-game-rules__faq-item.active .page-game-rules__faq-answer {
    padding: 15px 20px !important;
  }
}

@media (max-width: 480px) {
  .page-game-rules__hero-title {
    font-size: 2em;
  }
  .page-game-rules__hero-description {
    font-size: 1em;
  }
  .page-game-rules__section-title {
    font-size: 1.6em;
  }
  .page-game-rules__btn-primary--large,
  .page-game-rules__btn-secondary--large {
    font-size: 1.1em;
    padding: 15px 25px;
  }
}