/* style/faq.css */

/* Biến CSS cho màu sắc */
:root {
  --color-primary: #11A84E;
  --color-secondary: #22C768;
  --color-card-bg: #11271B;
  --color-background: #08160F;
  --color-text-main: #F2FFF6;
  --color-text-secondary: #A7D9B8;
  --color-border: #2E7A4E;
  --color-glow: #57E38D;
  --color-gold: #F2C14E;
  --color-divider: #1E3A2A;
  --color-deep-green: #0A4B2C;
  --gradient-button: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
}

/* BEM Naming: .page-faq__element-name */

.page-faq {
  background-color: var(--color-background);
  color: var(--color-text-main);
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

.page-faq__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  text-align: center;
  overflow: hidden;
}

.page-faq__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.page-faq__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3; /* Làm mờ hình ảnh để văn bản dễ đọc */
  filter: brightness(0.6); /* Giảm độ sáng */
  min-width: 200px;
  min-height: 200px;
}

.page-faq__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5); /* Nền tối để văn bản nổi bật */
  border-radius: 10px;
  color: var(--color-text-main);
}

.page-faq__main-title {
  font-size: clamp(2em, 5vw, 3.5em);
  color: var(--color-gold);
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-faq__subtitle {
  font-size: clamp(1em, 2vw, 1.25em);
  color: var(--color-text-secondary);
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-faq__cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: var(--gradient-button);
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-faq__cta-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-faq__cta-button--large {
  padding: 18px 35px;
  font-size: 1.2em;
}

.page-faq__content-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  background-color: var(--color-background);
  color: var(--color-text-main);
}

.page-faq__section-title,
.page-faq__sub-section-title {
  font-size: clamp(1.8em, 3vw, 2.5em);
  color: var(--color-gold);
  text-align: center;
  margin-bottom: 40px;
  padding-top: 20px;
  border-bottom: 2px solid var(--color-divider);
  padding-bottom: 10px;
}

.page-faq__sub-section-title {
  font-size: clamp(1.5em, 2.5vw, 2em);
  color: var(--color-primary);
  margin-top: 50px;
  margin-bottom: 30px;
}

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

.page-faq__faq-item {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  color: var(--color-text-main);
  transition: all 0.3s ease;
}

.page-faq__faq-item.active {
  box-shadow: 0 0 15px var(--color-primary);
}

.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1em;
  color: var(--color-text-main);
  background-color: var(--color-deep-green);
  border-bottom: 1px solid var(--color-border);
  user-select: none; /* Prevent text selection on click */
}

.page-faq__faq-question:hover {
  background-color: rgba(var(--color-deep-green), 0.8);
}

.page-faq__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: var(--color-gold);
  transition: transform 0.3s ease;
}

.page-faq__faq-item[open] .page-faq__faq-toggle,
.page-faq__faq-item.active .page-faq__faq-toggle {
  transform: rotate(45deg); /* Change '+' to 'x' or '-' */
}

.page-faq__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  color: var(--color-text-secondary);
  border-top: 1px solid var(--color-divider);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.page-faq__faq-item[open] .page-faq__faq-answer,
.page-faq__faq-item.active .page-faq__faq-answer {
  max-height: 2000px; /* Large enough to accommodate content */
  transition: max-height 0.5s ease-in;
}

.page-faq__faq-answer p {
  margin-bottom: 15px;
  color: var(--color-text-secondary);
}

.page-faq__answer-button {
  display: inline-block;
  padding: 10px 20px;
  background: var(--color-primary);
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.9em;
  font-weight: bold;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
  margin-top: 10px;
}

.page-faq__answer-button:hover {
  background-color: var(--color-secondary);
}

.page-faq__conclusion-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 20px;
  background-color: var(--color-deep-green);
  color: var(--color-text-main);
  position: relative;
  overflow: hidden;
}

.page-faq__conclusion-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  min-width: 200px;
  min-height: 200px;
}

.page-faq__conclusion-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-faq__conclusion-title {
  font-size: clamp(1.8em, 3vw, 2.8em);
  color: var(--color-gold);
  margin-bottom: 20px;
}

.page-faq__conclusion-text {
  font-size: clamp(1em, 2vw, 1.15em);
  color: var(--color-text-secondary);
  margin-bottom: 40px;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .page-faq__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
  }

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

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

  .page-faq__subtitle {
    font-size: clamp(0.9em, 4vw, 1.1em);
  }

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

  .page-faq__cta-button--large {
    padding: 15px 25px;
    font-size: 1.1em;
  }

  .page-faq__content-area {
    padding: 30px 15px;
  }

  .page-faq__section-title,
  .page-faq__sub-section-title {
    font-size: clamp(1.5em, 6vw, 2em);
    margin-bottom: 25px;
  }

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

  .page-faq__faq-answer {
    padding: 15px 20px;
    font-size: 0.95em;
  }

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

  .page-faq__conclusion-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin-bottom: 20px;
  }

  .page-faq__conclusion-title {
    font-size: clamp(1.5em, 6vw, 2.2em);
  }

  .page-faq__conclusion-text {
    font-size: clamp(0.9em, 4vw, 1.1em);
  }

  /* Image and Video responsive rules */
  .page-faq img,
  .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__hero-image-wrapper,
  .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;
  }

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

/* Contrast Fixes - Ensure readability on all backgrounds */
.page-faq p, .page-faq li, .page-faq__faq-answer {
  color: var(--color-text-secondary); /* Ensure light text on dark background */
}

.page-faq__faq-question .page-faq__faq-qtext {
  color: var(--color-text-main);
}