/* style/faq.css */

/* Base styles for the FAQ page */
.page-faq {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: #FFFFFF; /* Default body background is white */
}

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

/* Hero Section */
.page-faq__hero-section {
  padding: 40px 0;
  text-align: center;
  background-color: #FFFFFF;
  border-bottom: 1px solid #e0e0e0;
  padding-top: 10px; /* Small top padding, body handles header offset */
}

.page-faq__hero-title {
  font-size: 2.5em;
  font-weight: bold;
  color: #017439;
  margin-bottom: 15px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-faq__hero-description {
  font-size: 1.1em;
  color: #555555;
  max-width: 800px;
  margin: 0 auto 30px auto;
}

.page-faq__hero-cta {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.page-faq__btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-faq__btn-primary {
  background-color: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  border: 2px solid #C30808;
}

.page-faq__btn-primary:hover {
  background-color: #a30606;
  border-color: #a30606;
}

.page-faq__btn-secondary {
  background-color: #017439;
  color: #FFFFFF;
  border: 2px solid #017439;
}

.page-faq__btn-secondary:hover {
  background-color: #005a2e;
  border-color: #005a2e;
}

/* Section Titles */
.page-faq__section {
  padding: 40px 0;
  background-color: #f9f9f9;
  border-bottom: 1px solid #eee;
}

.page-faq__section:last-of-type {
  border-bottom: none;
}

.page-faq__section-title {
  font-size: 2em;
  color: #017439;
  text-align: center;
  margin-bottom: 25px;
  font-weight: bold;
}

.page-faq__section-intro {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: #555555;
}

/* FAQ List */
.page-faq__faq-list {
  padding-top: 20px;
}

.page-faq__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.page-faq__faq-item[open] {
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.15em;
  font-weight: bold;
  color: #333333;
  cursor: pointer;
  list-style: none;
  user-select: none;
  position: relative;
}

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

.page-faq__faq-qtext {
  flex-grow: 1;
  text-align: left;
  padding-right: 15px;
}

.page-faq__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: #017439;
  transition: transform 0.3s ease;
}

.page-faq__faq-item[open] .page-faq__faq-toggle {
  transform: rotate(45deg);
}

.page-faq__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1em;
  color: #555555;
  line-height: 1.7;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease-out;
}

.page-faq__faq-item[open] .page-faq__faq-answer {
  max-height: 2000px; /* Sufficiently large for smooth animation */
  transition: max-height 0.5s ease-in;
}

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

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

.page-faq__faq-answer a {
  color: #017439;
  text-decoration: underline;
}

.page-faq__faq-answer a:hover {
  color: #005a2e;
}

/* Images within FAQ answers */
.page-faq__faq-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Final CTA */
.page-faq__final-cta {
  text-align: center;
  margin-top: 40px;
}

/* --- Responsive Styles --- */

/* Desktop/Tablet (up to 1024px) */
@media (max-width: 1024px) {
  .page-faq__hero-title {
    font-size: 2.2em;
  }

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

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

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

/* Mobile (up to 768px) */
@media (max-width: 768px) {
  /* 1. Top Section Title + Dual CTA */
  .page-faq__hero-section {
    padding: 20px 0;
    padding-top: 10px !important; /* Small top padding, body handles header offset */
  }

  .page-faq__hero-title {
    font-size: clamp(1.8em, 6vw, 2.2em);
    margin-bottom: 10px;
    padding: 0 15px;
  }

  .page-faq__hero-description {
    font-size: 1em;
    margin-bottom: 20px;
    padding: 0 15px;
  }

  .page-faq__hero-cta {
    flex-direction: column;
    gap: 10px;
    padding: 0 15px;
  }

  .page-faq__btn {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 15px;
    font-size: 1em;
  }

  /* 2. Single Column Long Text Container (General Sections) */
  .page-faq__container {
    padding: 0 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-faq__section {
    padding: 30px 0;
  }

  .page-faq__section-title {
    font-size: 1.6em;
    margin-bottom: 20px;
  }

  .page-faq__section-intro {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  /* 3. General Images and Figure */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
    margin: 15px auto;
  }

  /* 4. Buttons and Button Containers (already handled by .page-faq__btn and .page-faq__hero-cta) */
  /* Ensuring containers for buttons also adapt */
  .page-faq__final-cta {
    padding: 0 15px;
  }

  /* 5. FAQ Block (details/summary) */
  .page-faq__faq-item {
    margin-bottom: 10px;
  }

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

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

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