/* style/game-rules.css */

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

/* Base styles for the page content */
.page-game-rules {
  color: var(--text-main); /* Default text color for the main content area */
  background-color: var(--bg-main);
  line-height: 1.6;
  font-family: 'Arial', sans-serif;
}

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

/* Hero Section */
.page-game-rules__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding for visual spacing, body handles main header offset */
  text-align: center;
  overflow: hidden;
  background-color: var(--bg-main);
}

.page-game-rules__hero-image-wrapper {
  width: 100%;
  max-width: 1920px;
  margin-bottom: 30px;
  order: 1; /* Image first in DOM order */
}

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

.page-game-rules__hero-content {
  order: 2; /* Content second in DOM order */
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 20px;
  background-color: var(--bg-card);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  margin-top: -80px; /* Overlap slightly for visual effect */
}

.page-game-rules__main-title {
  font-size: clamp(2em, 4vw, 3.5em);
  font-weight: 700;
  color: var(--clr-gold);
  margin-bottom: 20px;
  line-height: 1.2;
  letter-spacing: 0.5px;
  text-shadow: 0 0 10px rgba(242, 193, 78, 0.5);
}

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

.page-game-rules__cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: var(--btn-gradient);
  color: var(--text-main);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.1em;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

/* General Section Styles */
.page-game-rules__section {
  padding: 60px 0;
  border-bottom: 1px solid var(--clr-divider);
}

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

.page-game-rules__dark-section {
  background-color: var(--bg-card);
  color: var(--text-main);
}

.page-game-rules__section-title {
  font-size: 2.5em;
  font-weight: 700;
  color: var(--clr-primary);
  text-align: center;
  margin-bottom: 40px;
  text-shadow: 0 0 8px rgba(17, 168, 78, 0.3);
}

.page-game-rules__sub-title {
  font-size: 1.8em;
  font-weight: 600;
  color: var(--clr-secondary);
  margin-top: 30px;
  margin-bottom: 20px;
  border-left: 5px solid var(--clr-gold);
  padding-left: 15px;
}

.page-game-rules__paragraph {
  font-size: 1.05em;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.7;
}

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

.page-game-rules__list-item {
  position: relative;
  padding-left: 30px;
  margin-bottom: 15px;
  color: var(--text-main);
  font-size: 1.05em;
}

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

.page-game-rules__list-item ul {
  margin-top: 10px;
  margin-bottom: 0;
  padding-left: 20px;
  list-style: disc;
}

.page-game-rules__list-item ul li {
  padding-left: 0;
  margin-bottom: 8px;
  font-size: 0.95em;
}

.page-game-rules__list-item ul li::before {
  content: '';
}

.page-game-rules__content-image {
  width: 100%;
  height: auto;
  display: block;
  margin: 40px auto;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  object-fit: cover;
}

/* Specific section adjustments */
.page-game-rules__general-rules a,
.page-game-rules__general-terms a {
  color: var(--clr-gold);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.page-game-rules__general-rules a:hover,
.page-game-rules__general-terms a:hover {
  color: var(--clr-secondary);
}

/* FAQ Section */
.page-game-rules__faq-section {
  background-color: var(--bg-card);
}

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

.page-game-rules__faq-item {
  background-color: var(--bg-main);
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.15em;
  font-weight: 600;
  color: var(--clr-primary);
  background-color: var(--clr-deep-green);
  border-bottom: 1px solid var(--clr-divider);
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

.page-game-rules__faq-question:hover {
  background-color: var(--clr-primary);
  color: var(--text-main);
}

.page-game-rules__faq-item[open] .page-game-rules__faq-question {
  background-color: var(--clr-primary);
  color: var(--text-main);
}

.page-game-rules__faq-toggle {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--text-main);
  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: 1em;
  color: var(--text-secondary);
  background-color: var(--bg-main);
  line-height: 1.6;
}

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

/* Hide default details arrow */
.page-game-rules__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-game-rules__faq-item summary {
  list-style: none;
}

/* Contact CTA Section */
.page-game-rules__contact-cta {
  text-align: center;
  padding-top: 80px;
  padding-bottom: 80px;
  background-color: var(--bg-main);
}

.page-game-rules__contact-cta .page-game-rules__section-title {
  color: var(--clr-gold);
}

.page-game-rules__contact-cta .page-game-rules__paragraph {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 40px;
}

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

.page-game-rules__btn-primary {
  background: var(--btn-gradient);
  color: var(--text-main);
}

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

.page-game-rules__btn-secondary:hover {
  background: var(--clr-primary);
  color: var(--text-main);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

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

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

@media (max-width: 768px) {
  .page-game-rules {
    font-size: 16px;
    line-height: 1.6;
  }

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

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

  .page-game-rules__main-title {
    font-size: clamp(1.5em, 6vw, 2.5em);
    margin-bottom: 15px;
  }

  .page-game-rules__description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-game-rules__cta-button {
    padding: 12px 25px;
    font-size: 1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-game-rules__cta-buttons {
    flex-direction: column;
    gap: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-game-rules__section {
    padding: 40px 0;
  }

  .page-game-rules__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

  .page-game-rules__sub-title {
    font-size: 1.3em;
    padding-left: 10px;
  }

  .page-game-rules__paragraph,
  .page-game-rules__list-item {
    font-size: 0.95em;
  }

  .page-game-rules__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

  .page-game-rules__hero-image-wrapper,
  .page-game-rules__content-area,
  .page-game-rules__section,
  .page-game-rules__card,
  .page-game-rules__container,
  .page-game-rules__faq-section,
  .page-game-rules__contact-cta {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no horizontal scroll */
  }

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

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

  .page-game-rules__contact-cta {
    padding-top: 60px;
    padding-bottom: 60px;
  }
}

@media (max-width: 480px) {
  .page-game-rules__hero-content {
    margin-top: -40px;
  }

  .page-game-rules__main-title {
    font-size: clamp(1.2em, 8vw, 2em);
  }

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

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