/* style/faq.css */

/* Base styles for the page content */
.page-faq {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background: #FFFFFF; /* Default body background */
}

/* Header offset for fixed header */
.page-faq__hero-section {
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
}

/* Hero Section */
.page-faq__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #26A9E0, #FFFFFF); /* Brand color gradient */
    color: #ffffff; /* White text on brand color background */
}

.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-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-faq__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: #FFFFFF; /* White text for main title */
    line-height: 1.2;
    font-weight: bold;
}

.page-faq__intro-text {
    font-size: 1.2em;
    margin-bottom: 30px;
    max-width: 800px;
    color: #f0f0f0; /* Slightly off-white for contrast */
    margin-left: auto;
    margin-right: auto;
}

.page-faq__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    width: 100%;
}

.page-faq__cta-button {
    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; /* Ensures padding is included in width */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Break long words */
}

.page-faq__cta-button--primary {
    background: #EA7C07; /* Login color */
    color: #ffffff;
    border: 2px solid transparent;
}

.page-faq__cta-button--primary:hover {
    background: #d66f06;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-faq__cta-button--secondary {
    background: #FFFFFF;
    color: #26A9E0; /* Primary color */
    border: 2px solid #26A9E0;
}

.page-faq__cta-button--secondary:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Section spacing */
.page-faq__section-spacing {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.page-faq__section-title {
    font-size: 2.5em;
    color: #26A9E0; /* Primary color for section titles */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

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

/* FAQ List */
.page-faq__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

/* FAQ Item styles */
.page-faq__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

/* FAQ default state - answer hidden */
.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.4s ease;
    padding: 0 25px;
    opacity: 0;
    color: #333333;
    font-size: 1.05em;
}

/* FAQ expanded state - 🚨 Use !important and sufficiently large max-height */
.page-faq__faq-item.active .page-faq__faq-answer {
    max-height: 2000px !important; /* 🚨 Use !important, value large enough for any content */
    padding: 20px 25px !important;
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 8px 8px;
    border-top: 1px solid #e0e0e0;
}

/* Question style */
.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-item.active .page-faq__faq-question {
    border-radius: 8px 8px 0 0;
    border-bottom-color: transparent;
}

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

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

/* Question title style */
.page-faq__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.15em;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Prevents h3 from blocking click event */
    color: #26A9E0; /* Primary color for questions */
}

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

.page-faq__faq-item.active .page-faq__faq-toggle {
    color: #333;
    transform: rotate(180deg);
}

/* Small buttons within FAQ answers */
.page-faq__btn-small {
    display: inline-block;
    padding: 8px 15px;
    margin-top: 15px;
    background: #26A9E0;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-faq__btn-small:hover {
    background: #1e87bb;
}

/* Image content within FAQ answers */
.page-faq__image-content {
    margin-top: 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Game links in FAQ answers */
.page-faq__game-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.page-faq__btn-game {
    display: inline-block;
    padding: 8px 15px;
    background: #f0f0f0;
    color: #26A9E0;
    text-decoration: none;
    border: 1px solid #26A9E0;
    border-radius: 4px;
    font-size: 0.9em;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-faq__btn-game:hover {
    background: #26A9E0;
    color: #ffffff;
}

/* CTA Section at the bottom */
.page-faq__cta-section {
    padding: 80px 20px;
    text-align: center;
    background: #26A9E0; /* Primary brand color */
    color: #ffffff;
    box-sizing: border-box;
}

.page-faq__cta-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: bold;
}

.page-faq__cta-description {
    font-size: 1.15em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0;
}

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

    .page-faq__cta-title {
        font-size: 2.4em;
    }
}

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

    .page-faq__main-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }

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

    .page-faq__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-faq__cta-button {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 25px;
        font-size: 16px;
    }

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

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

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

    .page-faq__faq-item {
        margin-bottom: 10px;
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    }

    .page-faq__faq-question {
        padding: 15px 20px;
        flex-wrap: wrap;
    }

    .page-faq__faq-question h3 {
        font-size: 1em;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }

    .page-faq__faq-toggle {
        margin-left: 10px;
        width: 28px;
        height: 28px;
        font-size: 22px;
    }

    .page-faq__faq-answer {
        padding: 0 20px;
        font-size: 0.95em;
    }

    .page-faq__faq-item.active .page-faq__faq-answer {
        padding: 15px 20px !important;
    }

    .page-faq__btn-small {
        max-width: 100% !important;
        width: 100% !important;
        padding: 7px 12px;
        font-size: 0.85em;
        text-align: center;
    }

    .page-faq__image-content {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-faq__cta-section {
        padding: 60px 15px;
    }

    .page-faq__cta-title {
        font-size: 2em;
    }

    .page-faq__cta-description {
        font-size: 1em;
        margin-bottom: 30px;
    }

    /* Mobile image and container responsiveness */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-faq__section,
    .page-faq__card,
    .page-faq__container,
    .page-faq__hero-container,
    .page-faq__content-area,
    .page-faq__faq-list,
    .page-faq__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-faq__game-links {
        flex-direction: column;
        gap: 8px;
    }
    .page-faq__btn-game {
        width: 100% !important;
        text-align: center;
        max-width: 100% !important;
    }
}