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

/* Hero Section */
.page-faq__hero-section {
  padding-top: 10px; /* Small top padding, assuming shared.css handles body padding */
  padding-bottom: 40px;
  background-color: #f0f8ff; /* Light blue background for hero */
  text-align: center;
}

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

.page-faq__main-title {
  font-size: clamp(28px, 4vw, 48px); /* Responsive font size for H1 */
  color: #26A9E0;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-faq__description {
  font-size: 18px;
  color: #555555;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-faq__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  width: 100%; /* Ensure container takes full width */
  max-width: 100%;
  box-sizing: border-box;
}

.page-faq__btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  max-width: 100%; /* Ensure button does not overflow */
  box-sizing: border-box;
}

.page-faq__btn--primary {
  background-color: #26A9E0;
  color: #FFFFFF;
  border: 2px solid #26A9E0;
}

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

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

.page-faq__btn--secondary:hover {
  background-color: #f0f8ff;
  color: #1a8cc4;
}

/* Content Section */
.page-faq__content-section {
  padding: 50px 0;
  background-color: #FFFFFF; /* Light background for content */
}

.page-faq__section-title {
  font-size: 32px;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-faq__intro-text {
  font-size: 17px;
  text-align: center;
  color: #555555;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

.page-faq__category {
  margin-bottom: 40px;
}

.page-faq__category-title {
  font-size: 26px;
  color: #000000;
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0e0e0;
  font-weight: bold;
}

.page-faq__faq-item {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-faq__faq-item summary {
  display: block; /* Ensure summary behaves like a block */
  cursor: pointer;
  padding: 20px;
  font-size: 18px;
  font-weight: bold;
  color: #333333;
  position: relative;
  list-style: none; /* Hide default marker */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  transition: background-color 0.3s ease;
}

.page-faq__faq-item summary:hover {
  background-color: #f0f0f0;
}

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

.page-faq__faq-qtext {
  display: block;
  padding-right: 30px; /* Space for toggle icon */
}

.page-faq__faq-toggle {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  line-height: 1;
  color: #26A9E0;
  transition: transform 0.3s ease;
}

.page-faq__faq-item[open] .page-faq__faq-toggle {
  transform: translateY(-50%) rotate(45deg); /* Rotate to form an 'x' or '-' */
}

.page-faq__faq-answer {
  padding: 0 20px 20px 20px;
  font-size: 16px;
  color: #555555;
  max-height: 0;
  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; /* Arbitrarily large value for smooth transition */
  padding-top: 10px;
  transition: max-height 0.5s ease-in, padding 0.3s ease-in;
}

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

.page-faq__faq-answer ul,
.page-faq__faq-answer ol {
  margin-bottom: 15px;
  padding-left: 25px;
}

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

.page-faq__faq-answer a {
  color: #26A9E0;
  text-decoration: none;
  font-weight: bold;
}

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

/* Images within content */
.page-faq__figure {
  margin: 25px 0;
  text-align: center;
}

.page-faq__figure img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin: 0 auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-faq__figcaption {
  font-size: 14px;
  color: #777777;
  margin-top: 10px;
}

/* Promo Box */
.page-faq__promo-box {
  background-color: #26A9E0;
  color: #FFFFFF;
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  margin-top: 50px;
}

.page-faq__promo-title {
  font-size: 30px;
  margin-bottom: 15px;
  font-weight: bold;
  color: #FFFFFF;
}

.page-faq__promo-description {
  font-size: 18px;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-faq__btn--light {
  background-color: #FFFFFF;
  color: #26A9E0;
  border: 2px solid #FFFFFF;
}

.page-faq__btn--light:hover {
  background-color: #e0f2f7;
  color: #1a8cc4;
}

.page-faq__btn--outline-light {
  background-color: transparent;
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
}

.page-faq__btn--outline-light:hover {
  background-color: #FFFFFF;
  color: #26A9E0;
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-faq__container {
    padding: 0 15px;
  }

  .page-faq__main-title {
    font-size: clamp(26px, 4.5vw, 40px);
  }

  .page-faq__description {
    font-size: 17px;
  }

  .page-faq__section-title {
    font-size: 28px;
  }

  .page-faq__category-title {
    font-size: 24px;
  }

  .page-faq__faq-item summary {
    font-size: 17px;
    padding: 18px;
  }

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

  .page-faq__promo-title {
    font-size: 26px;
  }

  .page-faq__promo-description {
    font-size: 17px;
  }
}

@media (max-width: 768px) {
  /* 1. Top section title + dual CTA */
  .page-faq__hero-section {
    padding-top: 10px !important; /* Enforce small top padding */
    padding-bottom: 30px;
  }

  .page-faq__main-title {
    font-size: clamp(24px, 6vw, 36px);
    margin-bottom: 10px;
  }

  .page-faq__description {
    font-size: 15px;
    margin-bottom: 20px;
  }

  .page-faq__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px;
    padding-left: 15px; /* Ensure container padding */
    padding-right: 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-faq__btn {
    width: 100% !important; /* Full width buttons */
    max-width: 100% !important;
    padding: 10px 15px;
    font-size: 15px;
    white-space: normal !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
  }

  /* 2. Single column long text container */
  .page-faq__content-section {
    padding: 30px 0;
  }

  .page-faq__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-faq__section-title {
    font-size: 26px;
    margin-bottom: 15px;
  }

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

  .page-faq__category-title {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .page-faq__faq-item summary {
    font-size: 16px;
    padding: 15px;
  }

  .page-faq__faq-qtext {
    padding-right: 25px;
  }

  .page-faq__faq-toggle {
    right: 15px;
    font-size: 20px;
  }

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

  .page-faq__faq-answer ul,
  .page-faq__faq-answer ol {
    padding-left: 20px;
  }

  /* 3. General images and figure */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  .page-faq__figure {
    margin: 20px 0;
  }

  .page-faq__figcaption {
    font-size: 13px;
    margin-top: 8px;
  }

  /* 4. Buttons and button containers (already covered in top section, but re-emphasize) */
  .page-faq__cta-buttons--inline {
    flex-direction: column;
    gap: 10px;
    padding-left: 0;
    padding-right: 0;
  }

  /* 5. FAQ blocks (readability enhancements) */
  .page-faq__promo-box {
    padding: 30px 20px;
    margin-top: 30px;
  }

  .page-faq__promo-title {
    font-size: 24px;
    margin-bottom: 10px;
  }

  .page-faq__promo-description {
    font-size: 16px;
    margin-bottom: 20px;
  }
}