/* style/faq.css */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #EA7C07; /* Màu cho nút Đăng nhập */
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --background-color-light: #f9f9f9;
  --border-color: #e0e0e0;
}

.page-faq {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark);
  background: #ffffff; /* Default body background is white */
}

/* Hero Section */
.page-faq__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, header offset handled by body */
  background-color: var(--background-color-light);
  overflow: hidden;
}

.page-faq__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.page-faq__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

.page-faq__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.page-faq__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-faq__main-title {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--primary-color);
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  /* clamp for responsive font size, avoiding fixed large values */
  font-size: clamp(2rem, 4vw, 3.2rem); 
}

.page-faq__intro-text {
  font-size: 1.1rem;
  color: var(--text-color-dark);
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-faq__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: var(--text-color-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-faq__cta-button:hover {
  background: #1e87b7;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* FAQ Section */
.page-faq__faq-section {
  padding: 60px 20px;
  background-color: var(--background-color-light);
}

.page-faq__container {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

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

.page-faq__section-description {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-color-dark);
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

details.page-faq__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--text-color-light);
  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 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease, color 0.3s ease;
  color: var(--text-color-dark);
}

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(--background-color-light);
  color: var(--primary-color);
}

.page-faq__faq-qtext {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
}

.page-faq__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
  transition: transform 0.3s ease;
}

details.page-faq__faq-item[open] .page-faq__faq-toggle {
  transform: rotate(45deg);
  color: var(--primary-color);
}

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

.page-faq__faq-answer p {
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 1rem;
  line-height: 1.7;
}

.page-faq__image-inline {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* CTA Bottom Section */
.page-faq__cta-bottom-section {
  padding: 60px 20px;
  text-align: center;
  background-color: var(--primary-color);
}

.page-faq__dark-section {
  background: var(--primary-color);
  color: var(--text-color-light);
  padding: 40px 30px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.page-faq__cta-bottom-section .page-faq__section-title {
  color: var(--text-color-light);
  margin-bottom: 15px;
}

.page-faq__cta-bottom-section .page-faq__section-description {
  color: var(--text-color-light);
  margin-bottom: 30px;
}

.page-faq__cta-button--large {
  padding: 18px 50px;
  font-size: 20px;
  background: var(--secondary-color); /* Màu đăng nhập */
}

.page-faq__cta-button--large:hover {
  background: #c76707;
}

/* Responsive Design */
@media (max-width: 768px) {
  .page-faq {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-faq__hero-section,
  .page-faq__faq-section,
  .page-faq__cta-bottom-section {
    padding: 30px 15px;
  }

  .page-faq__hero-section {
    padding-top: 10px !important;
  }

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

  .page-faq__intro-text {
    font-size: 1rem;
  }

  .page-faq__cta-button,
  .page-faq__cta-button--large {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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

  .page-faq__section-description {
    font-size: 0.95rem;
  }

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

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

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

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

  .page-faq__image-inline {
    margin: 15px auto;
  }

  /* Ensure all images and containers are responsive */
  .page-faq img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-faq__section,
  .page-faq__card,
  .page-faq__container,
  .page-faq__hero-container,
  .page-faq__faq-list,
  .page-faq__cta-bottom-section .page-faq__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
  }
  .page-faq__hero-content, .page-faq__dark-section {
    padding-left: 15px;
    padding-right: 15px;
  }
}