/* style/privacy-policy.css */

/* Variables from shared.css (assumed to be defined in shared.css) */
/* :root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --text-color-dark: #333333;
  --text-color-light: #FFFFFF;
  --header-offset: 120px;
} */

.page-privacy-policy {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark, #333333); /* Default text color for light body background */
  background-color: var(--secondary-color, #FFFFFF); /* Body background is light */
}

/* --- Hero Section --- */
.page-privacy-policy__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); /* Ensure content is not hidden by fixed header */
  background: linear-gradient(135deg, var(--primary-color), #004d2b); /* Darker gradient for primary color */
  color: var(--text-color-light, #FFFFFF); /* Light text on dark background */
  min-height: 300px;
}

.page-privacy-policy__hero-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.page-privacy-policy__hero-title {
  font-size: 2.8em;
  margin-bottom: 15px;
  line-height: 1.2;
  font-weight: bold;
  color: var(--text-color-light, #FFFFFF);
}

.page-privacy-policy__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

/* --- Content Sections --- */
.page-privacy-policy__content-section {
  padding: 60px 0;
  background-color: var(--secondary-color, #FFFFFF); /* Light background */
  color: var(--text-color-dark, #333333); /* Dark text on light background */
}

.page-privacy-policy__container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-privacy-policy__heading {
  font-size: 2em;
  color: var(--primary-color);
  margin-top: 40px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(1, 116, 57, 0.2);
  padding-bottom: 10px;
}

.page-privacy-policy__sub-heading {
  font-size: 1.4em;
  color: var(--primary-color);
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-privacy-policy p {
  margin-bottom: 15px;
  font-size: 1.05em;
}

.page-privacy-policy ul {
  list-style-type: disc;
  margin-left: 25px;
  margin-bottom: 20px;
}

.page-privacy-policy ul li {
  margin-bottom: 8px;
  font-size: 1.05em;
}

.page-privacy-policy a {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-privacy-policy a:hover {
  color: #004d2b;
  text-decoration: none;
}

.page-privacy-policy__image {
  width: 100%;
  height: auto;
  max-width: 800px;
  display: block;
  margin: 30px auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  object-fit: cover; /* Ensure images fit without distortion */
  min-width: 200px; /* Ensure minimum size */
  min-height: 200px;
}

/* --- FAQ Section --- */
.page-privacy-policy__faq-section {
  padding: 60px 0;
  background-color: var(--secondary-color, #FFFFFF); /* Light background */
  color: var(--text-color-dark, #333333); /* Dark text */
}

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

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

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

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-privacy-policy__faq-item.active .page-privacy-policy__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;
  color: var(--text-color-dark, #333333);
}

/* Vấn đề phong cách */
.page-privacy-policy__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-privacy-policy__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

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

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

/* Chuyển đổi biểu tượng */
.page-privacy-policy__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 biểu tượng chặn sự kiện click */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-privacy-policy__faq-item.active .page-privacy-policy__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Tùy chọn: xoay để tạo hiệu ứng 'x' */
}

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

  /* Fixed Header Spacing for mobile */
  .page-privacy-policy__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-privacy-policy__hero-title {
    font-size: 2em;
  }

  .page-privacy-policy__hero-description {
    font-size: 1em;
  }

  .page-privacy-policy__content-section {
    padding: 40px 0;
  }

  .page-privacy-policy__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-privacy-policy__heading {
    font-size: 1.6em;
    margin-top: 30px;
    margin-bottom: 15px;
  }

  .page-privacy-policy__sub-heading {
    font-size: 1.2em;
    margin-top: 25px;
    margin-bottom: 10px;
  }

  .page-privacy-policy p,
  .page-privacy-policy ul li {
    font-size: 0.95em;
  }

  /* Responsive images */
  .page-privacy-policy img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: unset !important; /* Allow smaller images if needed for layout, but still >= 200px due to overall constraint */
    min-height: unset !important;
  }
  
  /* Ensure content images are at least 200px wide for mobile */
  .page-privacy-policy__image {
    min-width: 200px !important;
    min-height: 200px !important;
  }

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