/* style/faq.css */

/* Base styles for the FAQ page */
.page-faq {
  color: #ffffff; /* Text color for dark body background */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  background-color: transparent; /* Body background is handled by shared.css */
  padding-top: var(--header-offset, 120px); /* Fixed header spacing */
}

.page-faq__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 400px;
  overflow: hidden;
  padding: 40px 20px;
  background-color: rgba(1, 116, 57, 0.8); /* Primary brand color with transparency */
}

.page-faq__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  filter: brightness(0.5); /* Darken image to ensure text contrast */
}

.page-faq__hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.page-faq__hero-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-faq__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-faq__hero-cta {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text breaking */
  box-sizing: border-box;
  max-width: 100%;
}

.page-faq__btn-primary {
  background-color: #C30808; /* Custom color for register/login */
  color: #FFFF00; /* Custom font color for register/login */
  border: 2px solid #C30808;
}

.page-faq__btn-primary:hover {
  background-color: #a00606;
  border-color: #a00606;
  color: #ffffff;
}

.page-faq__btn-secondary {
  background-color: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}

.page-faq__btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.page-faq__btn-large {
  padding: 15px 30px;
  font-size: 1.1em;
}

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

.page-faq__section-title {
  font-size: 2.5em;
  color: #017439; /* Brand color for main titles */
  text-align: center;
  margin-bottom: 50px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.page-faq__faq-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.page-faq__faq-category {
  background-color: rgba(255, 255, 255, 0.05); /* Slightly transparent white on dark background */
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-faq__category-title {
  font-size: 1.8em;
  color: #017439; /* Brand color for category titles */
  margin-bottom: 25px;
  text-align: center;
}

.page-faq__faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px 0;
}

.page-faq__faq-item:last-child {
  border-bottom: none;
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: bold;
  color: #ffffff;
  padding: 10px 0;
  transition: color 0.3s ease;
}

.page-faq__faq-question:hover {
  color: #017439; /* Hover effect with brand color */
}

.page-faq__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  width: 24px;
  text-align: center;
  transition: transform 0.3s ease;
  color: #017439; /* Toggle icon color */
}

.page-faq__faq-item.active .page-faq__faq-toggle {
  transform: rotate(45deg);
  content: '−';
}

.page-faq__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 15px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #e0e0e0; /* Slightly lighter text for answers */
}

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

.page-faq__faq-answer p:last-child {
  margin-bottom: 0;
}

.page-faq__faq-answer a {
  color: #017439; /* Brand color for links within answers */
  text-decoration: underline;
}

.page-faq__faq-answer a:hover {
  color: #02944d;
  text-decoration: none;
}

.page-faq__faq-item.active .page-faq__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show content */
  padding: 15px;
}

.page-faq__support-image,
.page-faq__transaction-image,
.page-faq__promotions-image,
.page-faq__games-image {
  display: block;
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 100%;
  height: auto;
}

.page-faq__cta-section {
  text-align: center;
  background-color: #017439; /* Primary brand color for CTA section */
  padding: 50px 20px;
  border-radius: 10px;
  margin-top: 60px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  color: #ffffff;
}

.page-faq__cta-title {
  font-size: 2.2em;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-faq__cta-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-faq__hero-title {
    font-size: 2.2em;
  }
  .page-faq__section-title {
    font-size: 2em;
  }
  .page-faq__category-title {
    font-size: 1.5em;
  }
}

@media (max-width: 768px) {
  .page-faq {
    font-size: 16px;
    line-height: 1.6;
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    overflow-x: hidden; /* Prevent horizontal scroll */
  }

  .page-faq__hero-section {
    min-height: 300px;
    padding: 30px 15px;
  }

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

  .page-faq__hero-description {
    font-size: 1em;
  }

  .page-faq__hero-cta {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 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__content-area {
    padding: 40px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

  .page-faq__category-title {
    font-size: 1.3em;
  }

  .page-faq__faq-question {
    font-size: 1em;
  }

  .page-faq__faq-toggle {
    font-size: 1.3em;
  }

  .page-faq__cta-section {
    padding: 40px 15px;
    margin-top: 40px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

  .page-faq__cta-description {
    font-size: 1em;
  }

  /* Images responsive */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
  }

  /* Content area image containers */
  .page-faq__faq-answer,
  .page-faq__hero-section,
  .page-faq__content-area,
  .page-faq__cta-section,
  .page-faq__faq-category {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px; /* Add padding to prevent edge-to-edge content */
    padding-right: 15px; /* Add padding to prevent edge-to-edge content */
  }
  .page-faq__faq-answer {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}

/* Ensure all links within page-faq respect contrast */
.page-faq a {
  color: #017439; /* Brand color for links */
  text-decoration: underline;
}

.page-faq a:hover {
  color: #02944d; /* Slightly darker/lighter for hover */
  text-decoration: none;
}

/* Specific contrast for elements with brand background */
.page-faq__dark-bg {
  color: #ffffff;
}

/* Override default link color for buttons to maintain contrast */
.page-faq__btn-primary {
  color: #FFFF00; /* For primary button */
}
.page-faq__btn-secondary {
  color: #ffffff; /* For secondary button */
}