/* style/faq.css */

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

.page-faq {
    color: var(--color-text-main); /* Default text color for the page */
    background-color: var(--color-background); /* Ensure consistency with body background if needed */
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* Hero Section */
.page-faq__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    text-align: center;
    overflow: hidden;
    background-color: var(--color-deep-green); /* Fallback/base for hero */
}

.page-faq__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.page-faq__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5); /* Slightly darken image for text readability */
}

.page-faq__hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    color: var(--color-text-main);
}

.page-faq__main-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive font size */
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--color-gold); /* Gold for main title */
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.page-faq__hero-description {
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: var(--color-text-main);
}

/* General Section Styling */
.page-faq__section {
    padding: 60px 20px;
    background-color: var(--color-background);
}

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

.page-faq__section-title {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: var(--color-gold);
}

.page-faq__section-description {
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: var(--color-text-secondary);
}

/* FAQ Section */
.page-faq__faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.page-faq__faq-item {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
    color: var(--color-text-main);
}

.page-faq__faq-item summary {
    list-style: none; /* Hide default marker */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    background-color: var(--color-deep-green);
    color: var(--color-gold);
    transition: background-color 0.3s ease;
}

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

.page-faq__faq-item summary:hover {
    background-color: var(--color-primary);
}

.page-faq__faq-qtext {
    flex-grow: 1;
}

.page-faq__faq-toggle {
    font-size: 1.5rem;
    font-weight: 700;
    margin-left: 15px;
    color: var(--color-glow);
}

.page-faq__faq-item[open] .page-faq__faq-toggle {
    content: "−"; /* Changed by JS, but good to have a CSS fallback */
}

.page-faq__faq-answer {
    padding: 20px 25px;
    border-top: 1px solid var(--color-divider);
    font-size: 1rem;
    color: var(--color-text-main);
}

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

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

.page-faq__faq-answer .page-faq__image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
}

.page-faq__game-list {
    list-style: disc;
    margin-left: 20px;
    padding-top: 10px;
}

.page-faq__game-list li {
    margin-bottom: 8px;
    color: var(--color-text-main);
}

.page-faq__game-list a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-faq__game-list a:hover {
    color: var(--color-gold);
    text-decoration: underline;
}


/* CTA Section */
.page-faq__cta-section {
    background-color: var(--color-deep-green); /* Dark background for CTA */
    color: var(--color-text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 80px 20px;
}

.page-faq__cta-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin-bottom: 40px;
}

.page-faq__cta-section .page-faq__section-title {
    color: var(--color-gold);
}

.page-faq__cta-section .page-faq__section-description {
    color: var(--color-text-secondary);
}

.page-faq__cta-buttons {
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    justify-content: center;
    gap: 20px;
    position: relative;
    z-index: 2;
    width: 100%; /* Ensure container takes full width for responsive buttons */
    max-width: 600px; /* Limit overall button group width */
    margin: 0 auto;
    box-sizing: border-box;
}

.page-faq__cta-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    opacity: 0.2; /* Subtle background image */
}

.page-faq__cta-image-wrapper .page-faq__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) brightness(0.3); /* Desaturate and darken for background */
}

/* About Section */
.page-faq__about-section {
    padding: 60px 20px;
    background-color: var(--color-background);
}

.page-faq__about-content {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 40px;
    align-items: center;
    justify-content: center;
}

.page-faq__about-text {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    color: var(--color-text-main);
}

.page-faq__about-text p {
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.page-faq__about-image-wrapper {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    text-align: center;
}

/* Button Styles */
.page-faq__btn-primary,
.page-faq__btn-secondary,
.page-faq__btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons adapt to width */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Ensure text breaks */
}

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

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

.page-faq__btn-secondary {
    background-color: transparent;
    color: var(--color-glow); /* Text color for secondary button */
    border: 2px solid var(--color-glow);
}

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

.page-faq__btn-link {
    background: none;
    border: none;
    color: var(--color-secondary);
    padding: 0;
    font-weight: 500;
    text-decoration: underline;
    font-size: 1rem;
}

.page-faq__btn-link:hover {
    color: var(--color-gold);
    text-decoration: none;
}

/* Image Styling */
.page-faq__image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Responsive Images & Videos (General) */
.page-faq img,
.page-faq video {
    max-width: 100%;
    height: auto;
    display: block;
}

.page-faq__video-section,
.page-faq__video-container,
.page-faq__video-wrapper,
.page-faq__hero-image-wrapper,
.page-faq__cta-image-wrapper,
.page-faq__about-image-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

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

    .page-faq__hero-section {
        padding: 40px 15px;
        padding-top: 10px;
    }

    .page-faq__main-title {
        font-size: 2.2rem;
    }

    .page-faq__hero-description {
        font-size: 1rem;
    }

    .page-faq__section {
        padding: 40px 15px;
    }

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

    .page-faq__section-description {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

    .page-faq__faq-item summary {
        padding: 15px 20px;
        font-size: 1.1rem;
    }

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

    .page-faq__cta-section {
        padding: 60px 15px;
        flex-direction: column; /* Stack image and content */
    }

    .page-faq__cta-content {
        margin-bottom: 30px;
    }

    .page-faq__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding: 0 15px; /* Add padding to button container */
    }

    .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;
        padding-left: 15px;
        padding-right: 15px;
    }

    .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: 0; /* Handled by individual buttons */
        padding-right: 0; /* Handled by individual buttons */
        flex-wrap: wrap !important;
        gap: 15px;
    }

    .page-faq__about-content {
        flex-direction: column;
    }

    .page-faq__about-text,
    .page-faq__about-image-wrapper {
        max-width: 100%;
    }

    /* Enforce image/video responsiveness for all relevant elements */
    .page-faq img,
    .page-faq video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-faq__section,
    .page-faq__card,
    .page-faq__container,
    .page-faq__video-section,
    .page-faq__video-container,
    .page-faq__video-wrapper,
    .page-faq__hero-image-wrapper,
    .page-faq__cta-image-wrapper,
    .page-faq__about-image-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    /* Override padding for full-width sections that manage their own inner padding */
    .page-faq__hero-section,
    .page-faq__cta-section,
    .page-faq__section {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Contrast Fixes */
.page-faq__dark-bg {
    background-color: var(--color-deep-green);
    color: var(--color-text-main);
}
.page-faq__dark-bg .page-faq__section-title {
    color: var(--color-gold);
}
.page-faq__dark-bg .page-faq__section-description {
    color: var(--color-text-secondary);
}
/* Ensure default text is light on dark background */
.page-faq p, .page-faq li {
    color: var(--color-text-main);
}
.page-faq a {
    color: var(--color-secondary);
}
.page-faq a:hover {
    color: var(--color-gold);
}