/* style/register.css */

/* Base styles for the register page, inheriting from body's dark background */
.page-register {
    color: #ffffff; /* Light text for dark body background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* Section general styling */
.page-register__section-title {
    font-size: 2.5em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: #FFFF00; /* Custom font color for titles */
    line-height: 1.2;
    max-width: 900px; /* Constraint for H1, applying to H2 as well to prevent excessive size */
    margin-left: auto;
    margin-right: auto;
}

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

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

/* Hero Section */
.page-register__hero-section {
    position: relative;
    display: flex;
    flex-direction: column; /* Ensure image is above text */
    align-items: center;
    justify-content: center;
    padding: 10px 0 60px 0; /* Small top padding, larger bottom padding */
    background-color: #1a1a1a; /* Slightly lighter dark background for hero */
    overflow: hidden;
}

.page-register__hero-image-wrapper {
    width: 100%;
    max-height: 600px; /* Limit height of the image wrapper */
    overflow: hidden;
    margin-bottom: 30px; /* Space between image and content */
}

.page-register__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    min-width: 200px;
    min-height: 200px;
}

.page-register__hero-content {
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
}

.page-register__main-title {
    font-size: clamp(2.5em, 5vw, 3.5em); /* Responsive font size for H1 */
    font-weight: bold;
    margin-bottom: 20px;
    color: #FFFF00; /* Custom font color for H1 */
    line-height: 1.2;
}

.page-register__description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #f0f0f0;
}

/* Buttons */
.page-register__btn-primary,
.page-register__btn-secondary,
.page-register__btn-submit {
    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;
    cursor: pointer;
    margin: 10px;
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow text to break words */
    max-width: 100%; /* Ensure button doesn't overflow */
}

.page-register__btn-primary {
    background-color: #C30808; /* Custom red for register/login */
    color: #FFFF00; /* Custom yellow for register/login font */
    border: 2px solid transparent;
}

.page-register__btn-primary:hover {
    background-color: #a00606;
    color: #ffffff;
}

.page-register__btn-secondary {
    background-color: #ffffff;
    color: #C30808; /* Custom red for register/login */
    border: 2px solid #C30808;
}

.page-register__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #a00606;
}

.page-register__btn-submit {
    background-color: #C30808;
    color: #FFFF00;
    border: none;
    width: 100%;
    max-width: 400px;
    margin: 20px auto 0 auto;
    display: block;
}

.page-register__btn-submit:hover {
    background-color: #a00606;
    color: #ffffff;
}

.page-register__btn-large {
    padding: 18px 35px;
    font-size: 1.1em;
}

/* Form Section */
.page-register__form-section {
    padding: 60px 0;
    background-color: #017439; /* Primary brand color for this section background */
    color: #ffffff; /* White text for contrast */
}

.page-register__form-section .page-register__section-title {
    color: #FFFF00; /* Yellow title for dark green background */
}

.page-register__form-section .page-register__section-description {
    color: #ffffff;
}

.page-register__registration-form {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white card background */
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    margin-top: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-register__form-group {
    margin-bottom: 20px;
    width: 100%;
    max-width: 500px;
}

.page-register__form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #ffffff;
}

.page-register__form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #005a2e; /* Darker green border */
    border-radius: 5px;
    background-color: #005a2e; /* Darker green input background */
    color: #ffffff;
    font-size: 1em;
    box-sizing: border-box;
}

.page-register__form-input::placeholder {
    color: #cccccc;
}

.page-register__checkbox-group {
    display: flex;
    align-items: center;
    max-width: 500px;
    width: 100%;
}

.page-register__form-checkbox {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    accent-color: #C30808; /* Red accent for checkbox */
}

.page-register__link {
    color: #FFFF00; /* Yellow for links in dark background */
    text-decoration: underline;
}

.page-register__link:hover {
    color: #ffcc00;
}

.page-register__form-image-wrapper {
    margin-top: 40px;
    width: 100%;
    max-width: 800px;
}

.page-register__form-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    min-width: 200px;
    min-height: 200px;
}


/* Benefits Section */
.page-register__benefits-section {
    padding: 60px 0;
    background-color: #111; /* Body background color */
    color: #ffffff;
}

.page-register__benefits-section .page-register__section-title {
    color: #FFFF00; /* Yellow title for dark background */
}

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

.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: rgba(255, 255, 255, 0.08); /* Slightly lighter card background */
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%; /* Ensure cards have equal height */
    box-sizing: border-box;
}

.page-register__benefit-card:hover {
    transform: translateY(-5px);
}

.page-register__benefit-icon {
    width: 100%; /* Occupy full width of card */
    max-width: 250px; /* Max width for icon/image */
    height: auto;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 8px;
    min-width: 200px;
    min-height: 200px;
}

.page-register__benefit-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 15px;
    color: #FFFF00; /* Yellow for benefit titles */
}

.page-register__benefit-text {
    font-size: 1em;
    color: #e0e0e0;
}

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

.page-register__steps-section .page-register__section-title {
    color: #FFFF00; /* Yellow title for dark green background */
}

.page-register__steps-section .page-register__section-description {
    color: #ffffff;
}

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

.page-register__step-card {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.page-register__step-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #C30808; /* Red for step numbers */
    margin-bottom: 15px;
}

.page-register__step-title {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #FFFF00; /* Yellow for step titles */
}

.page-register__step-text {
    font-size: 1em;
    color: #e0e0e0;
}

.page-register__steps-image {
    width: 100%;
    max-width: 1000px;
    height: auto;
    display: block;
    margin: 40px auto 0 auto;
    border-radius: 10px;
    min-width: 200px;
    min-height: 200px;
}


/* FAQ Section */
.page-register__faq-section {
    padding: 60px 0;
    background-color: #111; /* Body background color */
    color: #ffffff;
}

.page-register__faq-section .page-register__section-title {
    color: #FFFF00; /* Yellow title for dark background */
}

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

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

.page-register__faq-item {
    background-color: rgba(255, 255, 255, 0.08);
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-register__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #FFFF00; /* Yellow for FAQ questions */
    cursor: pointer;
    background-color: #222; /* Slightly darker background for question */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-register__faq-question:hover {
    background-color: #333;
}

.page-register__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: #C30808; /* Red for toggle icon */
    margin-left: 15px;
}

/* For details tag, hide default marker */
.page-register__faq-item summary {
    list-style: none;
}
.page-register__faq-item summary::-webkit-details-marker {
    display: none;
}

.page-register__faq-answer {
    padding: 20px 25px;
    font-size: 1em;
    color: #e0e0e0;
    background-color: rgba(255, 255, 255, 0.05); /* Lighter background for answer */
}

/* CTA Section */
.page-register__cta-section {
    padding: 60px 0;
    background-color: #C30808; /* Red background for final CTA */
    color: #ffffff;
    text-align: center;
}

.page-register__cta-section .page-register__section-title {
    color: #FFFF00; /* Yellow title for red background */
}

.page-register__cta-section .page-register__section-description {
    color: #ffffff;
    margin-bottom: 30px;
}

.page-register__cta-section .page-register__btn-primary {
    background-color: #FFFF00; /* Yellow button for red section */
    color: #C30808; /* Red text */
    border: 2px solid transparent;
}

.page-register__cta-section .page-register__btn-primary:hover {
    background-color: #ffcc00;
    color: #a00606;
}

.page-register__cta-section .page-register__btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.page-register__cta-section .page-register__btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Image and Video Responsive Rules */
.page-register img {
    max-width: 100%;
    height: auto;
    display: block;
}

.page-register video,
.page-register__video {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
}

.page-register__video-section,
.page-register__video-container,
.page-register__video-wrapper {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

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

    .page-register__hero-section {
        padding-bottom: 40px;
    }

    .page-register__main-title {
        font-size: clamp(2em, 8vw, 2.5em);
    }

    .page-register__section-title {
        font-size: clamp(1.8em, 7vw, 2.2em);
    }

    .page-register__description,
    .page-register__section-description {
        font-size: 1em;
    }

    .page-register__btn-primary,
    .page-register__btn-secondary,
    .page-register__btn-submit,
    .page-register a[class*="button"],
    .page-register 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 !important;
        margin-right: 0 !important;
        margin-bottom: 15px !important;
    }

    .page-register__hero-content .page-register__btn-primary,
    .page-register__hero-content .page-register__btn-secondary {
        display: block; /* Stack buttons vertically on mobile */
    }

    .page-register__cta-section .page-register__btn-primary,
    .page-register__cta-section .page-register__btn-secondary {
        display: block;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .page-register__registration-form {
        padding: 20px;
    }

    .page-register__form-group {
        max-width: 100%;
    }

    .page-register__checkbox-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-register__form-checkbox {
        margin-bottom: 10px;
    }

    .page-register__benefits-grid,
    .page-register__steps-grid {
        grid-template-columns: 1fr;
    }

    .page-register__faq-question {
        font-size: 1.1em;
        padding: 15px 20px;
    }

    .page-register__faq-answer {
        padding: 15px 20px;
    }

    /* General containers for mobile padding */
    .page-register__container {
        padding: 0 15px !important;
    }

    /* Image responsive overrides */
    .page-register img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-register__section,
    .page-register__card,
    .page-register__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .page-register__video-section {
        padding-top: 10px !important; /* body 已承担 --header-offset，此处禁止 var(--header-offset) */
    }

    /* Video responsive overrides */
    .page-register video,
    .page-register__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-register__video-section,
    .page-register__video-container,
    .page-register__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .page-register__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}