/* style/faq.css */

/* Base styles for the FAQ page */
.page-faq {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main, #F2FFF6); /* Default text color for dark background */
  background-color: var(--background, #08160F); /* Page background from custom palette */
}

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: var(--background, #08160F);
  overflow: hidden; /* Ensure content doesn't overflow */
}

.page-faq__hero-image-wrapper {
  width: 100%;
  max-width: 1200px; /* Constrain image width on larger screens */
  margin-bottom: 30px; /* Space between image and content */
}

.page-faq__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.page-faq__hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.page-faq__main-title {
  font-size: clamp(1.8em, 4vw, 2.5em); /* Responsive H1 font size */
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-main, #F2FFF6);
  margin-bottom: 20px;
}

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

/* Call to Action Buttons */
.page-faq__cta-buttons {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  gap: 20px;
  justify-content: center;
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1em;
  transition: all 0.3s ease;
  min-width: 180px;
  box-sizing: border-box; /* Ensure padding is included in width */
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
}

.page-faq__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Custom button color */
  color: #F2FFF6;
  border: 2px solid transparent;
}

.page-faq__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(42, 209, 111, 0.4);
}

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

.page-faq__btn-secondary:hover {
  background: rgba(46, 122, 78, 0.2); /* Slight background on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(46, 122, 78, 0.2);
}

.page-faq__btn-small {
  padding: 10px 20px;
  font-size: 0.95em;
  min-width: unset;
}

.page-faq__btn-large {
  padding: 18px 40px;
  font-size: 1.2em;
}

/* FAQ List Section */
.page-faq__faq-list-section {
  padding: 80px 20px;
  background-color: var(--card-bg, #11271B); /* Custom card background */
  color: var(--text-main, #F2FFF6);
}

.page-faq__container {
  max-width: 1000px;
  margin: 0 auto;
}

.page-faq__section-title {
  font-size: 2em;
  font-weight: 700;
  color: var(--text-main, #F2FFF6);
  text-align: center;
  margin-bottom: 20px;
}

.page-faq__section-description {
  font-size: 1.05em;
  color: var(--text-secondary, #A7D9B8);
  text-align: center;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-faq__faq-item-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.page-faq__faq-item {
  background-color: var(--background, #08160F); /* Use deeper background for item */
  border: 1px solid var(--divider, #1E3A2A); /* Custom divider color */
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.page-faq__faq-item[open] {
  background-color: var(--deep-green, #0A4B2C); /* Deeper green when open */
  border-color: var(--glow, #57E38D); /* Glow color for border when open */
  box-shadow: 0 0 15px rgba(87, 227, 141, 0.2);
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15em;
  font-weight: 600;
  color: var(--text-main, #F2FFF6);
  cursor: pointer;
  user-select: none;
  position: relative;
  list-style: none; /* Remove default marker for summary */
}

.page-faq__faq-question::-webkit-details-marker { /* Hide default marker for Webkit */
  display: none;
}

.page-faq__faq-question::marker { /* Hide default marker for other browsers */
  display: none;
}

.page-faq__faq-qtext {
  flex-grow: 1;
  text-align: left;
}

.page-faq__faq-toggle {
  font-size: 1.8em;
  line-height: 1;
  margin-left: 15px;
  color: var(--glow, #57E38D); /* Glow color for toggle */
  transition: transform 0.3s ease;
}

.page-faq__faq-item[open] .page-faq__faq-toggle {
  transform: rotate(45deg); /* Rotate for 'x' effect */
}

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

.page-faq__faq-answer p {
  margin-bottom: 15px;
}

.page-faq__faq-answer a {
  color: var(--glow, #57E38D); /* Links in answers use glow color */
  text-decoration: none;
  border-bottom: 1px solid rgba(87, 227, 141, 0.5);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.page-faq__faq-answer a:hover {
  color: #F2FFF6;
  border-color: var(--glow, #57E38D);
}

.page-faq__game-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

/* CTA Section at the bottom */
.page-faq__cta-section {
  padding: 80px 20px;
  text-align: center;
  background-color: var(--deep-green, #0A4B2C); /* Custom deep green background */
  color: var(--text-main, #F2FFF6);
}

.page-faq__cta-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-faq__cta-title {
  font-size: 2.2em;
  font-weight: 700;
  color: var(--text-main, #F2FFF6);
  margin-bottom: 20px;
}

.page-faq__cta-description {
  font-size: 1.1em;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-faq__main-title {
    font-size: clamp(1.6em, 3.5vw, 2.2em);
  }
  .page-faq__section-title {
    font-size: 1.8em;
  }
  .page-faq__cta-title {
    font-size: 2em;
  }
}

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

  /* Images */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* All containers with images/videos/buttons */
  .page-faq__hero-section,
  .page-faq__faq-list-section,
  .page-faq__cta-section,
  .page-faq__container,
  .page-faq__hero-image-wrapper,
  .page-faq__cta-content,
  .page-faq__faq-item-group,
  .page-faq__game-links {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Prevent horizontal scroll */
  }

  /* Specific padding for hero section */
  .page-faq__hero-section {
    padding-top: 10px !important; /* body handles --header-offset, this is decorative */
    padding-bottom: 40px;
  }

  .page-faq__hero-image-wrapper {
    margin-bottom: 20px;
  }

  .page-faq__main-title {
    font-size: 1.8em; /* Adjusted H1 for mobile */
    margin-bottom: 15px;
  }

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

  /* Buttons */
  .page-faq__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
  }
  
  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    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-faq__btn-large {
    padding: 15px 25px;
    font-size: 1.1em;
  }

  .page-faq__section-title {
    font-size: 1.6em;
  }

  .page-faq__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  .page-faq__faq-question {
    font-size: 1.05em;
    padding: 18px 20px;
  }

  .page-faq__faq-answer {
    padding: 0 20px 18px;
  }

  .page-faq__cta-title {
    font-size: 1.8em;
  }

  .page-faq__cta-description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-faq__game-links {
    flex-direction: column; /* Stack game links vertically */
  }
}

@media (max-width: 480px) {
  .page-faq__hero-section {
    padding: 30px 10px;
    padding-top: 10px;
  }
  .page-faq__faq-list-section,
  .page-faq__cta-section {
    padding: 50px 10px;
  }
  .page-faq__main-title {
    font-size: 1.6em;
  }
  .page-faq__section-title {
    font-size: 1.4em;
  }
  .page-faq__cta-title {
    font-size: 1.6em;
  }
  .page-faq__faq-question {
    font-size: 1em;
  }
}

/* Color contrast enforcement (assuming dark body background based on palette) */
.page-faq__dark-bg {
  color: var(--text-main, #F2FFF6); /* Text Main */
  background: var(--card-bg, #11271B); /* Card BG */
}

.page-faq__deep-green {
  background-color: var(--deep-green, #0A4B2C); /* Deep Green */
  color: var(--text-main, #F2FFF6); /* Text Main */
}

/* Ensure links in text have good contrast */
.page-faq p a,
.page-faq li a {
  color: var(--glow, #57E38D); /* Use Glow color for links */
  text-decoration: underline;
}
.page-faq p a:hover,
.page-faq li a:hover {
  color: #F2FFF6;
}