/* style/game-rules.css */

/* Body padding-top handled by shared.css */

.page-game-rules {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main, #F2FFF6); /* Default text color for dark body background */
  background-color: var(--bg-color, #08160F); /* Consistent with custom background color */
}

.page-game-rules__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding as body handles header offset */
  background-color: var(--deep-green, #0A4B2C); /* Darker background for hero */
  overflow: hidden;
}

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

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

.page-game-rules__hero-content {
  width: 100%;
  max-width: 900px;
  text-align: center;
  color: var(--text-main, #F2FFF6);
  z-index: 1;
}

.page-game-rules__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-main, #F2FFF6);
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(87, 227, 141, 0.5);
}

.page-game-rules__description {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: var(--text-secondary, #A7D9B8);
}

.page-game-rules__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.page-game-rules__btn-primary,
.page-game-rules__btn-secondary {
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-game-rules__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-game-rules__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-game-rules__btn-secondary {
  background: transparent;
  color: var(--text-main, #F2FFF6);
  border: 2px solid var(--border, #2E7A4E);
}

.page-game-rules__btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--glow, #57E38D);
  border-color: var(--glow, #57E38D);
}

.page-game-rules__content-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

.page-game-rules__light-bg {
  background-color: #ffffff; /* Fallback for light sections */
  color: #333333; /* Dark text for light background */
}

.page-game-rules__dark-section {
  background-color: var(--card-b-g, #11271B);
  color: var(--text-main, #F2FFF6);
}

.page-game-rules__text-main {
  color: var(--text-main, #F2FFF6);
}

.page-game-rules__text-secondary {
  color: var(--text-secondary, #A7D9B8);
}

.page-game-rules__text-dark {
  color: #333333;
}

.page-game-rules__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.3;
}

.page-game-rules__text-block {
  font-size: 1.05rem;
  margin-bottom: 20px;
  text-align: justify;
}

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

.page-game-rules__card {
  background-color: var(--card-b-g, #11271B); /* Consistent with custom card background */
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  box-sizing: border-box;
}

.page-game-rules__card.page-game-rules__light-bg {
  background-color: #ffffff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.page-game-rules__card-image {
  width: 100%;
  max-width: 400px; /* Ensure images are not too wide in cards */
  height: auto;
  display: block;
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
}

.page-game-rules__card.page-game-rules__light-bg .page-game-rules__card-image {
  border: 1px solid #e0e0e0;
}

.page-game-rules__card-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-main, #F2FFF6);
}

.page-game-rules__card.page-game-rules__light-bg .page-game-rules__card-title {
  color: #333333;
}

.page-game-rules__list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  text-align: left;
  font-size: 1rem;
  flex-grow: 1;
}

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

.page-game-rules__card.page-game-rules__light-bg .page-game-rules__list li {
  color: #555555;
}

.page-game-rules__list li::before {
  content: '✔';
  color: var(--glow, #57E38D);
  position: absolute;
  left: 0;
  top: 0;
  font-weight: bold;
}

.page-game-rules__btn-link {
  display: inline-block;
  margin-top: auto; /* Push to bottom of card */
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  color: var(--glow, #57E38D);
  border: 1px solid var(--border, #2E7A4E);
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-game-rules__card.page-game-rules__light-bg .page-game-rules__btn-link {
  color: var(--deep-green, #0A4B2C);
  border-color: var(--deep-green, #0A4B2C);
}

.page-game-rules__btn-link:hover {
  background-color: var(--glow, #57E38D);
  color: #ffffff;
  border-color: var(--glow, #57E38D);
}

.page-game-rules__card.page-game-rules__light-bg .page-game-rules__btn-link:hover {
  background-color: var(--deep-green, #0A4B2C);
  color: #ffffff;
  border-color: var(--deep-green, #0A4B2C);
}

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

.page-game-rules__faq-item {
  background-color: var(--card-b-g, #11271B);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-game-rules__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-main, #F2FFF6);
  transition: background-color 0.3s ease;
  list-style: none; /* Hide default marker */
}

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

.page-game-rules__faq-item summary:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

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

.page-game-rules__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  color: var(--glow, #57E38D);
}

.page-game-rules__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1rem;
  color: var(--text-secondary, #A7D9B8);
  line-height: 1.7;
}

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

.page-game-rules__image-text-block {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 40px;
  margin-top: 40px;
  padding: 30px;
  background-color: #f8f8f8;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-game-rules__content-image {
  width: 100%;
  max-width: 450px;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.page-game-rules__text-block-content {
  flex-grow: 1;
}

.page-game-rules__sub-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: #333333;
}

.page-game-rules__text-block-content p {
  font-size: 1.05rem;
  margin-bottom: 25px;
  color: #555555;
}

.page-game-rules__cta-section {
  background-color: var(--deep-green, #0A4B2C);
  padding: 80px 20px;
  text-align: center;
  color: var(--text-main, #F2FFF6);
}

/* Responsive Styles */
@media (max-width: 992px) {
  .page-game-rules__image-text-block {
    flex-direction: column;
    text-align: center;
  }
  .page-game-rules__content-image {
    max-width: 100%;
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .page-game-rules__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
  }

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

  .page-game-rules__description {
    font-size: 1rem;
  }

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

  .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__btn-link {
    max-width: 100% !important;
    width: 100% !important;
  }

  .page-game-rules__content-area {
    padding: 30px 15px;
  }

  .page-game-rules__section-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

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

  .page-game-rules__card {
    padding: 20px;
  }

  .page-game-rules__card-title {
    font-size: 1.25rem;
  }

  .page-game-rules__list li {
    font-size: 0.95rem;
  }

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

  .page-game-rules__faq-answer {
    padding: 0 20px 15px 20px;
    font-size: 0.95rem;
  }

  .page-game-rules__image-text-block {
    padding: 20px;
  }

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

  .page-game-rules__text-block-content p {
    font-size: 1rem;
  }

  .page-game-rules__cta-section {
    padding: 60px 15px;
  }
  
  /* Mobile image and video 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__video-section,
  .page-game-rules__video-container,
  .page-game-rules__video-wrapper,
  .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: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no overflow */
  }
  
  .page-game-rules__cta-buttons {
    flex-wrap: wrap !important;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .page-game-rules__hero-content {
    padding: 0 10px;
  }

  .page-game-rules__main-title {
    font-size: clamp(1.6rem, 8vw, 2.2rem);
  }

  .page-game-rules__description {
    font-size: 0.95rem;
  }

  .page-game-rules__btn-primary,
  .page-game-rules__btn-secondary {
    font-size: 0.95rem;
    padding: 12px 20px;
  }

  .page-game-rules__section-title {
    font-size: clamp(1.3rem, 7vw, 1.8rem);
  }

  .page-game-rules__text-block {
    font-size: 0.95rem;
  }

  .page-game-rules__card-title {
    font-size: 1.1rem;
  }

  .page-game-rules__list li {
    font-size: 0.9rem;
  }
}