/* Base styles */
.page-game-rules {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFF1E8; /* Text Main */
  background-color: #140C0C; /* Background */
  padding-top: 10px; /* Small top padding, assuming body has --header-offset */
}

.page-game-rules__section {
  padding: 40px 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  overflow: hidden;
}

.page-game-rules__section-title {
  font-size: 32px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;
  color: #F3C54D; /* Gold */
}

.page-game-rules__content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-game-rules__content-wrapper p {
  font-size: 16px;
  margin-bottom: 15px;
}

.page-game-rules__hero-section {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  color: #FFF1E8;
}

.page-game-rules__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.page-game-rules__hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay for text readability */
  border-radius: 10px;
}

.page-game-rules__main-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: bold;
  margin-bottom: 15px;
  color: #F3C54D; /* Gold */
  line-height: 1.2;
}

.page-game-rules__description {
  font-size: 18px;
  margin-bottom: 25px;
  color: #FFF1E8;
}

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

.page-game-rules__btn-primary,
.page-game-rules__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-game-rules__btn-primary {
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
  color: #FFF1E8;
  border: none;
}

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

.page-game-rules__btn-secondary {
  background: #2A1212; /* Card BG */
  color: #F3C54D; /* Gold */
  border: 2px solid #F3C54D; /* Gold */
}

.page-game-rules__btn-secondary:hover {
  background: #F3C54D;
  color: #2A1212;
}

.page-game-rules__sub-title {
  font-size: 24px;
  font-weight: bold;
  color: #F3C54D; /* Gold */
  margin-bottom: 15px;
}

.page-game-rules__grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.page-game-rules__text-block {
  background: #2A1212; /* Card BG */
  padding: 25px;
  border-radius: 8px;
  color: #FFF1E8;
  border: 1px solid #6A1E1E; /* Border */
}

.page-game-rules__card {
  background: #2A1212; /* Card BG */
  border: 1px solid #6A1E1E; /* Border */
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  padding-bottom: 20px;
  color: #FFF1E8;
}

.page-game-rules__card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 15px;
  display: block;
}

.page-game-rules__card-title {
  font-size: 20px;
  font-weight: bold;
  color: #F3C54D; /* Gold */
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-game-rules__card p {
  font-size: 15px;
  margin-bottom: 15px;
  padding: 0 15px;
}

.page-game-rules__card-link {
  display: inline-block;
  padding: 8px 15px;
  background: #C61F1F; /* Main Color */
  color: #FFF1E8;
  text-decoration: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.page-game-rules__card-link:hover {
  background: #E53030; /* Accent Color */
}

.page-game-rules__image-right {
  float: right;
  margin-left: 20px;
  margin-bottom: 15px;
  max-width: 40%;
  height: auto;
  border-radius: 8px;
}

.page-game-rules__image-left {
  float: left;
  margin-right: 20px;
  margin-bottom: 15px;
  max-width: 40%;
  height: auto;
  border-radius: 8px;
}

/* Color Contrast Specifics */
.page-game-rules__dark-bg {
  background-color: #140C0C; /* Background */
  color: #FFF1E8; /* Text Main */
}

.page-game-rules__light-bg {
  background-color: #2A1212; /* Card BG, slightly lighter for contrast */
  color: #FFF1E8; /* Text Main */
}

/* FAQ Section */
details.page-game-rules__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #6A1E1E;
  overflow: hidden;
  background: #2A1212;
  color: #FFF1E8;
}
details.page-game-rules__faq-item summary.page-game-rules__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: #F3C54D;
}
details.page-game-rules__faq-item summary.page-game-rules__faq-question::-webkit-details-marker {
  display: none;
}
details.page-game-rules__faq-item summary.page-game-rules__faq-question:hover {
  background: #1C0F0F;
}
.page-game-rules__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #F3C54D;
}
.page-game-rules__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #F3C54D;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-game-rules__faq-item .page-game-rules__faq-answer {
  padding: 0 20px 20px;
  background: #1C0F0F;
  border-radius: 0 0 5px 5px;
  color: #FFF1E8;
}

/* Responsive Design */
/* Mobile Images */
.page-game-rules img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mobile Buttons */
.page-game-rules__cta-button,
.page-game-rules__btn-primary,
.page-game-rules__btn-secondary,
.page-game-rules a[class*="button"],
.page-game-rules a[class*="btn"] {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-game-rules__cta-buttons,
.page-game-rules__button-group,
.page-game-rules__btn-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

@media (max-width: 768px) {
  .page-game-rules {
    padding-top: 5px; /* Adjust for mobile, ensure small top padding */
  }
  .page-game-rules__hero-section {
    min-height: 300px;
  }
  .page-game-rules__hero-content {
    padding: 15px;
  }
  .page-game-rules__main-title {
    font-size: 26px;
  }
  .page-game-rules__description {
    font-size: 16px;
  }
  .page-game-rules__section {
    padding: 30px 15px;
  }
  .page-game-rules__section-title {
    font-size: 26px;
    margin-bottom: 20px;
  }
  .page-game-rules__content-wrapper {
    padding: 0 10px;
  }
  .page-game-rules__image-right,
  .page-game-rules__image-left {
    float: none;
    margin: 0 auto 20px auto;
    max-width: 100%;
  }
  .page-game-rules__grid-layout {
    grid-template-columns: 1fr;
  }
  .page-game-rules__card-image {
    height: 180px;
  }

  /* Mobile Images - Forced Adaption */
  .page-game-rules img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-game-rules__section,
  .page-game-rules__card,
  .page-game-rules__container,
  .page-game-rules__text-block,
  .page-game-rules__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 10px;
    padding-right: 10px;
  }

  /* Mobile Buttons - Forced Adaption */
  .page-game-rules__cta-button,
  .page-game-rules__btn-primary,
  .page-game-rules__btn-secondary,
  .page-game-rules a[class*="button"],
  .page-game-rules 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;
    padding-right: 15px;
  }
  .page-game-rules__cta-buttons,
  .page-game-rules__button-group,
  .page-game-rules__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 10px;
    padding-right: 10px;
    flex-wrap: wrap !important;
    gap: 10px;
  }
  .page-game-rules__cta-buttons {
    flex-direction: column;
  }

  details.page-game-rules__faq-item summary.page-game-rules__faq-question { padding: 15px; }
  .page-game-rules__faq-qtext { font-size: 15px; }
  .page-game-rules__faq-answer { padding: 0 15px 15px; }
}