/* style/game-rules.css */
.page-game-rules {
  background-color: #08160F; /* Background color from custom palette */
  color: #F2FFF6; /* Text Main color from custom palette, high contrast with dark background */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

.page-game-rules__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 40px 0; /* body handles top padding, only small top padding here for visual */
  background-color: #08160F;
}

.page-game-rules__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

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

.page-game-rules__hero-content {
  max-width: 900px;
  text-align: center;
  padding: 20px;
  margin-top: -80px; /* Overlap image slightly for visual effect, but text is below image */
  z-index: 1;
  position: relative;
  background-color: rgba(17, 39, 27, 0.8); /* Card BG with transparency for subtle effect */
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-game-rules__main-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: 1px;
  color: #F2C14E; /* Gold color for main title */
  margin-bottom: 15px;
  text-shadow: 0 0 10px rgba(242, 193, 78, 0.5);
  max-width: 100%;
  box-sizing: border-box;
}

.page-game-rules__description {
  font-size: 1.1em;
  color: #A7D9B8; /* Text Secondary color */
  margin-bottom: 30px;
}

.page-game-rules__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

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

.page-game-rules__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #F2FFF6;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-game-rules__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

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

.page-game-rules__btn-secondary:hover {
  background-color: #2AD16F;
  color: #F2FFF6;
}

.page-game-rules__section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 30px 20px;
  background-color: #11271B; /* Card BG color */
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  border: 1px solid #2E7A4E; /* Border color */
}

.page-game-rules__section-title {
  color: #F2C14E; /* Gold color for section titles */
  font-size: 2.2em;
  margin-bottom: 25px;
  text-align: center;
  text-shadow: 0 0 5px rgba(242, 193, 78, 0.3);
}

.page-game-rules__text-block p {
  margin-bottom: 15px;
  color: #F2FFF6; /* Text Main color */
}

.page-game-rules__list {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 20px;
  color: #F2FFF6; /* Text Main color */
}

.page-game-rules__list li {
  margin-bottom: 10px;
}

.page-game-rules__list li strong {
  color: #57E38D; /* Glow color for emphasis */
}

.page-game-rules__content-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 25px auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-game-rules__image-wrapper {
  width: 100%;
  max-width: 800px; /* Max width for content images */
  margin: 0 auto;
  overflow: hidden;
  box-sizing: border-box;
}

.page-game-rules__faq-list {
  margin-top: 30px;
}

.page-game-rules__faq-item {
  background-color: #0A4B2C; /* Deep Green color */
  border: 1px solid #2E7A4E; /* Border color */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  cursor: pointer;
  color: #F2FFF6; /* Text Main color */
  font-weight: bold;
  background-color: #13994A; /* Darker green for contrast */
  transition: background-color 0.3s ease;
}

.page-game-rules__faq-question:hover {
  background-color: #2AD16F;
}

.page-game-rules__faq-qtext {
  flex-grow: 1;
}

.page-game-rules__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
}

.page-game-rules__faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out, padding 0.5s ease-out;
  background-color: #0A4B2C; /* Deep Green color */
  color: #A7D9B8; /* Text Secondary color */
}

.page-game-rules__faq-answer p {
  padding-top: 10px;
  padding-bottom: 10px;
  margin: 0;
}

.page-game-rules__faq-item[open] .page-game-rules__faq-answer {
  max-height: 500px; /* Adjust as needed for content */
  padding-bottom: 20px;
}

/* Details element specific styling to remove default arrow */
.page-game-rules__faq-item summary {
  list-style: none;
}

.page-game-rules__faq-item summary::-webkit-details-marker {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-game-rules__hero-content {
    margin-top: -60px;
    max-width: 700px;
  }
  .page-game-rules__main-title {
    font-size: 2.5em;
  }
  .page-game-rules__section-title {
    font-size: 1.8em;
  }
}

@media (max-width: 768px) {
  .page-game-rules {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-game-rules__hero-section {
    padding: 10px 0 20px 0;
  }
  .page-game-rules__hero-content {
    margin-top: -40px;
    max-width: 95%;
    padding: 20px;
  }
  .page-game-rules__main-title {
    font-size: 1.8em;
  }
  .page-game-rules__description {
    font-size: 1em;
  }
  .page-game-rules__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }
  .page-game-rules__btn-primary,
  .page-game-rules__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 15px;
  }
  .page-game-rules__section {
    margin: 20px auto;
    padding: 20px 15px;
  }
  .page-game-rules__section-title {
    font-size: 1.5em;
    margin-bottom: 20px;
  }
  .page-game-rules__text-block p {
    font-size: 0.95em;
  }
  .page-game-rules__list {
    margin-left: 15px;
  }
  .page-game-rules__image-wrapper {
    padding: 0 15px;
  }
  .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__hero-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
  }
  .page-game-rules__faq-question {
    padding: 12px 15px;
  }
  .page-game-rules__faq-answer {
    padding: 0 15px;
  }
  .page-game-rules__faq-item[open] .page-game-rules__faq-answer {
    padding-bottom: 15px;
  }
}