/* style/faq.css */

:root {
  --thaibet-primary: #017439;
  --thaibet-secondary: #FFFFFF;
  --thaibet-text-dark: #333333;
  --thaibet-text-light: #f0f0f0;
  --thaibet-bg-light: #f9f9f9;
  --thaibet-bg-white: #ffffff;
  --thaibet-border-color: #e0e0e0;
  --thaibet-button-register: #C30808;
  --thaibet-button-login: #C30808;
  --thaibet-button-font-yellow: #FFFF00;
}

/* General Page Styles */
.page-faq {
  font-family: 'Arial', sans-serif;
  color: var(--thaibet-text-dark); /* Default text color for light body background */
  line-height: 1.6;
  font-size: 16px;
}

.page-faq__dark-bg {
  background-color: var(--thaibet-primary);
  color: var(--thaibet-text-light);
}

.page-faq__light-bg {
  background-color: var(--thaibet-bg-light);
  color: var(--thaibet-text-dark);
}

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

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 10px; /* Small padding, body takes --header-offset */
  padding-bottom: 50px;
  overflow: hidden;
}

.page-faq__hero-image-wrapper {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  position: relative;
  z-index: 0;
}

.page-faq__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-faq__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin-top: 30px;
  padding: 0 20px;
}

.page-faq__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--thaibet-text-light);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-faq__hero-description {
  font-size: 1.15rem;
  color: var(--thaibet-text-light);
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.page-faq__btn-primary,
.page-faq__btn-secondary,
.page-faq a[class*="button"],
.page-faq a[class*="btn"] {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-faq__btn-primary {
  background-color: var(--thaibet-button-register);
  color: var(--thaibet-button-font-yellow);
  border: 2px solid var(--thaibet-button-register);
}

.page-faq__btn-primary:hover {
  background-color: #a30606;
  border-color: #a30606;
  color: var(--thaibet-secondary);
}

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

.page-faq__btn-secondary:hover {
  background-color: var(--thaibet-primary);
  color: var(--thaibet-secondary);
}

/* Content Area */
.page-faq__content-area {
  padding: 60px 0;
  background-color: var(--thaibet-bg-white);
}

.page-faq__section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--thaibet-primary);
  text-align: center;
  margin-bottom: 20px;
}

.page-faq__section-title--light {
  color: var(--thaibet-secondary);
}

.page-faq__intro-text {
  max-width: 800px;
  margin: 0 auto 40px;
  text-align: center;
  font-size: 1.1rem;
  color: var(--thaibet-text-dark);
}

/* FAQ List */
.page-faq__faq-list {
  margin-bottom: 50px;
  padding: 0 20px;
}

.page-faq__faq-category-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--thaibet-primary);
  margin-top: 40px;
  margin-bottom: 25px;
  text-align: left;
  padding-left: 10px;
}

details.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid var(--thaibet-border-color);
  overflow: hidden;
  background: var(--thaibet-bg-white);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

details.page-faq__faq-item summary.page-faq__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}

details.page-faq__faq-item summary.page-faq__faq-question::-webkit-details-marker {
  display: none;
}

details.page-faq__faq-item summary.page-faq__faq-question:hover {
  background: var(--thaibet-bg-light);
}

.page-faq__faq-qtext {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--thaibet-text-dark);
}

.page-faq__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--thaibet-primary);
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}

details.page-faq__faq-item .page-faq__faq-answer {
  padding: 0 25px 25px;
  background: var(--thaibet-bg-light);
  border-radius: 0 0 8px 8px;
  color: var(--thaibet-text-dark);
}

.page-faq__faq-answer p {
  margin: 0;
  padding: 0;
}

/* CTA Block */
.page-faq__cta-block {
  display: flex;
  align-items: center;
  gap: 40px;
  background-color: var(--thaibet-bg-white);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  margin-top: 50px;
}

.page-faq__cta-image {
  width: 50%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.page-faq__cta-content {
  width: 50%;
  text-align: left;
}

.page-faq__cta-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  color: var(--thaibet-primary);
  margin-bottom: 15px;
  font-weight: 700;
}

.page-faq__cta-description {
  font-size: 1.05rem;
  color: var(--thaibet-text-dark);
  margin-bottom: 30px;
}

/* Explore Section */
.page-faq__explore-section {
  padding: 80px 0;
  text-align: center;
}

.page-faq__explore-text {
  max-width: 900px;
  margin: 0 auto 40px;
  font-size: 1.15rem;
  color: var(--thaibet-text-light);
}

.page-faq__explore-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 40px;
}

.page-faq__explore-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  display: block;
  margin: 0 auto;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-faq__container {
    padding: 20px;
  }

  .page-faq__hero-image-wrapper {
    max-height: 400px;
  }

  .page-faq__hero-content {
    margin-top: 20px;
  }

  .page-faq__main-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
  }

  .page-faq__hero-description {
    font-size: 1rem;
  }

  .page-faq__cta-block {
    flex-direction: column;
    text-align: center;
    padding: 30px;
  }

  .page-faq__cta-image,
  .page-faq__cta-content {
    width: 100%;
  }

  .page-faq__cta-content {
    margin-top: 30px;
  }

  .page-faq__cta-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
  }

  .page-faq__explore-buttons {
    flex-direction: column;
    align-items: center;
  }

  .page-faq__explore-buttons .page-faq__btn-primary,
  .page-faq__explore-buttons .page-faq__btn-secondary {
    width: 80%;
  }
}

@media (max-width: 768px) {
  .page-faq {
    font-size: 15px;
    line-height: 1.5;
  }

  .page-faq__hero-section {
    padding-top: 10px; /* Ensure small top padding */
    padding-bottom: 30px;
  }

  .page-faq__hero-image-wrapper {
    max-height: 250px;
  }

  .page-faq__hero-image {
    object-fit: contain !important; /* HERO 主图区域: 移动 object-fit:contain */
    aspect-ratio: unset !important;
  }

  .page-faq__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    margin-bottom: 15px;
  }

  .page-faq__hero-description {
    font-size: 0.95rem;
    margin-bottom: 25px;
  }

  .page-faq__btn-primary,
  .page-faq__btn-secondary,
  .page-faq a[class*="button"],
  .page-faq a[class*="btn"] {
    padding: 12px 20px;
    font-size: 0.9rem;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-faq__explore-buttons,
  .page-faq__cta-block .page-faq__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column !important; /* 多个按钮横向排列时，允许换行 */
    gap: 15px;
  }

  .page-faq__content-area {
    padding: 40px 0;
  }

  .page-faq__section-title {
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    margin-bottom: 15px;
  }

  .page-faq__intro-text {
    font-size: 1rem;
    margin-bottom: 30px;
    padding: 0 15px;
  }

  .page-faq__faq-list {
    padding: 0 15px;
  }

  .page-faq__faq-category-title {
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    margin-top: 30px;
    margin-bottom: 20px;
    padding-left: 0;
  }

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

  .page-faq__faq-qtext {
    font-size: 1rem;
  }

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

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

  .page-faq__cta-block {
    padding: 30px 20px;
    margin-top: 30px;
  }

  .page-faq__cta-content {
    margin-top: 20px;
    padding: 0 15px;
  }

  .page-faq__cta-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .page-faq__cta-description {
    font-size: 0.95rem;
    margin-bottom: 25px;
  }

  .page-faq__explore-section {
    padding: 50px 0;
  }

  .page-faq__explore-text {
    font-size: 1rem;
    margin-bottom: 30px;
    padding: 0 15px;
  }

  /* General images and containers */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-faq__container,
  .page-faq__cta-block,
  .page-faq__explore-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Article body (if present, for long text sections) */
  .page-faq__article-body {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 15px;
    box-sizing: border-box;
  }

  .page-faq__article-body p,
  .page-faq__article-body ul,
  .page-faq__article-body ol {
    max-width: 100%;
    word-wrap: break-word;
  }

  .page-faq__article-body img,
  .page-faq__article-figure {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}