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

.page-terms-conditions__hero-section {
    position: relative;
    padding: 80px 20px;
    padding-top: var(--header-offset, 120px); /* Ensures content clears fixed header */
    background-color: #017439; /* Brand primary color */
    color: #FFFFFF;
    text-align: center;
    overflow: hidden;
}

.page-terms-conditions__hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.page-terms-conditions__hero-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #FFFFFF;
}

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

.page-terms-conditions__hero-cta {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%; /* Ensure container takes full width */
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.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;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box; /* Ensure padding is included in width */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
}

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

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

.page-terms-conditions__btn-secondary {
    background-color: #C30808; /* Login color */
    color: #FFFF00; /* Login font color */
    border: 2px solid #C30808;
}

.page-terms-conditions__btn-secondary:hover {
    background-color: #e01c1c;
    border-color: #e01c1c;
}

.page-terms-conditions__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.page-terms-conditions__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
}

.page-terms-conditions__content-section {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.page-terms-conditions__content-section h2 {
    color: #017439; /* Brand primary color */
    font-size: 2.2em;
    margin-bottom: 25px;
    border-bottom: 2px solid #017439;
    padding-bottom: 10px;
}

.page-terms-conditions__content-section h3 {
    color: #017439;
    font-size: 1.6em;
    margin-top: 30px;
    margin-bottom: 15px;
}

.page-terms-conditions__content-section h4 {
    color: #333333;
    font-size: 1.2em;
    margin-top: 20px;
    margin-bottom: 10px;
}

.page-terms-conditions__content-section p {
    margin-bottom: 15px;
    line-height: 1.7;
    color: #333333;
}

.page-terms-conditions__content-section ul,
.page-terms-conditions__content-section ol {
    list-style: disc;
    margin-left: 25px;
    margin-bottom: 15px;
    color: #333333;
}

.page-terms-conditions__content-section ol {
    list-style: decimal;
}

.page-terms-conditions__content-section li {
    margin-bottom: 8px;
    color: #333333;
}

.page-terms-conditions__content-section a {
    color: #017439;
    text-decoration: none;
    font-weight: bold;
}

.page-terms-conditions__content-section a:hover {
    text-decoration: underline;
}

.page-terms-conditions__image-container {
    margin: 30px 0;
    text-align: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-terms-conditions__image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: block; /* Ensures height: auto works correctly */
    margin: 0 auto;
}

/* FAQ Section */
.page-terms-conditions__faq-section {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
}

.page-terms-conditions__faq-section h2 {
    color: #017439;
    font-size: 2.2em;
    margin-bottom: 25px;
    text-align: center;
}

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

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

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

.page-terms-conditions__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: #017439;
    transition: transform 0.3s ease;
}

.page-terms-conditions__faq-item.active .page-terms-conditions__faq-toggle {
    transform: rotate(45deg); /* Plus sign to X or just a dash */
}

.page-terms-conditions__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px; /* Initial padding */
    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 value */
    padding: 15px 25px; /* Expanded padding */
}

/* Contact Section */
.page-terms-conditions__contact-info {
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px;
    background-color: #e8f5e9; /* Light green background */
    border-radius: 8px;
    text-align: center;
    color: #333333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
}

.page-terms-conditions__contact-info h3 {
    color: #017439;
    font-size: 1.8em;
    margin-bottom: 20px;
}

.page-terms-conditions__contact-info p {
    font-size: 1.1em;
    margin-bottom: 10px;
}

.page-terms-conditions__contact-info a {
    color: #017439;
    text-decoration: none;
    font-weight: bold;
}

.page-terms-conditions__contact-info a:hover {
    text-decoration: underline;
}

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

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

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

    .page-terms-conditions__hero-cta {
        flex-direction: column;
        gap: 15px;
        padding-left: 0;
        padding-right: 0;
    }

    .page-terms-conditions__btn-primary,
    .page-terms-conditions__btn-secondary {
        width: 100% !important;
        padding: 12px 20px;
        margin: 0 auto; /* Center buttons when stacked */
    }

    .page-terms-conditions__hero-section,
    .page-terms-conditions__content-section,
    .page-terms-conditions__faq-section,
    .page-terms-conditions__contact-info {
        margin: 20px auto;
        padding: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-terms-conditions__content-section h2,
    .page-terms-conditions__faq-section h2 {
        font-size: 1.8em;
        margin-bottom: 15px;
    }

    .page-terms-conditions__content-section h3 {
        font-size: 1.4em;
        margin-top: 25px;
    }

    .page-terms-conditions__content-section p,
    .page-terms-conditions__content-section li,
    .page-terms-conditions__faq-question,
    .page-terms-conditions__faq-answer p {
        font-size: 15px;
    }

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

    .page-terms-conditions__image-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        padding-left: 0px; /* Reset padding here if already applied to section */
        padding-right: 0px; /* Reset padding here if already applied to section */
    }
}