/* style/game-rules.css */

/* Body background is #f4f4f4 (light), so default text should be dark */
.page-game-rules {
  color: #333333; /* Default dark text for light body background */
  background-color: #f4f4f4;
  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: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: #08160F; /* Custom background color */
  color: #F2FFF6; /* Main text color for dark background */
}

.page-game-rules__hero-image {
  width: 100%;
  max-width: 1920px;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 30px;
}

.page-game-rules__hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.page-game-rules__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: #F2FFF6; /* Main text color */
  margin-bottom: 20px;
}

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

.page-game-rules__btn-primary {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Custom button color */
  color: #ffffff; /* White text for primary button */
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-game-rules__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
}

.page-game-rules__section {
  padding: 60px 20px;
  background-color: #f4f4f4;
  color: #333333;
}

.page-game-rules__section--dark-bg {
  background-color: #08160F; /* Custom background color */
  color: #F2FFF6; /* Main text color for dark background */
}

.page-game-rules__container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-game-rules__section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #11A84E; /* Brand primary color for titles */
  text-align: center;
  margin-bottom: 40px;
}

.page-game-rules__section--dark-bg .page-game-rules__section-title {
  color: #F2FFF6; /* Main text color for titles on dark background */
}

.page-game-rules__text-block {
  font-size: 1rem;
  margin-bottom: 20px;
  text-align: justify;
  color: inherit; /* Inherit color from parent section */
}

.page-game-rules__image-content {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin: 30px auto;
  max-width: 800px;
}

.page-game-rules__list {
  list-style: disc;
  margin-left: 20px;
  padding-left: 0;
  margin-bottom: 20px;
  color: inherit;
}

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

.page-game-rules__game-type {
  background-color: #11271B; /* Card BG color */
  border: 1px solid #2E7A4E; /* Border color */
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 30px;
  color: #F2FFF6; /* Main text color for dark card */
}

.page-game-rules__game-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: #57E38D; /* Glow color for sub-titles */
  margin-bottom: 20px;
  text-align: center;
}

.page-game-rules__image-card {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin: 20px auto;
  max-width: 600px;
}

.page-game-rules__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  background-color: transparent;
  color: #57E38D; /* Glow color for secondary button text */
  border: 2px solid #57E38D; /* Glow color for secondary button border */
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  margin-top: 20px;
}

.page-game-rules__btn-secondary:hover {
  background-color: #57E38D;
  color: #08160F; /* Dark background color for text on hover */
}

.page-game-rules__cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 40px;
}

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

.page-game-rules__faq-item {
  background-color: #11271B; /* Card BG color */
  border: 1px solid #2E7A4E; /* Border color */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #F2FFF6; /* Main text color for dark card */
}

.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  color: #F2FFF6; /* Main text color */
  background-color: #0A4B2C; /* Deep Green for FAQ question background */
}

.page-game-rules__faq-item details > summary {
  list-style: none;
}

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

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

.page-game-rules__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

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

.page-game-rules__faq-answer {
  padding: 0 20px 20px;
  font-size: 1rem;
  color: #A7D9B8; /* Secondary text color */
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-game-rules__hero-section,
  .page-game-rules__section {
    padding: 40px 15px;
  }

  .page-game-rules__main-title {
    font-size: clamp(2rem, 4vw, 3rem);
  }

  .page-game-rules__description {
    font-size: 1rem;
  }

  .page-game-rules__section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  }
}

@media (max-width: 768px) {
  .page-game-rules {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-game-rules__hero-section {
    padding: 30px 15px;
    padding-top: 10px !important; /* body handles header offset */
  }

  .page-game-rules__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .page-game-rules__description {
    font-size: 0.95rem;
  }

  .page-game-rules__section-title {
    font-size: clamp(1.4rem, 5vw, 2rem);
  }

  .page-game-rules__text-block {
    font-size: 0.95rem;
  }

  .page-game-rules__list {
    margin-left: 15px;
  }

  .page-game-rules__game-type {
    padding: 20px;
  }

  .page-game-rules__game-title {
    font-size: clamp(1.3rem, 4.5vw, 1.8rem);
  }

  .page-game-rules__btn-primary,
  .page-game-rules__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
    text-align: center;
  }

  .page-game-rules__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-game-rules img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-game-rules__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-game-rules__faq-question {
    font-size: 1rem;
    padding: 15px;
  }

  .page-game-rules__faq-answer {
    padding: 0 15px 15px;
  }
}