/* style/game-rules.css */

/* Base styles for the page */
.page-game-rules {
  color: #1F2D3D; /* Text Main */
  background-color: #F4F7FB; /* Background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

/* Hero Section */
.page-game-rules__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  text-align: center;
  background-color: #F4F7FB; /* Light background */
  color: #1F2D3D; /* Dark text */
}

.page-game-rules__hero-image-wrapper {
  width: 100%;
  max-width: 1200px;
  margin-bottom: 30px;
}

.page-game-rules__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-game-rules__hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.page-game-rules__main-title {
  font-size: clamp(2em, 4vw, 2.8em); /* Responsive font size for H1 */
  font-weight: 700;
  color: #2F6BFF; /* Main Color */
  margin-bottom: 20px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-game-rules__description {
  font-size: 1.1em;
  color: #1F2D3D; /* Text Main */
  margin-bottom: 30px;
}

/* CTA Button */
.page-game-rules__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  cursor: pointer;
  box-sizing: border-box;
}

.page-game-rules__btn-primary {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Button Gradient */
  color: #FFFFFF; /* White text for contrast */
  border: none;
  box-shadow: 0 4px 15px rgba(47, 107, 255, 0.3);
}

.page-game-rules__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(47, 107, 255, 0.4);
}

.page-game-rules__btn-secondary {
  background: #FFFFFF; /* Card BG */
  color: #2F6BFF; /* Main Color */
  border: 2px solid #2F6BFF; /* Main Color */
}

.page-game-rules__btn-secondary:hover {
  background: #2F6BFF; /* Main Color */
  color: #FFFFFF; /* White text */
  transform: translateY(-2px);
}

/* Content Area */
.page-game-rules__content-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  background-color: #F4F7FB; /* Background */
  color: #1F2D3D; /* Text Main */
}

.page-game-rules__section-title {
  font-size: 2.2em;
  font-weight: 700;
  color: #2F6BFF; /* Main Color */
  margin-bottom: 30px;
  text-align: center;
}

.page-game-rules__sub-title {
  font-size: 1.8em;
  font-weight: 600;
  color: #2F6BFF; /* Main Color */
  margin-top: 40px;
  margin-bottom: 20px;
}

.page-game-rules__text-block {
  font-size: 1em;
  margin-bottom: 20px;
  line-height: 1.7;
}

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

.page-game-rules__card {
  background-color: #FFFFFF; /* Card BG */
  border: 1px solid #D6E2FF; /* Border */
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  color: #1F2D3D; /* Text Main */
}

.page-game-rules__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

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

.page-game-rules__card-title {
  font-size: 1.5em;
  font-weight: 600;
  color: #2F6BFF; /* Main Color */
  margin-bottom: 15px;
}

.page-game-rules__list {
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-game-rules__list li {
  margin-bottom: 8px;
  font-size: 0.95em;
}

.page-game-rules__button-link {
  display: inline-block;
  margin-top: auto; /* Push to bottom */
  padding: 10px 20px;
  background-color: #6FA3FF; /* Auxiliary Color */
  color: #FFFFFF;
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.9em;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.page-game-rules__button-link:hover {
  background-color: #2F6BFF; /* Main Color */
}

/* Terminology List */
.page-game-rules__terminology-list {
  list-style: none;
  padding: 0;
  margin-top: 30px;
}

.page-game-rules__terminology-list li {
  background-color: #FFFFFF; /* Card BG */
  border: 1px solid #D6E2FF; /* Border */
  border-left: 5px solid #2F6BFF; /* Main Color for accent */
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 15px;
  font-size: 1em;
  line-height: 1.6;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.page-game-rules__terminology-list li strong {
  color: #2F6BFF; /* Main Color */
  font-size: 1.1em;
}

/* Responsible Gaming Grid */
.page-game-rules__responsible-gaming-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-game-rules__responsible-gaming-grid .page-game-rules__card {
  text-align: center;
}

.page-game-rules__responsible-gaming-grid .page-game-rules__card-image {
  height: 250px;
  object-fit: contain; /* Ensure full image is visible */
}

.page-game-rules__link {
  color: #2F6BFF; /* Main Color */
  text-decoration: underline;
  font-weight: 600;
}

.page-game-rules__link:hover {
  color: #6FA3FF; /* Auxiliary Color */
}

/* FAQ Section */
.page-game-rules__faq-list {
  margin-top: 30px;
}

.page-game-rules__faq-item {
  background-color: #FFFFFF; /* Card BG */
  border: 1px solid #D6E2FF; /* Border */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1em;
  font-weight: 600;
  color: #2F6BFF; /* Main Color */
  cursor: pointer;
  background-color: #F4F7FB; /* Background slightly lighter */
  border-bottom: 1px solid #D6E2FF;
}

.page-game-rules__faq-item[open] .page-game-rules__faq-question {
  border-bottom: 1px solid #D6E2FF;
}

.page-game-rules__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: #2F6BFF;
  margin-left: 15px;
}

.page-game-rules__faq-item[open] .page-game-rules__faq-toggle {
  content: '−';
}

.page-game-rules__faq-answer {
  padding: 15px 25px 20px;
  font-size: 1em;
  color: #1F2D3D; /* Text Main */
  line-height: 1.6;
}

/* For details tag, hide default marker */
.page-game-rules__faq-item summary {
  list-style: none;
}

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

/* CTA Section at the bottom */
.page-game-rules__cta-section {
  background-color: #2F6BFF; /* Main Color */
  color: #FFFFFF; /* White text for contrast */
  padding: 60px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.page-game-rules__cta-content {
  max-width: 800px;
}

.page-game-rules__cta-title {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-game-rules__cta-description {
  font-size: 1.1em;
  margin-bottom: 40px;
}

.page-game-rules__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-game-rules__cta-image-wrapper {
  max-width: 600px;
  width: 100%;
}

.page-game-rules__cta-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-game-rules__game-category-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-game-rules__hero-section,
  .page-game-rules__content-area,
  .page-game-rules__cta-section {
    padding-left: 15px;
    padding-right: 15px;
  }

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

  .page-game-rules__section-title {
    font-size: 1.8em;
  }

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

  .page-game-rules__game-category-grid,
  .page-game-rules__responsible-gaming-grid {
    grid-template-columns: 1fr;
  }

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

  .page-game-rules__card,
  .page-game-rules__container,
  .page-game-rules__hero-image-wrapper,
  .page-game-rules__cta-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-game-rules__hero-section {
    padding-top: 10px !important; /* body handles --header-offset, this is for visual spacing */
  }

  .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: 0;
    padding-right: 0;
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 15px;
  }

  .page-game-rules__cta-title {
    font-size: 2em;
  }
}

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

  .page-game-rules__section-title {
    font-size: 1.6em;
  }

  .page-game-rules__sub-title {
    font-size: 1.3em;
  }

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

  .page-game-rules__content-area,
  .page-game-rules__cta-section {
    padding: 30px 10px;
  }

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

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

  .page-game-rules__cta-title {
    font-size: 1.8em;
  }
}