/* style/game-rules.css */

/* --- Base Styles --- */
.page-game-rules {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #f0f0f0; /* Default light text for dark body background */
  background-color: transparent; /* Body background from shared.css */
}

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

.page-game-rules__section {
  padding: 60px 0;
  background-color: var(--black-color); /* Inherit from body or use a dark color */
  color: #f0f0f0;
}

.page-game-rules__dark-section {
  background-color: #1a1a1a; /* Slightly lighter dark background for contrast */
  color: #ffffff;
}

.page-game-rules__section-title,
.page-game-rules__main-title {
  font-size: clamp(28px, 4vw, 48px); /* Responsive H1/H2 font size */
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: #26A9E0; /* Brand color for titles */
  line-height: 1.2;
}

.page-game-rules__sub-title,
.page-game-rules__card-title,
.page-game-rules__game-card-title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 600;
  margin-top: 30px;
  margin-bottom: 20px;
  color: #26A9E0; /* Brand color for sub-titles */
  line-height: 1.3;
}

.page-game-rules p {
  margin-bottom: 15px;
  color: #f0f0f0;
}

.page-game-rules ul {
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 15px;
  color: #f0f0f0;
}

.page-game-rules ul li {
  margin-bottom: 5px;
}

/* --- Buttons --- */
.page-game-rules__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap; /* Allow wrapping for multiple buttons */
}

.page-game-rules__btn-primary,
.page-game-rules__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  text-align: center;
  box-sizing: border-box; /* Crucial for responsive buttons */
}

.page-game-rules__btn-primary {
  background-color: #26A9E0; /* Brand primary color */
  color: #ffffff;
  border: 2px solid #26A9E0;
}

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

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

.page-game-rules__btn-secondary:hover {
  background-color: #26A9E0;
  color: #ffffff;
}

/* --- Hero Section --- */
.page-game-rules__hero-section {
  position: relative;
  display: flex;
  flex-direction: column; /* Image above text */
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  padding: 10px 0 60px 0; /* Small top padding, body handles header offset */
  overflow: hidden;
  background-color: #0d0d0d; /* Dark background for hero section */
}

.page-game-rules__hero-image-wrapper {
  width: 100%;
  max-height: 500px; /* Limit height for hero image */
  overflow: hidden;
  margin-bottom: 40px;
}

.page-game-rules__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.7); /* Slightly darken image for text readability if needed */
}

.page-game-rules__hero-content {
  position: relative; /* Not absolute, for "image above text" */
  z-index: 2;
  max-width: 900px;
  padding: 0 20px;
}

.page-game-rules__main-title {
  color: #ffffff; /* White title on dark background */
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.page-game-rules__intro-text {
  font-size: 18px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

/* --- Image and Text Blocks --- */
.page-game-rules__image-text-block {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 40px;
}

.page-game-rules__image-text-block--reverse {
  flex-direction: row-reverse;
}

.page-game-rules__content-image {
  flex: 1;
  min-width: 300px; /* Ensure images don't get too small on desktop */
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  object-fit: cover;
}

.page-game-rules__text-content {
  flex: 2;
  color: #f0f0f0;
}

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

.page-game-rules__card {
  background-color: rgba(255, 255, 255, 0.08); /* Semi-transparent white on dark background */
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  color: #ffffff;
  display: flex;
  flex-direction: column;
}

.page-game-rules__card-title {
  color: #26A9E0;
  margin-top: 0;
  font-size: 24px;
}

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

.page-game-rules__game-card {
  background-color: rgba(255, 255, 255, 0.05); /* Lighter semi-transparent */
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  color: #f0f0f0;
}

.page-game-rules__game-card-title {
  color: #26A9E0;
  font-size: 22px;
  margin-top: 0;
  margin-bottom: 15px;
}

.page-game-rules__game-card ul {
  list-style: none; /* Remove default disc */
  padding-left: 0;
}

.page-game-rules__game-card ul li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 10px;
}

.page-game-rules__game-card ul li::before {
  content: '✓'; /* Custom bullet point */
  position: absolute;
  left: 0;
  color: #26A9E0;
  font-weight: bold;
}

/* --- FAQ Section --- */
.page-game-rules__faq-section {
  padding: 60px 0;
}

.page-game-rules__faq-list {
  max-width: 900px;
  margin: 40px auto 0 auto;
}

.page-game-rules__faq-item {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #ffffff;
}

.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  color: #26A9E0; /* Question text color */
  user-select: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-game-rules__faq-question::marker, /* For details/summary native marker */
.page-game-rules__faq-question::-webkit-details-marker {
  display: none;
}

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

.page-game-rules__faq-toggle {
  font-size: 24px;
  line-height: 1;
  margin-left: 15px;
  transition: transform 0.3s ease;
  color: #ffffff; /* Toggle icon color */
}

.page-game-rules__faq-item[open] .page-game-rules__faq-toggle {
  transform: rotate(45deg); /* Rotate for 'x' effect */
}

.page-game-rules__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 16px;
  color: #f0f0f0;
}

/* --- CTA Section --- */
.page-game-rules__cta-section {
  text-align: center;
  padding-bottom: 80px;
}

.page-game-rules__cta-description {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 30px auto;
  color: #f0f0f0;
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
  .page-game-rules__image-text-block {
    flex-direction: column;
    text-align: center;
  }

  .page-game-rules__image-text-block--reverse {
    flex-direction: column; /* Keep same order on mobile */
  }

  .page-game-rules__content-image {
    margin-bottom: 30px;
  }
}

@media (max-width: 768px) {
  .page-game-rules__section {
    padding: 40px 0;
  }

  .page-game-rules__section-title,
  .page-game-rules__main-title {
    font-size: clamp(24px, 6vw, 36px);
    margin-bottom: 30px;
  }

  .page-game-rules__sub-title,
  .page-game-rules__card-title,
  .page-game-rules__game-card-title {
    font-size: clamp(20px, 5vw, 28px);
    margin-top: 20px;
    margin-bottom: 15px;
  }

  .page-game-rules__intro-text,
  .page-game-rules__cta-description {
    font-size: 16px;
  }

  /* Mobile forced image/video/button responsive styles */
  .page-game-rules img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-game-rules video,
  .page-game-rules__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-game-rules__section,
  .page-game-rules__card,
  .page-game-rules__container,
  .page-game-rules__video-section,
  .page-game-rules__video-container,
  .page-game-rules__video-wrapper,
  .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: 15px;
    padding-right: 15px;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }

  .page-game-rules__hero-section {
    padding-top: 10px !important; /* Small top padding */
    padding-bottom: 40px !important;
  }

  .page-game-rules__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 15px !important;
  }
  
  .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__faq-question {
    padding: 15px 20px;
    font-size: 16px;
  }

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

/* Ensure images are never smaller than 200px (excluding small icons like logo/social, which are not in content area) */
.page-game-rules__content-image,
.page-game-rules__hero-image {
  min-width: 200px;
  min-height: 200px;
}

/* No CSS filters on images */
.page-game-rules img {
  filter: none;
}