/* style/faq.css */

/* Base styles for the FAQ page */
.page-faq {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: var(--background-color, #FFFFFF); /* Inherit body background */
}

/* Section common styles */
.page-faq__section {
    padding: 60px 0;
}

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

/* Hero Section */
.page-faq__hero-section {
    padding-top: 10px; /* Small top padding, header offset handled by body */
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column; /* Image above text */
    align-items: center;
    text-align: center;
    background-color: #017439; /* Brand primary color as background */
    color: #ffffff;
}

.page-faq__hero-image-wrapper {
    width: 100%;
    overflow: hidden;
}

.page-faq__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    min-height: 200px; /* Min size requirement */
}

.page-faq__hero-content {
    padding: 40px 20px;
    max-width: 900px;
    position: relative;
    z-index: 1;
}

.page-faq__main-title {
    font-size: clamp(2em, 4vw, 3.5em); /* Responsive H1 font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #FFFFFF;
}

.page-faq__intro-text {
    font-size: 1.1em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #F0F0F0; /* Slightly off-white for contrast */
}

.page-faq__hero-cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* Button styles */
.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1em;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-faq__btn-primary {
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808;
}

.page-faq__btn-primary:hover {
    background-color: #e02020;
    border-color: #e02020;
}

.page-faq__btn-secondary {
    background-color: transparent;
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808; /* Use same border color for consistency */
}

.page-faq__btn-secondary:hover {
    background-color: #C30808;
    color: #FFFFFF;
}

/* Section titles */
.page-faq__section-title {
    font-size: clamp(1.8em, 3vw, 2.8em);
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
    color: #017439; /* Primary color for titles on light background */
}

.page-faq__section-title--dark-bg {
    color: #FFFFFF; /* White for titles on dark background */
}

/* Content wrapper with image and FAQ list */
.page-faq__content-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.page-faq__container--reversed .page-faq__content-wrapper {
    flex-direction: row-reverse;
}

.page-faq__image-box {
    flex: 1;
    min-width: 300px;
    box-sizing: border-box;
}

.page-faq__content-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-height: 200px; /* Min size requirement */
}

.page-faq__faq-list {
    flex: 2;
}

/* FAQ Item (Details/Summary) */
.page-faq__faq-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f9f9f9;
    cursor: pointer;
    font-weight: 600;
    color: #017439; /* Primary color for questions */
    position: relative;
    list-style: none;
}

.page-faq__faq-question::-webkit-details-marker {
    display: none;
}

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

.page-faq__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: #017439;
    transition: transform 0.3s ease;
}

.page-faq__faq-item[open] .page-faq__faq-toggle {
    transform: rotate(45deg);
}

.page-faq__faq-answer {
    padding: 0 20px;
    color: #555555;
    font-size: 0.95em;
    max-height: 0; /* For JS-controlled expansion (if not native details) */
    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: 2000px; /* Sufficiently large for content */
    padding: 15px 20px;
}

.page-faq__faq-answer p {
    margin-bottom: 10px;
}
.page-faq__faq-answer p:last-child {
    margin-bottom: 0;
}

/* Game links in FAQ answer */
.page-faq__game-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.page-faq__game-link {
    display: inline-block;
    padding: 8px 15px;
    background-color: #e0e0e0;
    color: #333333;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9em;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-faq__game-link:hover {
    background-color: #017439;
    color: #ffffff;
}

/* Dark background sections */
.page-faq__dark-bg {
    background-color: #017439; /* Primary color as dark background */
    color: #ffffff; /* Light text for contrast */
}

.page-faq__dark-bg .page-faq__faq-item {
    background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white for items */
    border-color: rgba(255, 255, 255, 0.2);
}

.page-faq__dark-bg .page-faq__faq-question {
    background-color: rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
}

.page-faq__dark-bg .page-faq__faq-toggle {
    color: #FFFFFF;
}

.page-faq__dark-bg .page-faq__faq-answer {
    color: #f0f0f0;
}

.page-faq__dark-bg .page-faq__faq-answer a {
    color: #FFFF00; /* Yellow for links on dark background */
}
.page-faq__dark-bg .page-faq__faq-answer a:hover {
    text-decoration: underline;
}

/* Call to Action Section */
.page-faq__cta-section {
    text-align: center;
    background-color: #f5f5f5;
    padding: 80px 0;
}

.page-faq__cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.page-faq__cta-title {
    font-size: clamp(1.8em, 3vw, 2.5em);
    font-weight: 700;
    margin-bottom: 20px;
    color: #017439;
}

.page-faq__cta-description {
    font-size: 1.1em;
    margin-bottom: 40px;
    color: #555555;
}

.page-faq__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* Images responsive base */
.page-faq img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .page-faq__section {
        padding: 50px 0;
    }

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

    .page-faq__main-title {
        font-size: clamp(1.8em, 5vw, 3em);
    }

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

    .page-faq__section-title {
        font-size: clamp(1.6em, 4vw, 2.5em);
    }

    .page-faq__hero-cta-buttons,
    .page-faq__cta-buttons {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    /* HERO 主图区域 */
    .page-faq__hero-section {
        padding-top: 10px !important;
    }
    .page-faq__hero-content {
        padding: 30px 15px;
    }
    .page-faq__main-title {
        font-size: clamp(1.8em, 7vw, 2.5em) !important;
        margin-bottom: 15px;
    }
    .page-faq__intro-text {
        font-size: 0.95em !important;
        margin-bottom: 25px;
    }
    .page-faq__hero-image {
        min-height: 150px;
    }

    /* 深色导语区 (applies to hero intro text) */
    .page-faq__section {
        padding: 40px 0 !important;
    }

    /* Content sections */
    .page-faq__content-wrapper {
        flex-direction: column !important;
        gap: 30px !important;
    }
    .page-faq__image-box {
        min-width: unset !important;
        width: 100% !important;
    }
    .page-faq__content-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-height: 200px !important;
    }

    /* FAQ items */
    .page-faq__faq-item {
        margin-bottom: 10px !important;
    }
    .page-faq__faq-question {
        padding: 12px 15px !important;
        font-size: 0.95em !important;
    }
    .page-faq__faq-answer {
        padding: 10px 15px !important;
        font-size: 0.9em !important;
    }
    .page-faq__section-title {
        font-size: clamp(1.5em, 6vw, 2em) !important;
        margin-bottom: 30px !important;
    }

    /* 通用图片与容器 */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-faq__section,
    .page-faq__container,
    .page-faq__content-wrapper,
    .page-faq__image-box,
    .page-faq__faq-list,
    .page-faq__cta-content {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    .page-faq__container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* 按钮与按钮容器 */
    .page-faq__hero-cta-buttons,
    .page-faq__cta-buttons {
        flex-direction: column !important;
        gap: 10px !important;
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    .page-faq__btn-primary,
    .page-faq__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 15px !important;
    }
    .page-faq__game-links {
        flex-direction: column !important;
        gap: 8px !important;
    }
    .page-faq__game-link {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        text-align: center;
    }
}

/* Contrast fix if needed - not explicitly applied, but defined for reference */
.page-faq__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

.page-faq__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}