:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-color: #EA7C07;
  --text-dark: #333333;
  --text-light: #FFFFFF;
  --bg-light: #F8F8F8;
  --border-color: #e0e0e0;
}

.page-faq {
  font-family: 'Arial', sans-serif;
  color: var(--text-dark); /* Default text color for light body background */
  background-color: var(--secondary-color); /* Default background color for the page content */
  line-height: 1.6;
}

/* Hero Banner (First section, not a full-page hero) */
.page-faq__hero-banner {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color) 50%, var(--secondary-color) 100%);
  padding: 60px 0;
  text-align: center;
  color: var(--text-light);
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
}

.page-faq__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-faq__main-title {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-light);
}

.page-faq__intro-text {
  font-size: 18px;
  max-width: 900px;
  margin: 0 auto 30px auto;
}

.page-faq__hero-image-wrapper {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

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

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

.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-block;
  padding: 15px 40px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons don't overflow */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow text to break words */
}

.page-faq__btn-primary {
  background: var(--login-color); /* Use login color for primary CTA */
  color: var(--text-light);
  border: 2px solid var(--login-color);
}

.page-faq__btn-primary:hover {
  background: #D56F00; /* Darker version of #EA7C07 */
  border-color: #D56F00;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-secondary {
  background: var(--secondary-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-faq__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Content Sections */
.page-faq__content-section {
  padding: 60px 0;
}

.page-faq__dark-section {
  background-color: var(--bg-light); /* Light grey background */
  color: var(--text-dark);
}

.page-faq__section-title {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--primary-color);
}

.page-faq__text-block {
  max-width: 900px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.7;
}

.page-faq__text-block p {
    margin-bottom: 15px;
}

.page-faq__text-block a {
    color: var(--primary-color);
    text-decoration: underline;
}

.page-faq__text-block a:hover {
    color: #2098d0; /* Darker version of #26A9E0 */
}

/* FAQ Area */
.page-faq__faq-area {
  background-color: var(--secondary-color);
}

/* FAQ container style */
.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* FAQ default state - Answer hidden */
.page-faq__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 25px; /* Adjust padding here */
  opacity: 0;
  font-size: 16px;
  line-height: 1.7;
}

/* FAQ expanded state - ⚠️ Use!important and sufficiently large max-height */
.page-faq__faq-item.active .page-faq__faq-answer {
  max-height: 2000px !important; /* ⚠️ Use!important to ensure priority, value large enough to accommodate any content */
  padding: 20px 25px !important; /* Adjust padding here */
  opacity: 1;
  background: var(--bg-light);
  border-radius: 0 0 10px 10px;
  color: var(--text-dark);
}

/* Question style */
.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px; /* Adjust padding here */
  background: var(--secondary-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-dark);
}

.page-faq__faq-question:hover {
  background: var(--bg-light);
  border-color: #c8c8c8; /* Darker version of #e0e0e0 */
}

.page-faq__faq-question:active {
  background: #e8e8e8; /* Darker version of #F8F8F8 */
}

/* Question title style */
.page-faq__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click event */
  color: var(--primary-color); /* Use primary color for question titles */
}

/* Toggle icon */
.page-faq__faq-toggle {
  font-size: 28px; /* Larger icon */
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; /* Larger toggle area */
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
}

.page-faq__faq-item.active .page-faq__faq-toggle {
  color: var(--secondary-color);
  background-color: var(--primary-color);
  transform: rotate(45deg); /* Rotate for minus sign effect */
}

/* Image styles */
.page-faq img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px; /* Consistent border-radius for images */
  object-fit: cover;
}

.page-faq__image-wrapper {
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.page-faq__image-wrapper--small {
    max-width: 800px; /* Example for smaller content images */
    margin-left: auto;
    margin-right: auto;
}

.page-faq__image-wrapper--mobile {
    max-width: 400px; /* Example for mobile app images */
    margin-left: auto;
    margin-right: auto;
}

/* List styles within FAQ answers */
.page-faq__faq-answer ul {
    list-style-type: disc;
    padding-left: 25px;
    margin-top: 10px;
    margin-bottom: 10px;
}

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

/* Global image CSS minimum size check (for content images) */
.page-faq img:not(.shared-header img, .shared-footer img) {
    min-width: 200px;
    min-height: 200px;
}

/* Responsive design */
@media (max-width: 1024px) {
  .page-faq__main-title {
    font-size: 36px;
  }
  .page-faq__section-title {
    font-size: 32px;
  }
  .page-faq__intro-text {
    font-size: 17px;
  }
  .page-faq__faq-question h3 {
    font-size: 17px;
  }
  .page-faq__faq-answer {
    font-size: 15px;
  }
  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    padding: 12px 30px;
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .page-faq__hero-banner {
    padding: 40px 15px;
    padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header offset */
  }

  .page-faq__main-title {
    font-size: 28px;
    margin-bottom: 15px;
  }
  .page-faq__intro-text {
    font-size: 15px;
    margin-bottom: 20px;
  }
  .page-faq__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }
  .page-faq__content-section {
    padding: 40px 0;
  }
  .page-faq__container {
    padding: 0 15px; /* Mobile padding */
  }
  .page-faq__text-block {
    font-size: 15px;
  }

  /* FAQ Mobile Adaptation */
  .page-faq__faq-item {
    margin-bottom: 10px;
    border-radius: 8px;
  }
  .page-faq__faq-question {
    padding: 15px 20px;
    border-radius: 8px;
  }
  .page-faq__faq-question h3 {
    font-size: 16px;
    line-height: 1.4;
  }
  .page-faq__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
    margin-left: 10px;
  }
  .page-faq__faq-item.active .page-faq__faq-answer {
    padding: 15px 20px !important;
  }
  .page-faq__faq-answer {
    padding: 0 20px;
    font-size: 15px;
  }
  .page-faq__faq-answer ul {
      padding-left: 20px;
  }

  /* Image responsive for mobile */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 4px;
  }
  .page-faq__hero-image-wrapper,
  .page-faq__image-wrapper,
  .page-faq__image-wrapper--small,
  .page-faq__image-wrapper--mobile {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-faq img:not(.shared-header img, .shared-footer img) {
        min-width: unset; /* Allow smaller images on mobile if explicitly sized, but max-width: 100% will apply */
        min-height: unset;
  }

  .page-faq__cta-buttons {
    flex-direction: column; /* Stack buttons vertically on mobile */
    gap: 10px;
  }
  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    padding: 12px 20px;
    font-size: 16px;
    width: 100% !important; /* Ensure buttons take full width */
  }
}