/* style/faq.css */
/* Base styles for the FAQ page */
.page-faq {
  font-family: Arial, sans-serif;
  color: #333333; /* Dark text for default light body background */
  line-height: 1.6;
  background-color: #f8f9fa; /* Light background for overall page content */
}

.page-faq__section-spacing {
  padding: 60px 0;
}

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

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
  background: linear-gradient(135deg, #26A9E0, #FFFFFF); /* Brand colors */
  color: #ffffff; /* White text on gradient background */
}

.page-faq__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column; /* Default vertical stack */
  align-items: center;
  justify-content: center;
  gap: 30px; /* Space between content and image */
}

.page-faq__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 800px; /* Constrain content width */
}

.page-faq__main-title {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #ffffff;
}

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

.page-faq__hero-image {
  width: 100%;
  max-width: 900px; /* Max width for the image */
  margin-top: 30px;
}

.page-faq__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

/* CTA Button */
.page-faq__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: #EA7C07; /* Login color for primary CTA */
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  border: 2px solid transparent; /* Default border */
  box-sizing: border-box;
}

.page-faq__cta-button:hover {
  background: #d46d06; /* Slightly darker on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-faq__cta-button:active {
  background: #c06005;
}

/* Section titles and descriptions */
.page-faq__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 15px;
  color: #26A9E0; /* Brand color for main titles */
}

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

/* FAQ List */
.page-faq__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

/* FAQ Item styles */
.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  background-color: #ffffff; /* White background for FAQ items */
}

/* FAQ Question styles */
.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: #333333;
}

.page-faq__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-faq__faq-question:active {
  background: #eeeeee;
}

/* FAQ Question H3 */
.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 events */
  color: #333333;
}

/* FAQ Toggle Icon */
.page-faq__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #26A9E0; /* Brand color for toggle icon */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click events */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
  color: #000000; /* Darker color when active */
  transform: rotate(180deg); /* Rotate for minus sign effect if using icon font */
}

/* FAQ Answer styles - Hidden by default */
.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 20px;
  opacity: 0;
  background: #fefefe; /* Slightly off-white for answer background */
  border-top: 1px solid #eeeeee;
  color: #555555;
}

/* FAQ Answer styles - Active/Expanded state */
.page-faq__faq-item.active .page-faq__faq-answer {
  max-height: 2000px !important; /* CRITICAL: Use !important and large value */
  padding: 20px !important; /* CRITICAL: Use !important */
  opacity: 1;
  border-radius: 0 0 8px 8px;
}

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

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

.page-faq__faq-answer a:hover {
  color: #1a7fb3;
}

/* Specific button styles within FAQ answers */
.page-faq__btn-primary {
  display: inline-block;
  padding: 10px 20px;
  background: #26A9E0;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  margin-top: 10px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-sizing: border-box;
}

.page-faq__btn-primary:hover {
  background: #1a7fb3;
  transform: translateY(-1px);
}

.page-faq__btn-primary:active {
  background: #156a93;
}

.page-faq__btn-secondary {
  display: inline-block;
  padding: 10px 20px;
  background: #ffffff;
  color: #26A9E0;
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  margin-top: 10px;
  transition: all 0.3s ease;
  border: 2px solid #26A9E0;
  box-sizing: border-box;
}

.page-faq__btn-secondary:hover {
  background: #f0f8ff;
  color: #1a7fb3;
  border-color: #1a7fb3;
  transform: translateY(-1px);
}

.page-faq__btn-secondary:active {
  background: #e0eef9;
}

/* CTA Section at bottom */
.page-faq__cta-section {
  background: #26A9E0; /* Brand primary color for background */
  color: #ffffff;
  text-align: center;
  padding: 80px 20px;
}

.page-faq__cta-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.page-faq__cta-title {
  font-size: 38px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #ffffff;
}

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

.page-faq__cta-section .page-faq__cta-button {
  background: #ffffff; /* White background for buttons in dark section */
  color: #26A9E0; /* Brand color text */
  border-color: #ffffff;
  margin: 0 10px; /* Space between buttons */
}

.page-faq__cta-section .page-faq__cta-button:hover {
  background: #f0f0f0;
  color: #1a7fb3;
}

/* Image responsive and filter restrictions */
.page-faq img {
  max-width: 100%;
  height: auto;
  display: block;
  /* NO CSS FILTERS ALLOWED HERE */
}

/* Mobile Responsive Design */
@media (max-width: 1024px) {
  .page-faq__hero-container {
    flex-direction: column;
  }
  .page-faq__hero-image {
    margin-top: 20px;
  }
  .page-faq__section-spacing {
    padding: 40px 0;
  }
  .page-faq__cta-section {
    padding: 60px 20px;
  }
}

@media (max-width: 768px) {
  .page-faq {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-faq__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* CRITICAL: mobile padding-top */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-faq__main-title {
    font-size: 32px;
    margin-bottom: 15px;
  }

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

  .page-faq__cta-button {
    padding: 12px 25px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin: 10px 0 !important; /* Stack buttons vertically */
  }

  .page-faq__cta-section .page-faq__cta-button {
    margin: 10px 0;
  }

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

  .page-faq__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-faq__faq-question {
    padding: 15px;
  }

  .page-faq__faq-question h3 {
    font-size: 16px;
  }

  .page-faq__faq-toggle {
    font-size: 24px;
    width: 25px;
    height: 25px;
  }

  .page-faq__faq-item.active .page-faq__faq-answer {
    padding: 15px !important;
  }

  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin: 10px 0 !important; /* Ensure buttons stack or wrap properly */
  }

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

  .page-faq__content-area,
  .page-faq__cta-section {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Ensure all images are responsive and do not overflow */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  
  .page-faq__hero-image img {
    border-radius: 4px;
  }

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

  .page-faq__cta-description {
    font-size: 16px;
  }
}