/* style/game-rules.css */

/* Root variables for colors */
:root {
  --bj66-primary-color: #11A84E;
  --bj66-secondary-color: #22C768;
  --bj66-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --bj66-card-bg: #11271B;
  --bj66-background: #08160F;
  --bj66-text-main: #F2FFF6;
  --bj66-text-secondary: #A7D9B8;
  --bj66-border-color: #2E7A4E;
  --bj66-glow-color: #57E38D;
  --bj66-gold-color: #F2C14E;
  --bj66-divider-color: #1E3A2A;
  --bj66-deep-green: #0A4B2C;
}

.page-game-rules {
  background-color: var(--bj66-background);
  color: var(--bj66-text-main); /* Light text on dark background */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

.page-game-rules__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 60px;
  text-align: center;
  overflow: hidden;
}

.page-game-rules__hero-image-wrapper {
  width: 100%;
  max-height: 675px; /* Limit height for aesthetic */
  overflow: hidden;
  position: relative;
}

.page-game-rules__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.7); /* Slightly dim image for text readability */
}

.page-game-rules__hero-content-wrapper {
  position: relative;
  z-index: 10;
  padding: 20px;
  max-width: 900px;
  margin-top: -150px; /* Overlap slightly with image for design effect, but not text on image */
  background: rgba(8, 22, 15, 0.85); /* Semi-transparent background for text block */
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--bj66-border-color);
}

.page-game-rules__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  color: var(--bj66-gold-color);
  margin-bottom: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(242, 193, 78, 0.5);
}

.page-game-rules__hero-description {
  font-size: 1.1rem;
  color: var(--bj66-text-secondary);
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-game-rules__hero-cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-game-rules__section {
  padding: 60px 0;
  border-bottom: 1px solid var(--bj66-divider-color);
}

.page-game-rules__section:last-of-type {
  border-bottom: none;
}

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

.page-game-rules__section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: var(--bj66-gold-color);
  text-align: center;
  margin-bottom: 40px;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(242, 193, 78, 0.4);
}

.page-game-rules__text-block {
  font-size: 1rem;
  color: var(--bj66-text-main);
  margin-bottom: 20px;
  text-align: justify;
}

.page-game-rules__text-block a {
  color: var(--bj66-secondary-color);
  text-decoration: underline;
}

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

.page-game-rules__card {
  background-color: var(--bj66-card-bg);
  border: 1px solid var(--bj66-border-color);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  color: var(--bj66-text-main);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-game-rules__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 15px var(--bj66-glow-color);
}

.page-game-rules__card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid var(--bj66-border-color);
}

.page-game-rules__card-title {
  font-size: 1.5rem;
  color: var(--bj66-gold-color);
  margin-bottom: 15px;
  font-weight: 600;
}

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

.page-game-rules__list li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 10px;
  color: var(--bj66-text-secondary);
}

.page-game-rules__list li::before {
  content: '✔';
  position: absolute;
  left: 0;
  color: var(--bj66-secondary-color);
  font-weight: bold;
}

.page-game-rules__game-type-block {
  background-color: var(--bj66-card-bg);
  border: 1px solid var(--bj66-border-color);
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.page-game-rules__game-type-title {
  font-size: 2rem;
  color: var(--bj66-gold-color);
  margin-bottom: 25px;
  text-align: center;
  font-weight: 700;
}

.page-game-rules__game-image {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 25px;
  border: 1px solid var(--bj66-border-color);
}

/* Policy section specific styles */
.page-game-rules__policy-section .page-game-rules__card {
  margin-bottom: 20px;
  background-color: var(--bj66-deep-green);
  border-color: var(--bj66-secondary-color);
}

.page-game-rules__policy-section .page-game-rules__card:last-child {
  margin-bottom: 0;
}

.page-game-rules__policy-section .page-game-rules__card-title {
  color: var(--bj66-text-main);
}

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

.page-game-rules__faq-item {
  background-color: var(--bj66-card-bg);
  border: 1px solid var(--bj66-border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--bj66-text-main);
  background-color: var(--bj66-deep-green);
  border-bottom: 1px solid var(--bj66-divider-color);
}

.page-game-rules__faq-item[open] .page-game-rules__faq-question {
  border-bottom: 1px solid var(--bj66-secondary-color);
}

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

.page-game-rules__faq-toggle {
  font-size: 1.8rem;
  line-height: 1;
  margin-left: 15px;
  color: var(--bj66-secondary-color);
  transition: transform 0.3s ease;
}

.page-game-rules__faq-item[open] .page-game-rules__faq-toggle {
  transform: rotate(45deg);
}

.page-game-rules__faq-answer {
  padding: 20px 25px;
  font-size: 1rem;
  color: var(--bj66-text-secondary);
  background-color: rgba(17, 39, 27, 0.8);
}

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

.page-game-rules__faq-cta {
  margin-top: 40px;
}

/* Buttons */
.page-game-rules__btn-primary,
.page-game-rules__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
}

.page-game-rules__btn-primary {
  background: var(--bj66-button-gradient);
  color: #ffffff;
  box-shadow: 0 5px 15px rgba(42, 209, 111, 0.4);
}

.page-game-rules__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  box-shadow: 0 8px 20px rgba(42, 209, 111, 0.6);
  transform: translateY(-2px);
}

.page-game-rules__btn-secondary {
  background-color: transparent;
  color: var(--bj66-secondary-color);
  border: 2px solid var(--bj66-secondary-color);
}

.page-game-rules__btn-secondary:hover {
  background-color: var(--bj66-secondary-color);
  color: var(--bj66-background);
  box-shadow: 0 5px 15px rgba(34, 199, 104, 0.4);
  transform: translateY(-2px);
}

.page-game-rules__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* General image responsiveness */
.page-game-rules img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Media Queries for Responsiveness */
@media (max-width: 1024px) {
  .page-game-rules__hero-content-wrapper {
    margin-top: -100px;
  }
  .page-game-rules__main-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }
  .page-game-rules__section-title {
    font-size: clamp(1.6rem, 4vw, 2.5rem);
  }
  .page-game-rules__card-title {
    font-size: 1.3rem;
  }
  .page-game-rules__game-type-title {
    font-size: 1.8rem;
  }
  .page-game-rules__faq-question {
    font-size: 1.05rem;
    padding: 18px 20px;
  }
}

@media (max-width: 768px) {
  .page-game-rules {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-game-rules__hero-content-wrapper {
    margin-top: -80px;
    padding: 15px;
    border-radius: 8px;
  }
  .page-game-rules__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }
  .page-game-rules__hero-description {
    font-size: 1rem;
  }
  .page-game-rules__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-game-rules__btn-primary,
  .page-game-rules__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1rem;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-game-rules__section {
    padding: 40px 0;
  }
  .page-game-rules__container {
    padding: 0 15px;
  }
  .page-game-rules__content-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-game-rules__card {
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  .page-game-rules__game-type-block {
    padding: 30px;
    margin-bottom: 30px;
  }
  .page-game-rules__faq-question {
    font-size: 1rem;
    padding: 15px 18px;
  }
  .page-game-rules__faq-answer {
    padding: 15px 18px;
  }
  
  /* Mobile specific image handling */
  .page-game-rules img {
    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-image-wrapper,
  .page-game-rules__hero-content-wrapper,
  .page-game-rules__game-type-block,
  .page-game-rules__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Prevent horizontal scroll */
  }

  .page-game-rules__hero-section {
    padding-top: 10px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .page-game-rules__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 10px;
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 480px) {
  .page-game-rules__hero-content-wrapper {
    margin-top: -60px;
  }
  .page-game-rules__main-title {
    font-size: clamp(1.5rem, 7vw, 2.2rem);
  }
  .page-game-rules__section-title {
    font-size: clamp(1.4rem, 6vw, 2rem);
  }
  .page-game-rules__card-title {
    font-size: 1.2rem;
  }
  .page-game-rules__game-type-title {
    font-size: 1.6rem;
  }
  .page-game-rules__faq-question {
    font-size: 0.95rem;
    padding: 12px 15px;
  }
  .page-game-rules__faq-answer {
    padding: 12px 15px;
  }
}