/* style/login.css */

/* Base styles for the login page */
.page-login {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Body background is dark #121212, so text is light */
    background-color: #121212; /* Ensure page background matches shared body background */
}

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

.page-login__section-title {
    font-size: 32px;
    font-weight: bold;
    color: #FFC107; /* Auxiliary color for titles */
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.page-login__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #0A2E4A; /* Main color for underline */
    border-radius: 2px;
}

/* Hero Banner Section */
.page-login__hero-banner {
    background: linear-gradient(135deg, #0A2E4A, #1a3a55); /* Dark blue gradient */
    padding: var(--header-offset, 120px) 0 60px 0; /* Add header offset here, assuming shared doesn't set it on body */
    text-align: center;
    color: #ffffff;
}

.page-login__hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-login__main-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    color: #FFC107; /* Gold for main title */
    line-height: 1.2;
}

.page-login__hero-description {
    font-size: 18px;
    color: #f0f0f0;
    margin-bottom: 40px;
}

/* Login Form Section */
.page-login__form-section {
    padding: 80px 0;
    background-color: #1a1a1a; /* Slightly lighter dark background for this section */
}

.page-login__form-section .page-login__container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
}

.page-login__form-card {
    background-color: #2a2a2a; /* Darker background for the card */
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 500px;
    box-sizing: border-box;
    border: 1px solid #0A2E4A; /* Main color border */
}

.page-login__form-title {
    font-size: 28px;
    font-weight: bold;
    color: #FFC107; /* Gold for form title */
    text-align: center;
    margin-bottom: 30px;
}

.page-login__form-group {
    margin-bottom: 20px;
}

.page-login__form-label {
    display: block;
    font-size: 16px;
    color: #f0f0f0;
    margin-bottom: 8px;
}

.page-login__form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #0A2E4A; /* Main color border */
    border-radius: 8px;
    background-color: #121212; /* Very dark input background */
    color: #ffffff;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-login__form-input::placeholder {
    color: #999999;
}

.page-login__form-input:focus {
    border-color: #FFC107; /* Gold on focus */
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.3);
    outline: none;
}

.page-login__form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.page-login__remember-me {
    display: flex;
    align-items: center;
    color: #f0f0f0;
}

.page-login__checkbox {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    accent-color: #FFC107; /* Gold checkbox */
}

.page-login__checkbox-label {
    cursor: pointer;
}

.page-login__forgot-password {
    color: #FFC107; /* Gold link */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-login__forgot-password:hover {
    color: #ffffff;
    text-decoration: underline;
}

.page-login__submit-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #FFC107; /* Gold button */
    color: #0A2E4A; /* Dark blue text for contrast */
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

.page-login__submit-btn:hover {
    background-color: #e0a800; /* Darker gold on hover */
    transform: translateY(-2px);
}

.page-login__register-prompt {
    text-align: center;
    color: #f0f0f0;
    margin-top: 30px;
    font-size: 16px;
}

.page-login__register-link {
    color: #FFC107; /* Gold link */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-login__register-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

.page-login__image-aside {
    flex-shrink: 0;
    width: 100%;
    max-width: 600px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-login__image-aside img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    min-width: 200px; /* Minimum size requirement */
    min-height: 200px;
}

/* Benefits Section */
.page-login__benefits-section {
    padding: 80px 0;
    background-color: #121212; /* Main dark background */
}

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

.page-login__benefit-item {
    background-color: #2a2a2a; /* Darker background for benefit cards */
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #0A2E4A; /* Main color border */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-login__benefit-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.page-login__benefit-icon {
    width: 120px; /* Adjusted icon display size */
    height: 120px;
    object-fit: contain;
    margin: 0 auto 20px auto;
    display: block;
    /* The actual image generated will be 250x250, scaled down by these CSS rules */
}

.page-login__benefit-title {
    font-size: 22px;
    font-weight: bold;
    color: #FFC107; /* Gold for benefit titles */
    margin-bottom: 15px;
}

.page-login__benefit-description {
    font-size: 15px;
    color: #cccccc;
}

/* FAQ Section */
.page-login__faq-section {
    padding: 80px 0;
    background-color: #1a1a1a; /* Slightly lighter dark background */
}

.page-login__faq-list {
    margin-top: 40px;
}

/* FAQ容器样式 */
.page-login__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #2a2a2a; /* Darker background for FAQ item */
    border: 1px solid #0A2E4A; /* Main color border */
}

/* FAQ默认状态 - 答案隐藏 */
.page-login__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;
    color: #cccccc;
    font-size: 15px;
    line-height: 1.7;
}

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

/* 问题样式 */
.page-login__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #0A2E4A; /* Main color background for question */
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
    color: #ffffff;
}

.page-login__faq-question:hover {
    background: #1a3a55; /* Slightly lighter dark blue on hover */
}

.page-login__faq-question:active {
    background: #051d30; /* Slightly darker dark blue on active */
}

/* 问题标题样式 */
.page-login__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* 防止h3标签阻止点击事件 */
    color: #ffffff; /* White text for question title */
}

/* 切换图标 */
.page-login__faq-toggle {
    font-size: 28px; /* Larger toggle icon */
    font-weight: bold;
    line-height: 1;
    color: #FFC107; /* Gold for toggle icon */
    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: 32px; /* Larger touch target */
    height: 32px;
}

.page-login__faq-item.active .page-login__faq-toggle {
    color: #ffffff; /* White when active */
    transform: rotate(45deg); /* Rotate for minus sign effect */
}


/* General image and button responsive styles */
.page-login img {
    max-width: 100%;
    height: auto;
    display: block;
}

.page-login__submit-btn,
.page-login a[class*="button"],
.page-login a[class*="btn"] {
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-login__cta-buttons,
.page-login__button-group,
.page-login__btn-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Media Queries */
@media (max-width: 1024px) {
    .page-login__main-title {
        font-size: 40px;
    }

    .page-login__hero-description {
        font-size: 17px;
    }

    .page-login__form-section .page-login__container {
        flex-direction: column;
        gap: 40px;
    }

    .page-login__image-aside {
        max-width: 100%;
    }

    .page-login__benefit-icon {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 768px) {
    .page-login {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-login__container {
        padding: 0 15px !important; /* Ensure mobile padding */
    }

    .page-login__hero-banner {
        padding: var(--header-offset, 80px) 0 40px 0 !important; /* Adjust header offset for mobile */
    }

    .page-login__main-title {
        font-size: 32px;
    }

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

    .page-login__section-title {
        font-size: 26px;
        margin-bottom: 30px;
    }

    .page-login__form-section {
        padding: 60px 0;
    }

    .page-login__form-card {
        padding: 30px 20px;
    }

    .page-login__form-title {
        font-size: 24px;
    }

    .page-login__submit-btn {
        padding: 12px !important;
        font-size: 16px !important;
    }

    .page-login__benefits-section {
        padding: 60px 0;
    }

    .page-login__benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-login__benefit-item {
        padding: 25px;
    }

    .page-login__benefit-icon {
        width: 120px !important; /* Keep fixed size for mobile */
        height: 120px !important;
        min-width: 120px !important; /* Ensure it's not scaled smaller than its display size */
        min-height: 120px !important;
    }

    .page-login__benefit-title {
        font-size: 20px;
    }

    .page-login__faq-section {
        padding: 60px 0;
    }

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

    /* Force responsive image behavior */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Force responsive button behavior */
    .page-login__cta-button,
    .page-login__btn-primary,
    .page-login__btn-secondary,
    .page-login a[class*="button"],
    .page-login a[class*="btn"],
    .page-login__submit-btn {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-login__cta-buttons,
    .page-login__button-group,
    .page-login__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }
    .page-login__cta-buttons {
        display: flex;
        flex-direction: column;
    }
}