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

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  width: 100%;
  padding-top: 10px; /* Small top padding, relying on body padding-top for header offset */
  margin-bottom: 40px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #f5f5f5; /* Light background for the section */
}

.page-faq__hero-image {
  width: 100%;
  max-height: 500px; /* Limit height on desktop */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-faq__hero-image img {
  width: 100%;
  height: auto;
  object-fit: cover; /* Desktop: cover to fill space */
  display: block;
}

.page-faq__hero-content {
  position: relative; /* Ensure content is above any potential background elements */
  z-index: 10;
  max-width: 900px;
  text-align: center;
  padding: 30px 20px 40px;
  background-color: #ffffff; /* White background for content block for contrast */
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-top: -80px; /* Overlap with image slightly for visual appeal */
}

.page-faq__main-title {
  font-size: clamp(28px, 4vw, 42px); /* Responsive font size */
  color: #26A9E0;
  margin-bottom: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.page-faq__description {
  font-size: 18px;
  color: #555555;
  margin-bottom: 30px;
}

/* CTA Buttons in Hero */
.page-faq__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 180px;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons don't overflow */
  white-space: normal;
  word-wrap: break-word;
}

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

.page-faq__btn-primary:hover {
  background-color: #1a8ccb;
  border-color: #1a8ccb;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(38, 169, 224, 0.3);
}

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

.page-faq__btn-secondary:hover {
  background-color: #f0f8ff;
  color: #1a8ccb;
  border-color: #1a8ccb;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(38, 169, 224, 0.1);
}

.page-faq__btn-small {
  padding: 10px 20px;
  font-size: 15px;
  min-width: unset;
}

/* Content Section (General) */
.page-faq__content-section {
  padding: 40px 0;
  background-color: #f9f9f9;
}

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

.page-faq__section-title {
  font-size: clamp(24px, 3.5vw, 36px);
  color: #26A9E0;
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
}

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

/* FAQ List Styles (details/summary based) */
details.page-faq__faq-item {
  margin-bottom: 0; /* Gap handled by parent flex */
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
details.page-faq__faq-item summary.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none; /* Hide default marker */
  transition: background-color 0.3s ease;
}
details.page-faq__faq-item summary.page-faq__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker for webkit browsers */
}
details.page-faq__faq-item summary.page-faq__faq-question:hover {
  background: #f5f5f5;
}

.page-faq__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333;
}
.page-faq__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: #26A9E0;
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
  transition: transform 0.3s ease;
}
details.page-faq__faq-item[open] .page-faq__faq-toggle {
  transform: rotate(45deg); /* Rotate + to X */
}

details.page-faq__faq-item .page-faq__faq-answer {
  padding: 0 25px 25px;
  background: #fcfcfc;
  border-top: 1px solid #eee;
  border-radius: 0 0 8px 8px;
  color: #555555;
}

.page-faq__faq-answer p {
  margin-bottom: 15px;
  font-size: 16px;
}
.page-faq__faq-answer ol,
.page-faq__faq-answer ul {
  margin-left: 25px;
  margin-bottom: 15px;
  font-size: 16px;
}
.page-faq__faq-answer li {
  margin-bottom: 8px;
}
.page-faq__faq-answer a {
  color: #26A9E0;
  text-decoration: underline;
}
.page-faq__faq-answer a:hover {
  color: #1a8ccb;
}

.page-faq__image-inline {
  width: 100%;
  height: auto;
  max-width: 600px; /* Limit width of inline images */
  display: block;
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Final CTA Section */
.page-faq__cta-section {
  background-color: #26A9E0;
  color: #FFFFFF;
  padding: 60px 0;
  text-align: center;
  margin-top: 40px;
}

.page-faq__cta-container {
  max-width: 800px;
}

.page-faq__cta-title {
  font-size: clamp(26px, 4vw, 38px);
  color: #FFFFFF;
  margin-bottom: 20px;
  font-weight: 700;
}

.page-faq__cta-description {
  font-size: 18px;
  color: #f0f0f0;
  margin-bottom: 30px;
}

/* Specific button styles for the final CTA */
.page-faq__cta-section .page-faq__btn-primary {
  background-color: #EA7C07; /* Login color for primary CTA */
  border-color: #EA7C07;
}

.page-faq__cta-section .page-faq__btn-primary:hover {
  background-color: #e06a00;
  border-color: #e06a00;
}

.page-faq__cta-section .page-faq__btn-secondary {
  background-color: #FFFFFF;
  color: #26A9E0;
  border-color: #FFFFFF;
}

.page-faq__cta-section .page-faq__btn-secondary:hover {
  background-color: #e6e6e6;
  color: #1a8ccb;
  border-color: #e6e6e6;
}

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

/* For screens smaller than 849px (Hero image specific) */
@media (max-width: 849px) {
  .page-faq__hero-image img {
    object-fit: contain !important; /* Prevent cropping on smaller screens */
    aspect-ratio: unset !important; /* Allow natural aspect ratio for contain */
    max-height: 400px;
  }
  .page-faq__hero-content {
    margin-top: -40px; /* Adjust overlap */
  }
}

/* For screens smaller than 768px (Mobile) */
@media (max-width: 768px) {
  .page-faq {
    font-size: 16px;
    line-height: 1.6;
  }

  /* Hero Section */
  .page-faq__hero-section {
    padding-top: 10px;
    margin-bottom: 20px;
  }
  .page-faq__hero-image {
    max-height: 300px;
  }
  .page-faq__hero-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    aspect-ratio: unset !important;
  }
  .page-faq__hero-content {
    padding: 20px 15px 30px;
    margin-top: -30px;
    border-radius: 0;
    box-shadow: none;
  }
  .page-faq__main-title {
    font-size: clamp(24px, 7vw, 32px);
    margin-bottom: 10px;
  }
  .page-faq__description {
    font-size: 16px;
    margin-bottom: 20px;
  }

  /* CTA Buttons (general and hero) */
  .page-faq__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px;
    overflow: hidden;
  }
  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Content Section */
  .page-faq__content-section {
    padding: 20px 0;
  }
  .page-faq__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-faq__section-title {
    font-size: clamp(22px, 6vw, 28px);
    margin-bottom: 15px;
  }
  .page-faq__section-intro {
    font-size: 15px;
    margin-bottom: 20px;
  }

  /* FAQ List */
  .page-faq__faq-list {
    gap: 10px;
    margin-top: 20px;
  }
  details.page-faq__faq-item {
    border-radius: 5px;
  }
  details.page-faq__faq-item summary.page-faq__faq-question {
    padding: 15px 20px;
  }
  .page-faq__faq-qtext {
    font-size: 16px;
  }
  .page-faq__faq-toggle {
    font-size: 24px;
    width: 25px;
    margin-left: 10px;
  }
  details.page-faq__faq-item .page-faq__faq-answer {
    padding: 0 20px 20px;
  }
  .page-faq__faq-answer p,
  .page-faq__faq-answer ol,
  .page-faq__faq-answer ul,
  .page-faq__faq-answer li {
    font-size: 15px;
  }
  .page-faq__image-inline {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    margin: 15px auto;
  }

  /* Final CTA Section */
  .page-faq__cta-section {
    padding: 30px 0;
    margin-top: 20px;
  }
  .page-faq__cta-title {
    font-size: clamp(22px, 6vw, 30px);
    margin-bottom: 15px;
  }
  .page-faq__cta-description {
    font-size: 16px;
    margin-bottom: 20px;
  }

  /* General image and container rules for mobile */
  .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__faq-answer {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  /* Ensure content section padding for mobile */
  .page-faq__content-section .page-faq__container {
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-faq__cta-section .page-faq__cta-container {
    padding-left: 15px;
    padding-right: 15px;
  }
}