/* style/login.css */

/* Base styles for the page-login scope */
.page-login {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: var(--background-color, #FFFFFF); /* Inherit from shared or default to white */
    overflow-x: hidden; /* Prevent horizontal scroll on desktop */
}

/* Fixed Header Spacing - Apply to the main content wrapper */
.page-login {
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

/* Section styling */
.page-login__hero-section {
    position: relative;
    padding: 80px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #017439; /* Main brand color for dark background */
    color: #FFFFFF; /* White text for dark background */
}

.page-login__hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(1, 116, 57, 0.8), rgba(1, 116, 57, 0.9));
    z-index: 1;
}

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

.page-login__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: #FFFFFF;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-login__subtitle {
    font-size: 1.2em;
    margin-bottom: 40px;
    color: #f0f0f0;
}

.page-login__form-wrapper {
    background-color: #FFFFFF; /* White background for form */
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    margin: 40px auto 0; /* Adjust margin to center and give space */
    text-align: left;
    color: #333333; /* Dark text for white background */
}

.page-login__form-title {
    font-size: 1.8em;
    margin-bottom: 30px;
    text-align: center;
    color: #017439; /* Brand color for title */
}

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

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

.page-login__form-input {
    width: calc(100% - 20px);
    padding: 12px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

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

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

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

.page-login__checkbox {
    margin-right: 8px;
}

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

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

.page-login__forgot-password:hover {
    color: #00562e;
}

.page-login__btn-submit {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    background-color: #C30808; /* Custom color for login button */
    color: #FFFF00; /* Custom font color for login button */
}

.page-login__btn-submit:hover {
    background-color: #a30707; /* Slightly darker red on hover */
}

.page-login__register-text {
    text-align: center;
    margin-top: 25px;
    color: #555555;
}

.page-login__register-link {
    color: #C30808; /* Custom color for register link */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-login__register-link:hover {
    color: #a30707;
}

.page-login__hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.page-login__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}


/* General section styling */
.page-login__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-login__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 20px;
    color: #017439; /* Brand color for titles */
}

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

/* Why Choose Section */
.page-login__why-choose {
    padding: 80px 0;
    background-color: #FFFFFF; /* Light background */
    color: #333333; /* Dark text */
}

.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-color: #f8f8f8;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.page-login__feature-item:hover {
    transform: translateY(-5px);
}

.page-login__feature-icon {
    width: 100%;
    max-width: 200px; /* Ensure images are not too small but still content images */
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px;
}

.page-login__feature-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #017439;
}

.page-login__feature-text {
    font-size: 1em;
    color: #555555;
}

/* Benefits Section */
.page-login__benefits-section {
    padding: 80px 0;
    background-color: #017439; /* Dark background */
    color: #FFFFFF; /* White text */
}

.page-login__benefits-section .page-login__section-title,
.page-login__benefits-section .page-login__section-description {
    color: #FFFFFF;
}

.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: #FFFFFF; /* Light background for cards */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: left;
    color: #333333; /* Dark text for light background */
}

.page-login__card-title {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: #017439;
}

.page-login__card-text {
    font-size: 1em;
    color: #555555;
}

.page-login__cta-bottom {
    text-align: center;
    margin-top: 60px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

/* Buttons */
.page-login__btn-primary,
.page-login__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box; /* Ensure padding doesn't make button overflow */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
}

.page-login__btn-primary {
    background-color: #C30808; /* Custom color for primary button */
    color: #FFFF00; /* Custom font color */
    border: 2px solid #C30808;
}

.page-login__btn-primary:hover {
    background-color: #a30707;
    border-color: #a30707;
}

.page-login__btn-secondary {
    background-color: #FFFFFF; /* Auxiliary color for secondary button */
    color: #017439; /* Main brand color for text */
    border: 2px solid #017439;
}

.page-login__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #00562e;
    border-color: #00562e;
}


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

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

.page-login__faq-item {
    background-color: #FFFFFF;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-login__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    color: #017439;
    transition: background-color 0.3s ease;
}

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

.page-login__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
}

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

.page-login__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px; /* Initial padding for collapsed state */
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #555555;
}

.page-login__faq-item.active .page-login__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show content */
    padding: 20px 25px; /* Padding for expanded state */
}

.page-login__faq-answer p {
    margin-bottom: 0;
}


/* Final CTA Section */
.page-login__final-cta {
    padding: 80px 0;
    text-align: center;
    background-color: #017439; /* Dark background */
    color: #FFFFFF; /* White text */
}

.page-login__final-cta .page-login__section-title,
.page-login__final-cta .page-login__section-description {
    color: #FFFFFF;
}

.page-login__final-cta .page-login__cta-buttons {
    margin-top: 40px;
}


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

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

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

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

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

    .page-login__form-wrapper {
        padding: 30px;
        margin-top: 30px;
        max-width: 100% !important; /* Ensure form wrapper takes full width */
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-login__form-title {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

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

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

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

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

    .page-login__feature-icon {
        max-width: 150px;
    }

    .page-login__feature-title,
    .page-login__card-title {
        font-size: 1.3em;
    }

    .page-login__cta-bottom {
        flex-direction: column;
        gap: 15px;
    }

    /* Buttons responsive adaptation */
    .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;
    }

    .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;
        flex-direction: column; /* Stack buttons vertically on mobile */
    }

    /* Images responsive adaptation */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-login__section,
    .page-login__card,
    .page-login__container,
    .page-login__form-wrapper { /* Add form wrapper to container list */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important; /* Ensure containers don't cause scroll */
    }

    /* FAQ responsive */
    .page-login__faq-question {
        font-size: 1.1em;
        padding: 18px 20px;
    }

    .page-login__faq-answer {
        padding: 0 20px;
    }

    .page-login__faq-item.active .page-login__faq-answer {
        padding: 18px 20px;
    }
}

@media (max-width: 480px) {
    .page-login__main-title {
        font-size: 1.8em;
    }
    .page-login__section-title {
        font-size: 1.8em;
    }
    .page-login__form-wrapper {
        padding: 20px;
    }
    .page-login__form-title {
        font-size: 1.3em;
    }
    .page-login__btn-submit {
        font-size: 1em;
    }
    .page-login__faq-question {
        font-size: 1em;
    }
}

/* Color Contrast Fixes (as per instructions) */
.page-login__dark-bg {
    background-color: #017439;
    color: #ffffff; /* Deep green background, white text */
}

.page-login__light-bg {
    background-color: #ffffff;
    color: #333333; /* White background, dark grey text */
}

/* Ensure paragraph and list item colors */
.page-login p,
.page-login li {
    color: inherit; /* Inherit from parent section to maintain contrast */
}

.page-login__why-choose p,
.page-login__faq-section p {
    color: #555555; /* Specific for light sections */
}

.page-login__benefits-section p {
    color: #f0f0f0; /* Specific for dark sections */
}

/* Specific styling for login/register text and buttons for custom colors */
.page-login__btn-submit {
    background-color: #C30808;
    color: #FFFF00;
}

.page-login__btn-submit:hover {
    background-color: #a30707;
}

.page-login__register-link {
    color: #C30808;
}

.page-login__register-link:hover {
    color: #a30707;
}

.page-login__btn-primary {
    background-color: #C30808;
    color: #FFFF00;
    border-color: #C30808;
}

.page-login__btn-primary:hover {
    background-color: #a30707;
    border-color: #a30707;
}

.page-login__btn-secondary {
    background-color: #FFFFFF;
    color: #017439;
    border-color: #017439;
}

.page-login__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #00562e;
    border-color: #00562e;
}