/* style/faq.css */

:root {
    --primary-color: #F2C14E;
    --secondary-color: #FFD36B;
    --text-main-color: #FFF6D6;
    --card-bg-color: #111111;
    --background-color-page: #0A0A0A; /* Page specific background if different from body */
    --border-color: #3A2A12;
    --glow-color: #FFD36B;
    --button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
    --header-offset: 120px; /* Default desktop header offset */
}

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

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

/* Hero Section */
.page-faq__hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding-top: var(--header-offset); /* Ensure content is not hidden by fixed header */
    padding-bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden; /* For image positioning */
}

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

.page-faq__main-title {
    font-size: 3.2em;
    font-weight: bold;
    color: #000000; /* Darker text for contrast on gradient */
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.3);
    max-width: 100%;
}

.page-faq__hero-description {
    font-size: 1.2em;
    color: #333333; /* Darker text for contrast on gradient */
    margin-bottom: 30px;
}

.page-faq__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.page-faq__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2; /* Subtle background image */
    filter: none; /* Keep original color */
}

.page-faq__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.page-faq__btn-primary,
.page-faq__btn-secondary,
.page-faq__btn-tertiary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
    max-width: 100%;
    text-align: center;
}

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

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

.page-faq__btn-secondary {
    background: transparent;
    color: var(--text-main-color);
    border: 2px solid var(--primary-color);
    box-shadow: none;
}

.page-faq__btn-secondary:hover {
    background: var(--primary-color);
    color: #000000;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-tertiary {
    background: var(--card-bg-color);
    color: var(--text-main-color);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    font-size: 0.9em;
    border-radius: 5px;
}

.page-faq__btn-tertiary:hover {
    background: var(--primary-color);
    color: #000000;
    border-color: var(--primary-color);
}

/* Section Titles and Text Blocks */
.page-faq__section-title {
    font-size: 2.2em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    margin-top: 60px;
    position: relative;
}

.page-faq__section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    margin: 10px auto 0;
}

.page-faq__text-block {
    font-size: 1.1em;
    color: var(--text-main-color);
    text-align: center;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* FAQ List Section */
.page-faq__faq-list-section {
    padding: 40px 0;
    background-color: var(--background-color-page);
}

.page-faq__faq-item {
    background: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: var(--card-bg-color);
    color: var(--text-main-color);
    font-weight: bold;
    font-size: 1.15em;
    transition: background-color 0.3s ease;
}

.page-faq__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.page-faq__faq-question h3 {
    margin: 0;
    color: var(--text-main-color);
}

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

.page-faq__faq-item.active .page-faq__faq-toggle {
    transform: rotate(0deg); /* Explicitly set for consistency, JS changes text to '-' */
}

.page-faq__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-main-color);
    background-color: var(--card-bg-color);
}

.page-faq__faq-item.active .page-faq__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to accommodate content */
    padding: 15px 25px 25px;
}

.page-faq__faq-answer p {
    margin-bottom: 15px;
    font-size: 1em;
}

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

/* Images */
.page-faq img {
    max-width: 100%;
    height: auto;
    display: block;
    filter: none; /* Ensure no CSS filters are applied */
}

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

@media (max-width: 768px) {
    :root {
        --header-offset: 100px; /* Adjust for mobile header height */
    }
    .page-faq {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-faq__hero-section {
        padding-top: var(--header-offset) !important; /* Mobile specific padding */
        padding-bottom: 40px;
    }
    .page-faq__hero-content {
        padding: 0 15px;
    }
    .page-faq__main-title {
        font-size: 2.2em;
        line-height: 1.3;
    }
    .page-faq__hero-description {
        font-size: 1em;
    }
    .page-faq__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }
    .page-faq__btn-primary,
    .page-faq__btn-secondary,
    .page-faq__btn-tertiary {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-faq__section-title {
        font-size: 1.8em;
        margin-top: 40px;
        margin-bottom: 30px;
    }
    .page-faq__text-block {
        font-size: 1em;
        margin-bottom: 30px;
        padding: 0 15px;
    }
    .page-faq__faq-question {
        font-size: 1.05em;
        padding: 15px 20px;
    }
    .page-faq__faq-answer {
        padding: 0 20px;
    }
    .page-faq__faq-item.active .page-faq__faq-answer {
        padding: 10px 20px 20px;
    }
    .page-faq__game-links {
        flex-direction: column;
        gap: 10px;
    }
    .page-faq__game-links .page-faq__btn-tertiary {
        width: 100%;
    }
    
    /* Mobile image responsiveness */
    .page-faq img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
    }
    
    .page-faq__section,
    .page-faq__card,
    .page-faq__container {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
    }
}

@media (max-width: 480px) {
    .page-faq__main-title {
        font-size: 1.8em;
    }
    .page-faq__section-title {
        font-size: 1.5em;
    }
    .page-faq__faq-question {
        font-size: 1em;
    }
}