/* style/game-rules.css */
.page-game-rules {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main, #F2FFF6); /* Default text color for the page, assuming dark body background */
  background-color: var(--bg-primary, #08160F); /* Dark background for consistency */
}

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

/* Color Variables based on custom palette */
.page-game-rules__dark-bg {
  background-color: var(--bg-primary, #08160F);
  color: var(--text-main, #F2FFF6);
}

.page-game-rules__card-bg {
  background-color: var(--card-bg, #11271B);
  color: var(--text-main, #F2FFF6);
}

.page-game-rules__text-main {
  color: var(--text-main, #F2FFF6);
}

.page-game-rules__text-secondary {
  color: var(--text-secondary, #A7D9B8);
}

.page-game-rules__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: var(--text-main, #F2FFF6);
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  display: inline-block;
  border: none;
  cursor: pointer;
}

.page-game-rules__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-game-rules__btn-secondary {
  background: var(--card-bg, #11271B);
  color: var(--text-main, #F2FFF6);
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  display: inline-block;
  border: 2px solid var(--border-color, #2E7A4E);
  cursor: pointer;
}

.page-game-rules__btn-secondary:hover {
  background: var(--deep-green, #0A4B2C);
  transform: translateY(-2px);
}

.page-game-rules__btn-link {
  color: var(--glow, #57E38D);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  display: inline-block;
  margin-top: 15px;
}

.page-game-rules__btn-link:hover {
  color: var(--gold, #F2C14E);
}

.page-game-rules__link {
  color: var(--glow, #57E38D);
  text-decoration: none;
}

.page-game-rules__link:hover {
  text-decoration: underline;
}

/* Hero Section */
.page-game-rules__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 0 60px 0; /* Small top padding, more bottom padding */
  overflow: hidden;
}

.page-game-rules__video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.page-game-rules__hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5); /* Darken video for text readability */
}

.page-game-rules__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 20px;
}

.page-game-rules__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-game-rules__intro-text {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

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

/* General Section Styling */
.page-game-rules__intro-section, 
.page-game-rules__general-rules-section, 
.page-game-rules__specific-rules-section,
.page-game-rules__promotions-section,
.page-game-rules__dispute-section,
.page-game-rules__tips-section,
.page-game-rules__faq-section {
  padding: 60px 0;
}

.page-game-rules__section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-game-rules__section-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  font-size: 1.1rem;
}

.page-game-rules__sub-title {
  font-size: 1.7rem;
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-game-rules__content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.page-game-rules__content-grid:nth-child(even) .page-game-rules__image-block {
  order: 2;
}

.page-game-rules__image-block {
  text-align: center;
}

.page-game-rules__image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-game-rules__list {
  list-style: disc;
  padding-left: 20px;
  margin-top: 20px;
}

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

/* General Rules Section */
.page-game-rules__rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-game-rules__rule-card {
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.page-game-rules__card-title {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

/* Specific Rules Section */
.page-game-rules__game-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-game-rules__game-category {
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.page-game-rules__game-category .page-game-rules__image {
  margin-bottom: 20px;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Tips Section */
.page-game-rules__tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-game-rules__tip-card {
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.page-game-rules__tip-card .page-game-rules__image {
  margin-bottom: 20px;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* FAQ Section */
.page-game-rules__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-game-rules__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1rem;
  background-color: var(--card-bg, #11271B);
  color: var(--text-main, #F2FFF6);
}

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

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

.page-game-rules__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  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: 15px 20px 20px 20px;
  background-color: var(--deep-green, #0A4B2C); /* Slightly different dark background */
  color: var(--text-secondary, #A7D9B8);
  font-size: 1rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .page-game-rules__content-grid {
    grid-template-columns: 1fr;
  }
  .page-game-rules__content-grid:nth-child(even) .page-game-rules__image-block {
    order: unset;
  }
  .page-game-rules__hero-content {
    padding: 20px 15px;
  }
}

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

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

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

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

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

  .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__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;
    flex-wrap: wrap !important;
    gap: 10px;
  }

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

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

  .page-game-rules__image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-game-rules__image-block,
  .page-game-rules__rule-card,
  .page-game-rules__game-category,
  .page-game-rules__tip-card,
  .page-game-rules__faq-item,
  .page-game-rules__video-wrapper,
  .page-game-rules__video-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__hero-video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-game-rules__rule-card, 
  .page-game-rules__game-category, 
  .page-game-rules__tip-card {
    padding: 20px;
  }

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

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

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

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

@media (max-width: 480px) {
  .page-game-rules__main-title {
    font-size: clamp(1.8rem, 9vw, 2.2rem);
  }
  .page-game-rules__section-title {
    font-size: clamp(1.6rem, 8vw, 2rem);
  }
}