/*
  FAQ Section CSS
  Dựa trên thiết kế Figma node 4:559.
  Hiển thị danh sách câu hỏi thường gặp dạng accordion ở cột bên trái và hình ảnh lớp học bên phải.
*/

.faq-section {
  padding-top: 79px;
  padding-bottom: 95px;
  background-color: #F4F9FF;
  position: relative;
  overflow: hidden;
}

/* Container chính của section */
.faq-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

/* ========================================
   CỘT TRÁI: TIÊU ĐỀ VÀ ACCORDION FAQ
   ======================================== */

.faq-content {
  flex: 1;
  max-width: 646px;
  display: flex;
  flex-direction: column;
}

/* Tiêu đề chính */
.faq-title {
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 32px;
  font-weight: 600;
  color: #013475;
  margin: 0 0 8px;
  line-height: 1.35;
}

/* Phụ đề dưới tiêu đề */
.faq-subtitle {
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 15px;
  font-weight: 400;
  color: #3f3f3f;
  margin: 0 0 32px;
  line-height: 1.5;
}

/* Group danh sách accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

/* Mỗi hàng câu hỏi */
.faq-item {
  background-color: var(--white, #ffffff);
  border: 0.8px solid rgba(71, 71, 71, 0.3);
  border-radius: 10px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-item:hover {
  border-color: #013475;
  box-shadow: 0px 4px 12px rgba(1, 52, 117, 0.08);
}

/* Thanh tiêu đề câu hỏi */
.faq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  gap: 16px;
  min-height: 68px;
  box-sizing: border-box;
}

/* Câu hỏi */
.faq-question {
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 18px;
  font-weight: 600;
  color: rgba(22, 22, 22, 0.88);
  margin: 0;
  line-height: 1.35;
  letter-spacing: 0.18px;
  text-align: left;
}

/* Icon dấu cộng */
.faq-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.faq-item.open {
  border-color: #013475;
}

/* Vùng chứa nội dung câu trả lời */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
  box-sizing: border-box;
}

/* Lớp chữ trả lời */
.faq-answer-inner {
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 15px;
  font-weight: 400;
  color: #4e4e4e;
  line-height: 1.6;
  margin: 0;
  padding-bottom: 20px;
}

/* ========================================
   CỘT PHẢI: HÌNH ẢNH MINH HỌA
   ======================================== */

.faq-visual {
  flex: 1;
  max-width: 573px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ảnh lớp học */
.faq-classroom-img {
  position: absolute;
  top: 84px;
  right: -50px;
  width: 573px;
  height: 382px;
  border-radius: 20px;
  object-fit: cover;
}

/* ========================================
   RESPONSIVE - Màn hình Laptop/Tablet nhỏ
   ======================================== */

@media (max-width: 1199px) {
  .faq-section {
    margin: 60px 0;
    padding: 60px 0;
  }

  .faq-container {
    padding: 0 30px;
    gap: 30px;
  }

  .faq-title {
    font-size: 28px;
  }

  .faq-question {
    font-size: 16px;
  }
}

/* ========================================
   RESPONSIVE - Laptop (Màn hình 1024px)
   ======================================== */

@media (min-width: 992px) and (max-width: 1024px) {
  .faq-classroom-img {
    width: 500px;
    height: 300px;
    right: 10px;
    top: 130px;
  }
}

/* ========================================
   RESPONSIVE - Tablet (Màn hình dưới 992px)
   ======================================== */

@media (max-width: 991px) {
  .faq-section {
    padding: 10px 0;
    margin: 10px 0;
  }

  .faq-container {
    flex-direction: column-reverse; /* Xếp lớp học lên trên hoặc xuống dưới; ở đây đặt hình ảnh xuống dưới câu hỏi */
    align-items: center;
    gap: 40px;
  }

  .faq-content {
    max-width: 100%;
    width: 100%;
  }

  .faq-visual {
    max-width: 500px;
    width: 100%;
  }

  .faq-classroom-img {
    position: relative !important;
    top: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    display: block !important;
  }
}

/* ========================================
   RESPONSIVE - Mobile (Màn hình dưới 768px)
   ======================================== */

@media (max-width: 767px) {
  .faq-section {
    margin: 10px 0;
    padding: 10px 0;
  }

  .faq-container {
    padding: 0 20px;
    gap: 10px;
  }

  .faq-title {
    font-size: 24px;
    text-align: center;
  }

  .faq-subtitle {
    font-size: 14px;
    text-align: center;
    margin-bottom: 24px;
  }

  .faq-header {
    padding: 14px 16px;
    min-height: 60px;
  }

  .faq-question {
    font-size: 15px;
  }

  .faq-icon {
    width: 30px;
    height: 30px;
  }

  .faq-visual {
    max-width: 100%;
  }
}
