/* style/game-rules.css */

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

.page-game-rules {
  background-color: var(--sao79-bg);
  color: var(--sao79-text-main);
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

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

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

.page-game-rules__section-title {
  font-size: 2.8em;
  color: var(--sao79-text-main);
  margin-bottom: 30px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-game-rules__sub-title {
  font-size: 2.2em;
  color: var(--sao79-text-main);
  margin-top: 40px;
  margin-bottom: 25px;
  font-weight: 600;
  line-height: 1.3;
}

.page-game-rules__text-block {
  font-size: 1.1em;
  margin-bottom: 20px;
  color: var(--sao79-text-secondary);
}

.page-game-rules__text-main {
  color: var(--sao79-text-main);
}

.page-game-rules__text-secondary {
  color: var(--sao79-text-secondary);
}

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

/* Hero Section */
.page-game-rules__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 60px 0; /* body handles header offset, this is for decor */
  overflow: hidden;
}

.page-game-rules__hero-image-wrapper {
  width: 100%;
  max-height: 600px;
  overflow: hidden;
}

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

.page-game-rules__hero-content {
  max-width: 900px;
  margin-top: 40px;
  padding: 0 20px;
}

.page-game-rules__main-title {
  font-size: 3.5em;
  color: var(--sao79-text-main);
  margin-bottom: 20px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

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

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

/* Buttons */
.page-game-rules__btn-primary,
.page-game-rules__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-game-rules__btn-primary {
  background: var(--sao79-btn-gradient);
  color: var(--sao79-text-main);
  border: 2px solid transparent;
}

.page-game-rules__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(var(--sao79-primary), 0.4);
}

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

.page-game-rules__btn-secondary:hover {
  background-color: var(--sao79-primary);
  color: var(--sao79-text-main);
  transform: translateY(-2px);
}

/* Cards */
.page-game-rules__card {
  background-color: var(--sao79-card-bg);
  border-radius: 12px;
  padding: 30px;
  margin-top: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid var(--sao79-border);
}

.page-game-rules__card-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-bottom: 20px;
}

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

/* Lists */
.page-game-rules__list {
  list-style-type: disc;
  margin-left: 25px;
  margin-bottom: 20px;
  text-align: left;
}

.page-game-rules__list-item {
  margin-bottom: 10px;
  font-size: 1.05em;
  color: var(--sao79-text-secondary);
}

/* Image wrappers */
.page-game-rules__image-wrapper {
  margin: 30px auto;
  max-width: 1000px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 12px;
}

.page-game-rules__content-image {
  width: 100%;
  height: auto;
  display: block;
}

/* Video Section (if any) */
.page-game-rules__video-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small decorative padding */
  background-color: var(--sao79-bg);
}

.page-game-rules__video-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 12px;
}

.page-game-rules__video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.page-game-rules__video-wrapper iframe,
.page-game-rules__video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  cursor: pointer;
}

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

.page-game-rules__faq-item {
  background-color: var(--sao79-bg);
  border: 1px solid var(--sao79-border);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  text-align: left;
  color: var(--sao79-text-main);
}

.page-game-rules__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: 600;
  cursor: pointer;
  background-color: var(--sao79-deep-green);
  color: var(--sao79-text-main);
  transition: background-color 0.3s ease;
}

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

.page-game-rules__faq-question::-webkit-details-marker, /* Hide default marker for details */
.page-game-rules__faq-question::marker {
  display: none;
}

.page-game-rules__faq-qtext {
  flex-grow: 1;
  color: var(--sao79-text-main);
}

.page-game-rules__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: var(--sao79-text-main);
}

.page-game-rules__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1.05em;
  color: var(--sao79-text-secondary);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-game-rules__faq-item.active .page-game-rules__faq-answer {
  max-height: 2000px; /* Sufficiently large to show content */
  padding-top: 15px;
  transition: max-height 0.5s ease-in, padding 0.5s ease-in;
}

/* For <details> tag, default styling for answer */
details.page-game-rules__faq-item[open] .page-game-rules__faq-answer {
  max-height: none; /* Let browser handle height */
  padding-top: 15px;
  overflow: visible;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-game-rules__main-title {
    font-size: 3em;
  }
  .page-game-rules__section-title {
    font-size: 2.4em;
  }
  .page-game-rules__sub-title {
    font-size: 1.8em;
  }
}

@media (max-width: 768px) {
  .page-game-rules__section {
    padding: 40px 0;
  }
  .page-game-rules__main-title {
    font-size: 2.2em;
  }
  .page-game-rules__subtitle {
    font-size: 1.1em;
  }
  .page-game-rules__section-title {
    font-size: 2em;
  }
  .page-game-rules__sub-title {
    font-size: 1.6em;
  }
  .page-game-rules__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: 1em;
  }
  .page-game-rules__card {
    flex-direction: column;
    padding: 20px;
  }
  .page-game-rules__list {
    margin-left: 15px;
  }
  .page-game-rules__faq-question {
    padding: 15px 20px;
    font-size: 1.1em;
  }
  .page-game-rules__faq-answer {
    padding: 0 20px 15px 20px;
  }

  /* Mobile image responsiveness */
  .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__image-wrapper,
  .page-game-rules__hero-image-wrapper,
  .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__video-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }
  .page-game-rules__video-wrapper {
    padding-bottom: 56.25% !important;
  }
  .page-game-rules__video-wrapper iframe,
  .page-game-rules__video-wrapper video {
    width: 100% !important;
    height: 100% !important;
  }
}