/* style/faq.css */

/* Base styles for the FAQ page */
.page-faq {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main-color, #F2FFF6); /* Default text color for dark background */
    background-color: var(--background-color, #08160F); /* Ensure it respects shared.css body background */
}

/* Variables for custom colors */
:root {
    --primary-color: #11A84E;
    --secondary-color: #22C768;
    --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --card-bg-color: #11271B;
    --background-color: #08160F;
    --text-main-color: #F2FFF6;
    --text-secondary-color: #A7D9B8;
    --border-color: #2E7A4E;
    --glow-color: #57E38D;
    --gold-color: #F2C14E;
    --divider-color: #1E3A2A;
    --deep-green-color: #0A4B2C;
}

/* Section styling */
.page-faq__section-title {
    font-size: 2.5rem;
    color: var(--gold-color, #F2C14E);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    line-height: 1.2;
}

.page-faq__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Ensure image is above content */
    align-items: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--deep-green-color, #0A4B2C); /* Darker background for hero */
    overflow: hidden; /* Prevent content overflow */
}

.page-faq__hero-image-wrapper {
    width: 100%;
    max-width: 1920px; /* Max width for image */
    margin-bottom: 30px; /* Space between image and content */
}

.page-faq__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-faq__hero-content {
    max-width: 900px;
    text-align: center;
    z-index: 1; /* Ensure content is above any potential background elements */
    color: var(--text-main-color, #F2FFF6);
    padding: 0 20px;
}

.page-faq__main-title {
    font-weight: bold;
    color: var(--gold-color, #F2C14E);
    margin-bottom: 20px;
    /* No fixed font-size for H1, relying on responsive clamp if needed, but not here */
    line-height: 1.2;
}

.page-faq__hero-description {
    font-size: 1.15rem;
    margin-bottom: 30px;
    color: var(--text-secondary-color, #A7D9B8);
}

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

.page-faq__introduction-section,
.page-faq__account-section,
.page-faq__transaction-section,
.page-faq__games-section,
.page-faq__promotion-section,
.page-faq__security-support-section,
.page-faq__responsible-gaming-section,
.page-faq__cta-final-section {
    padding: 80px 0;
}

.page-faq__dark-section {
    background-color: var(--card-bg-color, #11271B); /* Use card background for dark sections */
    color: var(--text-main-color, #F2FFF6);
}

.page-faq__text-block {
    font-size: 1.05rem;
    margin-bottom: 30px;
    color: var(--text-secondary-color, #A7D9B8);
    text-align: justify;
}

.page-faq__content-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 40px auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    min-width: 200px; /* Minimum size requirement */
    min-height: 200px; /* Minimum size requirement */
}

/* FAQ Item Styling */
.page-faq__faq-item {
    background-color: var(--card-bg-color, #11271B);
    border: 1px solid var(--border-color, #2E7A4E);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

/* For <details> tag */
.page-faq__faq-item[open] {
    background-color: var(--deep-green-color, #0A4B2C);
    border-color: var(--primary-color, #11A84E);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--text-main-color, #F2FFF6);
    transition: color 0.3s ease;
    user-select: none;
}

.page-faq__faq-question:hover {
    color: var(--gold-color, #F2C14E);
}

.page-faq__faq-toggle {
    font-size: 1.8rem;
    line-height: 1;
    margin-left: 15px;
    color: var(--gold-color, #F2C14E);
    transition: transform 0.3s ease;
}

/* For <details> tag, hide default marker */
.page-faq__faq-item summary {
    list-style: none;
}
.page-faq__faq-item summary::-webkit-details-marker {
    display: none;
}

.page-faq__faq-answer {
    padding: 0 25px 20px;
    font-size: 1rem;
    color: var(--text-secondary-color, #A7D9B8);
    max-height: 0; /* For JS based accordion, controlled by active class */
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
}

/* For <details> tag, the content is naturally visible when open */
.page-faq__faq-item[open] .page-faq__faq-answer {
    max-height: 2000px; /* Large enough to accommodate content */
    padding-top: 15px;
}

/* For JS controlled accordion (if not using <details>) */
.page-faq__faq-item.active .page-faq__faq-answer {
    max-height: 2000px !important;
    padding-top: 15px;
}
.page-faq__faq-item.active .page-faq__faq-toggle {
    transform: rotate(45deg); /* Change + to X or - */
}


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

.page-faq__faq-answer ul,
.page-faq__faq-answer ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.page-faq__faq-answer li {
    margin-bottom: 8px;
}

/* Buttons */
.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box; /* Ensure padding doesn't push it out */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow long words to break */
}

.page-faq__btn-primary {
    background: var(--button-gradient);
    color: #ffffff; /* White text for primary button */
    border: 2px solid transparent;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

.page-faq__btn-secondary {
    background: transparent;
    color: var(--primary-color, #11A84E); /* Primary color text for secondary button */
    border: 2px solid var(--primary-color, #11A84E);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-faq__btn-secondary:hover {
    background: var(--primary-color, #11A84E);
    color: #ffffff; /* White text on hover */
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-faq__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-faq__inline-link {
    color: var(--gold-color, #F2C14E);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.page-faq__inline-link:hover {
    color: var(--glow-color, #57E38D);
}

/* Responsive design */
@media (max-width: 1024px) {
    .page-faq__section-title {
        font-size: 2rem;
    }
    .page-faq__main-title {
        font-size: clamp(2rem, 5vw, 2.5rem); /* Clamp for H1 on tablets */
    }
    .page-faq__hero-description {
        font-size: 1rem;
    }
    .page-faq__faq-question {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .page-faq {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-faq__section-title {
        font-size: 1.8rem;
    }
    .page-faq__main-title {
        font-size: clamp(1.8rem, 6vw, 2.2rem); /* Smaller clamp for H1 on mobile */
    }
    .page-faq__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important; /* body handles --header-offset, this is decorative */
    }
    .page-faq__hero-content {
        padding: 0 15px;
    }
    .page-faq__container {
        padding: 20px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Images responsive */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important; /* Ensure images take full width of container */
        height: auto !important;
        display: block !important;
    }
    .page-faq__hero-image-wrapper,
    .page-faq__content-image {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0; /* Remove padding for images in mobile */
    }

    /* Buttons responsive */
    .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__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-direction: column !important; /* Stack buttons vertically */
        gap: 15px !important; /* Space between stacked buttons */
        overflow: hidden !important;
    }

    .page-faq__faq-question {
        font-size: 1rem;
        padding: 15px 20px;
    }
    .page-faq__faq-answer {
        padding: 0 20px 15px;
    }
    .page-faq__faq-toggle {
        font-size: 1.5rem;
    }

    .page-faq__text-block {
        font-size: 1rem;
    }

    /* Ensure all content containers are constrained */
    .page-faq__introduction-section .page-faq__container,
    .page-faq__account-section .page-faq__container,
    .page-faq__transaction-section .page-faq__container,
    .page-faq__games-section .page-faq__container,
    .page-faq__promotion-section .page-faq__container,
    .page-faq__security-support-section .page-faq__container,
    .page-faq__responsible-gaming-section .page-faq__container,
    .page-faq__cta-final-section .page-faq__container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Ensure content area images CSS dimensions are not less than 200px (desktop) */
.page-faq__content-area img,
.page-faq__introduction-section img,
.page-faq__account-section img,
.page-faq__transaction-section img,
.page-faq__games-section img,
.page-faq__promotion-section img,
.page-faq__security-support-section img,
.page-faq__responsible-gaming-section img,
.page-faq__cta-final-section img {
    min-width: 200px;
    min-height: 200px;
    width: auto; /* Allow auto width on desktop to respect max-width */
    height: auto;
}

/* Image filter restriction */
.page-faq img {
    filter: none; /* Absolutely no filters */
}