/* style/game-rules.css */
/* Body background: #f4f4f4 (light) -> default text color should be dark (#333333) */

.page-game-rules {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Dark text for light body background */
  background-color: #f4f4f4; /* Ensures consistency with body background if not set globally */
}

.page-game-rules__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 60px 0; /* Small top padding, more bottom padding */
  background-color: #08160F; /* Background color for hero section */
  color: #F2FFF6; /* Light text for dark background */
}

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

.page-game-rules__hero-content {
  max-width: 900px;
  text-align: center;
  padding: 0 20px;
  z-index: 1; /* Ensure content is above image if any layering occurs (though not intended here) */
}

.page-game-rules__main-title {
  font-size: clamp(2em, 4vw, 3.2em); /* Responsive font size */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #F2FFF6; /* Light text for dark background */
}

.page-game-rules__hero-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #A7D9B8; /* Secondary light text */
}

.page-game-rules__cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
  max-width: 100%; /* Ensure responsive */
  box-sizing: border-box; /* Ensure responsive */
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text wrap */
}

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

.page-game-rules__cta-button--secondary {
  background: #ffffff;
  color: #11A84E;
  border: 2px solid #11A84E;
  margin-left: 15px;
}

.page-game-rules__cta-button--secondary:hover {
  background: #11A84E;
  color: #ffffff;
}

.page-game-rules__video-section {
  padding: 10px 20px 60px 20px; /* Small top padding, more bottom padding */
  background-color: #f4f4f4; /* Light background */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-game-rules__video-wrapper {
  position: relative;
  width: 100%;
  max-width: 1280px; /* Max width for video */
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  margin-bottom: 20px;
  background-color: #000;
  box-sizing: border-box; /* Ensure responsive */
}

.page-game-rules__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block; /* Ensure it behaves as a block element */
}

.page-game-rules__video-caption {
  text-align: center;
  max-width: 800px;
  font-style: italic;
  color: #555555;
  margin-top: 10px;
}

.page-game-rules__section {
  padding: 60px 20px;
  background-color: #f4f4f4; /* Light background */
  color: #333333; /* Dark text */
}

.page-game-rules__dark-section {
  background-color: #08160F; /* Dark background */
  color: #F2FFF6; /* Light text */
}

.page-game-rules__dark-bg {
  background-color: #11A84E; /* Brand primary color, dark */
  color: #F2FFF6; /* Light text for brand primary color */
}

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

.page-game-rules__section-title {
  font-size: clamp(1.8em, 3.5vw, 2.5em);
  font-weight: 700;
  margin-bottom: 40px;
  text-align: center;
  color: inherit; /* Inherit color from section (dark or light) */
}

.page-game-rules__image {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 30px auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  min-height: 200px;
}

.page-game-rules__text-block {
  font-size: 1em;
  margin-bottom: 20px;
  line-height: 1.7;
  color: inherit; /* Inherit color from section */
}

.page-game-rules__rule-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-game-rules__card {
  background-color: #11271B; /* Dark background for card */
  color: #F2FFF6; /* Light text for card */
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #2E7A4E; /* Border color */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-game-rules__card-title {
  font-size: 1.5em;
  font-weight: 600;
  margin-bottom: 15px;
  color: #F2C14E; /* Gold color for card title */
}

.page-game-rules__card-text {
  font-size: 0.95em;
  line-height: 1.6;
  margin-bottom: 20px;
  color: #A7D9B8; /* Secondary light text for card */
  flex-grow: 1; /* Allow text to grow */
}

.page-game-rules__card-link {
  display: inline-block;
  color: #2AD16F; /* Bright green link */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-top: 15px;
}

.page-game-rules__card-link:hover {
  color: #57E38D; /* Glow color on hover */
  text-decoration: underline;
}

.page-game-rules__contact-list {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}

.page-game-rules__contact-item {
  margin-bottom: 10px;
  font-size: 1.05em;
  color: inherit;
}

.page-game-rules__contact-item strong {
  color: #11A84E; /* Primary green for emphasis */
}

/* FAQ Section */
.page-game-rules__faq-section {
  padding: 60px 20px;
  background-color: #08160F; /* Dark background */
  color: #F2FFF6; /* Light text */
}

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

.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15em;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  color: #F2C14E; /* Gold color for question */
  position: relative;
  list-style: none; /* Remove default marker for details summary */
}

.page-game-rules__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker for webkit browsers */
}

.page-game-rules__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: #2AD16F; /* Bright green toggle */
  margin-left: 15px;
}

.page-game-rules__faq-item[open] .page-game-rules__faq-toggle {
  content: "−";
}

.page-game-rules__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1em;
  line-height: 1.7;
  color: #A7D9B8; /* Secondary light text */
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-game-rules__hero-content {
    max-width: 768px;
  }
}

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

  .page-game-rules__hero-section,
  .page-game-rules__video-section,
  .page-game-rules__section {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-game-rules__hero-section {
    padding-top: 10px; /* Small top padding for mobile hero */
  }

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

  .page-game-rules__hero-description {
    font-size: 1em;
  }

  /* Images responsive */
  .page-game-rules img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-width: 200px !important; /* Enforce min size */
    min-height: 200px !important; /* Enforce min size */
  }

  /* Video responsive */
  .page-game-rules video,
  .page-game-rules__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-game-rules__video-section,
  .page-game-rules__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden !important;
  }

  /* Buttons responsive */
  .page-game-rules__cta-button,
  .page-game-rules__cta-button--secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin: 10px 0 !important; /* Stack buttons vertically */
    padding: 12px 20px !important;
  }

  .page-game-rules__cta-button--secondary {
    margin-left: 0 !important; /* Remove left margin when stacked */
  }

  .page-game-rules__rule-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-game-rules__card {
    padding: 20px;
  }

  .page-game-rules__card-title {
    font-size: 1.3em;
  }

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

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

  /* Ensure all image/content containers are responsive */
  .page-game-rules__container,
  .page-game-rules__hero-content,
  .page-game-rules__video-caption {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Ensure content area images maintain minimum size on desktop */
.page-game-rules__general-rules-section .page-game-rules__image,
.page-game-rules__specific-rules-section .page-game-rules__image,
.page-game-rules__payment-section .page-game-rules__image {
  min-width: 200px;
  min-height: 200px;
}

/* Contrast emergency fix (if needed) */
.page-game-rules__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

.page-game-rules__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}