/* style/faq.css */
/* 
  Body padding-top is handled by shared.css for fixed header offset.
  This page's first section (hero-section) should only have a small decorative top padding.
*/

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

.page-faq {
  font-family: Arial, sans-serif;
  color: var(--text-main); /* Default text color for the page, assuming dark body background */
  background-color: var(--page-bg); /* Explicitly set page background to match dark theme */
  line-height: 1.6;
}

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

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  display: flex;
  flex-direction: column; /* Ensure image is above content */
  align-items: center;
  text-align: center;
  padding: 10px 0 60px 0; /* Small top padding, larger bottom padding */
  background-color: var(--deep-green); /* A dark background for the hero section */
  overflow: hidden; /* Prevent content overflow */
}

.page-faq__hero-image-wrapper {
  width: 100%;
  max-height: 500px; /* Limit height for hero image */
  overflow: hidden;
  margin-bottom: 30px; /* Space between image and content */
}

.page-faq__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.7); /* Slightly darken image for better text contrast if needed, but no color change */
}

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

.page-faq__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive font size for H1 */
  color: var(--gold-color);
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

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

/* Buttons */
.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  box-sizing: border-box;
  margin: 0 10px 15px 10px;
  min-width: 180px;
}

.page-faq__btn-primary {
  background: var(--button-gradient);
  color: #ffffff; /* Always white text for primary button */
  border: 2px solid transparent;
}

.page-faq__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

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

.page-faq__btn-secondary:hover {
  background: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

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

.page-faq__section-title {
  font-size: 2.2rem;
  color: var(--gold-color);
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-faq__text-block {
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 900px;
  margin: 0 auto 20px auto;
  color: var(--text-secondary);
}

/* FAQ List Section */
.page-faq__faq-list-section {
  padding: 60px 0;
  background-color: var(--card-bg); /* Slightly lighter dark background for FAQ list */
  color: var(--text-main);
}

.page-faq__faq-category {
  margin-bottom: 40px;
}

.page-faq__category-title {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 30px;
  text-align: center;
}

.page-faq__faq-item {
  background-color: var(--deep-green); /* Darker green for individual FAQ items */
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

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

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

.page-faq__faq-question:hover {
  background-color: var(--primary-color);
}

.page-faq__faq-qtext {
  flex-grow: 1;
  margin-right: 15px;
}

.page-faq__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--gold-color);
}

.page-faq__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1rem;
  color: var(--text-secondary);
  max-height: 0; /* Used for JS-driven collapse if not using <details> */
  overflow: hidden; /* Used for JS-driven collapse if not using <details> */
  transition: max-height 0.3s ease-out, padding 0.3s ease-out; /* Used for JS-driven collapse if not using <details> */
}

/* Styles for <details> tag (native accordion) */
.page-faq__faq-item[open] .page-faq__faq-answer {
  max-height: none; /* Override for native details */
  padding-top: 15px;
  transition: none; /* No transition for native details */
}

.page-faq__faq-item[open] .page-faq__faq-question {
  background-color: var(--primary-color);
  color: #ffffff;
}

.page-faq__faq-item[open] .page-faq__faq-toggle {
  color: #ffffff;
}

/* Image within FAQ answer */
.page-faq__faq-answer .page-faq__image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px 0;
  border-radius: 8px;
  object-fit: cover;
}

/* Call to Action Section */
.page-faq__cta-section {
  padding: 80px 0;
  background-color: var(--page-bg);
  text-align: center;
  color: var(--text-main);
}

/* General image styling */
.page-faq img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Responsive styles */
@media (max-width: 992px) {
  .page-faq__main-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }
  .page-faq__section-title {
    font-size: 1.8rem;
  }
  .page-faq__category-title {
    font-size: 1.5rem;
  }
  .page-faq__hero-image-wrapper {
    max-height: 400px;
  }
}

@media (max-width: 768px) {
  .page-faq__container {
    padding: 0 15px !important; /* Adjust container padding for mobile */
  }

  .page-faq__hero-section {
    padding: 10px 0 40px 0;
  }

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

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

  .page-faq__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }
  .page-faq__hero-description {
    font-size: 1rem;
  }

  .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;
    margin: 0 auto 15px auto !important; /* Center buttons and add spacing */
    padding-left: 15px !important; /* Ensure button text has internal padding */
    padding-right: 15px !important;
  }

  .page-faq__hero-content .page-faq__btn-primary,
  .page-faq__hero-content .page-faq__btn-secondary {
    display: block !important;
  }

  .page-faq__introduction-section,
  .page-faq__faq-list-section,
  .page-faq__cta-section {
    padding: 40px 0;
  }

  .page-faq__section-title {
    font-size: 1.6rem;
    margin-bottom: 30px;
  }
  .page-faq__category-title {
    font-size: 1.3rem;
  }

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

  /* Mobile image specific rules */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Ensure all block-level elements that contain content or images adapt to mobile width */
  .page-faq__hero-section,
  .page-faq__introduction-section,
  .page-faq__faq-list-section,
  .page-faq__cta-section,
  .page-faq__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Specific top padding for video section, if it were present. For FAQ, hero section has its own. */
  .page-faq__video-section {
    padding-top: 10px !important; /* body already has header offset */
  }
}