/* style/register.css */

/* General page styles */
.page-register {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: #f8f8f8; /* A light background for the page content */
}

.page-register__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.page-register__center-content {
    text-align: center;
}

.page-register__section-title {
    font-size: 36px;
    font-weight: bold;
    color: #017439; /* Primary color for titles */
    margin-bottom: 20px;
    text-align: center;
}

.page-register__section-title--white {
    color: #ffffff;
}

.page-register__section-description {
    font-size: 18px;
    color: #555555;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-register__section-description--white {
    color: #f0f0f0;
}

/* Buttons */
.page-register__cta-button {
    display: inline-block;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    margin: 10px;
    box-sizing: border-box;
}

.page-register__btn-register {
    background-color: #C30808; /* Custom color for register button */
    color: #FFFF00; /* Custom font color for register button */
    border: 2px solid #C30808;
}

.page-register__btn-register:hover {
    background-color: #a00606;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-register__btn-secondary {
    background-color: #ffffff;
    color: #017439; /* Primary color for secondary button text */
    border: 2px solid #017439;
}

.page-register__btn-secondary:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-register__btn-login {
    background-color: #C30808; /* Custom color for login button */
    color: #FFFF00; /* Custom font color for login button */
    border: 2px solid #C30808;
}

.page-register__btn-login:hover {
    background-color: #a00606;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Image styles */
.page-register img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

/* Hero Section */
.page-register__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #017439, #3cb371); /* Gradient from primary to a lighter green */
    color: #ffffff;
    /* Fixed header offset */
    padding-top: var(--header-offset, 120px);
}

.page-register__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.page-register__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

.page-register__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

.page-register__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-register__main-title {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #FFFF00; /* Custom font color for register button */
}

.page-register__hero-description {
    font-size: 20px;
    max-width: 900px;
    margin: 0 auto 30px auto;
    color: #f0f0f0;
}

/* Benefits Section */
.page-register__benefits-section {
    padding: 80px 0;
    background-color: #FFFFFF; /* White background as per custom color rules */
    color: #333333;
}

.page-register__benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-register__benefit-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-register__benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.page-register__benefit-card img {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    margin-bottom: 20px;
    border-radius: 8px;
}

.page-register__card-title {
    font-size: 24px;
    font-weight: bold;
    color: #017439;
    margin-bottom: 15px;
}

/* Steps Section */
.page-register__steps-section {
    padding: 80px 0;
    background-color: #017439; /* Primary color background */
    color: #ffffff;
}

.page-register__steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-register__step-item {
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-register__step-number {
    width: 60px;
    height: 60px;
    line-height: 60px;
    background-color: #FFFF00; /* Custom font color for register button */
    color: #017439; /* Primary color for step number text */
    border-radius: 50%;
    font-size: 32px;
    font-weight: bold;
    margin: 0 auto 20px auto;
}

.page-register__step-title {
    font-size: 22px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 10px;
}

/* Promotions Section */
.page-register__promotions-section {
    padding: 80px 0;
    background-color: #f8f8f8;
    color: #333333;
}

.page-register__promo-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-register__promo-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-register__promo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.page-register__promo-card img {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover;
    margin-bottom: 20px;
    border-radius: 8px;
}

/* FAQ Section */
.page-register__faq-section {
    padding: 80px 0;
    background-color: #017439; /* Primary color background */
    color: #ffffff;
}

.page-register__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* FAQ容器样式 */
.page-register__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
}

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

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-register__faq-item.active .page-register__faq-answer {
    max-height: 2000px !important; /* 🚨 使用!important确保优先级，值足够大以容纳任何内容 */
    padding: 20px 15px !important;
    opacity: 1;
    border-radius: 0 0 5px 5px;
}

/* 问题样式 */
.page-register__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;
    color: #333333; /* Dark text for light background */
}

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

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

/* 问题标题样式 */
.page-register__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* 防止h3标签阻止点击事件 */
}

/* 切换图标 */
.page-register__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #666;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* 防止图标阻止点击事件 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-register__faq-item.active .page-register__faq-toggle {
    color: #333;
}


/* Final CTA Section */
.page-register__cta-final-section {
    padding: 80px 0;
    background-color: #FFFFFF; /* White background */
    color: #333333;
}

.page-register__cta-final-section .page-register__section-description {
    margin-bottom: 30px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-register__main-title {
        font-size: 40px;
    }
    .page-register__section-title {
        font-size: 30px;
    }
    .page-register__hero-description {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .page-register__container,
    .page-register__hero-container {
        padding: 0 15px; /* Add padding to prevent content from touching edges */
    }

    /* Mobile header offset */
    .page-register__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
    }

    .page-register__main-title {
        font-size: 32px;
    }
    .page-register__hero-description {
        font-size: 16px;
    }
    .page-register__cta-button {
        padding: 12px 25px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin-left: 0;
        margin-right: 0;
    }

    /* Ensure button containers adapt */
    .page-register__center-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 0 15px; /* Add padding to ensure buttons don't touch edges */
        box-sizing: border-box;
        width: 100%;
    }

    .page-register__benefits-grid,
    .page-register__steps-grid,
    .page-register__promo-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-register__section-title {
        font-size: 26px;
    }
    .page-register__section-description {
        font-size: 15px;
        margin-bottom: 30px;
    }

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

    .page-register__section,
    .page-register__card,
    .page-register__container,
    .page-register__hero-container,
    .page-register__benefits-section,
    .page-register__steps-section,
    .page-register__promotions-section,
    .page-register__faq-section,
    .page-register__cta-final-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

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

/* Ensure no filter on images */
.page-register img {
    filter: none;
}