/* style/terms-conditions.css */

/* Base styles for the page content */
.page-terms-conditions {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: var(--background-color, #f8f8f8); /* Inherit from shared or default light gray */
}

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

/* Hero Section */
.page-terms-conditions__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
    background: linear-gradient(135deg, #26A9E0, #5ac3f2); /* Brand color gradient */
    color: #ffffff;
    border-bottom: 5px solid #1e87b7;
}

.page-terms-conditions__hero-container {
    max-width: 900px;
    margin: 0 auto;
}

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

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

.page-terms-conditions__hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-terms-conditions__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #EA7C07; /* Login button color */
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: none;
    max-width: 100%; /* Ensure button fits container */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-terms-conditions__cta-button:hover {
    background: #d46c06;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-terms-conditions__cta-button--secondary {
    background: #ffffff;
    color: #26A9E0;
    border: 2px solid #26A9E0;
}

.page-terms-conditions__cta-button--secondary:hover {
    background: #e0f5ff;
    color: #1e87b7;
    border-color: #1e87b7;
}

/* Content Section */
.page-terms-conditions__content-section {
    padding: 60px 0;
}

.page-terms-conditions__light-bg {
    background-color: #ffffff; /* Explicitly white for content */
    color: #333333;
}

.page-terms-conditions__section-title {
    font-size: 2.2em;
    color: #26A9E0;
    margin-bottom: 30px;
    text-align: center;
    font-weight: bold;
}

.page-terms-conditions__section-title--light {
    color: #ffffff;
}

.page-terms-conditions__sub-title {
    font-size: 1.6em;
    color: #26A9E0;
    margin-top: 40px;
    margin-bottom: 15px;
    font-weight: 600;
}

.page-terms-conditions__paragraph {
    margin-bottom: 15px;
    font-size: 1.05em;
    line-height: 1.7;
}

.page-terms-conditions__list {
    list-style-type: disc;
    margin-left: 25px;
    margin-bottom: 20px;
    font-size: 1.05em;
}

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

.page-terms-conditions__list-item ul {
    list-style-type: circle;
    margin-left: 20px;
    margin-top: 5px;
}

.page-terms-conditions__list-strong {
    font-weight: bold;
    color: #26A9E0;
}

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

.page-terms-conditions__link {
    color: #26A9E0;
    text-decoration: underline;
    transition: color 0.3s ease;
}

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

/* FAQ Section */
.page-terms-conditions__faq-section {
    padding: 60px 0;
    background-color: #26A9E0; /* Brand primary color for dark section */
    color: #ffffff;
}

.page-terms-conditions__dark-bg {
    background-color: #26A9E0;
    color: #ffffff;
}

.page-terms-conditions__faq-list {
    max-width: 800px;
    margin: 40px auto 0;
}

/* FAQ容器样式 */
.page-terms-conditions__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* FAQ默认状态 - 答案隐藏 */
.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 20px;
    opacity: 0;
    background-color: #f9f9f9; /* Light background for answer */
    color: #333333; /* Dark text for answer */
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-terms-conditions__faq-item.active .page-terms-conditions__faq-answer {
    max-height: 2000px !important; /* 🚨 Use !important, value large enough */
    padding: 20px !important; /* Adjust padding for expanded state */
    opacity: 1;
    border-radius: 0 0 8px 8px;
}

/* 问题样式 */
.page-terms-conditions__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.page-terms-conditions__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

/* 问题标题样式 */
.page-terms-conditions__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.5;
    color: #333333;
    pointer-events: none; /* Prevent h3 from blocking click event */
}

/* 切换图标 */
.page-terms-conditions__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #26A9E0; /* Brand color for toggle */
    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: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #26A9E0;
}

.page-terms-conditions__faq-item.active .page-terms-conditions__faq-toggle {
    color: #ffffff;
    background-color: #26A9E0;
    transform: rotate(45deg); /* Rotate for minus sign effect */
}


/* Responsive styles */
@media (max-width: 992px) {
    .page-terms-conditions__hero-title {
        font-size: 2.2em;
    }
    .page-terms-conditions__hero-description {
        font-size: 1.1em;
    }
    .page-terms-conditions__section-title {
        font-size: 1.8em;
    }
    .page-terms-conditions__sub-title {
        font-size: 1.4em;
    }
    .page-terms-conditions__paragraph,
    .page-terms-conditions__list-item {
        font-size: 1em;
    }
}

@media (max-width: 768px) {
    .page-terms-conditions__container {
        padding: 15px;
    }

    /* Mobile Hero Section */
    .page-terms-conditions__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile specific padding-top */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-terms-conditions__hero-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }

    .page-terms-conditions__hero-description {
        font-size: 0.95em;
        margin-bottom: 30px;
    }

    .page-terms-conditions__hero-actions {
        flex-direction: column; /* Stack buttons vertically on mobile */
        gap: 15px;
    }

    .page-terms-conditions__cta-button {
        padding: 12px 25px;
        font-size: 1em;
        width: 100% !important; /* Force full width on mobile */
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* Mobile Content Section */
    .page-terms-conditions__content-section {
        padding: 40px 0;
    }

    .page-terms-conditions__section-title {
        font-size: 1.6em;
        margin-bottom: 25px;
    }

    .page-terms-conditions__sub-title {
        font-size: 1.3em;
        margin-top: 30px;
    }

    /* Mobile Images */
    .page-terms-conditions img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: unset; /* Remove min-width on mobile */
        min-height: unset; /* Remove min-height on mobile */
        margin: 20px auto;
    }

    .page-terms-conditions__section,
    .page-terms-conditions__card,
    .page-terms-conditions__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Mobile FAQ */
    .page-terms-conditions__faq-section {
        padding: 40px 0;
    }

    .page-terms-conditions__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-terms-conditions__faq-question h3 {
        font-size: 1em;
        width: calc(100% - 40px); /* Adjust width for toggle */
    }
    
    .page-terms-conditions__faq-toggle {
        margin-left: 10px;
        width: 26px;
        height: 26px;
        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;
    }
}