.page-game-rules {
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background-color: var(--background); /* #F4F7FB */
  color: var(--text-main); /* #1F2D3D */
}

.page-game-rules__hero-section {
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
  background-color: var(--primary-color); /* #2F6BFF */
  padding-bottom: 20px; /* Space below content */
}

.page-game-rules__hero-image-wrapper {
  width: 100%;
  max-height: 500px; /* Limit hero image height */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-game-rules__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-height: 200px; /* Ensure image is not too small */
}

.page-game-rules__hero-content {
  text-align: center;
  max-width: 900px;
  margin: 20px auto 0 auto;
  padding: 0 20px;
  color: var(--card-bg); /* White text on hero */
}

.page-game-rules__main-title {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--card-bg); /* White */
  max-width: 100%; /* Use max-width to control size rather than font-size */
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-game-rules__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: var(--card-bg); /* White */
}

.page-game-rules__cta-button {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  background: var(--button-gradient); /* linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%) */
  color: var(--card-bg); /* White */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  min-width: 200px; /* Ensure button is not too small */
  text-align: center;
  border: none;
  cursor: pointer;
}

.page-game-rules__cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-game-rules__section {
  padding: 40px 0;
  margin-bottom: 20px;
}

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

.page-game-rules__container--flex {
  display: flex;
  gap: 40px;
  align-items: center;
}

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

.page-game-rules__image-block {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-game-rules__image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  min-width: 200px; /* Minimum size for content images */
  min-height: 200px;
  object-fit: cover;
}

.page-game-rules__section-title {
  font-size: 2.2em;
  font-weight: 700;
  color: var(--custom-color-1776249996415); /* #000000 */
  margin-bottom: 25px;
  text-align: center;
  line-height: 1.3;
}

.page-game-rules__introduction-section .page-game-rules__section-title,
.page-game-rules__cta-final-section .page-game-rules__section-title {
  color: var(--text-main); /* #1F2D3D */
}

.page-game-rules__paragraph {
  font-size: 1.05em;
  line-height: 1.7;
  margin-bottom: 20px;
  color: var(--text-main); /* #1F2D3D */
}

.page-game-rules__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-game-rules__list-item {
  background-color: var(--card-bg); /* #FFFFFF */
  border-left: 5px solid var(--primary-color); /* #2F6BFF */
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.page-game-rules__list-item:hover {
  transform: translateY(-3px);
}

.page-game-rules__list-title {
  font-size: 1.3em;
  font-weight: 700;
  color: var(--primary-color); /* #2F6BFF */
  margin-top: 0;
  margin-bottom: 10px;
}

.page-game-rules__list-description {
  font-size: 1em;
  line-height: 1.6;
  color: var(--text-main); /* #1F2D3D */
}

.page-game-rules__game-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.page-game-rules__game-card {
  background-color: var(--card-bg); /* #FFFFFF */
  border: 1px solid var(--border-color); /* #D6E2FF */
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-game-rules__game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.page-game-rules__game-card-title {
  font-size: 1.4em;
  font-weight: 700;
  color: var(--primary-color); /* #2F6BFF */
  margin-top: 0;
  margin-bottom: 15px;
}

.page-game-rules__game-card-description {
  font-size: 0.95em;
  line-height: 1.6;
  color: var(--text-main); /* #1F2D3D */
  margin-bottom: 25px;
  flex-grow: 1;
}

.page-game-rules__game-card-link {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  background-color: var(--auxiliary-color); /* #6FA3FF */
  color: var(--card-bg); /* White */
  transition: background-color 0.3s ease;
  border: none;
}

.page-game-rules__game-card-link:hover {
  background-color: #4A8BFF; /* Slightly darker blue */
}

.page-game-rules__cta-button--secondary {
  background: var(--auxiliary-color); /* #6FA3FF */
  color: var(--card-bg); /* White */
  min-width: unset; /* Allow it to shrink */
  padding: 10px 25px;
}

.page-game-rules__cta-button--secondary:hover {
  background-color: #4A8BFF;
}

.page-game-rules__cta-final-section {
  text-align: center;
  padding: 60px 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--auxiliary-color) 100%);
  color: var(--card-bg); /* White */
  border-radius: 12px;
  margin: 40px auto;
  max-width: 1200px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.page-game-rules__cta-final-content {
  padding: 0 40px;
}

.page-game-rules__cta-final-section .page-game-rules__section-title {
  color: var(--card-bg); /* White */
  font-size: 2.5em;
  margin-bottom: 20px;
}

.page-game-rules__cta-final-section .page-game-rules__paragraph {
  color: var(--card-bg); /* White */
  max-width: 800px;
  margin: 0 auto 30px auto;
}

.page-game-rules__cta-button--large {
  padding: 15px 40px;
  font-size: 1.2em;
  border-radius: 10px;
  min-width: 250px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .page-game-rules__hero-image-wrapper {
    max-height: 400px;
  }
  .page-game-rules__main-title {
    font-size: 2.2em;
  }
  .page-game-rules__section-title {
    font-size: 1.8em;
  }
  .page-game-rules__container--flex {
    flex-direction: column;
  }
  .page-game-rules__container--reverse-on-mobile {
    flex-direction: column-reverse;
  }
  .page-game-rules__image-block {
    margin-bottom: 30px;
  }
}

@media (max-width: 768px) {
  .page-game-rules {
    padding-top: 5px; /* Adjust for mobile, body still handles header offset */
  }
  .page-game-rules__hero-image-wrapper {
    max-height: 300px;
  }
  .page-game-rules__hero-image {
    max-width: 100%;
    height: auto;
  }
  .page-game-rules__main-title {
    font-size: 1.8em;
  }
  .page-game-rules__description {
    font-size: 1em;
  }
  .page-game-rules__cta-button {
    padding: 10px 25px;
    font-size: 0.9em;
  }
  .page-game-rules__section {
    padding: 30px 0;
  }
  .page-game-rules__section-title {
    font-size: 1.6em;
    margin-bottom: 20px;
  }
  .page-game-rules__paragraph {
    font-size: 0.95em;
  }
  .page-game-rules__list-title {
    font-size: 1.2em;
  }
  .page-game-rules__list-description {
    font-size: 0.9em;
  }
  .page-game-rules__game-rules-grid {
    grid-template-columns: 1fr;
  }
  .page-game-rules__game-card {
    padding: 20px;
  }
  .page-game-rules__game-card-title {
    font-size: 1.3em;
  }
  .page-game-rules__cta-final-section .page-game-rules__section-title {
    font-size: 2em;
  }
  .page-game-rules__cta-button--large {
    padding: 12px 30px;
    font-size: 1.1em;
    min-width: unset;
  }
  /* Mobile image overflow prevention */
  .page-game-rules__container img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
  }
}

@media (max-width: 480px) {
  .page-game-rules__main-title {
    font-size: 1.5em;
  }
  .page-game-rules__section-title {
    font-size: 1.4em;
  }
  .page-game-rules__cta-final-section .page-game-rules__section-title {
    font-size: 1.8em;
  }
}