/* style/login.css */
.page-login {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light body background */
    background-color: #FFFFFF; /* Ensure consistency with body background */
}

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

/* Hero Section */
.page-login__hero-section {
    position: relative;
    padding: 80px 0;
    padding-top: var(--header-offset, 120px); /* Apply header offset */
    background: #017439; /* Brand primary color */
    color: #ffffff;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}

.page-login__hero-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #ffffff;
    line-height: 1.2;
}

.page-login__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-login__login-form-wrapper {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    max-width: 400px;
    margin: 30px auto 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

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

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

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

.page-login__form-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.page-login__btn-primary {
    display: inline-block;
    padding: 12px 25px;
    background-color: #C30808; /* Custom color for login/register */
    color: #FFFFFF; /* Ensuring WCAG AA contrast */
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
    text-align: center;
    box-sizing: border-box;
}

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

.page-login__forgot-password-link {
    color: #f0f0f0;
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.3s ease;
}

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

.page-login__register-cta {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.page-login__register-text {
    color: #ffffff;
    font-size: 1em;
}

.page-login__register-link {
    color: #FFFFFF; /* Default to white for contrast on dark background */
    text-decoration: underline;
    font-weight: bold;
    transition: color 0.3s ease;
}

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

.page-login__btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    background-color: #ffffff;
    color: #017439; /* Brand primary color */
    border: 2px solid #017439;
    border-radius: 5px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
    box-sizing: border-box;
}

.page-login__btn-secondary:hover {
    background-color: #017439;
    color: #ffffff;
}

/* General Section Styling */
.page-login__section {
    padding: 60px 0;
}

.page-login__section-title {
    font-size: 2.2em;
    margin-bottom: 25px;
    text-align: center;
    color: #017439;
}

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

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

.page-login__benefit-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    color: #333333;
}

.page-login__card-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

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

.page-login__card-description {
    font-size: 1em;
    margin-bottom: 20px;
}

/* Login Guide Section */
.page-login__guide-list {
    list-style: none;
    padding: 0;
    counter-reset: guide-step;
    max-width: 800px;
    margin: 0 auto 40px;
}

.page-login__guide-item {
    margin-bottom: 30px;
    position: relative;
    padding-left: 60px;
}

.page-login__guide-item::before {
    counter-increment: guide-step;
    content: counter(guide-step);
    position: absolute;
    left: 0;
    top: 0;
    background-color: #017439;
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    font-weight: bold;
}

.page-login__guide-heading {
    font-size: 1.3em;
    color: #017439;
    margin-bottom: 10px;
}

.page-login__guide-text {
    color: #555555;
}

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

/* Security Section */
.page-login__security-section {
    background-color: #017439; /* Brand primary color */
    color: #ffffff;
}

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

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

.page-login__security-features-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.page-login__security-feature-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
}

.page-login__feature-heading {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #ffffff;
}

.page-login__feature-text {
    font-size: 0.95em;
    color: #f0f0f0;
    margin-bottom: 15px;
}

.page-login__btn-link {
    color: #ffffff;
    text-decoration: underline;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-login__btn-link:hover {
    color: #FFFF00; /* Custom color for text link hover */
}

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

.page-login__troubleshooting-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 25px;
    text-align: center;
    color: #333333;
}

/* FAQ Section */
.page-login__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.page-login__faq-item {
    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: 15px 20px;
    background-color: #f9f9f9;
    cursor: pointer;
    font-size: 1.1em;
    color: #017439;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

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

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

.page-login__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: #ffffff;
    color: #555555;
}

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

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

/* CTA Section */
.page-login__cta-section {
    background-color: #017439;
    color: #ffffff;
    text-align: center;
}

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

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

.page-login__cta-buttons {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-login__hero-title {
        font-size: 2.4em;
    }

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

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

    .page-login__hero-title {
        font-size: 2em;
    }

    .page-login__hero-description {
        font-size: 1em;
    }

    .page-login__section {
        padding: 40px 0;
    }

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

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

    .page-login__benefits-grid,
    .page-login__security-features-list,
    .page-login__troubleshooting-grid {
        grid-template-columns: 1fr;
    }

    .page-login__guide-item {
        padding-left: 0;
        text-align: center;
    }

    .page-login__guide-item::before {
        position: static;
        margin: 0 auto 15px;
    }

    .page-login__cta-group,
    .page-login__cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    /* Mobile image, video, button responsive styles */
    .page-login img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-login__section,
    .page-login__card,
    .page-login__container,
    .page-login__login-form-wrapper,
    .page-login__cta-group,
    .page-login__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }
    
    .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;
    }
}

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

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

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