/* style/faq.css */
/* body đã có padding-top: var(--header-offset); nên không cần thêm ở đây */
.page-faq {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Text Main */
  background-color: #F5F7FA; /* Background */
}

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Ensure image is above content */
  align-items: center;
  padding-bottom: 40px; /* Space below content */
  padding-top: 10px; /* Small top padding for first section */
  box-sizing: border-box;
  background-color: #F5F7FA; /* Match body background */
}

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

.page-faq__hero-image {
  width: 100%;
  height: auto;
  display: block;
  min-width: 200px; /* Ensure minimum size */
  min-height: 200px;
}

.page-faq__hero-content {
  max-width: 900px;
  width: 100%; /* Important for flex child with max-width */
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

.page-faq__main-title {
  font-size: clamp(2em, 5vw, 3.5em); /* Responsive font size for H1 */
  color: #E53935; /* Main brand color */
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.2;
}

.page-faq__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #333333; /* Text Main */
}

/* General Buttons */
.page-faq__btn-primary,
.page-faq__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure responsive */
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-faq__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Custom button color */
  color: #ffffff;
  border: none;
  margin-right: 15px;
}

.page-faq__btn-primary:hover {
  opacity: 0.9;
}

.page-faq__btn-secondary {
  background-color: #ffffff;
  color: #E53935; /* Main brand color */
  border: 2px solid #E53935; /* Main brand color for border */
}

.page-faq__btn-secondary:hover {
  background-color: #f0f0f0;
}

/* FAQ Section */
.page-faq__faq-section {
  padding: 60px 20px;
  background-color: #F5F7FA; /* Background */
  box-sizing: border-box;
}

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

.page-faq__section-title {
  font-size: 2.5em;
  color: #E53935; /* Main brand color */
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-faq__faq-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-faq__faq-category {
  background-color: #ffffff; /* Card BG */
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #E0E0E0; /* Border */
}

.page-faq__category-title {
  font-size: 1.8em;
  color: #E53935; /* Main brand color */
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 2px solid #FF5A4F; /* Auxiliary brand color */
}

.page-faq__faq-item {
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.page-faq__faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2em;
  font-weight: bold;
  color: #333333; /* Text Main */
  cursor: pointer;
  padding: 10px 0;
  list-style: none; /* Remove default marker for details summary */
}

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

.page-faq__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: #E53935; /* Main brand color */
  margin-left: 10px;
  transition: transform 0.3s ease;
}

.page-faq__faq-item[open] .page-faq__faq-toggle {
  transform: rotate(45deg); /* Rotate for 'x' effect */
}

.page-faq__faq-answer {
  padding: 10px 0 0 0;
  font-size: 1em;
  color: #555555;
  line-height: 1.8;
}

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

.page-faq__faq-answer p:last-child {
  margin-bottom: 0;
}

.page-faq__link-text {
  color: #E53935; /* Main brand color for links */
  text-decoration: underline;
}

.page-faq__link-text:hover {
  color: #FF5A4F; /* Auxiliary brand color on hover */
}

.page-faq__image-container {
  width: 100%;
  max-width: 100%;
  margin-bottom: 30px;
  overflow: hidden;
  box-sizing: border-box;
}

.page-faq__content-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  min-width: 200px; /* Ensure minimum size */
  min-height: 200px;
}

/* Call to Action Section */
.page-faq__cta-section {
  background-color: #E53935; /* Dark background, main brand color */
  color: #ffffff; /* White text for contrast */
  padding: 60px 20px;
  text-align: center;
  box-sizing: border-box;
}

.page-faq__cta-title {
  font-size: 2em;
  margin-bottom: 20px;
  font-weight: bold;
  color: #ffffff;
}

.page-faq__cta-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #ffffff;
}

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

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-faq__hero-content {
    max-width: 768px;
  }
  .page-faq__container {
    max-width: 960px;
  }
}

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

  .page-faq__hero-section {
    padding-bottom: 30px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-faq__main-title {
    font-size: clamp(1.8em, 8vw, 2.5em);
  }

  .page-faq__description {
    font-size: 1em;
  }

  .page-faq__btn-primary,
  .page-faq__btn-secondary {
    padding: 12px 20px;
    font-size: 1em;
    width: 100% !important; /* Force full width on mobile */
    margin-right: 0;
    margin-bottom: 15px; /* Add space between stacked buttons */
  }

  .page-faq__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    align-items: center;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-faq__faq-section {
    padding: 40px 15px;
  }

  .page-faq__section-title {
    font-size: 2em;
    margin-bottom: 30px;
  }

  .page-faq__category-title {
    font-size: 1.5em;
  }

  .page-faq__faq-question {
    font-size: 1.1em;
  }

  .page-faq__faq-answer {
    font-size: 0.95em;
  }

  .page-faq__cta-section {
    padding: 40px 15px;
  }

  .page-faq__cta-title {
    font-size: 1.8em;
  }

  .page-faq__cta-description {
    font-size: 1em;
  }

  /* Mobile image responsiveness */
  .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__hero-image-wrapper,
  .page-faq__image-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .page-faq__video-section { /* If video section existed */
    padding-top: 10px !important; 
  }

  /* Mobile button responsiveness */
  .page-faq__cta-button,
  .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;
  }
  
  .page-faq__cta-buttons,
  .page-faq__button-group,
  .page-faq__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }
}

/* Ensure contrast for specific elements based on body background (assumed light) */
.page-faq__light-bg { /* Default for sections on light background */
  color: #333333;
  background-color: #F5F7FA;
}

.page-faq__dark-bg { /* For sections with brand color background */
  background-color: #E53935;
  color: #ffffff; /* White text for contrast */
}

/* Card background and text color explicitly defined */
.page-faq__faq-category {
  background-color: #FFFFFF; /* Card BG */
  color: #333333; /* Text Main */
}

/* Ensure button text is visible */
.page-faq__btn-primary {
  color: #ffffff;
}
.page-faq__btn-secondary {
  color: #E53935;
}

/* Contrast fix if needed (though not expected for this design) */
.page-faq__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

.page-faq__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}