/* style/faq.css */

:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --dark-bg-color: #1a1a2e;
    --light-text-color: #ffffff;
    --dark-text-color: #333333;
    --register-btn-bg: #C30808;
    --login-btn-bg: #C30808;
    --login-register-text: #FFFF00;
}

.page-faq {
    color: var(--light-text-color); /* Default text color for dark body background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: transparent; /* Body background handled by shared.css */
}

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

.page-faq__hero-section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--primary-color); /* Using brand color for hero */
    color: var(--secondary-color);
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

.page-faq__main-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: var(--secondary-color);
    line-height: 1.2;
}

.page-faq__description {
    font-size: 1.1em;
    max-width: 800px;
    margin: 0 auto 30px;
    color: var(--secondary-color);
}

.page-faq__cta-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.05em;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-faq__btn-primary {
    background-color: var(--register-btn-bg); /* Custom color for register */
    color: var(--login-register-text); /* Custom color for register text */
    border: 2px solid var(--register-btn-bg);
}

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

.page-faq__btn-secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.page-faq__btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.page-faq__content-section {
    padding: 60px 0;
    background-color: var(--secondary-color); /* Light background for content */
    color: var(--dark-text-color); /* Dark text for light background */
}

.page-faq__section-title {
    font-size: 2.2em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
}

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

.page-faq__faq-item {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.page-faq__faq-item[open] {
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    color: var(--primary-color);
    background-color: #e8f5e9;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
    list-style: none; /* For details/summary */
}

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

.page-faq__faq-question:hover {
    background-color: #dcedc8;
}

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

.page-faq__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: var(--primary-color);
}

.page-faq__faq-answer {
    padding: 20px 25px;
    font-size: 1em;
    color: var(--dark-text-color);
    line-height: 1.8;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}

.page-faq__faq-item[open] .page-faq__faq-answer {
    max-height: 2000px; /* Large enough to accommodate content */
}

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

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

.page-faq__inline-link {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: bold;
    margin-top: 10px;
    display: inline-block;
}

.page-faq__inline-link:hover {
    color: #004d2c;
}

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

.page-faq__category-link {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.page-faq__category-link:hover {
    background-color: #004d2c;
}

.page-faq__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--primary-color); /* Using brand color */
    color: var(--secondary-color);
}

.page-faq__cta-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.page-faq__cta-description {
    font-size: 1.1em;
    max-width: 700px;
    margin: 0 auto 40px;
    color: var(--secondary-color);
}

/* Image specific styles */
.page-faq img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-faq__main-title {
        font-size: 2.4em;
    }
    .page-faq__section-title {
        font-size: 2em;
    }
    .page-faq__cta-title {
        font-size: 2.2em;
    }
}

@media (max-width: 768px) {
    .page-faq__hero-section {
        padding: 60px 20px;
        padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
    }
    .page-faq__main-title {
        font-size: 2em;
    }
    .page-faq__description {
        font-size: 1em;
    }
    .page-faq__cta-group {
        flex-direction: column;
        gap: 15px;
    }
    .page-faq__btn-primary,
    .page-faq__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
    }
    .page-faq__content-section {
        padding: 40px 0;
    }
    .page-faq__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-faq__faq-question {
        padding: 15px 20px;
        font-size: 1em;
    }
    .page-faq__faq-answer {
        padding: 15px 20px;
        font-size: 0.95em;
    }
    .page-faq__cta-section {
        padding: 60px 20px;
    }
    .page-faq__cta-title {
        font-size: 2em;
    }
    .page-faq__cta-description {
        font-size: 1em;
    }
    .page-faq__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-faq__game-categories {
        flex-direction: column;
    }
    .page-faq__category-link {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .page-faq__main-title {
        font-size: 1.8em;
    }
    .page-faq__section-title {
        font-size: 1.6em;
    }
    .page-faq__cta-title {
        font-size: 1.8em;
    }
}