/* style/game-rules.css */
.page-game-rules {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #F2FFF6; /* Main text color for dark body background */
  background-color: transparent; /* Body background from shared.css */
}

/* Hero Section */
.page-game-rules__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding */
  padding-bottom: 40px;
  box-sizing: border-box;
}

.page-game-rules__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.page-game-rules__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 500px; /* Limit height on desktop */
}

.page-game-rules__hero-content {
  text-align: center;
  padding: 20px;
  max-width: 900px;
  margin-top: 20px;
  background-color: #11271B; /* Card background color */
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

.page-game-rules__main-title {
  font-size: clamp(28px, 4vw, 48px); /* Responsive font size */
  color: #F2C14E; /* Gold color for main title */
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.2;
}

.page-game-rules__hero-description {
  font-size: clamp(16px, 2vw, 20px);
  color: #A7D9B8; /* Secondary text color */
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* General Section Styling */
.page-game-rules__section {
  padding: 40px 20px;
  margin-bottom: 20px;
  background-color: #08160F; /* Background color */
  box-sizing: border-box;
}

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

.page-game-rules__section-title {
  font-size: clamp(24px, 3.5vw, 36px);
  color: #F2FFF6; /* Main text color */
  text-align: center;
  margin-bottom: 30px;
  font-weight: bold;
}

.page-game-rules__sub-title {
  font-size: clamp(20px, 2.5vw, 28px);
  color: #F2FFF6; /* Main text color */
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-game-rules__text-block {
  font-size: 17px;
  color: #F2FFF6; /* Main text color */
  margin-bottom: 20px;
  text-align: justify;
}

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

.page-game-rules__card {
  background-color: #11271B; /* Card background color */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  color: #F2FFF6; /* Main text color */
  border: 1px solid #2E7A4E; /* Border color */
}

.page-game-rules__card-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-game-rules__card-title {
  font-size: 22px;
  color: #F2C14E; /* Gold color for card titles */
  margin: 20px 20px 10px 20px;
  font-weight: bold;
}

.page-game-rules__card-text {
  font-size: 16px;
  color: #A7D9B8; /* Secondary text color */
  padding: 0 20px 20px 20px;
  text-align: justify;
}

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

.page-game-rules__list-item {
  background-color: #11271B; /* Card background color */
  border-radius: 8px;
  margin-bottom: 15px;
  padding: 20px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  border: 1px solid #2E7A4E; /* Border color */
}

.page-game-rules__list-title {
  font-size: 20px;
  color: #F2C14E; /* Gold color for list titles */
  margin-bottom: 10px;
  font-weight: bold;
}

.page-game-rules__list-text {
  font-size: 16px;
  color: #A7D9B8; /* Secondary text color */
  text-align: justify;
}

/* Images within content */
.page-game-rules__image {
  width: 100%;
  height: auto;
  display: block;
  margin: 30px auto;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  max-width: 800px; /* Max width for content images */
}

/* Video Section */
.page-game-rules__video-section {
  padding: 40px 20px;
  background-color: #0A4B2C; /* Deep Green background for video */
  margin-bottom: 20px;
  box-sizing: border-box;
}

.page-game-rules__video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: 30px auto;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  background-color: #0A4B2C; /* Deep Green background */
}

.page-game-rules__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block; /* Ensure it's a block element */
  cursor: pointer; /* Indicate it's clickable */
}

.page-game-rules__text-block--center {
  text-align: center;
}

.page-game-rules__text-link {
  color: #57E38D; /* Glow color for links */
  text-decoration: underline;
  font-weight: bold;
}
.page-game-rules__text-link:hover {
  color: #F2C14E; /* Gold color on hover */
}

/* CTA Button */
.page-game-rules__cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button gradient */
  color: #ffffff; /* White text for buttons */
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  max-width: 100%; /* Ensure responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

.page-game-rules__cta-button--large {
  padding: 18px 40px;
  font-size: 20px;
}

.page-game-rules__cta-wrapper {
  text-align: center;
  margin-top: 40px;
}

/* FAQ Section */
.page-game-rules__faq-section {
  padding: 40px 20px;
  background-color: #0A4B2C; /* Deep Green background for FAQ */
  margin-bottom: 20px;
  box-sizing: border-box;
}

.page-game-rules__faq-list {
  margin-top: 30px;
}

.page-game-rules__faq-item {
  background-color: #11271B; /* Card background color */
  border: 1px solid #2E7A4E; /* Border color */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #F2FFF6; /* Main text color */
}

.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  font-size: 18px;
  font-weight: bold;
  color: #F2C14E; /* Gold color for FAQ questions */
  cursor: pointer;
  background-color: #11271B; /* Card background color */
  transition: background-color 0.3s ease;
}

.page-game-rules__faq-question:hover {
  background-color: #1E3A2A; /* Slightly lighter dark green on hover */
}

.page-game-rules__faq-toggle {
  font-size: 24px;
  line-height: 1;
  margin-left: 15px;
  color: #57E38D; /* Glow color for toggle */
}

.page-game-rules__faq-item[open] .page-game-rules__faq-toggle {
  transform: rotate(0deg); /* No rotation for plus/minus */
}

.page-game-rules__faq-answer {
  padding: 0 20px 20px 20px;
  font-size: 16px;
  color: #A7D9B8; /* Secondary text color */
  text-align: justify;
}

.page-game-rules__faq-item details > summary {
    list-style: none; /* Remove default marker for details summary */
}
.page-game-rules__faq-item details > summary::-webkit-details-marker {
    display: none; /* Remove default marker for webkit browsers */
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-game-rules__hero-image {
    max-height: 400px;
  }
}

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

  .page-game-rules__hero-section {
    padding-bottom: 30px;
  }

  .page-game-rules__hero-content {
    margin-top: 15px;
    padding: 15px;
  }

  .page-game-rules__main-title {
    font-size: clamp(24px, 6vw, 36px);
  }

  .page-game-rules__hero-description {
    font-size: clamp(15px, 3vw, 18px);
    margin-bottom: 20px;
  }

  .page-game-rules__section-title {
    font-size: clamp(22px, 5vw, 30px);
    margin-bottom: 25px;
  }

  .page-game-rules__sub-title {
    font-size: clamp(18px, 4vw, 24px);
  }

  .page-game-rules__text-block,
  .page-game-rules__card-text,
  .page-game-rules__list-text,
  .page-game-rules__faq-answer p {
    font-size: 15px;
  }

  .page-game-rules__card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-game-rules__card-image {
    height: 200px;
  }

  .page-game-rules__card-title {
    font-size: 20px;
    margin: 15px 15px 8px 15px;
  }
  .page-game-rules__card-text {
    padding: 0 15px 15px 15px;
  }

  .page-game-rules__list-item {
    padding: 15px;
  }

  .page-game-rules__list-title {
    font-size: 18px;
  }

  .page-game-rules__faq-question {
    padding: 15px;
    font-size: 16px;
  }

  .page-game-rules__faq-answer {
    padding: 0 15px 15px 15px;
  }
  
  /* Mobile image, video, and button responsiveness */
  .page-game-rules img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-game-rules video,
  .page-game-rules__video {
    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__hero-section,
  .page-game-rules__hero-image-wrapper,
  .page-game-rules__hero-content,
  .page-game-rules__video-section,
  .page-game-rules__video-container,
  .page-game-rules__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no overflow */
  }
  
  .page-game-rules__video-section {
    padding-top: 10px !important; /* body already handles header offset */
  }

  .page-game-rules__video-wrapper {
    padding-bottom: 56.25% !important; /* Maintain aspect ratio */
    width: calc(100% - 30px) !important; /* Account for container padding */
    margin-left: 15px !important;
    margin-right: 15px !important;
  }

  .page-game-rules__cta-button,
  .page-game-rules__btn-primary,
  .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-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
  .page-game-rules__cta-button {
    width: calc(100% - 30px); /* Account for container padding */
  }
}