/* style/faq.css */

/* Base styles for the FAQ page */
.page-faq {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main); /* Default text color from custom palette */
  background-color: var(--background); /* Default background from custom palette */
}

/* 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); /* Use custom background color */
  color: var(--text-main); /* Light text for dark background */
  overflow: hidden;
}

.page-faq__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.page-faq__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2; /* Slightly dim the image to make text more readable */
  display: block;
}

.page-faq__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  background: rgba(0, 0, 0, 0.4); /* Semi-transparent overlay for text readability */
  border-radius: 10px;
}

.page-faq__main-title {
  font-size: clamp(2em, 3.5vw, 3em); /* Responsive font size for H1 */
  font-weight: 700;
  color: var(--gold); /* Use custom gold color for main title */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-faq__description {
  font-size: 1.1em;
  color: var(--text-secondary); /* Use custom secondary text color */
  margin-bottom: 30px;
}

/* Content Area */
.page-faq__content-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  background-color: var(--background); /* Use custom background color */
  color: var(--text-main);
}

.page-faq__section-title {
  font-size: 2.5em;
  font-weight: 700;
  color: var(--gold); /* Use custom gold color for section titles */
  text-align: center;
  margin-bottom: 40px;
  text-transform: uppercase;
}

.page-faq__faq-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-faq__faq-item {
  background-color: var(--card-bg); /* Use custom card background color */
  border: 1px solid var(--border); /* Use custom border color */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  color: var(--text-main);
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.25em;
  font-weight: 600;
  color: var(--text-main); /* Main text color for questions */
  background-color: rgba(17, 168, 78, 0.1); /* Slightly lighter brand color for question background */
  border-bottom: 1px solid var(--divider); /* Use custom divider color */
  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: rgba(17, 168, 78, 0.2);
}

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

.page-faq__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: var(--gold); /* Gold color for the toggle icon */
}

/* Styling for the open/active state of FAQ items */
.page-faq__faq-item[open] .page-faq__faq-question {
  background-color: rgba(17, 168, 78, 0.2);
  border-bottom-color: transparent;
}

.page-faq__faq-answer {
  padding: 20px 25px;
  font-size: 1.05em;
  color: var(--text-secondary); /* Secondary text color for answers */
}

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

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

.page-faq__faq-answer a {
  color: var(--main-color); /* Use main brand color for links in answers */
  text-decoration: underline;
}

.page-faq__faq-answer a:hover {
  color: var(--aux-color);
}

.page-faq__faq-answer ul {
  list-style: disc inside;
  margin-left: 20px;
  margin-bottom: 15px;
}

.page-faq__faq-answer li {
  margin-bottom: 5px;
}

.page-faq__image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

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

/* Call to Action Section */
.page-faq__cta-section {
  background-color: var(--deep-green); /* Use custom deep green background */
  color: var(--text-main); /* Light text for dark background */
  text-align: center;
  padding: 60px 20px;
}

.page-faq__cta-title {
  font-size: 2.2em;
  font-weight: 700;
  color: var(--gold); /* Use custom gold color for CTA title */
  margin-bottom: 20px;
}

.page-faq__cta-description {
  font-size: 1.1em;
  color: var(--text-secondary); /* Use custom secondary text color */
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

/* Buttons */
.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%; /* Ensure buttons don't overflow */
}

.page-faq__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Custom button gradient */
  color: #ffffff;
  border: 2px solid transparent;
}

.page-faq__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-faq__btn-secondary {
  background-color: transparent;
  color: var(--gold); /* Gold text for secondary button */
  border: 2px solid var(--gold); /* Gold border for secondary button */
}

.page-faq__btn-secondary:hover {
  background-color: var(--gold); /* Gold background on hover */
  color: var(--deep-green); /* Deep green text on hover */
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* General link styling in content */
.page-faq a {
  color: var(--main-color); /* Main brand color for general links */
  text-decoration: none;
}

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

/* --- Responsive Design --- */

/* Tablet and smaller desktops */
@media (max-width: 1024px) {
  .page-faq__hero-content {
    padding: 15px;
  }

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

  .page-faq__description,
  .page-faq__cta-description {
    font-size: 1em;
  }

  .page-faq__section-title {
    font-size: 2em;
  }

  .page-faq__faq-question {
    font-size: 1.1em;
    padding: 18px 20px;
  }

  .page-faq__faq-answer {
    font-size: 1em;
    padding: 18px 20px;
  }

  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    padding: 12px 25px;
    font-size: 1em;
  }

  .page-faq__cta-title {
    font-size: 2em;
  }
}

/* Mobile devices */
@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.5em, 6vw, 2.2em);
    margin-bottom: 15px;
  }

  .page-faq__description {
    margin-bottom: 25px;
  }

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

  .page-faq__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

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

  .page-faq__faq-answer {
    font-size: 0.95em;
    padding: 15px;
  }

  .page-faq__cta-section {
    padding: 40px 15px;
  }

  .page-faq__cta-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }

  .page-faq__cta-description {
    margin-bottom: 30px;
  }

  .page-faq__cta-buttons {
    flex-direction: column; /* Stack buttons vertically on mobile */
    gap: 15px;
  }

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

  .page-faq__section,
  .page-faq__card,
  .page-faq__container,
  .page-faq__hero-section,
  .page-faq__content-area,
  .page-faq__cta-section,
  .page-faq__image-gallery,
  .page-faq__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden; /* Prevent horizontal scroll */
  }

  .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;
  }

  .page-faq__cta-buttons {
    flex-wrap: wrap !important;
    gap: 10px;
    padding-left: 0;
    padding-right: 0;
  }
}

/* Custom color palette variables */
:root {
  --main-color: #11A84E;
  --aux-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;
}