/* style/terms-conditions.css */

/* General page styling */
.page-terms-conditions {
    font-family: Arial, sans-serif;
    color: #333333; /* Dark text on light background */
    background-color: #FFFFFF; /* Default body background is white */
    line-height: 1.6;
    font-size: 1rem;
}

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

/* Hero Section */
.page-terms-conditions__hero-section {
    position: relative;
    width: 100%;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    min-height: 500px; /* Ensure hero has a decent height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background-color: #017439; /* Use main brand color for hero background */
    color: #ffffff; /* White text on brand color background */
}

.page-terms-conditions__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.3; /* Make background image subtle */
}

.page-terms-conditions__hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.4); /* Dark overlay for text readability */
    border-radius: 10px;
}

.page-terms-conditions__main-title {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: #FFFF00; /* Yellow for main title for prominence */
    font-weight: bold;
}

.page-terms-conditions__intro-text {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #ffffff;
}

/* Content Area */
.page-terms-conditions__content-area {
    padding: 60px 0;
    background-color: #ffffff; /* Light background for content */
}

.page-terms-conditions__section-title {
    font-size: 2rem;
    color: #017439; /* Brand color for main section titles */
    margin-top: 40px;
    margin-bottom: 25px;
    text-align: left;
    font-weight: bold;
}

.page-terms-conditions__sub-title {
    font-size: 1.5rem;
    color: #333333; /* Dark text for subtitles */
    margin-top: 30px;
    margin-bottom: 20px;
    text-align: left;
    font-weight: bold;
}

.page-terms-conditions p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.page-terms-conditions__list {
    list-style: disc inside;
    margin-bottom: 20px;
    padding-left: 20px;
}

.page-terms-conditions__list li {
    margin-bottom: 10px;
}

/* Buttons */
.page-terms-conditions__btn-primary,
.page-terms-conditions__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    text-align: center;
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
    max-width: 100%; /* Ensure button doesn't overflow */
}

.page-terms-conditions__btn-primary {
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808;
    margin-top: 20px;
}

.page-terms-conditions__btn-primary:hover {
    background-color: #a00606;
    border-color: #a00606;
}

.page-terms-conditions__btn-secondary {
    background-color: #FFFFFF;
    color: #017439; /* Brand color for secondary button text */
    border: 2px solid #017439;
    margin-top: 20px;
}

.page-terms-conditions__btn-secondary:hover {
    background-color: #017439;
    color: #ffffff;
}

.page-terms-conditions__game-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
    margin-bottom: 30px;
    justify-content: center; /* Center align for better look */
}

/* FAQ Section */
.page-terms-conditions__faq-list {
    margin-top: 30px;
}

.page-terms-conditions__faq-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-terms-conditions__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background-color: #f9f9f9;
    cursor: pointer;
    font-weight: bold;
    color: #333333;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

.page-terms-conditions__faq-question:hover {
    background-color: #f0f0f0;
}

.page-terms-conditions__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    color: #017439; /* Brand color for toggle icon */
    transition: transform 0.3s ease;
}

.page-terms-conditions__faq-item.active .page-terms-conditions__faq-toggle {
    transform: rotate(45deg); /* Plus to X for active */
}

.page-terms-conditions__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    background-color: #ffffff;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.page-terms-conditions__faq-item.active .page-terms-conditions__faq-answer {
    max-height: 1000px !important; /* Use !important to ensure override */
    padding: 15px 25px;
}

.page-terms-conditions__faq-answer p {
    margin-bottom: 0;
}

/* Image responsiveness */
.page-terms-conditions img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .page-terms-conditions {
        font-size: 15px;
        line-height: 1.6;
    }

    .page-terms-conditions__container {
        padding: 0 15px; /* Smaller padding for mobile */
    }

    .page-terms-conditions__hero-section {
        min-height: 400px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure header offset on mobile */
    }

    .page-terms-conditions__hero-content {
        padding: 30px 15px;
    }

    .page-terms-conditions__main-title {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .page-terms-conditions__intro-text {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .page-terms-conditions__section-title {
        font-size: 1.6rem;
        margin-top: 30px;
        margin-bottom: 20px;
    }

    .page-terms-conditions__sub-title {
        font-size: 1.3rem;
        margin-top: 25px;
        margin-bottom: 15px;
    }

    /* Images */
    .page-terms-conditions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Content area and containers must not overflow */
    .page-terms-conditions__content-area,
    .page-terms-conditions__container,
    .page-terms-conditions__hero-section,
    .page-terms-conditions__hero-content,
    .page-terms-conditions__game-links,
    .page-terms-conditions__faq-list,
    .page-terms-conditions__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }

    /* Buttons */
    .page-terms-conditions__btn-primary,
    .page-terms-conditions__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 20px;
        font-size: 1rem;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin-top: 15px; /* Adjust spacing */
    }

    .page-terms-conditions__game-links {
        flex-direction: column; /* Stack buttons vertically on mobile */
        align-items: center;
    }
    .page-terms-conditions__game-links a {
        width: 100%; /* Make each button take full width */
    }

    .page-terms-conditions__faq-question {
        padding: 15px 20px;
        font-size: 1rem;
    }

    .page-terms-conditions__faq-answer {
        padding: 0 20px;
    }

    .page-terms-conditions__faq-item.active .page-terms-conditions__faq-answer {
        padding: 10px 20px;
    }
}