/* style/faq.css */

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

/* --- General Page Styles --- */
.page-faq {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--background);
}

/* Ensure body padding for fixed header is handled by shared.css */
/* .page-faq will not have padding-top: var(--header-offset); */

.page-faq__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 60px; /* Space below content */
  background-color: var(--background);
  overflow: hidden; /* Ensure no overflow from image */
}

.page-faq__hero-image-wrapper {
  width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px; /* Space between image and content */
}

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

.page-faq__hero-content {
  max-width: 900px;
  text-align: center;
  padding: 0 20px;
  z-index: 1;
}

.page-faq__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive H1 font size */
  font-weight: bold;
  color: var(--text-main);
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(87, 227, 141, 0.5); /* Glow effect */
}

.page-faq__intro-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-faq__cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.page-faq__cta-buttons--inline {
  margin-top: 20px;
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure button doesn't overflow */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow long words to break */
}

.page-faq__btn-primary {
  background: var(--button-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 5px 15px rgba(17, 168, 78, 0.4);
}

.page-faq__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  box-shadow: 0 8px 20px rgba(17, 168, 78, 0.6);
  transform: translateY(-2px);
}

.page-faq__btn-secondary {
  background-color: transparent;
  color: var(--text-main);
  border: 2px solid var(--border);
  box-shadow: 0 5px 15px rgba(46, 122, 78, 0.2);
}

.page-faq__btn-secondary:hover {
  background-color: rgba(46, 122, 78, 0.2);
  border-color: var(--glow);
  transform: translateY(-2px);
}

/* --- Content Area --- */
.page-faq__content-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  background-color: var(--background); /* Ensure background is consistent */
  color: var(--text-main); /* Text color for content area */
}

.page-faq__section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: bold;
  color: var(--gold);
  text-align: center;
  margin-bottom: 20px;
  text-shadow: 0 0 8px rgba(242, 193, 78, 0.3);
}

.page-faq__description-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* --- FAQ List --- */
.page-faq__faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 900px;
  margin: 0 auto 60px auto;
}

.page-faq__faq-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.page-faq__faq-item:hover {
  border-color: var(--glow);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.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);
  border-bottom: 1px solid var(--divider);
  user-select: none;
  list-style: none; /* For <summary> */
}

.page-faq__faq-question::-webkit-details-marker {
  display: none; /* For <summary> */
}

.page-faq__faq-qtext {
  flex-grow: 1;
  color: var(--gold);
}

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

.page-faq__faq-answer {
  padding: 0 25px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
  max-height: 0; /* Initial state for smooth transition on <details> */
  overflow: hidden; /* Initial state for smooth transition on <details> */
  transition: max-height 0.3s ease-out, padding 0.3s ease-out; /* Initial state for smooth transition on <details> */
}

/* Specific styles for <details> element */
.page-faq__faq-item[open] .page-faq__faq-answer {
  max-height: 1000px; /* Sufficiently large to contain content */
  padding: 20px 25px;
  transition: max-height 0.5s ease-in, padding 0.5s ease-in;
}

.page-faq__faq-item p {
  margin-bottom: 15px;
}

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

/* --- Bottom CTA --- */
.page-faq__bottom-cta {
  background-color: var(--card-bg);
  border-radius: 10px;
  padding: 40px;
  text-align: center;
  max-width: 900px;
  margin: 60px auto 0 auto;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
}

.page-faq__cta-image {
  width: 100%;
  height: auto;
  max-width: 800px;
  margin-bottom: 30px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-faq__cta-title {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  color: var(--gold);
  margin-bottom: 15px;
  text-shadow: 0 0 5px rgba(242, 193, 78, 0.2);
}

.page-faq__cta-description {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
  .page-faq {
    font-size: 15px;
    line-height: 1.5;
  }

  .page-faq__hero-section {
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 40px;
  }

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

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

  .page-faq__main-title {
    font-size: clamp(2rem, 8vw, 2.5rem);
    margin-bottom: 15px;
  }

  .page-faq__intro-text {
    font-size: 0.95rem;
    margin-bottom: 30px;
  }

  .page-faq__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 0.95rem;
  }

  .page-faq__content-area {
    padding: 40px 15px;
  }

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

  .page-faq__description-text {
    font-size: 0.9rem;
    margin-bottom: 30px;
  }

  .page-faq__faq-list {
    gap: 10px;
    margin-bottom: 40px;
  }

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

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

  .page-faq__faq-answer {
    padding: 0 20px;
    font-size: 0.9rem;
  }

  .page-faq__faq-item[open] .page-faq__faq-answer {
    padding: 15px 20px;
  }

  .page-faq__bottom-cta {
    padding: 30px 20px;
    margin: 40px auto 0 auto;
  }

  .page-faq__cta-image {
    margin-bottom: 20px;
  }

  .page-faq__cta-title {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
    margin-bottom: 10px;
  }

  .page-faq__cta-description {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  /* Image responsive rules */
  .page-faq img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-faq__hero-image,
  .page-faq__cta-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  /* Container for images to prevent overflow */
  .page-faq__hero-image-wrapper,
  .page-faq__bottom-cta {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* General containers for mobile padding */
  .page-faq__section,
  .page-faq__card,
  .page-faq__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Specific padding for hero/video section if it were a video */
  .page-faq__video-section {
    padding-top: 10px !important; /* body already has padding-top for header */
  }

  /* Button container mobile adaptation */
  .page-faq__cta-buttons {
    flex-wrap: wrap !important;
    gap: 10px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  .page-faq__cta-buttons--inline {
    flex-direction: column;
  }
}

/* Color contrast adjustments */
.page-faq p,
.page-faq li,
.page-faq span {
  color: var(--text-secondary); /* Ensure default text color for contrast */
}

/* Ensure headings have good contrast */
.page-faq h1, .page-faq h2, .page-faq h3 {
  color: var(--text-main);
}
.page-faq__faq-qtext {
  color: var(--gold); /* Specific color for question text */
}