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

/* Hero Section */
.page-terms-conditions__hero-section {
    position: relative;
    padding: 80px 20px;
    padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
    background-color: #017439; /* Brand primary color for hero background */
    color: #FFFFFF; /* White text on dark background */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden; /* Prevent image overflow */
}

.page-terms-conditions__hero-content {
    max-width: 900px;
    margin-bottom: 30px;
    z-index: 1; /* Ensure content is above image */
}

.page-terms-conditions__hero-title {
    font-size: 3em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #FFFF00; /* Special color for H1 as per custom color rules for 'register and login font' for emphasis */
}

.page-terms-conditions__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #FFFFFF;
}

.page-terms-conditions__btn-primary {
    display: inline-block;
    background-color: #C30808; /* Register/Login button color */
    color: #FFFF00; /* Register/Login font color */
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    max-width: 100%; /* Responsive button */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

.page-terms-conditions__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.3; /* Subtle background image */
}

.page-terms-conditions__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7); /* Darken image slightly for better text contrast */
}

/* Content Area */
.page-terms-conditions__content-area {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    background-color: #FFFFFF;
    color: #333333;
}

.page-terms-conditions__section-title {
    font-size: 2.5em;
    color: #017439; /* Brand primary color */
    margin-bottom: 30px;
    text-align: center;
    font-weight: bold;
}

.page-terms-conditions__sub-title {
    font-size: 1.8em;
    color: #017439;
    margin-top: 40px;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-terms-conditions__text-block {
    margin-bottom: 20px;
    font-size: 1.05em;
    line-height: 1.7;
}

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

.page-terms-conditions__list-item {
    margin-bottom: 10px;
    font-size: 1.05em;
}

.page-terms-conditions__list-item strong {
    color: #017439;
}

.page-terms-conditions__content-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px 0;
    display: block;
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
}

.page-terms-conditions__image-wrapper {
    width: 100%;
    max-width: 800px; /* Constrain content images */
    margin: 25px auto;
    box-sizing: border-box;
    overflow: hidden;
}

.page-terms-conditions a {
    color: #017439; /* Brand primary color for links */
    text-decoration: underline;
    transition: color 0.3s ease;
}

.page-terms-conditions a:hover {
    color: #005028; /* Darker shade on hover */
}

/* FAQ Section */
.page-terms-conditions__faq-section {
    margin-top: 50px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

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

.page-terms-conditions__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.15em;
    font-weight: bold;
    color: #017439;
    cursor: pointer;
    background-color: #eaf7ed; /* Lighter shade of brand green */
    transition: background-color 0.3s ease;
}

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

.page-terms-conditions__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
}

.page-terms-conditions__faq-item.active .page-terms-conditions__faq-toggle {
    transform: rotate(45deg); /* Rotate to form an 'X' or just change text */
    content: '−'; /* Change to minus sign */
}

.page-terms-conditions__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px; /* Initial padding for collapsed state */
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #555555;
}

.page-terms-conditions__faq-item.active .page-terms-conditions__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show all content */
    padding: 15px 25px; /* Padding for expanded state */
}

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

/* Call to Action Section */
.page-terms-conditions__cta-section {
    text-align: center;
    margin-top: 60px;
    padding: 40px 20px;
    background-color: #f0f8f2; /* Light background for CTA */
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.page-terms-conditions__cta-text {
    font-size: 1.4em;
    margin-bottom: 30px;
    color: #017439;
    font-weight: bold;
}

.page-terms-conditions__btn-secondary {
    display: inline-block;
    background-color: #FFFFFF;
    color: #017439;
    border: 2px solid #017439;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin-left: 20px;
    max-width: 100%; /* Responsive button */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .page-terms-conditions__hero-section {
        padding: 60px 15px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure space for fixed header on mobile */
    }

    .page-terms-conditions__hero-title {
        font-size: 2.2em;
    }

    .page-terms-conditions__hero-description {
        font-size: 1em;
    }

    .page-terms-conditions__section-title {
        font-size: 1.8em;
    }

    .page-terms-conditions__sub-title {
        font-size: 1.5em;
    }

    .page-terms-conditions__text-block,
    .page-terms-conditions__list-item,
    .page-terms-conditions__faq-question,
    .page-terms-conditions__cta-text {
        font-size: 1em;
    }

    .page-terms-conditions__content-area {
        padding: 20px 15px;
    }

    .page-terms-conditions__image-wrapper,
    .page-terms-conditions__video-wrapper, /* Ensure video wrapper is responsive */
    .page-terms-conditions__cta-section,
    .page-terms-conditions__faq-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Prevent horizontal scroll */
    }

    .page-terms-conditions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-terms-conditions video,
    .page-terms-conditions__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-terms-conditions__btn-primary,
    .page-terms-conditions__btn-secondary,
    .page-terms-conditions a[class*="button"],
    .page-terms-conditions a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin-left: 0;
        margin-bottom: 15px; /* Add space between stacked buttons */
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-terms-conditions__cta-section a {
        display: block; /* Stack buttons vertically */
    }
}

/* Color Contrast Fixes (as per instructions) */
.page-terms-conditions__dark-bg {
    color: #ffffff; /* Deep background with light text */
    background: #017439; /* Using brand color but ensuring contrast */
}

.page-terms-conditions__light-bg {
    color: #333333; /* Light background with dark text */
    background: #ffffff;
}

/* Buttons for contrast */
.page-terms-conditions__btn-primary {
    background: #C30808;
    color: #FFFF00; /* Button text color */
}

.page-terms-conditions__btn-secondary {
    background: #ffffff;
    color: #017439;
    border: 2px solid #017439;
}

/* Ensure content text is readable */
.page-terms-conditions p,
.page-terms-conditions li {
  color: #333333;
}