/* style/faq.css */

/* --- General Page Styling --- */
.page-faq {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: #ffffff; /* Default body background */
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

.page-faq__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-faq__text-center {
    text-align: center;
}

.page-faq__section-title {
    font-size: 36px;
    color: #26A9E0; /* Primary brand color for titles */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

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

.page-faq__section-description {
    font-size: 18px;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-faq__section-description--white {
    color: #f0f0f0;
}

/* --- 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;
    background: linear-gradient(135deg, #26A9E0, #FFFFFF); /* Example gradient, actual image will cover */
    overflow: hidden; /* To contain image */
}

.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;
    position: relative;
    z-index: 1;
}

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

.page-faq__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    margin-top: -80px; /* Overlap with image slightly for visual appeal */
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-faq__main-title {
    font-size: 48px;
    color: #000000; /* Darker text for white background */
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.page-faq__hero-description {
    font-size: 20px;
    color: #555555;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-faq__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #26A9E0;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid #26A9E0;
    box-sizing: border-box; /* Crucial for button responsiveness */
}

.page-faq__cta-button:hover {
    background: #1e87bb; /* Slightly darker primary */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-faq__cta-button--secondary {
    background: #ffffff;
    color: #26A9E0;
    border: 2px solid #26A9E0;
}

.page-faq__cta-button--secondary:hover {
    background: #f0f0f0;
    color: #1e87bb;
}

/* --- Intro Section --- */
.page-faq__intro-section {
    padding: 80px 0;
    background-color: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
}

.page-faq__intro-image {
    display: block;
    max-width: 800px;
    width: 100%;
    height: auto;
    margin: 40px auto 0 auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* --- Main FAQ Section --- */
.page-faq__main-faq-section {
    padding: 80px 0;
    background-color: #26A9E0; /* Primary color background */
    color: #ffffff; /* White text for primary background */
}

.page-faq__faq-list {
    margin-top: 50px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* FAQ Item Styling - Provided by user, adapted to BEM */
.page-faq__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-faq__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;
}

.page-faq__faq-item.active .page-faq__faq-answer {
    max-height: 2000px !important; /* 🚨 Use!important确保优先级，值足够大以容纳任何内容 */
    padding: 20px 15px !important;
    opacity: 1;
    background: #f9f9f9;
    color: #333333; /* Dark text for light answer background */
    border-radius: 0 0 5px 5px;
}

.page-faq__faq-answer p {
    margin-bottom: 15px;
    font-size: 16px;
}

.page-faq__faq-answer .page-faq__btn-small {
    display: inline-block;
    padding: 8px 15px;
    background: #26A9E0;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.page-faq__faq-answer .page-faq__btn-small:hover {
    background: #1e87bb;
}

.page-faq__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-faq__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

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

.page-faq__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px; /* Increased font size for better readability */
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* 防止h3标签阻止点击事件 */
    color: #333333; /* Dark text for question */
}

.page-faq__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-faq__faq-item.active .page-faq__faq-toggle {
    color: #333;
}

/* --- CTA Section at the bottom --- */
.page-faq__cta-section {
    padding: 80px 0;
    background-color: #f0f8ff; /* Light blueish background */
    text-align: center;
}

.page-faq__cta-group--center {
    margin-top: 40px;
}

.page-faq__contact-image {
    display: block;
    max-width: 800px;
    width: 100%;
    height: auto;
    margin: 40px auto 0 auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-faq__section-title {
        font-size: 32px;
    }
    .page-faq__hero-content {
        padding: 30px;
    }
    .page-faq__main-title {
        font-size: 40px;
    }
    .page-faq__hero-description {
        font-size: 18px;
    }
    .page-faq__cta-button {
        padding: 12px 30px;
        font-size: 16px;
    }
}

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

    .page-faq__container {
        padding: 0 15px;
    }

    .page-faq__section-title {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .page-faq__section-description {
        font-size: 16px;
        margin-bottom: 25px;
    }

    /* Hero Section Mobile */
    .page-faq__hero-section {
        padding: 40px 15px;
    }
    .page-faq__hero-image {
        margin-bottom: 20px;
    }
    .page-faq__hero-image img {
        border-radius: 4px;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-faq__hero-content {
        padding: 25px;
        margin-top: -60px;
        border-radius: 8px;
    }
    .page-faq__main-title {
        font-size: 32px;
        margin-bottom: 15px;
    }
    .page-faq__hero-description {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .page-faq__cta-group {
        flex-direction: column;
        gap: 15px;
    }
    .page-faq__cta-button {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 15px;
        font-size: 16px;
        white-space: normal !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
    }
    .page-faq__cta-group,
    .page-faq__button-group,
    .page-faq__btn-container {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 0; /* Handled by button padding */
      padding-right: 0; /* Handled by button padding */
      flex-wrap: wrap !important;
      gap: 10px;
    }

    /* Intro Section Mobile */
    .page-faq__intro-section {
        padding: 50px 0;
    }
    .page-faq__intro-image {
        margin-top: 25px;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Main FAQ Section Mobile */
    .page-faq__main-faq-section {
        padding: 50px 0;
    }
    .page-faq__faq-list {
        margin-top: 30px;
    }
    .page-faq__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-faq__faq-question h3 {
        font-size: 15px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    .page-faq__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    .page-faq__faq-answer {
        padding: 0 15px;
    }
    .page-faq__faq-item.active .page-faq__faq-answer {
        padding: 15px !important;
    }
    .page-faq__faq-answer p {
        font-size: 15px;
    }
    .page-faq__faq-answer .page-faq__btn-small {
        font-size: 13px;
        padding: 6px 12px;
    }

    /* CTA Section Mobile */
    .page-faq__cta-section {
        padding: 50px 0;
    }
    .page-faq__cta-group--center {
        margin-top: 25px;
    }
    .page-faq__contact-image {
        margin-top: 25px;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* All images in content area */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    .page-faq__section,
    .page-faq__card,
    .page-faq__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Ensure all links and buttons are styled appropriately and don't overflow */
.page-faq a[class*="button"],
.page-faq a[class*="btn"] {
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}
.page-faq__cta-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}