/* style/privacy-policy.css */

/* Variables (if any, though shared.css likely has most) */
:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --text-color-dark: #333333;
    --text-color-light: #ffffff;
    --background-light: #ffffff;
    --background-dark: #26A9E0; /* Using primary color for dark sections */
    --border-color: #e0e0e0;
}

/* Base styles for the privacy policy page content */
.page-privacy-policy {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark); /* Default text color for light backgrounds */
    background: var(--background-light); /* Default background color for the page content */
}

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

/* Hero Banner Section */
.page-privacy-policy__hero-banner {
    padding: 60px 0;
    text-align: center;
    color: var(--text-color-light); /* Light text for dark background */
    background: var(--background-dark); /* Using primary color as dark background for banner */
    /* Fixed header offset - apply to the main content wrapper or first section */
    padding-top: var(--header-offset, 120px);
}

.page-privacy-policy__main-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--text-color-light);
}

.page-privacy-policy__intro-text {
    font-size: 1.1em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-color-light);
}

.page-privacy-policy__hero-image {
    width: 100%;
    height: auto;
    max-width: 800px; /* Constrain hero image width within container */
    margin: 30px auto 0 auto;
    border-radius: 8px;
    display: block; /* Ensure it behaves as a block element for margin auto */
    object-fit: cover;
}

/* General Content Section */
.page-privacy-policy__content-section {
    padding: 40px 0;
    background: var(--background-light); /* Light background for content */
    color: var(--text-color-dark); /* Dark text for light background */
}

.page-privacy-policy__section-title {
    font-size: 2em;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--primary-color); /* Use primary color for section titles */
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.page-privacy-policy__section-title--light {
    color: var(--text-color-light);
    border-bottom-color: var(--text-color-light);
}

.page-privacy-policy__text-block {
    margin-bottom: 15px;
    text-align: justify;
}

.page-privacy-policy__list {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 20px;
    padding-left: 0;
}

.page-privacy-policy__list li {
    margin-bottom: 8px;
}

.page-privacy-policy__content-image {
    width: 100%;
    height: auto;
    max-width: 700px;
    margin: 20px auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

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

.page-privacy-policy__contact-link:hover {
    color: #1a7eb3; /* A darker shade of primary-color */
}

/* CTA Button */
.page-privacy-policy__cta-wrapper {
    text-align: center;
    margin-top: 50px;
    padding: 30px 0;
}

.page-privacy-policy__cta-button {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--primary-color);
    color: var(--text-color-light);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
}

.page-privacy-policy__cta-button:hover {
    background-color: #1e8dc4; /* A slightly darker primary color */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* FAQ Section */
.page-privacy-policy__faq-section {
    padding: 60px 0;
    background: var(--background-dark); /* Dark background for FAQ section */
    color: var(--text-color-light); /* Light text for dark background */
}

.page-privacy-policy__faq-list {
    max-width: 800px;
    margin: 30px auto 0 auto;
}

/* FAQ容器样式 */
.page-privacy-policy__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--secondary-color); /* FAQ item background */
}

/* 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;
  color: var(--text-color-dark); /* Dark text for light answer background */
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-privacy-policy__faq-item.active .page-privacy-policy__faq-answer {
  max-height: 2000px !important; /* 🚨 使用!important确保优先级，值足够大以容纳任何内容 */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9; /* Slightly off-white for answer background */
  border-radius: 0 0 5px 5px;
}

/* 问题样式 */
.page-privacy-policy__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--secondary-color); /* Light background for question */
  border: 1px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-color-dark); /* Dark text for question */
}

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

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

/* 问题标题样式 */
.page-privacy-policy__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
  color: var(--text-color-dark); /* Dark text for question title */
}

/* 切换图标 */
.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; /* 防止图标阻止点击事件 */
  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: #333;
  transform: rotate(45deg); /* Change to X or rotate for minus sign */
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .page-privacy-policy__container {
        padding: 0 15px;
    }

    /* Fixed header offset - apply to the main content wrapper or first section */
    .page-privacy-policy__hero-banner {
        padding: 40px 15px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile padding-top is set */
    }

    .page-privacy-policy__main-title {
        font-size: 1.8em;
    }

    .page-privacy-policy__intro-text {
        font-size: 1em;
    }

    .page-privacy-policy__section-title {
        font-size: 1.5em;
        margin-top: 30px;
        border-bottom-width: 1px;
    }

    .page-privacy-policy__text-block,
    .page-privacy-policy__list li {
        font-size: 0.95em;
    }

    /* Images responsiveness */
    .page-privacy-policy img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    .page-privacy-policy__content-section,
    .page-privacy-policy__faq-section {
        padding: 30px 0;
    }

    /* Button responsiveness */
    .page-privacy-policy__cta-button {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 20px;
        font-size: 1em;
    }

    .page-privacy-policy__cta-wrapper {
        padding: 20px 15px;
    }
    
    /* FAQ Mobile Styles */
    .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;
    }
}

/* Color Contrast Enforcement */
.page-privacy-policy__dark-section {
    background: var(--background-dark); /* #26A9E0 */
    color: var(--text-color-light); /* #FFFFFF */
}

.page-privacy-policy__light-bg {
    background: var(--background-light); /* #FFFFFF */
    color: var(--text-color-dark); /* #333333 */
}

/* Ensure specific elements have high contrast */
.page-privacy-policy p,
.page-privacy-policy li,
.page-privacy-policy__faq-answer p {
    color: var(--text-color-dark); /* Default dark text for readability */
}

.page-privacy-policy__faq-question h3 {
    color: var(--text-color-dark); /* Dark text for question titles on light background */
}

.page-privacy-policy__cta-button.page-privacy-policy__btn-primary {
    background: #26A9E0; /* Primary brand color */
    color: #ffffff; /* White text for contrast */
}

/* Ensure no filter is used on images */
.page-privacy-policy img {
    filter: none !important;
}