/* style/faq.css */

/* Base styles for the FAQ page content */
.page-faq {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background: #FFFFFF; /* Body background from shared.css is default white */
}

/* Section spacing for consistency */
.page-faq__section--spacing {
    padding: 60px 0;
}

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

/* Hero Section - A simplified hero for FAQ page */
.page-faq__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
    background: linear-gradient(135deg, #017439, #017439 50%, #028945); /* Gradient with brand primary color */
    color: #FFFFFF;
}

.page-faq__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-faq__hero-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.page-faq__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
}

.page-faq__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-faq__main-heading {
    font-size: 3.2em;
    margin-bottom: 15px;
    color: #FFFF00; /* Special color for hero heading */
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-faq__intro-text {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 30px;
    color: #f0f0f0;
}

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

/* Buttons for Hero Section */
.page-faq__btn-register,
.page-faq__btn-login {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

.page-faq__btn-register {
    background: #C30808; /* Specific color for register */
    color: #FFFF00; /* Specific color for register font */
    border: 2px solid #C30808;
}

.page-faq__btn-register:hover {
    background: #a00606;
    border-color: #a00606;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-login {
    background: #C30808; /* Specific color for login */
    color: #FFFF00; /* Specific color for login font */
    border: 2px solid #C30808;
}

.page-faq__btn-login:hover {
    background: #a00606;
    border-color: #a00606;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* General Section Titles and Descriptions */
.page-faq__section-title {
    font-size: 2.5em;
    color: #017439; /* Brand primary color */
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-faq__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 40px;
    color: #555555;
}

.page-faq__section-title--light {
    color: #FFFFFF;
}

.page-faq__section-description--light {
    color: #f0f0f0;
}

/* FAQ Section */
.page-faq__faq-list {
    margin-top: 30px;
}

.page-faq__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-faq__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.page-faq__faq-question:active {
    background: #eeeeee;
}

.page-faq__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.15em;
    font-weight: 600;
    line-height: 1.5;
    color: #333333;
    pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-faq__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #017439; /* Brand primary color */
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from blocking click event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
    color: #C30808; /* Accent color when active */
    transform: rotate(0deg); /* No rotation for +/- */
}

.page-faq__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.3s ease;
    padding: 0 25px;
    opacity: 0;
    background: #fcfcfc;
    border-top: 1px solid #eee;
    color: #444444;
}

.page-faq__faq-item.active .page-faq__faq-answer {
    max-height: 2000px !important; /* Ensure enough height for content */
    padding: 20px 25px !important;
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 8px 8px;
}

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

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

.page-faq__image-content {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-faq__link-inline {
    color: #017439; /* Brand primary color for inline links */
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-faq__link-inline:hover {
    color: #028945;
}

.page-faq__game-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.page-faq__btn-game {
    display: inline-block;
    padding: 12px 25px;
    background: #017439;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

.page-faq__btn-game:hover {
    background: #028945;
    transform: translateY(-2px);
}

/* CTA Section */
.page-faq__cta-section {
    text-align: center;
    padding: 80px 20px;
}

.page-faq__dark-section {
    background: #017439; /* Brand primary color for dark section */
    color: #FFFFFF;
}

.page-faq__cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.page-faq__btn-primary {
    display: inline-block;
    padding: 15px 40px;
    background: #C30808; /* Register/Login color for primary CTA */
    color: #FFFF00; /* Register/Login font color */
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    border: 2px solid #C30808;
}

.page-faq__btn-primary:hover {
    background: #a00606;
    border-color: #a00606;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-download {
    display: inline-block;
    padding: 15px 40px;
    background: #028945; /* A darker green for download button */
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    border: 2px solid #028945;
}

.page-faq__btn-download:hover {
    background: #016a34;
    border-color: #016a34;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-faq__main-heading {
        font-size: 2.8em;
    }
    .page-faq__section-title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .page-faq__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header spacing */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-faq__main-heading {
        font-size: 2.2em;
        margin-bottom: 10px;
    }

    .page-faq__intro-text {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .page-faq__cta-buttons {
        flex-direction: column;
        gap: 15px;
        max-width: 300px;
    }
    
    .page-faq__btn-register,
    .page-faq__btn-login,
    .page-faq__btn-primary,
    .page-faq__btn-download,
    .page-faq__btn-game {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 20px;
        font-size: 16px;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-faq__section--spacing {
        padding: 40px 0;
    }

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

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

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

    .page-faq__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-faq__faq-question h3 {
        font-size: 1em;
        width: calc(100% - 40px);
    }
    
    .page-faq__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    
    .page-faq__faq-answer {
        padding: 0 15px;
    }
    
    .page-faq__faq-item.active .page-faq__faq-answer {
        padding: 15px !important;
    }

    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
}