/* style/faq.css */

/* Base styles for the FAQ page */
.page-faq {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: var(--background-color, #ffffff); /* Inherit from shared or default to white */
}

.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: 10px 0 60px 0; /* Small top padding, more bottom padding */
  overflow: hidden;
  background: linear-gradient(135deg, #26A9E0, #1a7a9e); /* Brand color gradient */
  color: #ffffff;
}

.page-faq__hero-image-wrapper {
  width: 100%;
  max-height: 500px; /* Limit height for hero image */
  overflow: hidden;
  margin-bottom: 30px;
}

.page-faq__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.7); /* Slightly dim the image for text readability */
}

.page-faq__hero-content {
  position: relative; /* Position relative to allow z-index for text over dimmed image */
  z-index: 1;
  padding: 0 20px;
  max-width: 800px;
}

.page-faq__main-title {
  font-size: clamp(2.2em, 4vw, 3.2em); /* Responsive font size */
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
}

.page-faq__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-faq__cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.page-faq__cta-button {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-sizing: border-box;
  text-align: center;
  max-width: 100%;
}

.page-faq__btn-primary {
  background-color: #EA7C07; /* Login/Register color */
  color: #ffffff;
  border: 2px solid #EA7C07;
}

.page-faq__btn-primary:hover {
  background-color: #d16d06;
  transform: translateY(-2px);
}

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

.page-faq__btn-secondary:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
}

.page-faq__btn-small {
  padding: 10px 20px;
  font-size: 0.9em;
}

/* FAQ Section */
.page-faq__faq-section {
  padding: 60px 0;
  background-color: #ffffff;
  color: #333333;
}

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

.page-faq__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-faq__faq-item {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.page-faq__faq-item[open] {
  background-color: #ffffff;
  border-color: #26A9E0;
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-weight: bold;
  font-size: 1.15em;
  color: #333333;
  cursor: pointer;
  list-style: none; /* For details/summary */
  -webkit-touch-callout: none; /* Disable callout on iOS */
  -webkit-user-select: none; /* Disable text selection on iOS */
  -khtml-user-select: none; /* Disable text selection on Safari */
  -moz-user-select: none; /* Disable text selection on Firefox */
  -ms-user-select: none; /* Disable text selection on IE/Edge */
  user-select: none; /* Standard syntax */
}

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

.page-faq__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #26A9E0;
}

.page-faq__faq-answer {
  padding: 0 20px 20px 20px;
  font-size: 1em;
  color: #555555;
}

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

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

.page-faq__image-in-answer {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 15px;
  border-radius: 5px;
  object-fit: cover;
}

/* CTA Section at bottom */
.page-faq__cta-section {
  padding: 60px 20px;
  text-align: center;
  background: linear-gradient(135deg, #26A9E0, #1a7a9e);
  color: #ffffff;
}

.page-faq__cta-title {
  font-size: clamp(1.8em, 3.5vw, 2.8em);
  margin-bottom: 20px;
  color: #ffffff;
}

.page-faq__cta-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .page-faq__container {
    padding: 0 15px;
  }

  .page-faq__hero-section {
    padding: 10px 0 40px 0;
  }

  .page-faq__hero-content {
    padding: 0 15px;
  }

  .page-faq__main-title {
    font-size: 2em;
  }

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

  .page-faq__cta-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .page-faq__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-faq__faq-section,
  .page-faq__cta-section {
    padding: 40px 0;
  }

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

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

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

  .page-faq__faq-answer {
    padding: 0 15px 15px 15px;
  }

  /* Mobile specific image/video/button overrides */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-faq video,
  .page-faq__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-faq__section,
  .page-faq__card,
  .page-faq__container,
  .page-faq__video-section,
  .page-faq__video-container,
  .page-faq__video-wrapper,
  .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;
    overflow: hidden !important;
  }

  .page-faq__video-section {
    padding-top: 10px !important; /* body đã xử lý padding-top cho header */
  }
}

/* Ensure content area images are not too small */
.page-faq .page-faq__faq-answer img {
  min-width: 200px;
  min-height: 200px;
}

/* No filter on images */
.page-faq img {
  filter: none;
}

/* Ensure hero image filter is only for dimming, not color change */
.page-faq__hero-image {
  filter: brightness(0.7);
}