/* style/game-rules.css */
.page-game-rules {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: var(--bg-color, #ffffff); /* Fallback to white if --bg-color not set */
}

.page-game-rules__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top spacing, body handles main header offset */
  text-align: center;
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background-color: #26A9E0;
}

.page-game-rules__hero-image-wrapper {
  width: 100%;
  max-width: 1920px; /* Max width for the image */
  margin-bottom: 30px;
}

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

.page-game-rules__hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.page-game-rules__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-game-rules__description {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #f0f0f0;
}

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

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

.page-game-rules__btn-primary {
  background-color: #EA7C07; /* Custom color for login/register */
  color: #ffffff;
  border: 2px solid #EA7C07;
}

.page-game-rules__btn-primary:hover {
  background-color: #cc6a06;
  border-color: #cc6a06;
}

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

.page-game-rules__btn-secondary:hover {
  background-color: #e0f2f7;
}

.page-game-rules__btn-small {
  padding: 8px 15px;
  font-size: 0.9rem;
}

.page-game-rules__section {
  padding: 50px 0;
}

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

.page-game-rules__section-title {
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: #26A9E0;
}

.page-game-rules__sub-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-top: 30px;
  margin-bottom: 20px;
  color: #26A9E0;
}

.page-game-rules__heading-four {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 25px;
  margin-bottom: 15px;
  color: #333333;
}

.page-game-rules__text-block {
  margin-bottom: 15px;
  color: #333333;
}

.page-game-rules__list {
  list-style-type: disc;
  margin-left: 25px;
  margin-bottom: 20px;
  color: #333333;
}

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

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

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

.page-game-rules__grid-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

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

.page-game-rules__image--full-width {
  margin-bottom: 20px;
}

.page-game-rules__game-category {
  margin-bottom: 50px;
  padding-bottom: 30px;
  border-bottom: 1px dashed #e0e0e0;
}

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

.page-game-rules__responsibility-section {
  background-color: #f8f8f8;
}

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

.page-game-rules__dark-section .page-game-rules__section-title,
.page-game-rules__dark-section .page-game-rules__text-block,
.page-game-rules__dark-section .page-game-rules__list li {
  color: #ffffff;
}

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

.page-game-rules__faq-section {
  background-color: #f8f8f8;
}

.page-game-rules__faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.page-game-rules__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.page-game-rules__faq-item summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-weight: bold;
  cursor: pointer;
  color: #26A9E0;
  font-size: 1.1rem;
}

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

.page-game-rules__faq-qtext {
  flex-grow: 1;
}

.page-game-rules__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
}

.page-game-rules__faq-answer {
  padding: 0 25px 20px;
  color: #555555;
}

.page-game-rules__faq-answer p {
  margin-bottom: 10px;
}

.page-game-rules__faq-answer .page-game-rules__btn-primary {
  margin-top: 10px;
}

.page-game-rules__conclusion-section {
  text-align: center;
  padding: 80px 20px;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .page-game-rules__main-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }

  .page-game-rules__section-title {
    font-size: 2rem;
  }

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

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

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

  .page-game-rules__grid-item:first-child {
    order: 2; /* Reverse order for image on mobile */
  }
  .page-game-rules__grid-item:last-child {
    order: 1;
  }
}

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

  .page-game-rules__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
  }

  .page-game-rules__hero-image-wrapper {
    margin-bottom: 20px;
  }

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

  .page-game-rules__description {
    font-size: 1rem;
    margin-bottom: 20px;
  }

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

  .page-game-rules__btn-primary,
  .page-game-rules__btn-secondary {
    width: 100% !important;
    max-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__section {
    padding: 30px 0;
  }

  .page-game-rules__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-game-rules__section-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
  }

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

  .page-game-rules__heading-four {
    font-size: 1.2rem;
  }

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

  .page-game-rules__grid-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px;
  }
  
  .page-game-rules__faq-item summary {
    padding: 15px 20px;
    font-size: 1rem;
  }

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