/* style/login.css */

/* General Styles */
.page-login {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: var(--background-color, #FFFFFF);
}

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

.page-login__section-title {
    font-size: 2.5em;
    color: #017439;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

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

/* Color Contrast Fixes */
.page-login__dark-bg {
    background-color: #017439;
    color: #ffffff;
}

.page-login__dark-bg .page-login__section-title,
.page-login__dark-bg .page-login__section-description,
.page-login__dark-bg .page-login__faq-title,
.page-login__dark-bg .page-login__step-title,
.page-login__dark-bg .page-login__step-text,
.page-login__dark-bg .page-login__faq-toggle {
    color: #ffffff;
}

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

.page-login__btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    text-align: center;
    cursor: pointer;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    box-sizing: border-box;
}

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

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

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

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

.page-login__btn--login {
    background-color: #C30808; /* Custom login button color */
    color: #FFFF00; /* Custom login button font color */
    border: 2px solid #C30808;
    width: 100%;
    margin-top: 20px;
    font-size: 1.1em;
}

.page-login__btn--login:hover {
    background-color: #a30606;
    border-color: #a30606;
}

.page-login__btn--link {
    background: none;
    border: 2px solid #017439;
    color: #017439;
    padding: 8px 15px;
    font-size: 0.9em;
    margin-top: 15px;
}

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

/* Hero Section */
.page-login__hero-section {
    position: relative;
    width: 100%;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: var(--header-offset, 120px);
    background-color: #017439;
}

.page-login__hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.6);
}

.page-login__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.page-login__login-card {
    position: relative;
    z-index: 3;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    width: 100%;
    text-align: center;
}

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

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

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

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

.page-login__form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
}

.page-login__form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.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;
    font-weight: bold;
}

.page-login__forgot-password:hover {
    text-decoration: underline;
}

.page-login__register-prompt {
    margin-top: 25px;
    color: #555555;
}

.page-login__register-link {
    color: #017439;
    text-decoration: none;
    font-weight: bold;
}

.page-login__register-link:hover {
    text-decoration: underline;
}

/* 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 {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

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

.page-login__benefit-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

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

/* Guide Section */
.page-login__guide-section {
    padding: 80px 0;
}

.page-login__guide-content {
    display: flex;
    gap: 40px;
    align-items: center;
}

.page-login__guide-steps {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.page-login__step-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.page-login__step-number {
    background-color: #ffffff;
    color: #017439;
    width: 40px;
    height: 40px;
    min-width: 40px; /* Ensure fixed width */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4em;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-login__step-title {
    font-size: 1.4em;
    margin-bottom: 5px;
    color: #ffffff;
}

.page-login__step-text {
    color: #f0f0f0;
    flex: 1;
}

.page-login__guide-image-wrapper {
    flex: 1;
    text-align: center;
}

.page-login__guide-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    min-width: 200px; /* Enforce min size */
    min-height: 200px; /* Enforce min size */
}

/* Troubleshoot Section */
.page-login__troubleshoot-section {
    padding: 80px 0;
}

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

.page-login__troubleshoot-item {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
}

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

.page-login__troubleshoot-text {
    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(250px, 1fr));
    gap: 30px;
}

.page-login__security-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-login__security-icon {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 20px;
    min-width: 200px; /* Enforce min size */
    min-height: 200px; /* Enforce min size */
}

.page-login__security-title {
    font-size: 1.4em;
    color: #ffffff;
    margin-bottom: 10px;
}

.page-login__security-text {
    color: #f0f0f0;
}

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

.page-login__video-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px; /* Max width for video */
    margin: 0 auto 30px auto;
    background-color: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-login__video {
    display: block;
    width: 100%;
    height: auto;
    cursor: pointer;
}

.page-login__video-overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FFFF00; /* Custom font color for login/register */
    font-size: 2.5em;
    font-weight: bold;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    pointer-events: none; /* Allow click to pass through to video element */
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.page-login__video-wrapper:hover .page-login__video-overlay-text {
    opacity: 1;
}

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

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

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

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

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

.page-login__faq-title {
    font-size: 1.2em;
    margin: 0;
    color: #ffffff;
}

.page-login__faq-toggle {
    font-size: 1.8em;
    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 25px;
    background-color: rgba(255, 255, 255, 0.05);
    color: #f0f0f0;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

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

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

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

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

/* Responsive Design */
@media (max-width: 1024px) {
    .page-login__hero-section {
        min-height: 600px;
    }

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

    .page-login__login-card {
        padding: 30px;
    }

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

    .page-login__guide-content {
        flex-direction: column-reverse;
    }

    .page-login__guide-steps {
        width: 100%;
    }

    .page-login__guide-image-wrapper {
        width: 100%;
        margin-bottom: 40px;
    }
}

@media (max-width: 768px) {
    .page-login__hero-section {
        min-height: 500px;
        padding-top: var(--header-offset, 120px) !important;
    }

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

    .page-login__intro-text {
        font-size: 1em;
    }

    .page-login__login-card {
        padding: 25px;
        max-width: 90%;
    }

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

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

    .page-login__benefits-grid,
    .page-login__troubleshoot-grid,
    .page-login__security-grid {
        grid-template-columns: 1fr;
    }

    .page-login__guide-section,
    .page-login__benefits-section,
    .page-login__troubleshoot-section,
    .page-login__security-section,
    .page-login__video-section,
    .page-login__faq-section,
    .page-login__cta-section {
        padding: 60px 0;
    }

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

    /* Image Responsive Adaptations */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-login__hero-background-image,
    .page-login__benefit-image,
    .page-login__guide-image,
    .page-login__security-icon {
        min-width: 200px !important;
        min-height: 200px !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Video Responsive Adaptations */
    .page-login video,
    .page-login__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-login__video-section,
    .page-login__video-container,
    .page-login__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    /* Button Responsive Adaptations */
    .page-login__btn,
    .page-login__btn--primary,
    .page-login__btn--secondary,
    .page-login__btn--login,
    .page-login__btn--link {
        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 {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }

    .page-login__form-options {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .page-login__forgot-password {
        align-self: flex-end;
    }

    .page-login__video-overlay-text {
        font-size: 1.5em;
    }
}

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

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

    .page-login__login-card {
        padding: 20px;
    }

    .page-login__forgot-password {
        width: 100%;
        text-align: right;
    }

    .page-login__remember-me {
        width: 100%;
        justify-content: center;
    }
}