/* style/faq.css */
.page-faq {
    font-family: Arial, sans-serif;
    color: var(--color-text-main);
    background-color: var(--color-background);
}

.page-faq__hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0 40px 0; /* Adjusted padding-top to 10px */
    background-color: var(--color-deep-green);
    position: relative;
    overflow: hidden;
}

.page-faq__hero-image-wrapper {
    width: 100%;
    max-height: 400px; /* Limit height for hero image */
    overflow: hidden;
    margin-bottom: 20px;
}

.page-faq__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Desktop: cover */
    display: block;
}

.page-faq__hero-content {
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
    z-index: 1;
}

.page-faq__main-title {
    font-size: clamp(2rem, 5vw, 3.5rem); /* Using clamp for H1 font-size */
    color: var(--color-text-main);
    margin-bottom: 15px;
    line-height: 1.2;
    font-weight: bold;
}

.page-faq__hero-description {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.page-faq__hero-cta {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
    max-width: 100%; /* Ensure button doesn't exceed container */
    box-sizing: border-box;
}

.page-faq__btn-primary {
    background: var(--color-button-gradient);
    color: #ffffff; /* White text for primary button */
    border: 2px solid transparent;
}

.page-faq__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

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

.page-faq__btn-secondary:hover {
    background-color: var(--color-primary);
    color: #ffffff;
    transform: translateY(-2px);
}

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

.page-faq__section-title {
    font-size: 2.5rem;
    color: var(--color-text-main);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    line-height: 1.3;
}

.page-faq__text-block {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-faq__text-block p {
    margin-bottom: 15px;
}

.page-faq__faq-list {
    background-color: var(--color-card-bg);
    border-radius: 12px;
    padding: 40px;
}

.page-faq__faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

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

.page-faq__faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.15rem;
    color: var(--color-text-main);
    list-style: none; /* Hide default marker */
    position: relative;
}

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

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

.page-faq__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    transition: transform 0.3s ease;
}

.page-faq__faq-item[open] .page-faq__faq-toggle {
    transform: rotate(45deg); /* Change + to X or similar */
}

.page-faq__faq-answer {
    padding: 0 20px 20px 20px;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-faq__faq-item[open] .page-faq__faq-answer {
    max-height: 2000px; /* Sufficiently large to show all content */
    padding-top: 10px;
}

.page-faq__cta-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    background-color: var(--color-deep-green);
    padding: 80px 20px;
    border-radius: 12px;
    max-width: 1200px;
    margin: 40px auto;
}

.page-faq__cta-content {
    flex: 1;
    max-width: 600px;
    text-align: left;
}

.page-faq__cta-title {
    font-size: 2.2rem;
    color: var(--color-text-main);
    margin-bottom: 20px;
    line-height: 1.3;
    font-weight: bold;
}

.page-faq__cta-description {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.page-faq__cta-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* Allow buttons to wrap */
}

.page-faq__cta-image-wrapper {
    flex: 1;
    max-width: 400px;
    border-radius: 12px;
    overflow: hidden;
}

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

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
    .page-faq__hero-content {
        max-width: 700px;
    }
    .page-faq__section-title {
        font-size: 2rem;
    }
    .page-faq__faq-list {
        padding: 30px;
    }
    .page-faq__cta-section {
        flex-direction: column;
        text-align: center;
        padding: 60px 20px;
    }
    .page-faq__cta-content {
        text-align: center;
        margin-bottom: 30px;
    }
    .page-faq__cta-buttons {
        justify-content: center;
    }
    .page-faq__cta-image-wrapper {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    /* Hero Section */
    .page-faq__hero-section {
        padding-top: 10px !important; /* Ensure small top padding */
        padding-bottom: 30px;
    }
    .page-faq__hero-image-wrapper {
        max-height: 250px;
    }
    .page-faq__hero-image {
        object-fit: contain !important; /* Mobile hero image must contain, not cover */
        height: auto !important;
        max-height: 100% !important;
        width: 100% !important;
    }
    .page-faq__main-title {
        font-size: 1.8rem;
    }
    .page-faq__hero-description {
        font-size: 1rem;
    }
    .page-faq__hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px;
        gap: 10px;
    }

    /* General Section & Text */
    .page-faq__section-spacing {
        padding: 40px 15px;
    }
    .page-faq__section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    .page-faq__text-block {
        font-size: 0.95rem;
    }

    /* FAQ List */
    .page-faq__faq-list {
        padding: 20px 15px;
    }
    .page-faq__faq-item summary {
        font-size: 1rem;
        padding: 15px;
    }
    .page-faq__faq-answer {
        font-size: 0.9rem;
        padding: 0 15px 15px 15px;
    }

    /* CTA Section */
    .page-faq__cta-section {
        padding: 40px 15px;
        margin: 30px auto;
        border-radius: 8px;
    }
    .page-faq__cta-title {
        font-size: 1.8rem;
    }
    .page-faq__cta-description {
        font-size: 1rem;
    }
    .page-faq__cta-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px;
        gap: 10px;
    }

    /* Global Image & Button Responsive Rules (Mandatory for all pages) */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-faq__section,
    .page-faq__card,
    .page-faq__container,
    .page-faq__hero-section,
    .page-faq__content-section,
    .page-faq__faq-list,
    .page-faq__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .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__hero-cta,
    .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: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
        display: flex;
        flex-direction: column;
    }
    /* Placeholder for other modules as per checklist - No specific game grid or winner list on FAQ page */
    /* No specific Hero Jackpot, Game Grid, Winner List, or Blog modules on FAQ page, so no specific media queries for them beyond general image/button rules. */
}