/* style/terms-conditions.css */

/* Base Styles for the page content */
.page-terms-conditions {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background */
    background-color: #ffffff; /* Explicitly set for content area if needed, or inherit from body */
}

/* Fixed Header Offset - applied to the first main content section */
.page-terms-conditions__hero-section {
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
    background: linear-gradient(135deg, #E0F2F7, #FFFFFF); /* Lighter gradient for hero */
    padding-bottom: 60px;
    text-align: center;
}

.page-terms-conditions__container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.page-terms-conditions__hero-title {
    font-size: 38px;
    color: #26A9E0; /* Brand color for main title */
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-terms-conditions__hero-description {
    font-size: 18px;
    color: #555555;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-terms-conditions__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #26A9E0; /* Primary brand color */
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-terms-conditions__cta-button:hover {
    background: #1e87c0; /* Slightly darker primary color on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-terms-conditions__content-area {
    padding: 60px 0;
    background-color: #ffffff;
}

.page-terms-conditions__section-title {
    font-size: 28px;
    color: #26A9E0; /* Brand color for section titles */
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 2px solid #E0F2F7;
    padding-bottom: 10px;
}

.page-terms-conditions p {
    margin-bottom: 15px;
    color: #333333;
}

.page-terms-conditions__image {
    width: 100%;
    height: auto;
    max-width: 800px; /* Constrain images within content */
    margin: 30px auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

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

.page-terms-conditions__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
}

/* FAQ default state - answer hidden */
.page-terms-conditions__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-terms-conditions__faq-item.active .page-terms-conditions__faq-answer {
    max-height: 2000px !important; /* 🚨 Use!important to ensure priority, value large enough for any content */
    padding: 20px 15px !important;
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
}

/* Question styles */
.page-terms-conditions__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-terms-conditions__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.page-terms-conditions__faq-question:active {
    background: #eeeeee;
}

/* Question title styles */
.page-terms-conditions__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: #333333;
    pointer-events: none; /* Prevent h3 from blocking click event */
}

/* Toggle icon */
.page-terms-conditions__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #26A9E0; /* Brand color for toggle icon */
    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-terms-conditions__faq-item.active .page-terms-conditions__faq-toggle {
    color: #000000;
    transform: rotate(45deg); /* Example: rotate for 'X' effect or simply change to '-' */
}

.page-terms-conditions__contact-cta {
    margin-top: 40px;
    text-align: center;
    font-size: 18px;
    color: #333333;
}

.page-terms-conditions__link-text {
    color: #26A9E0;
    text-decoration: underline;
    font-weight: bold;
}

.page-terms-conditions__link-text:hover {
    color: #1e87c0;
}


/* Responsive Design */
@media (max-width: 768px) {
    .page-terms-conditions__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header offset */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-terms-conditions__hero-title {
        font-size: 28px;
    }

    .page-terms-conditions__hero-description {
        font-size: 16px;
    }

    .page-terms-conditions__cta-button {
        padding: 12px 30px;
        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-terms-conditions__content-area {
        padding: 40px 15px;
    }

    .page-terms-conditions__section-title {
        font-size: 24px;
        margin-top: 30px;
        margin-bottom: 15px;
    }

    .page-terms-conditions p {
        font-size: 15px;
    }

    /* Images responsiveness */
    .page-terms-conditions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        border-radius: 4px;
    }

    /* Ensure all containers holding images or buttons are constrained */
    .page-terms-conditions__section,
    .page-terms-conditions__card,
    .page-terms-conditions__container,
    .page-terms-conditions__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

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