/* style/faq.css */

/* Cài đặt cơ bản cho trang FAQ */
.page-faq {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #f0f0f0; /* Màu chữ nhạt cho nền tối */
  background-color: #000; /* Nền đen từ body */
}

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

/* Intro Section */
.page-faq__intro-section {
  padding: 120px 0 60px; /* Thêm padding-top để tránh header cố định */
  text-align: center;
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.1), rgba(40, 167, 69, 0.1));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-faq__main-heading {
  font-size: 42px;
  color: #ffd700; /* Màu vàng kim cho tiêu đề chính */
  margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.page-faq__intro-text {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 30px;
  color: #e0e0e0;
}

.page-faq__intro-text strong {
    color: #ffd700;
}

.page-faq__image-wrapper {
  width: 100%;
  max-width: 900px;
  margin: 30px auto 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 123, 255, 0.3);
}

.page-faq__image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Quick Access Section */
.page-faq__quick-access-section {
    padding: 60px 0;
    background-color: #0a0a0a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.page-faq__section-heading {
    font-size: 32px;
    color: #ffd700;
    text-align: center;
    margin-bottom: 15px;
}

.page-faq__section-description {
    font-size: 16px;
    color: #cccccc;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
}

.page-faq__quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.page-faq__quick-link-card {
    display: block;
    background: rgba(0, 123, 255, 0.15); /* Nền xanh đậm nhẹ */
    padding: 25px;
    border-radius: 10px;
    text-decoration: none;
    color: #ffffff;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-faq__quick-link-card:hover {
    border-color: #ffd700; /* Viền vàng khi hover */
    background: rgba(0, 123, 255, 0.25);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-faq__card-title {
    font-size: 22px;
    color: #ffd700;
    margin-bottom: 10px;
}

.page-faq__quick-link-card p {
    font-size: 15px;
    color: #e0e0e0;
}

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

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

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

/* FAQ default state - answer hidden */
.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: rgba(255, 255, 255, 0.05);
  color: #e0e0e0;
  font-size: 15px;
}

/* FAQ expanded state - 🚨 Use!important and sufficiently large max-height */
.page-faq__faq-item.active .page-faq__faq-answer {
  max-height: 2000px !important; /* 🚨 Use!important for priority, large enough value */
  padding: 20px 25px !important;
  opacity: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 0 8px 8px;
}

/* Question style */
.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: rgba(0, 123, 255, 0.1); /* Nền xanh nhẹ cho câu hỏi */
  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: rgba(0, 123, 255, 0.2);
  border-color: #ffd700;
}

.page-faq__faq-question:active {
  background: rgba(0, 123, 255, 0.3);
}

/* Question title style */
.page-faq__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: #ffffff;
  pointer-events: none; /* Prevent h3 from blocking click event */
}

/* Toggle icon */
.page-faq__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #ffd700;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
  color: #ffffff;
  transform: rotate(180deg);
  background: #007bff;
}

/* CTA Section */
.page-faq__cta-section {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(90deg, #007bff, #28a745); /* Gradient brand colors */
  color: #ffffff;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page-faq__cta-heading {
  font-size: 38px;
  color: #ffffff;
  margin-bottom: 20px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.page-faq__cta-text {
  font-size: 18px;
  max-width: 700px;
  margin: 0 auto 40px;
}

.page-faq__cta-text strong {
    color: #ffd700;
}

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

.page-faq__btn {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-faq__btn--primary {
  background: #ffd700; /* Nút chính màu vàng kim */
  color: #000000;
}

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

.page-faq__btn--secondary {
  background: transparent;
  color: #ffffff;
  border-color: #ffffff;
}

.page-faq__btn--secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #ffd700;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-faq__main-heading {
    font-size: 38px;
  }

  .page-faq__section-heading {
    font-size: 28px;
  }

  .page-faq__intro-text,
  .page-faq__section-description,
  .page-faq__cta-text {
    font-size: 16px;
  }

  .page-faq__cta-heading {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .page-faq__intro-section {
    padding-top: 100px; /* Điều chỉnh padding-top cho mobile */
    padding-bottom: 40px;
  }

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

  .page-faq__intro-text {
    font-size: 15px;
    margin-bottom: 20px;
  }

  .page-faq__section-heading {
    font-size: 26px;
    margin-bottom: 10px;
  }

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

  .page-faq__quick-links-grid {
      grid-template-columns: 1fr;
      gap: 15px;
  }

  .page-faq__quick-link-card {
      padding: 20px;
  }

  .page-faq__card-title {
      font-size: 20px;
  }

  .page-faq__quick-link-card p {
      font-size: 14px;
  }

  .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;
    margin-left: 10px;
  }

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

  .page-faq__cta-section {
    padding: 60px 0;
  }

  .page-faq__cta-heading {
    font-size: 28px;
    margin-bottom: 15px;
  }

  .page-faq__cta-text {
    font-size: 15px;
    margin-bottom: 30px;
  }

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

  .page-faq__btn {
    width: 100%;
    max-width: 300px; /* Giới hạn chiều rộng nút trên mobile */
    margin: 0 auto;
    font-size: 16px;
    padding: 12px 25px;
  }

  /* Mobile image responsive adaptation */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-faq__intro-section,
  .page-faq__quick-access-section,
  .page-faq__faq-section,
  .page-faq__cta-section,
  .page-faq__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}