/* style/faq.css */
:root {
  --primary-color: #FFD700; /* Vàng sáng */
  --secondary-color: #1E90FF; /* Xanh biển */
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #0a0a0a;
  --bg-light: #f9f9f9;
  --border-color: #e0e0e0;
}

.page-faq {
  font-family: 'Arial', sans-serif;
  color: var(--text-light); /* Body background is dark, so text is light */
  line-height: 1.6;
  background-color: var(--bg-dark); /* Ensure consistency with body bg */
}

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

/* Fixed navigation bar spacing */
.page-faq__hero-section {
  padding-top: 120px; /* Adjust based on shared header height */
  padding-bottom: 60px;
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  text-align: center;
  position: relative;
  z-index: 1;
}

.page-faq__hero-section.page-faq__dark-bg {
  color: var(--text-light);
}

.page-faq__main-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.page-faq__main-title-link {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-faq__main-title-link:hover {
  color: var(--secondary-color);
}

.page-faq__highlight {
  color: var(--primary-color);
}

.page-faq__description {
  font-size: 18px;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

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

.page-faq__cta-button {
  display: inline-block;
  padding: 15px 40px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: none;
  cursor: pointer;
}

.page-faq__btn-primary {
  background: var(--primary-color);
  color: var(--text-dark); /* Ensure contrast with primary-color */
}

.page-faq__btn-primary:hover {
  background: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-faq__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.page-faq__section-title {
  font-size: 38px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 25px;
  color: var(--primary-color);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.page-faq__section-intro {
  font-size: 17px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 50px auto;
  color: #cccccc;
}

/* FAQ Section */
.page-faq__faq-section {
  padding: 60px 0;
  background-color: #1a1a1a; /* Slightly lighter than body for contrast */
  color: var(--text-light);
}

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

.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: #2a2a2a; /* Darker background for question */
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-faq__faq-question:hover {
  background: #3a3a3a;
  border-color: var(--primary-color);
}

.page-faq__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-light);
  pointer-events: none; /* Prevent h3 from blocking click event on parent */
}

.page-faq__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent toggle from blocking click event on parent */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  transform: rotate(0deg);
}

.page-faq__faq-item.active .page-faq__faq-toggle {
  color: var(--secondary-color);
  transform: rotate(45deg); /* Rotate for 'x' effect */
}

.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 25px;
  opacity: 0;
  background: #1a1a1a; /* Background for answer */
  color: #cccccc;
  border-radius: 0 0 8px 8px;
}

.page-faq__faq-item.active .page-faq__faq-answer {
  max-height: 2000px !important; /* Sufficiently large to contain content */
  padding: 20px 25px !important;
  opacity: 1;
  border: 1px solid #3a3a3a;
  border-top: none;
}

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

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

.page-faq__btn-small {
  display: inline-block;
  padding: 10px 20px;
  background: var(--secondary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 10px;
  transition: background-color 0.3s ease;
}

.page-faq__btn-small:hover {
  background: #1a7ad9;
}

.page-faq__image-content {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Contact CTA Section */
.page-faq__contact-cta {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(45deg, var(--secondary-color), #0056b3); /* Using secondary color with a gradient */
  color: var(--text-light);
}

.page-faq__contact-cta .page-faq__section-title {
  color: var(--text-light);
}

.page-faq__contact-cta .page-faq__description {
  color: #e0e0e0;
  margin-bottom: 40px;
}

.page-faq__contact-cta .page-faq__btn-primary {
  background: var(--primary-color);
  color: var(--text-dark);
}

.page-faq__contact-cta .page-faq__btn-primary:hover {
  background: #e6c200;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-faq__main-title {
    font-size: 40px;
  }
  .page-faq__section-title {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .page-faq__hero-section {
    padding-top: 100px; /* Adjust for mobile header */
    padding-bottom: 40px;
  }

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

  .page-faq__description {
    font-size: 16px;
    margin-bottom: 25px;
    padding: 0 15px;
  }

  .page-faq__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

  .page-faq__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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

  .page-faq__section-intro {
    font-size: 15px;
    margin-bottom: 30px;
    padding: 0 15px;
  }

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

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

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

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

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

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

  .page-faq__btn-small {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    text-align: center;
  }

  .page-faq__image-content {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    margin: 15px auto;
  }

  .page-faq__contact-cta {
    padding: 50px 0;
  }

  .page-faq__container {
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .page-faq__main-title {
    font-size: 28px;
  }
  .page-faq__section-title {
    font-size: 24px;
  }
  .page-faq__faq-question h3 {
    font-size: 15px;
  }
  .page-faq__faq-toggle {
    font-size: 20px;
    width: 24px;
    height: 24px;
  }
  .page-faq__faq-answer p {
    font-size: 14px;
  }
}

/* Ensure all images are responsive by default */
.page-faq img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Ensure all image containers are responsive */
.page-faq__image-container,
.page-faq__image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

/* Mobile specific overrides for images and containers */
@media (max-width: 768px) {
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-faq__image-container,
  .page-faq__image-wrapper,
  .page-faq__container,
  .page-faq__hero-section,
  .page-faq__faq-section,
  .page-faq__contact-cta {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* padding-left and padding-right are already set in media queries for specific sections */
  }
}