/* style/responsible-gaming.css */

/* Base styles for the page content */
.page-responsible-gaming {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #ffffff; /* Default body background */
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
}

.page-responsible-gaming__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-responsible-gaming__section {
    padding: 60px 0;
    margin-bottom: 20px;
}

.page-responsible-gaming__section-title {
    font-size: 36px;
    color: #017439; /* Primary color for main titles */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

.page-responsible-gaming__subsection-title {
    font-size: 28px;
    color: #017439;
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-responsible-gaming__sub-heading {
    font-size: 18px;
    color: #017439;
    margin-top: 15px;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-responsible-gaming p {
    margin-bottom: 15px;
    font-size: 16px;
}

.page-responsible-gaming ul,
.page-responsible-gaming ol {
    margin-bottom: 15px;
    padding-left: 20px;
}

.page-responsible-gaming li {
    margin-bottom: 8px;
    font-size: 16px;
}

/* Color contrast enforcement */
.page-responsible-gaming__light-bg {
    background-color: #ffffff;
    color: #333333;
}

.page-responsible-gaming__dark-bg {
    background-color: #017439; /* Primary brand color */
    color: #ffffff; /* White text for contrast */
}

/* Hero Section */
.page-responsible-gaming__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background-color: #f0f8f0; /* Light green background */
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden */
}

.page-responsible-gaming__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-responsible-gaming__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

.page-responsible-gaming__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
}

.page-responsible-gaming__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    color: #333333;
}

.page-responsible-gaming__hero-content h1 {
    font-size: 48px;
    color: #017439;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-responsible-gaming__intro-text {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-responsible-gaming__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #C30808; /* Specific button color */
    color: #FFFF00; /* Specific button font color */
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-responsible-gaming__cta-button:hover {
    background: #a30606; /* Darker red on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-responsible-gaming__contact-button {
    margin-top: 40px;
}

/* Image specific styles */
.page-responsible-gaming__image-wrapper {
    margin: 40px auto;
    text-align: center;
    max-width: 800px;
}

.page-responsible-gaming__image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
}

/* FAQ Section */
.page-responsible-gaming__faq-section {
    background-color: #f9f9f9;
}

/* FAQ container styles */
.page-responsible-gaming__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* FAQ default state - answer hidden */
.page-responsible-gaming__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 15px;
    opacity: 0;
}

/* FAQ expanded state - ☠️ Use !important and sufficiently large max-height */
.page-responsible-gaming__faq-item.active .page-responsible-gaming__faq-answer {
    max-height: 2000px !important; /* ☠️ Use !important ensure priority, value large enough to accommodate any content */
    padding: 20px 15px !important;
    opacity: 1;
    background: #ffffff; /* White background for answer */
    border-radius: 0 0 5px 5px;
}

/* Question styles */
.page-responsible-gaming__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #017439; /* Primary color for question background */
    color: #ffffff; /* White text for contrast */
    border: 1px solid #017439;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-responsible-gaming__faq-question:hover {
    background: #005a2e; /* Slightly darker primary color on hover */
    border-color: #005a2e;
}

.page-responsible-gaming__faq-question:active {
    background: #004d27;
}

/* Question title styles */
.page-responsible-gaming__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Prevent h3 from blocking click event */
    color: #ffffff; /* White text for contrast */
}

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

.page-responsible-gaming__faq-item.active .page-responsible-gaming__faq-toggle {
    transform: rotate(45deg); /* Rotate to form an 'X' or '-' */
    color: #ffffff;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .page-responsible-gaming {
        font-size: 16px;
        line-height: 1.6;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }

    .page-responsible-gaming__container {
        padding: 15px;
    }

    .page-responsible-gaming__section {
        padding: 40px 0;
    }

    .page-responsible-gaming__section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .page-responsible-gaming__subsection-title {
        font-size: 22px;
        margin-top: 30px;
        margin-bottom: 15px;
    }

    .page-responsible-gaming__hero-content h1 {
        font-size: 32px;
    }

    .page-responsible-gaming__intro-text {
        font-size: 16px;
    }

    .page-responsible-gaming__cta-button {
        padding: 12px 25px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    .page-responsible-gaming__contact-button {
        margin-left: auto;
        margin-right: auto;
        display: block;
    }

    /* Images */
    .page-responsible-gaming img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: unset; /* Remove min-width for mobile */
        min-height: unset; /* Remove min-height for mobile */
    }
    
    .page-responsible-gaming__image-wrapper {
        margin: 20px auto;
    }

    /* FAQ Mobile */
    .page-responsible-gaming__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-responsible-gaming__faq-question h3 {
        font-size: 16px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    
    .page-responsible-gaming__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    
    .page-responsible-gaming__faq-answer {
        padding: 0 15px;
    }
    
    .page-responsible-gaming__faq-item.active .page-responsible-gaming__faq-answer {
        padding: 15px !important;
    }
}