.page-faq {
  font-family: 'Arial', sans-serif;
  color: var(--text-main); /* Default text color for the page */
  background: var(--background); /* Body background from custom colors */
}

/* Custom CSS Variables from provided color scheme */
:root {
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg: #11271B;
  --background: #08160F;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green: #0A4B2C;
}

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  display: flex;
  flex-direction: column; /* Image above text */
  align-items: center;
  justify-content: center;
  padding: 10px 20px 60px; /* Small top padding, more bottom padding */
  text-align: center;
  overflow: hidden;
  background: var(--deep-green); /* Fallback background for hero */
}

.page-faq__hero-image-wrapper {
  width: 100%;
  max-width: 1920px;
  margin-bottom: 30px; /* Space between image and text */
}

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

.page-faq__hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative; /* Ensure content is above image if z-index is messed up */
  z-index: 2;
}

.page-faq__main-title {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  /* Using clamp for responsive font size without fixed large values */
  font-size: clamp(2.2rem, 4vw + 1rem, 3.5rem);
}

.page-faq__description {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* General Section Styling */
.page-faq__section {
  padding: 80px 0;
  background: var(--background);
}

.page-faq__section--about-77king88 {
  padding-top: 40px; /* Adjust if needed */
}

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

.page-faq__container--centered {
  text-align: center;
}

.page-faq__section-title {
  color: var(--text-main);
  font-size: clamp(1.8rem, 3.5vw + 1rem, 2.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.page-faq__section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--glow-color);
  margin: 15px auto 0;
  border-radius: 2px;
}

/* CTA Buttons */
.page-faq__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  width: 100%; /* Ensure container takes full width */
  max-width: 600px; /* Limit width on larger screens */
  margin: 0 auto;
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 180px;
  box-sizing: border-box;
  white-space: nowrap; /* Prevent text wrapping by default */
}

.page-faq__btn-primary {
  background: var(--button-gradient);
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(34, 199, 104, 0.4);
}

.page-faq__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(34, 199, 104, 0.6);
}

.page-faq__btn-secondary {
  background: none;
  color: var(--glow-color);
  border: 2px solid var(--glow-color);
}

.page-faq__btn-secondary:hover {
  background: rgba(87, 227, 141, 0.1);
  transform: translateY(-3px);
}

/* About Section Specifics */
.page-faq__content-wrapper {
  display: flex;
  gap: 40px;
  align-items: center;
}

.page-faq__text-block {
  flex: 1;
}

.page-faq__text-block p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 15px;
}

.page-faq__image-block {
  flex: 0 0 40%;
  max-width: 40%;
}

.page-faq__image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* FAQ List */
.page-faq__faq-list {
  background: var(--card-bg); /* Use card background for FAQ section */
}

.page-faq__faq-grid {
  display: grid;
  gap: 20px;
}

.page-faq__faq-item {
  background: var(--background); /* Slightly darker background for individual FAQ items */
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-faq__faq-item summary {
  list-style: none; /* Hide default marker */
  cursor: pointer;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-main);
  font-size: 1.2rem;
  font-weight: 600;
  background: var(--deep-green);
  transition: background 0.3s ease;
}

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

.page-faq__faq-item summary:hover {
  background: rgba(19, 153, 74, 0.6);
}

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

.page-faq__faq-toggle {
  font-size: 1.8rem;
  line-height: 1;
  margin-left: 15px;
  color: var(--glow-color);
}

.page-faq__faq-item[open] .page-faq__faq-toggle {
  content: '−'; /* Change to minus when open, handled by JS */
}

.page-faq__faq-answer {
  padding: 20px 25px;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 1rem;
  background: var(--background);
}

.page-faq__faq-answer p {
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.page-faq__faq-answer a {
  color: var(--glow-color);
  text-decoration: none;
  font-weight: 500;
}

.page-faq__faq-answer a:hover {
  text-decoration: underline;
}

/* Game Categories (within FAQ answer) */
.page-faq__game-categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.page-faq__game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  width: calc(33% - 20px); /* 3 cards per row */
  max-width: 250px;
  min-width: 200px; /* Enforce minimum size */
  box-sizing: border-box;
}

.page-faq__game-card:hover {
  transform: translateY(-5px);
}

.page-faq__game-card img {
  width: 100%;
  height: 200px; /* Fixed height for consistency and min size */
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border-color);
}

.page-faq__game-title {
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 600;
  padding: 15px 10px;
  text-align: center;
}

/* App CTA (within FAQ answer) */
.page-faq__app-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.page-faq__qr-code {
  width: 200px; /* Adjust to meet minimum */
  height: 200px; /* Adjust to meet minimum */
  display: block;
  border: 5px solid #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-faq__content-wrapper {
    flex-direction: column;
  }
  .page-faq__image-block {
    max-width: 100%;
    margin-top: 30px;
  }
  .page-faq__game-card {
    width: calc(50% - 15px); /* 2 cards per row */
  }
}

@media (max-width: 768px) {
  .page-faq__hero-section {
    padding: 10px 15px 40px;
  }
  .page-faq__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    margin-bottom: 15px;
  }
  .page-faq__description {
    font-size: 1rem;
    margin-bottom: 20px;
  }
  .page-faq__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    padding: 0 15px; /* Add padding to prevent overflow */
    box-sizing: border-box;
  }
  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    width: 100%;
    max-width: 100% !important; /* Enforce full width */
    box-sizing: border-box !important;
    white-space: normal !important; /* Allow text wrapping */
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-faq__section {
    padding: 60px 0;
  }
  .page-faq__container {
    padding: 0 15px;
  }
  .page-faq__section-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 30px;
  }
  .page-faq__faq-item summary {
    font-size: 1.1rem;
    padding: 15px 20px;
  }
  .page-faq__faq-answer {
    padding: 15px 20px;
  }
  .page-faq__game-card {
    width: 100%; /* 1 card per row */
    max-width: 100%;
    margin: 0 auto;
  }
  .page-faq__game-card img {
    height: auto; /* Allow height to adjust for mobile */
    min-height: 200px;
  }
  .page-faq__qr-code {
    width: 200px;
    height: 200px;
  }

  /* Mobile image and video responsiveness (mandatory) */
  .page-faq img,
  .page-faq video,
  .page-faq__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-faq__section,
  .page-faq__card,
  .page-faq__container,
  .page-faq__video-section,
  .page-faq__video-container,
  .page-faq__video-wrapper,
  .page-faq__cta-buttons,
  .page-faq__button-group,
  .page-faq__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Prevent content overflow */
  }
  
  .page-faq__video-section {
    padding-top: 10px !important; /* Small top padding for video section */
  }

  .page-faq__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 10px !important;
  }
}

/* Content area image CSS size lower bound (200px) */
/* This rule applies to any img under .page-faq, excluding shared components */
.page-faq img:not(.shared-header img, .shared-footer img) {
  min-width: 200px;
  min-height: 200px;
}