/* style/login.css */

/* Base Styles for the Login Page */
.page-login {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default dark text for light body background */
    background-color: #ffffff; /* Default body background */
}

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

/* --- Hero Section --- */
.page-login__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
    background: linear-gradient(135deg, #26A9E0, #1a7fb3); /* Primary brand color gradient */
    color: #ffffff; /* Light text for dark background */
    overflow: hidden; /* Prevent image overflow */
}

.page-login__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    z-index: 1; /* Ensure content is above any background effects */
}

.page-login__hero-content {
    text-align: center;
    width: 100%;
    max-width: 600px;
}

.page-login__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: bold;
    color: #ffffff;
}

.page-login__intro-text {
    font-size: 1.1em;
    margin-bottom: 30px;
    opacity: 0.9;
    color: #f0f0f0;
}

.page-login__hero-image {
    width: 100%;
    max-width: 800px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.page-login__hero-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Login Form Styling */
.page-login__form-wrapper {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 450px;
    margin: 30px auto 0;
    text-align: left;
}

.page-login__login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.page-login__form-group {
    display: flex;
    flex-direction: column;
}

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

.page-login__form-input {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    color: #333333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-login__form-input:focus {
    border-color: #26A9E0;
    outline: none;
    box-shadow: 0 0 0 3px rgba(38, 169, 224, 0.2);
}

.page-login__form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
}

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

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

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

.page-login__checkbox {
    width: 16px;
    height: 16px;
    accent-color: #26A9E0; /* Checkbox color */
}

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

.page-login__btn-primary.page-login__login-button {
    background: #EA7C07; /* Custom color for login button */
    color: #ffffff;
    padding: 14px 25px;
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
    box-sizing: border-box; /* Ensure padding doesn't increase width */
}

.page-login__btn-primary.page-login__login-button:hover {
    background: #d46b00; /* Darker shade on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

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

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

/* --- General Section Styles --- */
.page-login__section-title {
    font-size: 2.5em;
    color: #26A9E0;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-login__section-description {
    font-size: 1.1em;
    color: #555555;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
}

.page-login__light-bg {
    background-color: #ffffff;
    color: #333333;
}

.page-login__dark-bg {
    background-color: #26A9E0; /* Primary brand color */
    color: #ffffff;
}

.page-login__dark-bg .page-login__section-title {
    color: #ffffff;
}

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

/* --- Benefits Section --- */
.page-login__benefits-section {
    padding: 80px 0;
}

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

.page-login__benefit-item {
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-login__benefit-item img {
    width: 100%;
    max-width: 400px; /* Adjust based on content */
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    object-fit: cover;
}

.page-login__benefit-title {
    font-size: 1.4em;
    color: #26A9E0;
    margin-bottom: 15px;
    font-weight: 700;
}

.page-login__benefit-text {
    font-size: 1em;
    color: #555555;
    margin-bottom: 20px;
}

/* --- Troubleshooting Section --- */
.page-login__troubleshooting-section {
    padding: 80px 0;
}

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

.page-login__trouble-item {
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    background-color: #ffffff; /* Card background */
    color: #333333; /* Dark text for light card background */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-login__trouble-title {
    font-size: 1.3em;
    color: #26A9E0;
    margin-bottom: 15px;
    font-weight: 700;
}

.page-login__trouble-text {
    font-size: 0.95em;
    color: #555555;
    margin-bottom: 20px;
}

/* --- Security Section --- */
.page-login__security-section {
    padding: 80px 0;
}

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

.page-login__security-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 25px;
    border-radius: 10px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-login__security-item img {
    width: 100%;
    max-width: 400px; /* Adjust based on content */
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px;
    object-fit: cover;
}

.page-login__security-title {
    font-size: 1.3em;
    color: #26A9E0;
    margin-bottom: 10px;
    font-weight: 700;
}

.page-login__security-text {
    font-size: 0.95em;
    color: #555555;
}


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

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

/* FAQ容器样式 */
.page-login__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    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;
    opacity: 0;
    background-color: #f0f0f0;
    color: #333333;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.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 mọi nội dung */
    padding: 20px !important;
    opacity: 1;
    background-color: #f0f0f0;
    border-radius: 0 0 8px 8px;
}

/* 问题样式 */
.page-login__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    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-color: #26A9E0;
}

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

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

/* 问题标题样式 */
.page-login__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.5;
    color: #333333;
    pointer-events: none; /* Ngăn h3 chặn sự kiện nhấp chuột */
}

/* 切换图标 */
.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 chuột */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #f0f0f0;
}

.page-login__faq-item.active .page-login__faq-toggle {
    color: #26A9E0;
    transform: rotate(180deg);
    background-color: #e0f2f7;
}

/* --- Contact Section --- */
.page-login__contact-section {
    padding: 80px 0;
    text-align: center;
}

.page-login__contact-options {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* --- Button Styles --- */
.page-login__btn-primary,
.page-login__btn-secondary,
.page-login__btn-link {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
    max-width: 100%; /* Ensure button doesn't overflow */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow text to break words */
}

.page-login__btn-primary {
    background-color: #26A9E0;
    color: #ffffff;
    border: 2px solid #26A9E0;
}

.page-login__btn-primary:hover {
    background-color: #1a7fb3;
    border-color: #1a7fb3;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.page-login__btn-secondary {
    background-color: #ffffff;
    color: #26A9E0;
    border: 2px solid #26A9E0;
}

.page-login__btn-secondary:hover {
    background-color: #e0f2f7;
    color: #1a7fb3;
    border-color: #1a7fb3;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-login__btn-link {
    background: none;
    border: none;
    color: #26A9E0;
    padding: 0;
    text-decoration: underline;
    font-weight: 500;
}

.page-login__btn-link:hover {
    color: #1a7fb3;
    text-decoration: none;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-login__main-title {
        font-size: 2.8em;
    }

    .page-login__section-title {
        font-size: 2.2em;
    }

    .page-login__hero-container {
        flex-direction: column;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .page-login__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile padding-top */
        padding-bottom: 40px;
    }

    .page-login__main-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }

    .page-login__intro-text {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .page-login__section-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }

    .page-login__section-description {
        font-size: 0.95em;
        margin-bottom: 30px;
    }

    .page-login__container {
        padding: 20px 15px;
    }

    /* Images responsiveness */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box;
    }

    .page-login__section,
    .page-login__card,
    .page-login__container,
    .page-login__form-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-login__hero-image {
        margin-top: 20px;
    }

    /* Buttons responsiveness */
    .page-login__btn-primary,
    .page-login__btn-secondary,
    .page-login__btn-link,
    .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;
    }

    .page-login__contact-options {
        flex-direction: column;
        gap: 15px;
    }

    /* FAQ Mobile */
    .page-login__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }

    .page-login__faq-question h3 {
        font-size: 1em;
        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;
    }
}

@media (max-width: 480px) {
    .page-login__main-title {
        font-size: 1.8em;
    }

    .page-login__section-title {
        font-size: 1.6em;
    }

    .page-login__form-wrapper {
        padding: 20px;
    }

    .page-login__form-input {
        padding: 10px 12px;
    }

    .page-login__btn-primary.page-login__login-button {
        padding: 12px 20px;
        font-size: 1em;
    }
}