/* style/faq.css */

/* Custom colors from requirements */
:root {
    --primary-color: #11A84E;
    --secondary-color: #22C768;
    --btn-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --card-bg: #11271B;
    --bg-color: #08160F; /* This is the body background */
    --text-main: #F2FFF6;
    --text-secondary: #A7D9B8;
    --border: #2E7A4E;
    --glow: #57E38D;
    --gold: #F2C14E;
    --divider: #1E3A2A;
    --deep-green: #0A4B2C;
}

/* --- General Styles --- */
.page-faq {
    font-family: 'Arial', sans-serif;
    color: var(--text-main); /* Default text color for the page, derived from body bg */
    background-color: var(--bg-color); /* Matches custom color #08160F */
    line-height: 1.6;
}

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

.page-faq__section-title {
    font-size: 2.5em;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.page-faq__category-title {
    font-size: 1.8em;
    color: var(--text-main);
    margin-top: 50px;
    margin-bottom: 25px;
    font-weight: 600;
    border-bottom: 2px solid var(--divider); /* #1E3A2A */
    padding-bottom: 10px;
}

.page-faq__text-block {
    font-size: 1.1em;
    color: var(--text-secondary); /* #A7D9B8 */
    margin-bottom: 20px;
    text-align: justify;
}

.page-faq__link-more,
.page-faq__link-game {
    color: var(--gold); /* #F2C14E */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    display: inline-block;
    margin-top: 10px;
}

.page-faq__link-more:hover,
.page-faq__link-game:hover {
    color: var(--glow); /* #57E38D */
    text-decoration: underline;
}

/* --- Buttons --- */
.page-faq__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap; /* For mobile responsiveness */
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-width: 180px;
    text-align: center;
    box-sizing: border-box; /* Crucial for mobile */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
}

.page-faq__btn-primary {
    background: var(--btn-gradient);
    color: var(--text-main); /* #F2FFF6 */
    border: 2px solid transparent;
}

.page-faq__btn-primary:hover {
    background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%); /* Slight inverse for hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-faq__btn-secondary {
    background-color: transparent;
    color: var(--glow); /* #57E38D */
    border: 2px solid var(--glow); /* #57E38D */
}

.page-faq__btn-secondary:hover {
    background-color: var(--glow); /* #57E38D */
    color: var(--deep-green); /* #0A4B2C */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* --- Hero Section --- */
.page-faq__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    overflow: hidden;
    background-color: var(--bg-color); /* Fallback */
}

.page-faq__hero-image {
    width: 100%;
    height: auto;
    max-height: 600px; /* Max height for desktop hero image */
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 40px;
    display: block;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.page-faq__hero-content {
    text-align: center;
    max-width: 900px;
    z-index: 1;
}

.page-faq__main-title {
    font-size: clamp(2.5em, 5vw, 3.5em); /* Responsive font size for H1 */
    color: var(--text-main); /* #F2FFF6 */
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.page-faq__hero-description {
    font-size: 1.2em;
    color: var(--text-secondary); /* #A7D9B8 */
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Introduction Section --- */
.page-faq__introduction-section {
    padding: 80px 0;
    background-color: var(--bg-color); /* #08160F */
    text-align: center;
}

.page-faq__introduction-section .page-faq__text-block {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-faq__content-image {
    width: 100%;
    height: auto;
    max-width: 800px;
    min-width: 200px; /* Ensure minimum size */
    border-radius: 10px;
    margin: 40px auto 0 auto;
    display: block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.page-faq__image-small {
  max-width: 600px; /* Smaller image size for specific content */
}

/* --- Accordion Section (FAQ) --- */
.page-faq__accordion-section {
    padding: 80px 0;
    background-color: var(--bg-color); /* #08160F */
}

.page-faq__faq-list {
    margin-top: 40px;
}

.page-faq__faq-item {
    background-color: var(--card-bg); /* #11271B */
    border: 1px solid var(--border); /* #2E7A4E */
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.page-faq__faq-item[open] {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border-color: var(--glow); /* #57E38D */
}

.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); /* #F2FFF6 */
    cursor: pointer;
    background-color: var(--card-bg); /* #11271B */
    transition: background-color 0.3s ease;
    list-style: none; /* For <summary> tag */
}

.page-faq__faq-question::-webkit-details-marker {
    display: none; /* For <summary> tag */
}

.page-faq__faq-question:hover {
    background-color: var(--deep-green); /* #0A4B2C */
}

.page-faq__faq-qtext {
    flex-grow: 1;
    margin-right: 15px;
}

.page-faq__faq-toggle {
    font-size: 1.8em;
    font-weight: 300;
    color: var(--glow); /* #57E38D */
    line-height: 1;
}

.page-faq__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1.05em;
    color: var(--text-secondary); /* #A7D9B8 */
    background-color: var(--deep-green); /* #0A4B2C */
    border-top: 1px solid var(--divider); /* #1E3A2A */
}

.page-faq__faq-answer p {
    margin-bottom: 15px;
    color: var(--text-secondary); /* Ensure paragraph text color */
}

.page-faq__faq-answer strong {
    color: var(--text-main); /* Highlight strong text */
}

.page-faq__faq-answer .page-faq__link-more {
    margin-top: 5px;
    display: inline-block;
}

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

.page-faq__link-game {
    background-color: var(--deep-green); /* #0A4B2C */
    border: 1px solid var(--border); /* #2E7A4E */
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.95em;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-main); /* #F2FFF6 */
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.page-faq__link-game:hover {
    background-color: var(--glow); /* #57E38D */
    border-color: var(--glow); /* #57E38D */
    color: var(--deep-green); /* #0A4B2C */
    text-decoration: none;
}

/* --- Final CTA Section --- */
.page-faq__final-cta-section {
    padding: 80px 0;
    background-color: var(--bg-color); /* #08160F */
    text-align: center;
}

.page-faq__final-cta-section .page-faq__text-block {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-faq__section-title {
        font-size: 2em;
    }
    .page-faq__category-title {
        font-size: 1.6em;
    }
    .page-faq__faq-question {
        font-size: 1.1em;
    }
    .page-faq__hero-image {
        max-height: 500px;
    }
}

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

    /* Containers and sections */
    .page-faq__container,
    .page-faq__hero-section,
    .page-faq__introduction-section,
    .page-faq__accordion-section,
    .page-faq__final-cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-faq__hero-section {
        padding-top: 10px !important; /* Ensure small padding, not --header-offset */
        padding-bottom: 40px;
    }

    /* Titles */
    .page-faq__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-faq__category-title {
        font-size: 1.4em;
        margin-top: 30px;
        margin-bottom: 20px;
    }
    .page-faq__main-title {
        font-size: clamp(2em, 8vw, 2.5em); /* Adjust H1 for smaller screens */
    }
    .page-faq__hero-description {
        font-size: 1em;
    }

    /* Images */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: unset !important; /* Override desktop min-width if any */
        min-height: unset !important; /* Override desktop min-height if any */
    }
    .page-faq__hero-image {
        margin-bottom: 30px;
        max-height: 300px; /* Further restrict hero image height on mobile */
    }
    .page-faq__content-image {
        margin-top: 30px;
    }

    /* Buttons */
    .page-faq__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        margin-top: 30px;
    }
    .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 20px;
        font-size: 1em;
    }

    /* FAQ items */
    .page-faq__faq-item {
        margin-bottom: 10px;
    }
    .page-faq__faq-question {
        padding: 15px 20px;
        font-size: 1em;
    }
    .page-faq__faq-toggle {
        font-size: 1.5em;
    }
    .page-faq__faq-answer {
        padding: 0 20px 15px 20px;
        font-size: 0.95em;
    }
    .page-faq__game-links {
        flex-direction: column; /* Stack game links vertically */
    }
    .page-faq__link-game {
        width: 100%;
        text-align: center;
    }
}