/* style/login.css */
/* 
 * Màu sắc tùy chỉnh:
 * Đăng ký: #C30808
 * Đăng nhập: #C30808
 * Nền: #FFFFFF
 * Font đăng ký và đăng nhập: #FFFF00
 */

/* Biến CSS */
:root {
    --primary-color: #017439; /* Màu xanh lá cây chính */
    --secondary-color: #C30808; /* Màu đỏ cho đăng ký/đăng nhập */
    --background-color: #FFFFFF; /* Màu nền chung */
    --text-color-dark: #333333; /* Màu chữ tối cho nền sáng */
    --text-color-light: #ffffff; /* Màu chữ sáng cho nền tối */
    --button-text-color: #FFFF00; /* Màu chữ cho nút đăng ký/đăng nhập */
    --border-color: #e0e0e0;
}

/* Base styles for .page-login, ensuring proper spacing from header */
.page-login {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark); /* Default text color for light background */
    background-color: var(--background-color); /* Default page background */
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
}

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

/* Sections */
.page-login__section-title {
    font-size: 2.5em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-login__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    line-height: 1.7;
}

/* 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;
    background: linear-gradient(135deg, var(--primary-color) 0%, #339966 100%); /* Green gradient for hero background */
    color: var(--text-color-light); /* Light text for dark background */
    overflow: hidden; /* Ensure content stays within bounds */
}

.page-login__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.page-login__hero-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-login__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
    filter: brightness(0.8); /* Slightly dim the image for text readability, NO color change */
}

.page-login__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.95); /* Semi-transparent white background for form */
    color: var(--text-color-dark); /* Dark text for light background */
}

.page-login__main-title {
    font-size: 3em;
    margin-bottom: 15px;
    color: var(--primary-color); /* Use primary color for H1 on light background */
}

.page-login__intro-text {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--text-color-dark);
}

.page-login__login-form-wrapper {
    max-width: 450px;
    margin: 0 auto;
    padding: 30px;
    background: var(--background-color);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

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

.page-login__form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--primary-color);
}

.page-login__form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.page-login__btn-login {
    display: block;
    width: 100%;
    padding: 15px;
    background: var(--secondary-color); /* Custom login button color */
    color: var(--button-text-color); /* Custom login button font color */
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 20px;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: none;
    box-sizing: border-box;
    max-width: 100%; /* Ensure button adapts on mobile */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text break */
}

.page-login__btn-login:hover {
    background: #A00707; /* Darker red on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-login__form-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.95em;
    flex-wrap: wrap; /* Allow links to wrap on small screens */
    gap: 10px; /* Space between links */
}

.page-login__form-links a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-login__form-links a:hover {
    text-decoration: underline;
    color: var(--secondary-color);
}

.page-login__link-separator {
    color: var(--text-color-dark);
}

/* Benefits Section */
.page-login__benefits-section {
    background-color: var(--primary-color); /* Dark background for this section */
    color: var(--text-color-light); /* Light text for dark background */
    padding: 80px 0;
}

.page-login__benefits-section .page-login__section-title {
    color: var(--text-color-light); /* White title on dark background */
}

.page-login__benefits-section .page-login__section-description {
    color: var(--text-color-light);
}

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

.page-login__benefit-item {
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent white for cards */
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    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.2);
}

.page-login__benefit-item img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    min-width: 200px; /* Enforce minimum image size */
    min-height: 200px; /* Enforce minimum image size */
    object-fit: cover;
}

.page-login__benefit-title {
    font-size: 1.5em;
    color: var(--text-color-light);
    margin-bottom: 15px;
    font-weight: bold;
}

.page-login__benefit-text {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.9);
}

/* Security Section */
.page-login__security-section {
    background-color: var(--background-color);
    color: var(--text-color-dark);
    padding: 80px 0;
}

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

.page-login__feature-item {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    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.12);
}

.page-login__feature-item img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    min-width: 200px; /* Enforce minimum image size */
    min-height: 200px; /* Enforce minimum image size */
    object-fit: cover;
}

.page-login__feature-title {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: bold;
}

.page-login__feature-text {
    font-size: 1em;
    color: var(--text-color-dark);
}

/* FAQ Section */
.page-login__faq-section {
    background-color: #f9f9f9; /* Light grey background for FAQ */
    padding: 80px 0;
    color: var(--text-color-dark);
}

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

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

.page-login__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

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

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

.page-login__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.5;
    color: var(--primary-color);
    pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-login__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: var(--primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from blocking click event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-login__faq-item.active .page-login__faq-toggle {
    color: var(--secondary-color);
    transform: rotate(45deg); /* Rotate for 'x' effect, or just change to '-' */
}

.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 15px;
    opacity: 0;
    background: #fcfcfc;
    border-top: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    border-radius: 0 0 5px 5px;
}

.page-login__faq-item.active .page-login__faq-answer {
    max-height: 2000px !important; /* Sufficiently large to ensure content expands */
    padding: 20px 15px !important;
    opacity: 1;
}

.page-login__faq-answer p {
    margin: 0;
    color: var(--text-color-dark);
    font-size: 1em;
    line-height: 1.7;
}

/* CTA Section */
.page-login__cta-section {
    background-color: var(--primary-color); /* Dark background for CTA */
    color: var(--text-color-light); /* Light text for dark background */
    padding: 80px 0;
    text-align: center;
}

.page-login__cta-section .page-login__section-title {
    color: var(--text-color-light);
}

.page-login__cta-section .page-login__section-description {
    color: rgba(255, 255, 255, 0.9);
}

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

.page-login__btn-primary,
.page-login__btn-secondary {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    box-sizing: border-box;
    max-width: 100%; /* Ensure button adapts on mobile */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text break */
}

.page-login__btn-primary {
    background: var(--secondary-color); /* Custom register button color */
    color: var(--button-text-color); /* Custom register button font color */
    border-color: var(--secondary-color);
}

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

.page-login__btn-secondary {
    background: var(--text-color-light); /* White background */
    color: var(--primary-color); /* Primary color text */
    border-color: var(--text-color-light);
}

.page-login__btn-secondary:hover {
    background: #f0f0f0;
    color: darken(var(--primary-color), 10%); /* This will be handled by preprocessor or manually darkened */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Helper classes for background/text color contrast */
.page-login__dark-bg {
    background: var(--primary-color);
    color: var(--text-color-light);
}

.page-login__light-bg {
    background: var(--background-color);
    color: var(--text-color-dark);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-login__main-title {
        font-size: 2.5em;
    }
    .page-login__benefits-grid,
    .page-login__security-features {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-login {
        font-size: 16px;
        line-height: 1.6;
        padding-top: var(--header-offset, 120px) !important; /* Mobile header spacing */
    }

    .page-login__container {
        padding: 20px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-login__hero-section {
        padding: 40px 15px;
    }

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

    .page-login__hero-image img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-login__hero-content {
        padding: 25px;
    }

    .page-login__main-title {
        font-size: 2em;
        margin-bottom: 10px;
    }

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

    .page-login__login-form-wrapper {
        padding: 20px;
    }

    .page-login__btn-login {
        padding: 12px;
        font-size: 1.1em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-login__form-links {
        flex-direction: column;
        gap: 5px;
        align-items: center;
    }
    
    .page-login__link-separator {
        display: none; /* Hide separator on mobile if links stack */
    }

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

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

    .page-login__benefits-section,
    .page-login__security-section,
    .page-login__faq-section,
    .page-login__cta-section {
        padding: 40px 0;
    }

    .page-login__benefit-item img,
    .page-login__feature-item img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px !important; /* Enforce minimum image size */
        min- /* Adjust height for mobile if needed, but keep >=200px */
    }
}