.page-login {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light background */
    background-color: var(--auxiliary-color, #FFFFFF); /* Ensure light background for main content */
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
}

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

.page-login__section {
    padding: 60px 0;
    text-align: center;
}

.page-login__section-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #017439; /* Brand primary color for titles */
}

.page-login__section-title--white {
    color: #FFFFFF;
}

.page-login__section-description {
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto 40px auto;
    line-height: 1.7;
    color: #555555;
}

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

/* --- Hero Section --- */
.page-login__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    overflow: hidden;
    background: #017439; /* Fallback for overlay */
}

.page-login__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.3; /* Subtle overlay */
}

.page-login__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(1, 116, 57, 0.7), rgba(255, 255, 255, 0.2));
    z-index: 1;
}

.page-login__hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    color: #FFFFFF;
}

.page-login__main-heading {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-login__intro-text {
    font-size: 20px;
    margin-bottom: 40px;
    line-height: 1.5;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

/* --- Login Form Container --- */
.page-login__login-form-container {
    background: #FFFFFF; /* Custom background color */
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    max-width: 450px;
    margin: 40px auto 0 auto;
    text-align: left;
}

.page-login__form-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
    color: #017439;
    text-align: center;
}

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

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

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

.page-login__form-input:focus {
    border-color: #017439;
    outline: none;
    box-shadow: 0 0 0 3px rgba(1, 116, 57, 0.2);
}

.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;
}

.page-login__checkbox {
    margin-right: 8px;
    accent-color: #017439; /* Custom checkbox color */
}

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

.page-login__forgot-password-link {
    color: #017439;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

.page-login__btn-login {
    display: inline-block;
    width: 100%;
    padding: 15px;
    background: #C30808; /* Custom login button color */
    color: #FFFF00; /* Custom login button font color */
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    text-decoration: none;
}

.page-login__btn-login:hover {
    background-color: #a00606;
    transform: translateY(-2px);
}

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

.page-login__btn-register {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 25px;
    background: #C30808; /* Custom register button color */
    color: #FFFF00; /* Custom register button font color */
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-login__btn-register:hover {
    background-color: #a00606;
    transform: translateY(-2px);
}

/* --- Why Log In Section --- */
.page-login__why-login {
    background-color: #f9f9f9;
}

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

.page-login__feature-item {
    background: #FFFFFF;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-login__feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

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

.page-login__feature-text {
    font-size: 16px;
    color: #555555;
}

/* --- Account Security Section --- */
.page-login__account-security {
    background-color: #017439; /* Brand primary color */
    color: #FFFFFF;
}

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

.page-login__security-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-login__security-image {
    width: 100%;
    height: 180px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.page-login__security-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #FFFFFF;
}

.page-login__security-text {
    font-size: 16px;
    color: #f0f0f0;
}

.page-login__security-tip {
    margin-top: 40px;
    font-size: 16px;
    font-style: italic;
    color: #f0f0f0;
}

/* --- Troubleshooting Section --- */
.page-login__troubleshooting {
    background-color: #FFFFFF;
}

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

.page-login__troubleshooting-item {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    text-align: left;
}

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

.page-login__troubleshooting-text {
    font-size: 16px;
    color: #555555;
}

/* --- FAQ Section --- */
.page-login__faq-section {
    background-color: #f0f0f0;
}

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

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

/* 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; /* Adjusted padding */
    opacity: 0;
    background: #f9f9f9; /* Light background for answer */
    color: #555555; /* Dark text for readability */
}

/* FAQ展开状态 - 🚨 Sử dụng!important và đủ lớn max-height để đảm bảo có thể mở rộng */
.page-login__faq-item.active .page-login__faq-answer {
    max-height: 2000px !important; /* 🚨 Sử dụng!important để đảm bảo ưu tiên, giá trị đủ lớn để chứa bất kỳ nội dung nào */
    padding: 20px !important; /* Adjusted padding */
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
}

/* Vấn đề kiểu dáng */
.page-login__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;
}

.page-login__faq-item.active .page-login__faq-question {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
}

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

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

/* Kiểu tiêu đề câu hỏi */
.page-login__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Ngăn thẻ h3 chặn sự kiện nhấp */
    color: #017439; /* Brand color for question title */
}

/* Chuyển đổi biểu tượng */
.page-login__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; /* Ngăn biểu tượng chặn sự kiện nhấp */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    transform: rotate(0deg); /* Initial state */
}

.page-login__faq-item.active .page-login__faq-toggle {
    color: #017439;
    transform: rotate(45deg); /* Change to X or - */
}

/* --- Contact Support Section --- */
.page-login__contact-support {
    background-color: #017439; /* Brand primary color */
    color: #FFFFFF;
    padding-bottom: 80px;
}

.page-login__btn-support {
    display: inline-block;
    padding: 15px 40px;
    background: #C30808; /* Custom button color */
    color: #FFFF00; /* Custom button font color */
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-login__main-heading {
        font-size: 40px;
    }
    .page-login__section-title {
        font-size: 30px;
    }
    .page-login__intro-text {
        font-size: 18px;
    }
    .page-login__login-form-container {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .page-login {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-login__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile header spacing */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-login__main-heading {
        font-size: 32px;
        margin-bottom: 15px;
    }
    .page-login__intro-text {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .page-login__section {
        padding: 40px 0;
    }
    .page-login__section-title {
        font-size: 26px;
        margin-bottom: 15px;
    }
    .page-login__section-description {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .page-login__login-form-container {
        max-width: 100%;
        padding: 25px;
        margin-top: 30px;
    }
    .page-login__form-title {
        font-size: 24px;
        margin-bottom: 25px;
    }
    .page-login__form-input {
        padding: 10px 12px;
        font-size: 15px;
    }
    .page-login__form-options {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 20px;
    }
    .page-login__forgot-password-link {
        margin-top: 10px;
    }
    .page-login__btn-login,
    .page-login__btn-register,
    .page-login__btn-support {
        padding: 12px 20px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-login__features-grid,
    .page-login__security-grid,
    .page-login__troubleshooting-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-login__feature-item,
    .page-login__security-item,
    .page-login__troubleshooting-item {
        padding: 20px;
    }
    .page-login__feature-image,
    .page-login__security-image {
        height: 150px;
    }
    .page-login__feature-title,
    .page-login__security-title,
    .page-login__troubleshooting-title {
        font-size: 18px;
    }

    /* FAQ Mobile */
    .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: 24px;
        height: 24px;
        font-size: 20px;
    }
    .page-login__faq-answer {
        padding: 0 15px;
    }
    .page-login__faq-item.active .page-login__faq-answer {
        padding: 15px !important;
    }

    /* Ensure all images are responsive and do not overflow */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-login__section,
    .page-login__card,
    .page-login__container,
    .page-login__login-form-container,
    .page-login__features-grid,
    .page-login__security-grid,
    .page-login__troubleshooting-grid,
    .page-login__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}