/* style/faq.css */

/* Variables for colors from the custom palette */
.page-faq {
    --primary-color: #11A84E;
    --secondary-color: #22C768;
    --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --card-bg-color: #11271B;
    --background-color: #08160F;
    --text-main-color: #F2FFF6;
    --text-secondary-color: #A7D9B8;
    --border-color: #2E7A4E;
    --glow-color: #57E38D;
    --gold-color: #F2C14E;
    --divider-color: #1E3A2A;
    --deep-green-color: #0A4B2C;
}

/* Base styles for the page-faq component */
.page-faq {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main-color); /* #F2FFF6 */
  background: var(--background-color); /* #08160F */
  padding-bottom: 60px; /* Space for footer */
}

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background-color: var(--deep-green-color); /* A slightly different dark green for hero background */
  overflow: hidden;
}

.page-faq__hero-image {
  width: 100%;
  max-width: 100%; /* Ensure responsiveness */
  height: auto;
  display: block;
  object-fit: cover;
  margin-bottom: 20px; /* Space between image and content */
}

.page-faq__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.page-faq__main-title {
  font-size: clamp(2rem, 5vw, 3.5rem); /* Responsive H1 font size */
  color: var(--text-main-color);
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: 0.05em;
}

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

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

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

/* General Section Styling */
.page-faq__section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--text-main-color);
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

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

.page-faq__text-block {
  font-size: 1rem;
  color: var(--text-secondary-color);
  margin-bottom: 15px;
  text-align: justify;
}

/* Introduction Section */
.page-faq__introduction-section {
  padding: 60px 0;
  background-color: var(--background-color);
}

.page-faq__introduction-section .page-faq__section-title {
    margin-bottom: 30px;
}

.page-faq__btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  margin-top: 20px;
}

.page-faq__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-main-color);
}

/* FAQ List Section */
.page-faq__faq-list-section {
  padding: 60px 0;
  background-color: var(--deep-green-color);
}

.page-faq__faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.page-faq__faq-item {
  background-color: var(--card-bg-color); /* #11271B */
  border: 1px solid var(--border-color); /* #2E7A4E */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  color: var(--text-main-color); /* Ensure text is light on dark background */
}

.page-faq__faq-item:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.15rem;
  font-weight: bold;
  cursor: pointer;
  color: var(--text-main-color);
  background-color: rgba(0, 0, 0, 0.1); /* Slightly darker for contrast */
}

.page-faq__faq-question:hover {
  background-color: rgba(0, 0, 0, 0.2);
}

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

.page-faq__faq-toggle {
  font-size: 1.5rem;
  font-weight: bold;
  margin-left: 15px;
  color: var(--primary-color);
}

.page-faq__faq-answer {
  padding: 0 20px 20px 20px;
  font-size: 1rem;
  color: var(--text-secondary-color);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out, padding 0.5s ease-out;
}

/* Styling for <details> tag (native accordion) */
.page-faq__faq-item[open] .page-faq__faq-answer {
  max-height: 500px; /* Sufficient height to show content */
  padding-top: 15px;
}

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

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

/* Images within text blocks */
.page-faq__image-in-text {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  margin: 15px 0;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

.page-faq__btn-small {
  display: inline-block;
  background: var(--primary-color);
  color: var(--text-main-color);
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
  margin-top: 15px;
  transition: background 0.3s ease;
}

.page-faq__btn-small:hover {
  background: var(--secondary-color);
}

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

.page-faq__game-link {
    display: inline-block;
    background-color: var(--deep-green-color);
    color: var(--gold-color);
    border: 1px solid var(--gold-color);
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-faq__game-link:hover {
    background-color: var(--gold-color);
    color: var(--deep-green-color);
}

/* CTA Section */
.page-faq__cta-section {
  padding: 60px 0;
  background-color: var(--background-color);
}

.page-faq__cta-section .page-faq__dark-section {
    background-color: var(--card-bg-color); /* Using card bg for this dark section */
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.page-faq__cta-section .page-faq__section-title {
    margin-bottom: 20px;
}

.page-faq__cta-section .page-faq__text-block {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
}

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

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

  .page-faq__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
  }

  .page-faq__hero-content {
    padding: 10px;
  }

  .page-faq__main-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  .page-faq__description {
    font-size: 1rem;
  }

  .page-faq__cta-button {
    padding: 12px 25px;
    width: 100%;
    max-width: 100% !important; /* Constrain width for single button */
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-faq__section-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin-bottom: 25px;
  }

  .page-faq__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .page-faq__introduction-section,
  .page-faq__faq-list-section,
  .page-faq__cta-section {
    padding: 40px 0;
  }

  .page-faq__faq-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .page-faq__faq-question {
    font-size: 1rem;
    padding: 15px;
  }

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

  .page-faq img,
  .page-faq__image-in-text {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-faq__faq-item,
  .page-faq__introduction-section .page-faq__container,
  .page-faq__faq-list-section .page-faq__container,
  .page-faq__cta-section .page-faq__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-faq__cta-buttons {
    flex-direction: column;
    gap: 15px;
    align-items: center;
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-faq__cta-buttons .page-faq__cta-button,
  .page-faq__cta-buttons .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;
  }
}

/* Ensure content images are not too small in CSS */
.page-faq img:not(.page-faq__hero-image) {
  min-width: 200px;
  min-height: 200px;
}