/* style/about.css */

/* --- General Page Styling --- */
.page-about {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background: var(--secondary-color); /* Matches body background from shared.css */
}

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

.page-about__section {
  padding: 80px 0;
  text-align: center;
}

.page-about__section-title {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 40px;
  color: #017439; /* Primary color for titles */
}

.page-about__section-title--white {
  color: #ffffff;
}

.page-about__sub-title {
  font-size: 24px;
  font-weight: 600;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #017439;
}

.page-about__dark-bg {
  background: #017439;
  color: #ffffff;
}

.page-about__light-bg {
  background: #ffffff;
  color: #333333;
}

.page-about__text-block {
  margin-bottom: 20px;
  text-align: left;
}

.page-about__text-block--white p {
  color: #ffffff;
}

/* --- Hero Section --- */
.page-about__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
  background: linear-gradient(135deg, #017439, #00562b); /* Darker green gradient */
  color: #ffffff;
}

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

.page-about__hero-image {
  width: 100%;
  max-width: 800px; /* Limit image width */
  margin-top: 30px; /* Space between content and image */
}

.page-about__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-about__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 800px;
}

.page-about__hero-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #FFFF00; /* Register/Login font color for emphasis */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.page-about__hero-description {
  font-size: 18px;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

.page-about__hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-about__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Ensure long words break */
  max-width: 100%; /* Ensure button does not overflow */
  box-sizing: border-box;
}

.page-about__btn-register {
  background: #C30808; /* Custom Register color */
  color: #FFFF00; /* Custom Register font color */
  border: 2px solid #C30808;
}

.page-about__btn-register:hover {
  background: #e02020;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-about__btn-login {
  background: #C30808; /* Custom Login color */
  color: #FFFF00; /* Custom Login font color */
  border: 2px solid #C30808;
}

.page-about__btn-login:hover {
  background: #e02020;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* --- Content Grid --- */
.page-about__content-grid {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  text-align: left;
  margin-top: 40px;
}

.page-about__content-grid .page-about__text-block {
  flex: 1;
}

.page-about__image-block {
  flex: 0 0 40%;
  max-width: 40%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-about__image-block img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-about__full-width {
  margin-top: 40px;
  text-align: left;
}

/* --- Feature Grid --- */
.page-about__feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-about__feature-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards have equal height */
  display: flex;
  flex-direction: column;
}

.page-about__feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.page-about__feature-card img {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-about__feature-card .page-about__card-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #017439;
}

.page-about__feature-card p {
  font-size: 16px;
  color: #555555;
  flex-grow: 1; /* Make paragraphs grow to fill space */
}

/* --- Commitment List --- */
.page-about__commitment-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
  text-align: left;
}

.page-about__commitment-item {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border-left: 5px solid #017439;
  height: 100%;
}

.page-about__commitment-item h3 {
  color: #017439;
  font-size: 20px;
  margin-top: 0;
}

.page-about__commitment-item p {
  color: #555555;
}

/* --- Partners and Technology --- */
.page-about__partners-tech {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  text-align: left;
}

.page-about__partners-tech .page-about__text-block {
  flex: 1;
}

.page-about__text-block--white h3 {
  color: #FFFF00; /* Custom font color for titles in dark sections */
}

/* --- CTA Section --- */
.page-about__cta-section {
  background: linear-gradient(90deg, #017439, #00562b);
  color: #ffffff;
  padding: 100px 0;
}

.page-about__cta-container {
  max-width: 900px;
  margin: 0 auto;
}

.page-about__cta-description {
  font-size: 20px;
  margin-bottom: 40px;
  color: #f0f0f0;
}

.page-about__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- FAQ Section --- */
.page-about__faq-section {
  padding: 80px 0;
  background: #f5f5f5; /* Slightly off-white background for contrast */
}

.page-about__faq-list {
  max-width: 900px;
  margin: 40px auto 0 auto;
  text-align: left;
}

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

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

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-about__faq-item.active .page-about__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 20px !important;
  opacity: 1;
  background: #ffffff;
  border-radius: 0 0 8px 8px;
}

/* 问题样式 */
.page-about__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-about__faq-question:hover {
  background: #f0f0f0;
  border-color: #d0d0d0;
}

.page-about__faq-question:active {
  background: #e8e8e8;
}

/* 问题标题样式 */
.page-about__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
  color: #333333;
}

/* 切换图标 */
.page-about__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #017439; /* Use primary color for toggle */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* 防止图标阻止点击事件 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-about__faq-item.active .page-about__faq-toggle {
  color: #C30808; /* Change color when active */
  transform: rotate(45deg); /* Rotate for 'x' effect, or just change to '-' */
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-about__hero-title {
    font-size: 40px;
  }
  .page-about__section-title {
    font-size: 30px;
  }
  .page-about__sub-title {
    font-size: 22px;
  }
  .page-about__hero-description {
    font-size: 16px;
  }
  .page-about__cta-button {
    font-size: 18px;
    padding: 12px 30px;
  }
  .page-about__content-grid,
  .page-about__partners-tech {
    flex-direction: column;
    gap: 30px;
  }
  .page-about__image-block {
    max-width: 100%;
    order: -1; /* Image appears above text on smaller screens */
  }
  .page-about__feature-card img {
    height: 200px;
  }
}

@media (max-width: 768px) {
  .page-about__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header offset */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-about__section {
    padding: 40px 0;
  }
  .page-about__container {
    padding: 0 15px;
  }
  .page-about__hero-title {
    font-size: 32px;
    margin-bottom: 15px;
  }
  .page-about__hero-description {
    font-size: 15px;
    margin-bottom: 25px;
  }
  .page-about__hero-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-about__cta-button {
    font-size: 16px;
    padding: 12px 25px;
    width: 100% !important; /* Force full width for buttons */
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-about__hero-buttons,
  .page-about__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
  }

  .page-about__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }
  .page-about__sub-title {
    font-size: 20px;
    margin-top: 25px;
  }
  .page-about__image-block {
    max-width: 100%;
    margin-bottom: 20px;
  }
  .page-about__image-block img {
    border-radius: 6px;
  }

  /* Mobile image specific styles */
  .page-about img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-about__section,
  .page-about__card,
  .page-about__container,
  .page-about__feature-card,
  .page-about__commitment-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

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