/* Ensure page background seamlessly matches bg.jpg bottom color (#ededeb) */
html, body {
  background-color: #ededeb;
}

/* ==========================================================================
   Homepage FAQ Section - Ming An Tang (Traditional Chinese Medicine & Five Elements Style)
   Palette: Traditional Gold (#937d4a), Deep Maroon (#791216), Warm Off-white (#faf8f5)
   ========================================================================== */

.home-faq-section {
  width: 90%;
  max-width: 1080px;
  margin: 0 auto 5%;
  box-sizing: border-box;
  font-family: "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", serif;
}

/* Header */
.home-faq-header {
  text-align: center;
  margin-bottom: 32px;
}

.home-faq-sub {
  font-family: "Cinzel", "Times New Roman", "Noto Serif TC", serif;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #937d4a;
  margin-bottom: 8px;
  font-weight: 500;
}

.home-faq-title {
  font-size: 28px;
  font-weight: 700;
  color: #2c2523;
  letter-spacing: 2px;
  margin: 0 0 12px;
  line-height: 1.4;
}

.home-faq-divider {
  width: 60px;
  height: 2px;
  background: #937d4a;
  margin: 0 auto;
  position: relative;
}

.home-faq-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: #791216;
  border: 1px solid #937d4a;
}

/* FAQ List */
.home-faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-faq-item {
  border: 1px solid #dfd7c5;
  border-radius: 4px;
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 8px rgba(147, 125, 74, 0.05);
}

.home-faq-item:hover {
  border-color: #937d4a;
  box-shadow: 0 4px 14px rgba(147, 125, 74, 0.12);
}

.home-faq-item[open] {
  border-color: #937d4a;
  box-shadow: 0 4px 16px rgba(147, 125, 74, 0.14);
}

/* Question Summary */
.home-faq-question {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  cursor: pointer;
  user-select: none;
  background: #faf8f5;
  transition: background-color 0.25s ease;
  list-style: none;
}

.home-faq-question::-webkit-details-marker {
  display: none;
}

.home-faq-question:hover {
  background: #f5f0e6;
}

.home-faq-item[open] .home-faq-question {
  background: #f7f2e8;
  border-bottom: 1px solid #ebd9b8;
}

/* Q Badge */
.faq-q-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: #791216;
  color: #ffffff;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 14px;
  font-weight: 700;
  border-radius: 50%;
  border: 1px solid #937d4a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.home-faq-item[open] .faq-q-badge {
  background: #937d4a;
  border-color: #791216;
}

/* Question Text */
.faq-q-text {
  flex-grow: 1;
  font-size: 18px;
  font-weight: 600;
  color: #2c2523;
  line-height: 1.5;
  letter-spacing: 0.5px;
}

/* Toggle Arrow Icon */
.faq-icon {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background-color: #937d4a;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Horizontal line */
.faq-icon::before {
  top: 9px;
  left: 2px;
  width: 16px;
  height: 2px;
}

/* Vertical line */
.faq-icon::after {
  top: 2px;
  left: 9px;
  width: 2px;
  height: 16px;
}

/* Minus state when open */
.home-faq-item[open] .faq-icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

.home-faq-item[open] .faq-icon {
  transform: rotate(180deg);
}

/* Answer Content */
.home-faq-answer {
  padding: 20px 24px 24px 72px;
  background: #ffffff;
}

.home-faq-answer p {
  margin: 0;
  font-size: 16px;
  line-height: 1.85;
  color: #26211e;
  letter-spacing: 0.4px;
  text-align: justify;
}

/* Mobile Responsive */
@media (max-width: 639px) {
  .home-faq-section {
    width: 92%;
    margin-bottom: 10%;
  }

  .home-faq-title {
    font-size: 22px;
  }

  .home-faq-question {
    padding: 14px 16px;
    gap: 12px;
  }

  .faq-q-badge {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .faq-q-text {
    font-size: 16px;
  }

  .home-faq-answer {
    padding: 16px 16px 20px 16px;
  }

  .home-faq-answer p {
    font-size: 14.5px;
    line-height: 1.75;
  }
}


/* FAQ Answer Links */
.home-faq-answer a {
  color: #791216;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.home-faq-answer a:hover {
  color: #937d4a;
  text-decoration-color: #937d4a;
}
