/* style/login.css */

/* --- General Styles for .page-login --- */
.page-login {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: #f8f8f8; /* Light background for contrast with dark text */
    padding-bottom: 50px; /* Ensure space above footer */
}

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

/* --- Hero Section --- */
.page-login__hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-top: 10px; /* Small top padding as per rule */
    padding-bottom: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #B71C1C; /* Use specified background color */
}

.page-login__hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: #B71C1C; /* Fallback */
}

.page-login__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Make it subtle */
    display: block;
}

.page-login__hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    color: #FFF5E1; /* Text Main */
    padding: 40px 20px;
}

.page-login__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Using clamp for H1 as per rule */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #FFF5E1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-login__description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #FFF5E1;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Form Section --- */
.page-login__form-section {
    padding: 60px 0;
    background-color: #f8f8f8;
}

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

.page-login__form-card {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    box-sizing: border-box;
}

.page-login__form-title {
    font-size: 2.2rem;
    color: #C91F17; /* Main Color */
    margin-bottom: 15px;
    text-align: center;
}

.page-login__form-subtitle {
    font-size: 1.1rem;
    color: #555555;
    margin-bottom: 30px;
    text-align: center;
}

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

.page-login__form-label {
    display: block;
    font-size: 1rem;
    color: #333333;
    margin-bottom: 8px;
    font-weight: bold;
}

.page-login__form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.page-login__form-input:focus {
    border-color: #C91F17;
    outline: none;
}

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

.page-login__forgot-password-link {
    color: #C91F17;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

.page-login__checkbox {
    margin-right: 8px;
    accent-color: #C91F17;
}

.page-login__checkbox-label {
    color: #555555;
}

.page-login__submit-button {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button gradient */
    color: #333333; /* Dark text for contrast */
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: block;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-login__submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-login__register-cta {
    text-align: center;
    margin-top: 30px;
    font-size: 1rem;
    color: #555555;
}

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

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

.page-login__form-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 50%;
}

.page-login__form-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: block;
}

/* --- Benefits Section (Dark Background) --- */
.page-login__benefits-section {
    background-color: #B71C1C; /* Background color */
    padding: 80px 0;
    text-align: center;
    color: #FFF5E1; /* Text Main */
}

.page-login__benefits-title {
    font-size: 2.5rem;
    color: #FFF5E1;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-login__benefits-description {
    font-size: 1.15rem;
    max-width: 800px;
    margin: 0 auto 50px;
    color: #FFF5E1;
}

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

.page-login__benefit-card {
    background-color: #D32F2F; /* Card BG */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-login__benefit-card-image {
    width: 100%; /* Ensure images are large */
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
}

.page-login__benefit-card-title {
    font-size: 1.5rem;
    color: #FFF5E1;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-login__benefit-card-text {
    font-size: 1rem;
    color: #FFF5E1;
    flex-grow: 1; /* Make sure text fills space */
}

/* --- FAQ Section --- */
.page-login__faq-section {
    padding: 80px 0;
    background-color: #f8f8f8;
}

.page-login__faq-title {
    font-size: 2.5rem;
    color: #C91F17;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
}

.page-login__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.page-login__faq-item {
    background-color: #ffffff;
    border: 1px solid #F2B544; /* Border color */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-login__faq-item summary { /* For details element */
    list-style: none; /* Hide default marker */
}

.page-login__faq-item summary::-webkit-details-marker { /* Hide default marker for webkit */
    display: none;
}

.page-login__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15rem;
    font-weight: bold;
    color: #333333;
    cursor: pointer;
    background-color: #ffe0b2; /* Light orange background */
    border-bottom: 1px solid #F2B544;
    transition: background-color 0.3s ease;
}

.page-login__faq-item[open] .page-login__faq-question {
    background-color: #FFD86A; /* Gold color for open state */
}

.page-login__faq-question:hover {
    background-color: #FFD86A;
}

.page-login__faq-qtext {
    flex-grow: 1;
}

.page-login__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    margin-left: 15px;
    color: #C91F17;
    transition: transform 0.3s ease;
}

.page-login__faq-item[open] .page-login__faq-toggle {
    transform: rotate(45deg); /* Rotate plus to become cross */
}

.page-login__faq-answer {
    padding: 20px 25px;
    font-size: 1rem;
    color: #555555;
    background-color: #ffffff;
    border-top: none;
}

/* --- CTA Section --- */
.page-login__cta-section {
    padding: 80px 0;
    background-color: #C91F17; /* Main Color */
    text-align: center;
    color: #FFF5E1;
}

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

.page-login__cta-content {
    max-width: 600px;
    text-align: left;
}

.page-login__cta-title {
    font-size: 2.5rem;
    color: #FFF5E1;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-login__cta-description {
    font-size: 1.15rem;
    margin-bottom: 40px;
    color: #FFF5E1;
}

.page-login__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
    flex-wrap: wrap; /* Ensure wrapping on smaller screens */
}

.page-login__btn {
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-block;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-login__btn-primary {
    background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button gradient */
    color: #333333; /* Dark text for contrast */
    border: 2px solid transparent;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-login__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-login__btn-secondary {
    background-color: #FFF5E1; /* Text Main as background */
    color: #C91F17; /* Main Color as text */
    border: 2px solid #F2B544; /* Border color */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-login__btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    background-color: #f0e0c0; /* Slightly darker on hover */
}

.page-login__cta-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 50%;
}

.page-login__cta-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: block;
}

/* --- Responsive Design (Mobile First, then adjustments) --- */

/* Universal image responsiveness */
.page-login img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Ensure content sections and cards don't overflow */
.page-login__section,
.page-login__card,
.page-login__container,
.page-login__form-card,
.page-login__benefit-card {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden; /* Prevent content overflow */
}

@media (max-width: 1024px) {
    .page-login__form-section .page-login__container,
    .page-login__cta-section .page-login__container {
        flex-direction: column;
        text-align: center;
    }

    .page-login__form-image-wrapper,
    .page-login__cta-image-wrapper {
        max-width: 100%;
        margin-top: 40px;
    }

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

    .page-login__cta-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    /* 1. HERO 主图区域 */
    .page-login__hero-section {
        padding-top: 10px !important; /* Small top padding as per rule */
        padding-bottom: 30px;
    }
    .page-login__main-title {
        font-size: clamp(2rem, 8vw, 2.5rem); /* Adjust H1 size for mobile */
        margin-bottom: 15px;
    }
    .page-login__description {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    /* 2. 深色导语区 (General text blocks/sections) */
    .page-login__form-title,
    .page-login__benefits-title,
    .page-login__faq-title,
    .page-login__cta-title {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    .page-login__form-subtitle,
    .page-login__benefits-description,
    .page-login__cta-description {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    /* 4. 通用图片与容器 */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-login__section,
    .page-login__card,
    .page-login__container,
    .page-login__form-card,
    .page-login__benefit-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-login__form-section .page-login__container {
        gap: 20px;
    }
    .page-login__form-image-wrapper,
    .page-login__cta-image-wrapper {
        order: -1; /* Image appears before text on mobile for CTA */
        margin-bottom: 30px;
        margin-top: 0;
    }
    .page-login__form-card {
        padding: 30px 20px;
    }
    .page-login__benefits-grid {
        grid-template-columns: 1fr; /* Single column for benefits */
        gap: 20px;
    }
    .page-login__benefit-card-image {
        height: 150px; /* Adjust height for mobile */
    }

    /* 5. 按钮与按钮容器 */
    .page-login__submit-button,
    .page-login__btn,
    .page-login__btn-primary,
    .page-login__btn-secondary,
    .page-login a[class*="button"],
    .page-login a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
        margin-bottom: 10px; /* Add space between stacked buttons */
    }
    .page-login__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 10px;
    }
    .page-login__cta-content {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* 6. FAQ 与其他模块 */
    .page-login__faq-section {
        padding: 40px 0;
    }
    .page-login__faq-list {
        padding: 0 15px;
    }
    .page-login__faq-question {
        font-size: 1rem;
        padding: 15px 20px;
    }
    .page-login__faq-answer {
        padding: 15px 20px;
        font-size: 0.95rem;
    }
    .page-login__faq-toggle {
        font-size: 1.2rem;
    }
}

@media (max-width: 549px) { /* Further adjustment for very small screens */
    .page-login__form-card {
        padding: 25px 15px;
    }
    .page-login__form-title {
        font-size: 1.8rem;
    }
    .page-login__benefits-title,
    .page-login__faq-title,
    .page-login__cta-title {
        font-size: 1.8rem;
    }
}