.page-faq {
  font-family: Arial, sans-serif;
  color: var(--text-main, #1F2D3D); /* Default text color, assuming light body bg */
  background-color: var(--page-bg-color, #F4F7FB); /* Using provided background color */
  line-height: 1.6;
}

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

.page-faq__hero-section {
  display: flex;
  flex-direction: column; /* Default to column for mobile first, then row for desktop */
  align-items: center;
  gap: 30px;
  padding: 10px 20px 40px; /* Small top padding as body handles header offset */
  background: var(--background, #F4F7FB);
  text-align: center;
}

.page-faq__hero-content {
  max-width: 800px;
  text-align: center;
}

.page-faq__main-title {
  font-size: clamp(2em, 4vw, 2.8em); /* Use clamp for H1 */
  color: var(--text-main, #1F2D3D);
  margin-bottom: 15px;
  line-height: 1.2;
  font-weight: 700;
}

.page-faq__description {
  font-size: 1.1em;
  color: var(--text-main, #1F2D3D);
  margin-bottom: 30px;
}

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

.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 1.05em;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 100%; /* Ensure button takes full width if needed */
  box-sizing: border-box;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word;
  text-align: center;
}

.page-faq__btn-primary {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 10px rgba(47, 107, 255, 0.3);
}

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

.page-faq__btn-secondary {
  background: #ffffff;
  color: var(--main-color, #2F6BFF);
  border: 2px solid var(--main-color, #2F6BFF);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.page-faq__btn-secondary:hover {
  background: var(--main-color, #2F6BFF);
  color: #ffffff;
}

.page-faq__hero-image-wrapper {
  max-width: 800px;
  width: 100%;
  box-sizing: border-box;
}

.page-faq__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  object-fit: cover; /* Default to cover for desktop */
  min-width: 200px; /* Minimum size requirement */
  min-height: 200px; /* Minimum size requirement */
}

.page-faq__section-title {
  font-size: 2.2em;
  color: var(--custom-color-1776249996415, #000000);
  text-align: center;
  margin-bottom: 30px;
  font-weight: 700;
}

.page-faq__faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 900px;
  margin: 0 auto 40px;
}

.page-faq__faq-item {
  background: var(--card-bg, #FFFFFF);
  border: 1px solid var(--border, #D6E2FF);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  color: var(--text-main, #1F2D3D);
}

.page-faq__faq-item:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15em;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-main, #1F2D3D);
  list-style: none; /* Hide default details marker */
  position: relative;
}

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

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

.page-faq__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: var(--main-color, #2F6BFF);
  transition: transform 0.3s ease;
}

.page-faq__faq-item[open] .page-faq__faq-toggle {
  transform: rotate(45deg); /* Change + to X or similar */
}

.page-faq__faq-answer {
  padding: 0 25px 20px;
  font-size: 1em;
  color: var(--text-main, #1F2D3D);
  max-height: 0; /* For smooth transition with JS, or handled by details tag */
  overflow: hidden; /* For smooth transition with JS */
  transition: max-height 0.3s ease-out, padding 0.3s ease-out; /* For smooth transition with JS */
}

.page-faq__faq-item[open] .page-faq__faq-answer {
    max-height: 1000px; /* Arbitrary large value for open state */
    padding-top: 10px;
}

.page-faq__faq-answer p {
  margin: 0;
  padding: 0;
}

.page-faq__faq-answer a {
    color: var(--main-color, #2F6BFF);
    text-decoration: underline;
}

.page-faq__faq-answer a:hover {
    color: var(--secondary-color, #6FA3FF);
}

/* General image and container responsiveness */
.page-faq img {
  max-width: 100%;
  height: auto;
  display: block;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
}

/* --- Desktop Styles (already defined as base) --- */
@media (min-width: 769px) {
  .page-faq__hero-section {
    flex-direction: row;
    padding: 60px 20px;
    text-align: left;
  }

  .page-faq__hero-content {
    text-align: left;
    margin-right: 30px;
  }

  .page-faq__cta-buttons {
    justify-content: flex-start;
  }

  .page-faq__hero-image-wrapper {
    flex-shrink: 0;
  }
}

/* --- Mobile Styles --- */
@media (max-width: 768px) {
  /* 1. Hero Section */
  .page-faq__hero-section {
    flex-direction: column !important; /* Force column for mobile */
    padding: 10px 15px 30px !important; /* Small top padding */
    gap: 20px;
  }

  .page-faq__main-title {
    font-size: 1.8em !important;
    margin-bottom: 10px;
  }

  .page-faq__description {
    font-size: 1em !important;
    margin-bottom: 20px;
  }

  /* 4. Buttons and Button Containers */
  .page-faq__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 15px !important;
    padding: 0 15px; /* Add padding to container */
  }

  .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; /* Ensure text inside buttons has padding */
    padding-right: 15px;
  }
  
  /* 3. General Images and Containers */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important; /* Hero mobile: contain, not cover */
    /* min-width and min-height are handled by the max-width:100% and container sizing */
  }

  .page-faq__hero-image {
    object-fit: contain !important; /* Specifically for hero image */
    aspect-ratio: unset !important;
    max-height: none !important;
  }

  .page-faq__section,
  .page-faq__content-area,
  .page-faq__hero-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* 6. Other Content Modules (FAQ specific) */
  .page-faq__section-title {
    font-size: 1.8em !important;
    margin-bottom: 20px;
  }

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

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

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