/* style/game-rules.css */

/* Base styles for the page */
.page-game-rules {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main); /* Default text color, will be overridden by section-specific colors */
  background-color: var(--background);
}

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

.page-game-rules__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-main);
  line-height: 1.2;
}

.page-game-rules__sub-title {
  font-size: 1.8em;
  font-weight: bold;
  margin-top: 30px;
  margin-bottom: 15px;
  color: var(--text-main);
}

.page-game-rules__paragraph {
  font-size: 1em;
  margin-bottom: 15px;
  color: var(--text-main);
}

/* Hero Section */
.page-game-rules__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0;
  padding-top: 10px; /* Small top padding, body handles header offset */
  overflow: hidden;
}

.page-game-rules__hero-image-wrapper {
  width: 100%;
  max-height: 70vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.page-game-rules__hero-content {
  text-align: center;
  padding: 40px 20px;
  max-width: 900px;
  z-index: 1;
}

.page-game-rules__main-title {
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-main);
  font-size: clamp(2em, 4vw, 3em); /* Responsive H1 font size */
}

.page-game-rules__hero-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: var(--text-secondary);
}

/* CTA Buttons */
.page-game-rules__cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.page-game-rules__cta-buttons--centered {
  margin-top: 40px;
}

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

.page-game-rules__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #F2FFF6;
  border: 2px solid transparent;
}

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

.page-game-rules__btn-secondary {
  background: #08160F; /* Match background color for outline effect */
  color: #F2FFF6;
  border: 2px solid var(--border);
}

.page-game-rules__btn-secondary:hover {
  background: var(--deep-green);
  color: var(--glow);
  border-color: var(--glow);
}

/* Section Specific Colors */
.page-game-rules__dark-section {
  background-color: var(--background);
  color: var(--text-main);
}

.page-game-rules__light-bg {
  background-color: #0A2218; /* A slightly lighter green for contrast */
  color: var(--text-main);
}

/* Introduction Section */
.page-game-rules__introduction-section {
  padding: 80px 0;
}

.page-game-rules__grid-item {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 60px;
}

.page-game-rules__grid-item--reverse {
  flex-direction: row-reverse;
}

.page-game-rules__image-content {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

.page-game-rules__text-block {
  flex: 1;
}

/* General Rules Section */
.page-game-rules__general-rules-section {
  padding: 80px 0;
  background-color: var(--card-bg);
}

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

.page-game-rules__rule-card {
  background-color: var(--deep-green);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: var(--text-main);
  border: 1px solid var(--divider);
}

.page-game-rules__card-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--glow);
}

.page-game-rules__card-description {
  font-size: 0.95em;
  color: var(--text-secondary);
}

/* Specific Rules Section */
.page-game-rules__specific-rules-section {
  padding: 80px 0;
}

.page-game-rules__game-category {
  margin-bottom: 60px;
  border-bottom: 1px solid var(--divider);
  padding-bottom: 40px;
}

.page-game-rules__game-category:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.page-game-rules__category-title {
  font-size: 2em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;
  color: var(--glow);
}

.page-game-rules__category-content {
  display: flex;
  align-items: flex-start;
  gap: 30px;
}

.page-game-rules__image-content--left {
  margin-right: 20px;
}

.page-game-rules__image-content--right {
  margin-left: 20px;
}

.page-game-rules__rule-list {
  list-style: none;
  padding: 0;
  flex: 1;
}

.page-game-rules__rule-list li {
  background-color: var(--card-bg);
  border: 1px solid var(--divider);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  font-size: 1em;
  color: var(--text-secondary);
}

.page-game-rules__rule-list li:last-child {
  margin-bottom: 0;
}

.page-game-rules__list-heading {
  font-size: 1.1em;
  font-weight: bold;
  color: var(--text-main);
  margin-bottom: 5px;
}

.page-game-rules__read-more-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--glow);
  text-decoration: none;
  font-weight: bold;
}

.page-game-rules__read-more-link:hover {
  text-decoration: underline;
}

/* Promotions Section */
.page-game-rules__promotions-section {
  padding: 80px 0;
  background-color: var(--card-bg);
}

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

.page-game-rules__promo-card {
  background-color: var(--deep-green);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: var(--text-main);
  border: 1px solid var(--divider);
}

/* Support Section (FAQ) */
.page-game-rules__support-section {
  padding: 80px 0;
}

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

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

.page-game-rules__faq-item {
  background-color: var(--card-bg);
  border: 1px solid var(--divider);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: var(--text-main);
}

.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1em;
  color: var(--text-main);
  list-style: none;
}

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

.page-game-rules__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
  color: var(--glow);
}

.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: 0.95em;
  color: var(--text-secondary);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.page-game-rules__faq-item[open] .page-game-rules__faq-answer {
  max-height: 500px; /* Adjust as needed for content */
  transition: max-height 0.5s ease-in;
}

/* Conclusion Section */
.page-game-rules__conclusion-section {
  padding: 80px 0;
  background-color: var(--deep-green);
  text-align: center;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-game-rules__hero-image-wrapper {
    max-height: 60vh;
  }

  .page-game-rules__grid-item {
    flex-direction: column;
    text-align: center;
  }

  .page-game-rules__grid-item--reverse {
    flex-direction: column;
  }

  .page-game-rules__image-content {
    max-width: 100%;
    margin: 0 auto 20px;
  }

  .page-game-rules__category-content {
    flex-direction: column;
  }

  .page-game-rules__image-content--left,
  .page-game-rules__image-content--right {
    margin: 0 auto 20px;
  }
}

@media (max-width: 768px) {
  .page-game-rules__section-title {
    font-size: 2em;
    margin-bottom: 30px;
  }

  .page-game-rules__sub-title {
    font-size: 1.5em;
  }

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

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

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

  .page-game-rules__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-game-rules__btn-primary,
  .page-game-rules__btn-secondary {
    padding: 12px 25px;
    font-size: 0.95em;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Ensure all content containers are responsive */
  .page-game-rules__container,
  .page-game-rules__introduction-section,
  .page-game-rules__general-rules-section,
  .page-game-rules__specific-rules-section,
  .page-game-rules__promotions-section,
  .page-game-rules__support-section,
  .page-game-rules__conclusion-section,
  .page-game-rules__rule-card-grid,
  .page-game-rules__promo-card-grid,
  .page-game-rules__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

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

  .page-game-rules__hero-image-wrapper {
    max-height: 40vh;
  }

  /* Video responsiveness (if any, though not in this specific page yet) */
  .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-container,
  .page-game-rules__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
}

@media (max-width: 480px) {
  .page-game-rules__section-title {
    font-size: 1.8em;
  }

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