/* style/game-rules.css */

/* Base styles for the page content */
.page-game-rules {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default dark text for light body background */
  background-color: #ffffff; /* Explicitly set for content area */
}

/* Hero Section */
.page-game-rules__hero-section {
  position: relative;
  width: 100%;
  height: 500px; /* Adjust height as needed */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  overflow: hidden;
  padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

.page-game-rules__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.page-game-rules__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
  z-index: 2;
}

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

.page-game-rules__main-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
}

.page-game-rules__intro-text {
  font-size: 1.3em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

/* General Section Styling */
.page-game-rules__section {
  padding: 60px 20px;
  text-align: center;
}

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

.page-game-rules__dark-bg {
  background-color: #26A9E0; /* Brand primary color */
  color: #ffffff;
}

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

.page-game-rules__section-title {
  font-size: 2.5em;
  margin-bottom: 30px;
  font-weight: bold;
  color: inherit; /* Inherit color from section background */
}

.page-game-rules__paragraph {
  font-size: 1.1em;
  margin-bottom: 20px;
  line-height: 1.8;
  text-align: left;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-game-rules__paragraph a {
  color: #EA7C07; /* Login color for links in text */
  text-decoration: underline;
}

.page-game-rules__paragraph a:hover {
  color: #c96706;
}

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

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

.page-game-rules__card {
  background-color: #ffffff;
  color: #333333;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  text-align: left;
  transition: transform 0.3s ease;
}

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

.page-game-rules__card-title {
  font-size: 1.6em;
  color: #26A9E0; /* Brand primary color */
  margin-bottom: 15px;
  font-weight: bold;
}

.page-game-rules__card-text {
  font-size: 1em;
  line-height: 1.7;
}

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

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

.page-game-rules__game-card {
  background-color: #ffffff;
  color: #333333;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  text-align: left;
  transition: transform 0.3s ease;
}

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

.page-game-rules__game-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-game-rules__game-title {
  font-size: 1.8em;
  color: #26A9E0;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-game-rules__game-list {
  list-style-type: disc;
  padding-left: 20px;
  font-size: 1em;
  line-height: 1.7;
}

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

.page-game-rules__game-list li a {
  color: #EA7C07;
  text-decoration: underline;
}

/* Buttons */
.page-game-rules__button-group {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-game-rules__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 50px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
  text-align: center;
  max-width: 100%; /* Ensure button doesn't overflow */
  box-sizing: border-box;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word;
}

.page-game-rules__btn-primary {
  background-color: #EA7C07; /* Login color for primary action */
  color: #ffffff;
}

.page-game-rules__btn-primary:hover {
  background-color: #c96706;
  transform: translateY(-2px);
}

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

.page-game-rules__btn-secondary:hover {
  background-color: #26A9E0;
  color: #ffffff;
  transform: translateY(-2px);
}

/* Ordered List */
.page-game-rules__ordered-list {
  list-style-type: decimal;
  padding-left: 30px;
  font-size: 1.1em;
  line-height: 1.8;
  text-align: left;
  max-width: 900px;
  margin: 30px auto;
}

.page-game-rules__ordered-list li {
  margin-bottom: 15px;
}

.page-game-rules__ordered-list li strong {
  color: #26A9E0;
}

.page-game-rules__ordered-list li a {
  color: #EA7C07;
  text-decoration: underline;
}

/* Conclusion Section */
.page-game-rules__conclusion {
  padding-bottom: 60px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-game-rules__main-title {
    font-size: 2.8em;
  }
  .page-game-rules__intro-text {
    font-size: 1.2em;
  }
  .page-game-rules__section-title {
    font-size: 2em;
  }
  .page-game-rules__card-title,
  .page-game-rules__game-title {
    font-size: 1.4em;
  }
  .page-game-rules__card,
  .page-game-rules__game-card {
    padding: 25px;
  }
}

@media (max-width: 768px) {
  .page-game-rules__hero-section {
    height: 400px;
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile hero content is not hidden */
  }
  .page-game-rules__main-title {
    font-size: 2em;
    margin-bottom: 15px;
  }
  .page-game-rules__intro-text {
    font-size: 1em;
    margin-bottom: 20px;
  }
  .page-game-rules__section {
    padding: 40px 15px;
  }
  .page-game-rules__section-title {
    font-size: 1.8em;
    margin-bottom: 25px;
  }
  .page-game-rules__paragraph {
    font-size: 0.95em;
    text-align: justify;
  }
  .page-game-rules__cta-button {
    padding: 12px 25px;
    font-size: 1em;
    width: 100% !important; /* Force full width on mobile */
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-game-rules__button-group {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    padding: 0 15px; /* Add padding to button group */
  }
  .page-game-rules__rule-cards,
  .page-game-rules__promo-cards,
  .page-game-rules__game-rules-grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
  }
  .page-game-rules__card,
  .page-game-rules__game-card {
    padding: 20px;
  }
  .page-game-rules__game-image {
    height: 180px; /* Slightly smaller image height */
  }
  .page-game-rules__ordered-list {
    padding-left: 20px;
    font-size: 1em;
  }

  /* Force responsive images and containers on mobile */
  .page-game-rules img {
    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__rule-cards,
  .page-game-rules__promo-cards,
  .page-game-rules__game-rules-grid,
  .page-game-rules__game-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* Add horizontal padding to main content containers to prevent overflow */
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no horizontal scroll */
  }

  /* Specific override for hero section content padding, as it's centered */
  .page-game-rules__hero-content {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Content area paragraph alignment for mobile */
  .page-game-rules__paragraph {
    text-align: left; /* Or justify if preferred for longer blocks */
  }
}

/* Ensure images in content area are not too small */
.page-game-rules__content-area img,
.page-game-rules__game-card img {
  min-width: 200px;
  min-height: 200px;
}

/* Ensure text color contrast for dark-bg sections */
.page-game-rules__dark-bg h2,
.page-game-rules__dark-bg p,
.page-game-rules__dark-bg li,
.page-game-rules__dark-bg a {
    color: #ffffff;
}

/* Override default link color for dark background for better contrast */
.page-game-rules__dark-bg a {
    color: #f0f0f0; /* Slightly off-white for links */
    text-decoration: underline;
}
.page-game-rules__dark-bg a:hover {
    color: #ffffff;
}

/* Ensure card links on dark background also have good contrast */
.page-game-rules__dark-bg .page-game-rules__card a {
    color: #EA7C07; /* Use login color for CTA in cards */
}
.page-game-rules__dark-bg .page-game-rules__card a:hover {
    color: #c96706;
}

/* Ensure text color for cards on light background */
.page-game-rules__light-bg .page-game-rules__card {
  color: #333333;
}
.page-game-rules__light-bg .page-game-rules__card-title {
  color: #26A9E0;
}
.page-game-rules__light-bg .page-game-rules__card-text a {
  color: #EA7C07;
}

/* Ensure text color for game cards on light background */
.page-game-rules__light-bg .page-game-rules__game-card {
  color: #333333;
}
.page-game-rules__light-bg .page-game-rules__game-title {
  color: #26A9E0;
}
.page-game-rules__light-bg .page-game-rules__game-list li a {
  color: #EA7C07;
}