/* style/faq.css */

/* Custom Color Definitions (for page-faq scope) */
.page-faq {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg: #11271B;
  --bg-color: #08160F; /* This will be overridden by shared.css body */
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow: #57E38D;
  --gold: #F2C14E;
  --divider: #1E3A2A;
  --deep-green: #0A4B2C;
}

/* Base styles for the FAQ page content */
.page-faq {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main); /* Using custom color: #F2FFF6 */
  background-color: var(--bg-color); /* From shared, should be #08160F */
}

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Image above text */
  align-items: center;
  padding: 10px 0 60px 0; /* Small top padding, larger bottom for separation */
  overflow: hidden; /* Ensure no overflow */
}

.page-faq__hero-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  margin-bottom: 30px; /* Space between image and content */
}

.page-faq__hero-content {
  max-width: 900px;
  text-align: center;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-faq__main-title {
  font-size: clamp(2em, 4vw, 3em); /* Responsive font size */
  font-weight: bold;
  color: var(--text-main); /* #F2FFF6 */
  margin-bottom: 20px;
  line-height: 1.2;
}

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

/* Section titles */
.page-faq__section-title {
  font-size: clamp(1.8em, 3.5vw, 2.5em);
  font-weight: bold;
  color: var(--text-main); /* #F2FFF6 */
  text-align: center;
  margin-bottom: 40px;
  padding-top: 60px;
}

/* Container for main content */
.page-faq__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* FAQ List */
.page-faq__faq-section {
  padding-bottom: 80px;
}

.page-faq__faq-list {
  margin-bottom: 60px;
}

.page-faq__faq-item {
  background-color: var(--card-bg); /* #11271B */
  border: 1px solid var(--border-color); /* #2E7A4E */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.2em;
  font-weight: bold;
  color: var(--text-main); /* #F2FFF6 */
  cursor: pointer;
  background-color: var(--deep-green); /* #0A4B2C */
  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 webkit browsers */
}

.page-faq__faq-question:hover {
  background-color: var(--primary-color); /* #11A84E */
}

.page-faq__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: var(--glow); /* #57E38D */
}

.page-faq__faq-answer {
  padding: 0 20px 20px;
  font-size: 1em;
  color: var(--text-secondary); /* #A7D9B8 */
  max-height: 0; /* For JS-controlled collapse/expand */
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-faq__faq-item[open] .page-faq__faq-answer {
  max-height: 2000px; /* Sufficiently large for content */
  padding: 20px;
}

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

.page-faq__faq-answer .page-faq__btn-secondary {
  margin-top: 10px;
  display: inline-block;
}

/* Buttons */
.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 180px;
  text-align: center;
  box-sizing: border-box;
}

.page-faq__btn-primary {
  background: var(--button-gradient); /* Custom button color */
  color: #ffffff;
  border: none;
}

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

.page-faq__btn-secondary {
  background-color: transparent;
  color: var(--glow); /* #57E38D */
  border: 2px solid var(--glow); /* #57E38D */
}

.page-faq__btn-secondary:hover {
  background-color: var(--glow); /* #57E38D */
  color: var(--card-bg); /* #11271B */
  transform: translateY(-2px);
}

/* CTA Section */
.page-faq__cta-section {
  text-align: center;
  padding: 60px 20px;
  background-color: var(--deep-green); /* #0A4B2C */
  border-radius: 8px;
  margin-top: 60px;
}

.page-faq__cta-section .page-faq__section-title {
  padding-top: 0;
  margin-bottom: 20px;
}

.page-faq__cta-buttons {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

/* Content Images */
.page-faq__image-content {
  width: 100%;
  min-width: 200px; /* Minimum size requirement */
  min-height: 200px; /* Minimum size requirement */
  height: auto;
  display: block;
  border-radius: 8px;
  margin-top: 20px;
  margin-bottom: 20px;
  object-fit: cover;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-faq__hero-content {
    max-width: 768px;
  }
}

@media (max-width: 768px) {
  .page-faq {
    font-size: 16px;
    line-height: 1.6;
  }

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

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

  .page-faq__main-title {
    font-size: 2em; /* Smaller on mobile */
  }

  .page-faq__description-text {
    font-size: 1em;
  }

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

  .page-faq__container {
    padding: 0 15px; /* Add side padding for mobile */
  }

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

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

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

  /* Mobile image adaptation */
  .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__faq-section,
  .page-faq__cta-section,
  .page-faq__faq-list,
  .page-faq__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-faq__cta-button,
  .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,
  .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;
    flex-wrap: wrap !important;
    gap: 10px;
    flex-direction: column; /* Stack buttons vertically on mobile */
  }
}