/* style/game-rules.css */

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

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

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

.page-game-rules__container--flex {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Hero Section */
.page-game-rules__hero-section {
  position: relative;
  padding: 10px 0 60px 0; /* Small top padding, more bottom padding */
  overflow: hidden;
  color: #ffffff;
  background-color: #26A9E0;
}

.page-game-rules__hero-image-wrapper {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
}

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

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

.page-game-rules__main-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  margin-bottom: 20px;
  font-size: clamp(2em, 4vw, 3.2em); /* Responsive font size */
}

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

/* Section Titles */
.page-game-rules__section-title {
  font-size: 2.2em;
  color: #26A9E0;
  margin-bottom: 40px;
  font-weight: bold;
  text-align: center;
}

.page-game-rules__dark-bg .page-game-rules__section-title {
  color: #FFFFFF;
}

/* Text Blocks */
.page-game-rules__text-block {
  font-size: 1.05em;
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #333333;
}

.page-game-rules__dark-bg .page-game-rules__text-block {
  color: #f0f0f0;
}

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

.page-game-rules__card {
  background: #ffffff;
  color: #333333;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: left;
  border: 1px solid #e0e0e0;
}

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

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

.page-game-rules__game-type-card {
  background: #f8f8f8;
  color: #333333;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #e5e5e5;
}

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

/* Images */
.page-game-rules__image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 40px;
}

.page-game-rules__image--centered {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.page-game-rules__btn-primary,
.page-game-rules__btn-secondary {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

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

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

.page-game-rules__btn-secondary:hover {
  background: #e0f4ff;
  color: #208ac7;
}

.page-game-rules__btn-primary--large,
.page-game-rules__btn-secondary--large {
  font-size: 1.1em;
  padding: 16px 32px;
}

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

/* Dark/Light Backgrounds */
.page-game-rules__dark-bg {
  background-color: #26A9E0;
  color: #ffffff;
}

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

/* FAQ Section */
.page-game-rules__faq-section {
  background-color: #26A9E0;
  color: #ffffff;
}

.page-game-rules__faq-list {
  max-width: 900px;
  margin: 40px auto 0 auto;
  text-align: left;
}

.page-game-rules__faq-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.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.5em;
  line-height: 1;
  margin-left: 15px;
}

.page-game-rules__faq-answer {
  padding: 0 25px 20px;
  font-size: 1em;
  color: #f0f0f0;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .page-game-rules__main-title {
    font-size: clamp(1.8em, 5vw, 2.8em);
  }

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

  .page-game-rules__card-grid,
  .page-game-rules__game-type-grid {
    grid-template-columns: 1fr;
  }
}

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

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

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

  /* Containers responsive */
  .page-game-rules__section,
  .page-game-rules__card,
  .page-game-rules__container,
  .page-game-rules__hero-image-wrapper,
  .page-game-rules__game-type-card,
  .page-game-rules__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Buttons responsive */
  .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 {
    flex-direction: column;
    gap: 15px;
  }

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

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

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

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

  .page-game-rules__hero-content {
    padding: 0 10px;
  }
  
  .page-game-rules p,
  .page-game-rules li {
    font-size: 16px;
    line-height: 1.6;
  }
}