/* Base styles for the FAQ page */
.page-faq {
    font-family: Arial, sans-serif;
    color: #FFF6D6; /* Main text color for dark background */
    background-color: #0A0A0A; /* Body background from shared */
    line-height: 1.6;
    padding-bottom: 40px; /* General padding for the bottom */
}

/* Fixed header spacing - per rule: if body has padding-top, this should be small */
.page-faq__hero-section {
    padding-top: 10px; /* Small top padding, assuming body handles header offset */
    padding-bottom: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-faq__hero-image-wrapper {
    width: 100%;
    max-height: 400px; /* Limit hero image height */
    overflow: hidden;
    margin-bottom: 30px;
}

.page-faq__hero-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
    min-width: 200px; /* Ensure min image size */
    min-height: 200px; /* Ensure min image size */
}

.page-faq__hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-faq__hero-title {
    font-size: clamp(2em, 4vw, 3.2em); /* Responsive font size */
    font-weight: bold;
    color: #FFD36B; /* Auxiliary color for highlight */
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 0 8px rgba(255, 211, 107, 0.5); /* Soft glow */
}

.page-faq__hero-description {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #FFF6D6;
}

.page-faq__hero-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    margin-top: 30px;
}

.page-faq__btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    max-width: 100%; /* Ensure buttons don't overflow */
    box-sizing: border-box; /* Include padding/border in width */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
}

.page-faq__btn-primary {
    background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
    color: #111111; /* Dark text for light gradient button */
    border: none;
    box-shadow: 0 4px 15px rgba(242, 193, 78, 0.4);
}

.page-faq__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(242, 193, 78, 0.6);
}

.page-faq__btn-secondary {
    background-color: #111111; /* Card BG color */
    color: #F2C14E; /* Main brand color for text */
    border: 2px solid #F2C14E; /* Border with main brand color */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.page-faq__btn-secondary:hover {
    background-color: #F2C14E;
    color: #111111;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(242, 193, 78, 0.4);
}

.page-faq__content-wrapper {
    padding: 40px 0;
}

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

.page-faq__section-title {
    font-size: 2.2em;
    color: #FFD36B;
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 211, 107, 0.3);
}

.page-faq__faq-list {
    background-color: #111111; /* Card BG color */
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid #3A2A12; /* Border color */
}

.page-faq__faq-item {
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle separator */
    padding-bottom: 15px;
}

.page-faq__faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2em;
    font-weight: bold;
    color: #F2C14E; /* Main brand color for questions */
    padding: 15px 0;
    cursor: pointer;
    list-style: none; /* Hide default marker for details summary */
}

.page-faq__faq-question::-webkit-details-marker {
    display: none; /* Hide default marker for Webkit browsers */
}

.page-faq__faq-qtext {
    flex-grow: 1;
    padding-right: 10px;
}

.page-faq__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    width: 20px;
    text-align: center;
    color: #FFD36B;
    transition: transform 0.3s ease;
}

.page-faq__faq-item[open] .page-faq__faq-toggle {
    transform: rotate(45deg); /* Rotate for 'x' effect, or just change text */
}

.page-faq__faq-answer {
    font-size: 1em;
    color: #FFF6D6; /* Main text color */
    padding: 0 15px 15px 0;
    line-height: 1.8;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-faq__faq-item[open] .page-faq__faq-answer {
    max-height: 1000px; /* Sufficiently large to reveal content */
    padding: 10px 15px 20px 0;
}

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

.page-faq__faq-answer img {
    width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
    border-radius: 8px;
    object-fit: cover;
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
}

.page-faq__cta-section {
    background-color: #111111; /* Card BG color */
    padding: 60px 20px;
    text-align: center;
    margin-top: 40px;
    border-top: 1px solid #3A2A12;
    border-bottom: 1px solid #3A2A12;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
}

.page-faq__cta-title {
    font-size: 2em;
    color: #FFD36B;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-faq__cta-description {
    font-size: 1.1em;
    color: #FFF6D6;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Tablet Responsiveness (max-width: 1024px) --- */
@media (max-width: 1024px) {
    .page-faq__hero-title {
        font-size: clamp(2.5em, 5vw, 3em);
    }

    .page-faq__hero-cta-buttons {
        gap: 10px;
    }

    .page-faq__btn {
        padding: 12px 25px;
    }

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

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

    .page-faq__faq-question {
        font-size: 1.15em;
    }

    .page-faq__cta-title {
        font-size: 1.9em;
    }
}

/* --- Mobile Responsiveness (max-width: 768px) --- */
@media (max-width: 768px) {
    .page-faq {
        font-size: 16px;
        line-height: 1.6;
    }

    /* 1. 顶区标题 + 双 CTA */
    .page-faq__hero-section {
        padding-top: 10px !important; /* Small top padding, per rule */
        padding-bottom: 30px;
    }

    .page-faq__hero-title {
        font-size: clamp(1.8em, 7vw, 2.5em);
        margin-bottom: 15px;
    }

    .page-faq__hero-description {
        font-size: 1em;
        margin-bottom: 25px;
    }

    .page-faq__hero-cta-buttons {
        flex-direction: column;
        gap: 10px;
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 4. 按钮与按钮容器 */
    .page-faq__btn {
        padding: 12px 20px;
        font-size: 0.95em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin: 0 auto; /* Center individual stacked buttons */
    }

    /* 2. 单栏长文容器 */
    .page-faq__container,
    .page-faq__faq-list,
    .page-faq__cta-section {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-faq__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .page-faq__faq-question {
        font-size: 1.1em;
        padding: 10px 0;
    }

    .page-faq__faq-answer {
        font-size: 0.95em;
        padding: 0 10px 10px 0;
    }

    /* 3. 通用图片与 figure */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px !important; /* Ensure min size is kept */
        min-height: 200px !important; /* Ensure min size is kept */
        box-sizing: border-box !important;
    }

    .page-faq__faq-answer img {
        margin: 15px 0;
    }

    /* 5. 注册教程与 FAQ 区块 (FAQ specific) */
    .page-faq__cta-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .page-faq__cta-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }

    .page-faq__cta-description {
        font-size: 1em;
        margin-bottom: 25px;
    }
}