/* style/support.css */

/* Base Styles for the Support Page */
.page-support {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Dark text for light body background (#FFFFFF) */
  background-color: var(--secondary-color, #FFFFFF); /* Ensure light background for main content */
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
}

.page-support__section {
  padding: 60px 20px;
  margin-bottom: 20px;
}

.page-support__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.page-support__section-title {
  font-size: 36px;
  color: var(--primary-color, #017439);
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-support__section-title--light {
  color: #ffffff;
}

.page-support__section-description {
  font-size: 18px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #555555;
}

.page-support__section-description--light {
  color: #f0f0f0;
}

.page-support__main-title {
  font-size: 48px;
  color: var(--primary-color, #017439);
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-support__intro-text {
  font-size: 20px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: #333333;
}

/* Hero Banner (not the homepage HERO, but a banner for support page) */
.page-support__hero-banner {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding: 80px 20px;
  text-align: center;
  color: #ffffff;
}

.page-support__hero-banner .page-support__main-title {
  color: #ffffff;
}

.page-support__hero-banner .page-support__intro-text {
  color: #f0f0f0;
}

/* General Image Styles */
.page-support__image-wrapper {
  margin: 20px 0;
  text-align: center;
}

.page-support__image {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  margin: 0 auto; /* Center images */
}

/* CTA Buttons */
.page-support__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  margin: 10px;
  cursor: pointer;
  max-width: 100%; /* Ensure responsiveness */
  box-sizing: border-box; /* Include padding in width */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Break long words */
}

.page-support__btn-primary {
  background: var(--primary-color, #017439);
  color: #ffffff;
  border: 2px solid var(--primary-color, #017439);
}

.page-support__btn-primary:hover {
  background: #005a2e; /* Darken primary color */
  border-color: #005a2e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-support__btn-secondary {
  background: #ffffff;
  color: var(--primary-color, #017439);
  border: 2px solid var(--primary-color, #017439);
}

.page-support__btn-secondary:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* About Support Section */
.page-support__about-support .page-support__content-wrapper {
  display: flex;
  align-items: center;
  gap: 40px;
}

.page-support__about-support .page-support__image-wrapper {
  flex: 1;
  min-width: 300px;
}

.page-support__about-support .page-support__text-content {
  flex: 2;
  font-size: 17px;
  line-height: 1.8;
}

/* Contact Methods Section */
.page-support__contact-methods {
  background-color: var(--primary-color, #017439);
  color: #ffffff;
}

.page-support__contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-support__contact-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%; /* Ensure cards are same height */
}

.page-support__contact-item .page-support__contact-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 20px;
  border-radius: 50%; /* Make icons circular if desired */
  object-fit: cover;
}

.page-support__contact-item .page-support__contact-heading {
  font-size: 24px;
  color: #ffffff;
  margin-bottom: 15px;
  font-weight: 600;
}

.page-support__contact-item .page-support__contact-text {
  font-size: 16px;
  color: #f0f0f0;
  margin-bottom: 25px;
  flex-grow: 1; /* Push button to bottom */
}

/* Common Issues Section */
.page-support__common-issues {
  background-color: #f9f9f9;
}

.page-support__issue-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-support__card {
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.page-support__card-title {
  font-size: 22px;
  color: var(--primary-color, #017439);
  margin-bottom: 15px;
  font-weight: bold;
}

.page-support__card-text {
  font-size: 16px;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-support__card-link {
  display: inline-block;
  color: var(--primary-color, #017439);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-support__card-link:hover {
  color: #005a2e; /* Darken primary color */
  text-decoration: underline;
}

/* Security & Privacy Section */
.page-support__security-privacy {
  background-color: var(--primary-color, #017439);
  color: #ffffff;
}

.page-support__security-privacy .page-support__content-wrapper {
  display: flex;
  align-items: center;
  gap: 40px;
}

.page-support__security-privacy .page-support__content-wrapper--reverse {
  flex-direction: row-reverse;
}

.page-support__security-privacy .page-support__image-wrapper {
  flex: 1;
  min-width: 300px;
}

.page-support__security-privacy .page-support__text-content {
  flex: 2;
  font-size: 17px;
  line-height: 1.8;
  color: #f0f0f0;
}

/* FAQ Section */
.page-support__faq {
  background-color: #ffffff;
}

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

/* FAQ容器样式 */
.page-support__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* FAQ默认状态 - 答案隐藏 */
.page-support__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.3s ease;
  padding: 0 15px;
  opacity: 0;
}

/* FAQ展开状态 - 🚨 Sử dụng!important và đủ lớn max-height để đảm bảo có thể mở rộng */
.page-support__faq-item.active .page-support__faq-answer {
  max-height: 2000px !important; /* 🚨 Sử dụng!important để đảm bảo độ ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

/* Vấn đề phong cách */
.page-support__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-support__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-support__faq-question:active {
  background: #eeeeee;
}

/* Vấn đề tiêu đề phong cách */
.page-support__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn chặn thẻ h3 chặn sự kiện nhấp */
  color: var(--primary-color, #017439);
}

/* Chuyển đổi biểu tượng */
.page-support__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Ngăn chặn biểu tượng chặn sự kiện nhấp */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-support__faq-item.active .page-support__faq-toggle {
  color: var(--primary-color, #017439);
  transform: rotate(45deg); /* Optional: rotate for 'x' effect */
}

.page-support__faq-image {
  margin-top: 60px;
}

/* CTA Section */
.page-support__cta-section {
  text-align: center;
  padding-bottom: 80px;
}

.page-support__cta-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-support__cta-buttons {
  margin-top: 30px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  justify-content: center;
  width: 100%;
  max-width: 800px;
  box-sizing: border-box;
}

.page-support__cta-image {
  margin-top: 50px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-support__about-support .page-support__content-wrapper,
  .page-support__security-privacy .page-support__content-wrapper {
    flex-direction: column;
    text-align: center;
  }

  .page-support__about-support .page-support__image-wrapper,
  .page-support__security-privacy .page-support__image-wrapper {
    margin-bottom: 30px;
  }

  .page-support__security-privacy .page-support__content-wrapper--reverse {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .page-support {
    padding-top: var(--header-offset, 120px) !important;
    font-size: 16px;
    line-height: 1.6;
  }

  .page-support__section {
    padding: 40px 15px;
  }

  .page-support__container {
    padding: 0 10px;
  }

  .page-support__main-title {
    font-size: 32px;
  }

  .page-support__intro-text {
    font-size: 17px;
  }

  .page-support__section-title {
    font-size: 28px;
  }

  .page-support__section-description {
    font-size: 16px;
  }

  .page-support__cta-button,
  .page-support__btn-primary,
  .page-support__btn-secondary,
  .page-support a[class*="button"],
  .page-support a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-support__cta-buttons,
  .page-support__button-group,
  .page-support__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
  }

  .page-support__image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-support__section,
  .page-support__card,
  .page-support__container,
  .page-support__contact-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-support__contact-grid {
    grid-template-columns: 1fr;
  }

  .page-support__issue-cards {
    grid-template-columns: 1fr;
  }

  /* Mobile FAQ styles */
  .page-support__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-support__faq-question h3 {
    font-size: 15px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-support__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-support__faq-answer {
    padding: 0 15px;
  }
  
  .page-support__faq-item.active .page-support__faq-answer {
    padding: 15px !important;
  }
}

/* Ensure content area images are not too small */
.page-support__content-area img,
.page-support__text-block img,
.page-support__image {
  min-width: 200px;
  min-height: 200px;
}

/* No CSS filters on images */
.page-support img {
  filter: none !important;
}