/* Base styles for the game-rules page */
.page-game-rules {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: #F5F7FA; /* Custom background color */
}

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

.page-game-rules__section {
  padding: 40px 0;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.page-game-rules__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-game-rules__dark-section {
  background-color: #E53935;
  color: #ffffff;
}

.page-game-rules__section-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 30px;
  color: inherit; /* Inherit color from section background */
}

.page-game-rules__sub-title {
  font-size: 24px;
  font-weight: 600;
  margin-top: 25px;
  margin-bottom: 15px;
  color: inherit;
}

.page-game-rules__paragraph {
  font-size: 16px;
  margin-bottom: 15px;
}

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

.page-game-rules__list-item {
  margin-bottom: 8px;
  font-size: 16px;
}

/* Hero Section */
.page-game-rules__hero-section {
  padding-top: 10px; /* Small top padding as per instruction */
  padding-bottom: 60px;
  text-align: center;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Using button gradient for hero background for visual impact */
  color: #ffffff;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
}

.page-game-rules__hero-section .page-game-rules__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.page-game-rules__hero-content {
  max-width: 800px;
  text-align: center;
}

.page-game-rules__main-title {
  font-size: clamp(28px, 4vw, 48px); /* Responsive font size */
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-game-rules__description {
  font-size: clamp(16px, 2vw, 20px);
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.9);
}

.page-game-rules__hero-image-wrapper {
  width: 100%;
  max-width: 800px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

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

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

.page-game-rules__btn-primary,
.page-game-rules__btn-secondary {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

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

.page-game-rules__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(229, 57, 53, 0.4);
}

.page-game-rules__btn-secondary {
  background: #ffffff;
  color: #E53935;
  border: 2px solid #E53935;
}

.page-game-rules__btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 90, 79, 0.2);
}

.page-game-rules__btn-primary--center,
.page-game-rules__btn-secondary--center {
  display: block;
  margin: 30px auto 0 auto;
  max-width: 300px;
}

/* Image Content Block */
.page-game-rules__image-content-block {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-top: 30px;
}

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

.page-game-rules__content-image {
  flex: 1;
  max-width: 50%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: block;
}

.page-game-rules__text-block {
  flex: 1;
  max-width: 50%;
}

.page-game-rules__text-block .page-game-rules__list {
  padding-left: 0;
  list-style-position: inside;
}

.page-game-rules__text-block .page-game-rules__list-item {
  margin-bottom: 5px;
}

/* Casino Grid */
.page-game-rules__content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.page-game-rules__card {
  background: #FFFFFF;
  color: #333333;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  padding: 25px;
  text-align: left;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.page-game-rules__card:hover {
  transform: translateY(-5px);
}

.page-game-rules__card-title {
  font-size: 22px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 15px;
  color: #E53935;
}

.page-game-rules__card-text {
  font-size: 15px;
  line-height: 1.5;
}

.page-game-rules__card-text a {
  color: #E53935;
  text-decoration: underline;
}

/* FAQ Section */
details.page-game-rules__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
details.page-game-rules__faq-item summary.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
details.page-game-rules__faq-item summary.page-game-rules__faq-question::-webkit-details-marker {
  display: none;
}
details.page-game-rules__faq-item summary.page-game-rules__faq-question:hover {
  background: #f5f5f5;
}
.page-game-rules__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333;
}
.page-game-rules__faq-toggle {
  font-size: 28px; /* Larger for better visibility */
  font-weight: bold;
  color: #E53935; /* Brand color for toggle */
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px; /* Adjust size */
  text-align: center;
}
details.page-game-rules__faq-item .page-game-rules__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 8px 8px;
  font-size: 16px;
  color: #555555;
}
details.page-game-rules__faq-item .page-game-rules__faq-answer p {
  margin: 0;
}

/* CTA section at the bottom */
.page-game-rules__section--cta {
  text-align: center;
  padding: 60px 0;
  background: #E53935;
  color: #ffffff;
}

.page-game-rules__container--cta {
  max-width: 800px;
}

.page-game-rules__section--cta .page-game-rules__section-title {
  color: #ffffff;
  margin-bottom: 25px;
}

.page-game-rules__section--cta .page-game-rules__paragraph {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 30px;
}

/* Responsive Styles */
@media (max-width: 1023px) {
  .page-game-rules__home-hero {
    display: block !important;
    grid-template-columns: none !important;
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .page-game-rules__hero-brand,
  .page-game-rules__hero-jackpot {
    display: none !important;
  }
  .page-game-rules__game-trial {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
    margin: 0 auto;
    padding: 0 0 12px !important;
    box-sizing: border-box;
  }
  .page-game-rules__game-trial-shell {
    height: auto !important;
    max-height: none !important;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-game-rules__game-trial-topbar,
  .page-game-rules__game-trial-bottombar {
    display: none !important;
  }
  .page-game-rules__game-trial-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1024 / 768;
    flex: none !important;
    min-height: 240px;
    max-height: none !important;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-game-rules__game-trial-frame {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    max-width: 100%;
    border: none;
    z-index: 1;
    overflow: hidden;
  }
  .page-game-rules__game-trial-overlay {
    z-index: 5 !important;
    pointer-events: auto !important;
  }
  .page-game-rules__game-trial-start {
    z-index: 6 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
  }
}

@media (min-width: 1024px) {
  .page-game-rules__home-hero {
    display: grid;
    grid-template-columns: 26% 48% 26%;
    gap: 16px;
    align-items: stretch;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 16px 24px;
    box-sizing: border-box;
  }
  .page-game-rules__hero-brand,
  .page-game-rules__hero-jackpot,
  .page-game-rules__game-trial {
    height: 300px;
    max-height: 300px;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-game-rules__game-trial {
    max-width: none !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .page-game-rules__game-trial-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 300px;
    box-sizing: border-box;
  }
  .page-game-rules__game-trial-viewport {
    flex: 1;
    min-height: 0;
    position: relative;
    width: 100%;
  }
  .page-game-rules__game-trial-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
  }
  .page-game-rules__hero-jackpot-claim {
    background: #c62828 !important;
    color: #fff !important;
  }
}

@media (max-width: 768px) {
  .page-game-rules__container {
    padding: 15px;
  }

  .page-game-rules__hero-section {
    padding-top: 10px;
    padding-bottom: 40px;
  }

  .page-game-rules__main-title {
    font-size: 28px;
  }

  .page-game-rules__description {
    font-size: 15px;
  }

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

  .page-game-rules__btn-primary,
  .page-game-rules__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
  }

  .page-game-rules__image-content-block {
    flex-direction: column;
    gap: 20px;
  }

  .page-game-rules__content-image,
  .page-game-rules__text-block {
    max-width: 100%;
  }

  .page-game-rules__section-title {
    font-size: 26px;
    margin-bottom: 25px;
  }

  .page-game-rules__sub-title {
    font-size: 20px;
  }

  .page-game-rules__paragraph,
  .page-game-rules__list-item,
  .page-game-rules__card-text {
    font-size: 15px;
  }

  .page-game-rules__content-grid {
    grid-template-columns: 1fr;
  }

  details.page-game-rules__faq-item summary.page-game-rules__faq-question {
    padding: 15px;
  }
  .page-game-rules__faq-qtext {
    font-size: 16px;
  }
  .page-game-rules__faq-toggle {
    font-size: 24px;
    width: 24px;
  }
  details.page-game-rules__faq-item .page-game-rules__faq-answer {
    padding: 0 15px 15px;
  }

  /* Mobile specific image adaptation */
  .page-game-rules img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-game-rules__section,
  .page-game-rules__card,
  .page-game-rules__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  /* Button specific mobile adaptation */
  .page-game-rules__cta-button,
  .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__cta-buttons {
    flex-direction: column;
  }
}

/* Homepage trial specific CSS (as required by prompt, even if not for this page) */
.page-game-rules__game-trial-overlay{z-index:5;pointer-events:auto;}.page-game-rules__game-trial-overlay.is-hidden{display:none!important;pointer-events:none!important;}.page-game-rules__game-trial-start{z-index:6;pointer-events:auto;touch-action:manipulation;}.page-game-rules__game-trial-shell{border:1px solid rgba(212,175,55,.45);border-radius:10px;overflow:hidden;}.page-game-rules__reward-modal{position:fixed;inset:0;z-index:10000;}