/* Base styles for the FAQ page content */
.page-faq {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Text Main */
  background: #F5F7FA; /* Background */
}

.page-faq__section-spacing {
  padding: 40px 0;
}

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

.page-faq__text-center {
  text-align: center;
}

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  overflow: hidden;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Brand gradient */
  color: #ffffff;
}

.page-faq__hero-image {
  width: 100%;
  height: 450px; /* Fixed height for desktop */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-faq__hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Cover for desktop to avoid empty space */
  display: block;
}

.page-faq__hero-content {
  padding: 30px 15px 50px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.page-faq__main-title {
  font-size: clamp(2.2rem, 4vw, 3rem); /* Responsive font size */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-faq__intro-text {
  font-size: 1.1rem;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* CTA Buttons */
.page-faq__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  width: 100%; /* Ensure container takes full width */
  max-width: 100%; /* Ensure container takes full width */
  box-sizing: border-box; /* Include padding in width */
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure buttons don't exceed container */
  box-sizing: border-box; /* Include padding in width */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  text-align: center;
}

.page-faq__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Button gradient */
  color: #ffffff;
  border: 2px solid transparent;
}

.page-faq__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-faq__btn-secondary {
  background: #ffffff;
  color: #E53935; /* Text Main on white background */
  border: 2px solid #E53935;
}

.page-faq__btn-secondary:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.page-faq__btn-small {
  padding: 8px 18px;
  font-size: 0.9rem;
}

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

/* Content Section */
.page-faq__section-heading {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  color: #E53935; /* Brand color for headings */
  text-align: center;
  margin-bottom: 25px;
}

.page-faq__section-description {
  font-size: 1rem;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* FAQ List */
.page-faq__faq-list {
  margin-top: 30px;
}

details.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 8px; /* Slightly larger radius */
  border: 1px solid #E0E0E0; /* Border */
  overflow: hidden;
  background: #FFFFFF; /* Card BG */
  box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Subtle shadow */
}

details.page-faq__faq-item summary.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none; /* Remove default marker */
  transition: background-color 0.3s ease;
  color: #333333; /* Text Main */
  font-weight: 600;
}

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

details.page-faq__faq-item summary.page-faq__faq-question:hover {
  background: #f5f5f5; /* Light hover effect */
}

.page-faq__faq-qtext {
  flex: 1;
  font-size: 1.1rem; /* Slightly larger font for question */
  line-height: 1.5;
  text-align: left;
  color: #333333; /* Ensure readability */
}

.page-faq__faq-toggle {
  font-size: 28px; /* Larger toggle icon */
  font-weight: bold;
  color: #E53935; /* Brand color for toggle */
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px; /* Square toggle area */
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

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

details.page-faq__faq-item .page-faq__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9; /* Slightly different background for answer */
  border-radius: 0 0 8px 8px;
  color: #333333; /* Text Main */
}

.page-faq__faq-answer p {
  margin-bottom: 15px;
  font-size: 1rem;
}

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

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

/* Bottom CTA Section */
.page-faq__cta-bottom-section {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Brand gradient */
  color: #ffffff;
  padding: 60px 0;
}

.page-faq__cta-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 15px;
  color: #ffffff;
}

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

/* General image styling for content area */
.page-faq img {
  max-width: 100%;
  height: auto;
  display: block; /* Ensure images are block level for max-width to work */
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-faq__container {
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  /* HERO Section */
  .page-faq__hero-section {
    padding-top: 10px; /* Ensure small top padding */
  }

  .page-faq__hero-image {
    height: 300px; /* Adjust height for mobile */
  }

  .page-faq__hero-image img {
    object-fit: contain !important; /* Mobile: contain to show full image, prevent cropping */
    aspect-ratio: unset !important; /* Reset aspect ratio */
    width: 100% !important;
    height: auto !important;
  }

  .page-faq__hero-content {
    padding: 20px 15px 40px;
  }

  .page-faq__main-title {
    font-size: 2rem; /* Fixed font size for mobile H1 */
  }

  .page-faq__intro-text {
    font-size: 1rem;
  }

  /* CTA Buttons - Mobile */
  .page-faq__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px;
    padding: 0 15px; /* Add padding to container */
  }

  .page-faq__btn-primary,
  .page-faq__btn-secondary,
  .page-faq a[class*="button"],
  .page-faq a[class*="btn"] {
    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;
  }

  /* Content Section */
  .page-faq__section-spacing {
    padding: 30px 0;
  }

  .page-faq__section-heading {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }

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

  /* FAQ List */
  details.page-faq__faq-item {
    margin-bottom: 10px;
    border-radius: 5px;
  }

  details.page-faq__faq-item summary.page-faq__faq-question {
    padding: 15px;
  }

  .page-faq__faq-qtext {
    font-size: 1rem;
  }

  .page-faq__faq-toggle {
    font-size: 24px;
    width: 24px;
    height: 24px;
    margin-left: 10px;
  }

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

  .page-faq__faq-answer p {
    font-size: 0.95rem;
  }

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

  .page-faq__game-links .page-faq__btn-small {
    width: 100%;
  }

  /* Bottom CTA Section */
  .page-faq__cta-bottom-section {
    padding: 40px 0;
  }

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

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

  /* General image styling for content area */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important; /* Ensure padding is included */
  }

  .page-faq__container,
  .page-faq__content-section,
  .page-faq__cta-bottom-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}