/* style/faq.css */
/* body 已 padding-top: var(--header-offset)；页面禁止再写该变量 */

/* Base styles for the page */
.page-faq {
    font-family: Arial, sans-serif;
    color: var(--text-main-color); /* Light text on dark body background */
    background-color: transparent; /* Rely on body background from shared.css */
    line-height: 1.6;
}

/* Color variables based on provided palette */
:root {
    --primary-color: #113B7A;
    --secondary-color: #1D5FD1;
    --button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
    --card-bg-color: #10233F;
    --text-main-color: #F3F8FF;
    --text-secondary-color: #AFC4E8;
    --border-color: #244D84;
    --glow-color: #4FA8FF;
    --gold-color: #F2C14E;
    --divider-color: #1B3357;
    --deep-navy-color: #08162B; /* This is the body background color */
}

/* Hero Section */
.page-faq__hero-section {
    position: relative;
    display: flex;
    flex-direction: column; /* Image block above text block */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--primary-color); /* A solid background for the section */
    overflow: hidden; /* Ensure no image overflow */
}

.page-faq__hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin-bottom: 30px; /* Space between content and image */
}

.page-faq__main-title {
    font-size: clamp(2em, 4vw, 3em); /* Responsive font size */
    color: var(--gold-color); /* Use gold for main title for prominence */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    letter-spacing: 0.05em;
    max-width: 100%;
}

.page-faq__description {
    font-size: 1.1em;
    color: var(--text-secondary-color);
    margin-bottom: 30px;
    max-width: 100%;
}

.page-faq__hero-image {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    margin-top: 30px; /* Space from content above */
}

/* Content Area */
.page-faq__content-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background-color: var(--deep-navy-color); /* Explicitly set for content area if needed, or rely on body */
    color: var(--text-main-color);
}

.page-faq__section-title {
    font-size: clamp(1.8em, 3vw, 2.5em);
    color: var(--gold-color);
    text-align: center;
    margin-bottom: 40px;
    font-weight: 600;
    line-height: 1.3;
}

/* Accordion */
.page-faq__accordion {
    max-width: 900px;
    margin: 0 auto;
}

.page-faq__faq-item {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    color: var(--text-main-color); /* Ensure light text on dark card */
}

.page-faq__faq-item[open] {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text-main-color);
    cursor: pointer;
    background-color: var(--card-bg-color);
    border-bottom: 1px solid var(--divider-color);
    transition: background-color 0.3s ease;
    user-select: none;
}

.page-faq__faq-item[open] .page-faq__faq-question {
    background-color: rgba(29, 95, 209, 0.2); /* Slightly lighter background when open */
    color: var(--gold-color);
    border-bottom: 1px solid var(--secondary-color);
}

.page-faq__faq-question:hover {
    background-color: rgba(29, 95, 209, 0.1);
}

.page-faq__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    margin-left: 15px;
    color: var(--gold-color);
}

.page-faq__faq-answer {
    padding: 20px 25px;
    font-size: 1em;
    color: var(--text-secondary-color);
    line-height: 1.7;
    border-top: none;
}

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

.page-faq__faq-answer .page-faq__image {
    display: block;
    max-width: 100%;
    height: auto;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-faq__game-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

/* Call to Action Section */
.page-faq__cta-section {
    background-color: var(--primary-color);
    padding: 60px 20px;
    text-align: center;
    color: var(--text-main-color);
    border-top: 1px solid var(--border-color);
}

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

.page-faq__cta-description {
    font-size: 1.1em;
    color: var(--text-secondary-color);
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1em;
    transition: all 0.3s ease;
    text-align: center;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    box-sizing: border-box;
    max-width: 100%; /* Ensure button doesn't overflow */
}

.page-faq__btn-primary {
    background: var(--button-gradient);
    color: #ffffff; /* White text on dark gradient */
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

.page-faq__btn-secondary {
    background-color: transparent;
    color: var(--gold-color);
    border: 2px solid var(--gold-color);
    margin-left: 10px; /* Space between buttons */
}

.page-faq__btn-secondary:hover {
    background-color: var(--gold-color);
    color: var(--deep-navy-color); /* Dark text on gold hover */
    transform: translateY(-2px);
}

/* General Link Styling for content area */
.page-faq__faq-answer a {
    color: var(--glow-color); /* Use glow color for links in answers */
    text-decoration: underline;
}
.page-faq__faq-answer a:hover {
    color: var(--gold-color);
    text-decoration: none;
}


/* Responsive styles */
@media (max-width: 1024px) {
    .page-faq__hero-content {
        max-width: 700px;
    }
}

@media (max-width: 768px) {
    .page-faq__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important;
    }

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

    .page-faq__description {
        font-size: 1em;
    }

    .page-faq__content-area,
    .page-faq__cta-section {
        padding: 30px 15px;
    }

    .page-faq__section-title,
    .page-faq__cta-title {
        font-size: clamp(1.6em, 6vw, 2em);
    }

    .page-faq__faq-question {
        font-size: 1.1em;
        padding: 15px 20px;
    }

    .page-faq__faq-answer {
        padding: 15px 20px;
        font-size: 0.95em;
    }

    /* Mobile specific image, video, button adaptations */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-faq__hero-section,
    .page-faq__content-area,
    .page-faq__cta-section,
    .page-faq__accordion,
    .page-faq__faq-item,
    .page-faq__game-links,
    .page-faq__cta-buttons,
    .page-faq__button-group,
    .page-faq__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Prevent content overflow */
    }
    
    .page-faq__btn-primary,
    .page-faq__btn-secondary,
    .page-faq a[class*="button"],
    .page-faq a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin-left: 0 !important; /* Remove horizontal margin for stack */
        margin-bottom: 10px; /* Add vertical spacing when stacked */
    }

    .page-faq__game-links {
        flex-direction: column; /* Stack game links vertically */
        align-items: center;
    }
    .page-faq__game-links .page-faq__btn-secondary {
        margin-bottom: 10px; /* Add spacing between stacked buttons */
        width: auto; /* Adjust width for stacking */
    }
}

@media (max-width: 480px) {
    .page-faq__main-title {
        font-size: clamp(1.6em, 8vw, 2em);
    }
    .page-faq__faq-question {
        font-size: 1em;
    }
    .page-faq__btn-primary,
    .page-faq__btn-secondary {
        padding: 10px 15px;
        font-size: 0.9em;
    }
}