/* style/login.css */
.page-login {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: var(--auxiliary-color, #FFFFFF); /* Page background from shared.css */
}

/* 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 below fixed header */
    background-color: #f5f5f5; /* Light background for hero section */
    overflow: hidden;
}

.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: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

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

.page-login__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 500px; /* Limit form width */
    background-color: #FFFFFF;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-50px); /* Overlap with image slightly */
}

.page-login__main-title {
    font-size: 32px;
    color: #017439;
    margin-bottom: 15px;
    line-height: 1.3;
}

.page-login__description {
    font-size: 16px;
    color: #555555;
    margin-bottom: 25px;
}

.page-login__form {
    width: 100%;
    margin-top: 20px;
}

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

.page-login__label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333333;
    font-size: 14px;
}

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

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

.page-login__form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap; /* Allow wrapping on mobile */
}

.page-login__forgot-password {
    color: #017439;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    padding: 5px 0; /* Add padding for click area */
    display: inline-block;
    max-width: 100%; /* Ensure it doesn't overflow */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

.page-login__btn-login {
    display: inline-block;
    padding: 12px 25px;
    /* Prioritizing WCAG AA contrast over custom color #C30808 and #FFFF00 */
    background: #017439;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

.page-login__register-text {
    margin-top: 25px;
    font-size: 15px;
    color: #555555;
}

.page-login__btn-register {
    color: #017439;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.page-login__btn-register:hover {
    color: #00562e;
    text-decoration: underline;
}

/* General Section Styling */
.page-login__section {
    padding: 80px 20px;
    text-align: center;
}

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

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

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

.page-login__section-description {
    font-size: 17px;
    color: #555555;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

/* Why Login Section */
.page-login__why-login-section {
    background-color: #FFFFFF;
}

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

.page-login__feature-item {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 12px;
    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(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

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

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

/* Login Guide Section */
.page-login__login-guide-section {
    background-color: #017439; /* Dark background */
    color: #ffffff;
}

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

.page-login__step-item {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 12px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-login__step-item:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.page-login__step-number {
    font-size: 48px;
    font-weight: bold;
    color: #FFFFFF;
    margin-bottom: 15px;
    line-height: 1;
}

.page-login__step-title {
    font-size: 24px;
    color: #FFFFFF;
    margin-bottom: 10px;
    font-weight: bold;
}

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

/* Security Section */
.page-login__security-section {
    background-color: #FFFFFF;
}

.page-login__security-content {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-top: 40px;
    flex-wrap: wrap; /* Allow wrapping on mobile */
}

.page-login__security-text {
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.page-login__security-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-login__security-list li {
    margin-bottom: 20px;
}

.page-login__security-list li:last-child {
    margin-bottom: 0;
}

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

.page-login__security-list p {
    font-size: 15px;
    color: #555555;
}

.page-login__security-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.page-login__security-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-login__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    background: #ffffff;
    color: #017439;
    text-decoration: none;
    border: 2px solid #017439;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    margin-top: 40px;
    transition: all 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

/* Troubleshooting Section */
.page-login__troubleshooting-section {
    background-color: #017439;
    color: #ffffff;
}

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

.page-login__troubleshooting-item {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 12px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-login__troubleshooting-item:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

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

.page-login__troubleshooting-text {
    font-size: 15px;
    color: #f0f0f0;
}

.page-login__troubleshooting-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
}

.page-login__troubleshooting-contact img {
    max-width: 400px;
    height: auto;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-login__contact-text {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 600px;
    color: #f0f0f0;
}

.page-login__contact-text--white {
    color: #f0f0f0;
}

.page-login__btn-primary {
    display: inline-block;
    padding: 15px 35px;
    background: #FFFFFF;
    color: #017439;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

/* Register CTA Section */
.page-login__register-cta-section {
    background-color: #f9f9f9;
}

.page-login__register-cta-content {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap; /* Allow wrapping on mobile */
    text-align: left;
}

.page-login__register-cta-text {
    flex: 1;
    min-width: 300px;
}

.page-login__register-cta-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.page-login__register-cta-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-login__btn-register-cta {
    display: inline-block;
    padding: 15px 35px;
    background: #017439;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

/* FAQ Section */
.page-login__faq-section {
    background-color: #FFFFFF;
    padding-bottom: 100px;
}

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

.page-login__faq-item {
    margin-bottom: 15px;
    border-radius: 10px;
    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 25px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    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: 17px;
    font-weight: 600;
    line-height: 1.5;
    color: #333333;
    pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-login__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #017439;
    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: 32px;
    height: 32px;
}

.page-login__faq-item.active .page-login__faq-toggle {
    color: #00562e;
    transform: rotate(45deg); /* Changed from '-' to rotate for visual effect */
}

.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 25px;
    opacity: 0;
    background: #f9f9f9;
    color: #555555;
    font-size: 15px;
    text-align: left;
}

.page-login__faq-item.active .page-login__faq-answer {
    max-height: 2000px !important; /* Use !important to ensure priority, value large enough for content */
    padding: 20px 25px !important;
    opacity: 1;
    border-radius: 0 0 10px 10px;
}

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

/* Copyright */
.page-login__copyright {
    text-align: center;
    padding: 30px 20px;
    background-color: #017439;
    color: #ffffff;
    font-size: 14px;
    margin-top: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-login__hero-content {
        transform: translateY(0); /* Remove overlap on smaller screens */
        margin-top: 30px;
    }
    .page-login__security-content,
    .page-login__register-cta-content {
        flex-direction: column;
        text-align: center;
    }
    .page-login__security-text,
    .page-login__register-cta-text {
        min-width: unset;
        width: 100%;
    }
    .page-login__security-image,
    .page-login__register-cta-image {
        min-width: unset;
        width: 100%;
    }
}

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

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

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

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

    .page-login__description {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .page-login__form-actions {
        flex-direction: column;
        gap: 15px;
    }

    .page-login__forgot-password,
    .page-login__btn-login {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}