/* style/login.css */

/* Base Styles & Page-specific variables */
.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 */
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

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

/* Hero Section */
.page-login__hero-section {
    position: relative;
    width: 100%;
    height: 600px; /* Fixed height for desktop */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    color: #ffffff; /* White text for dark section */
}

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

.page-login__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
    z-index: 2;
}

.page-login__hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    padding: 20px;
}

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

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

.page-login__cta-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

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

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

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

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

/* Form Section */
.page-login__form-section {
    padding: 60px 0;
    background-color: #f5f5f5; /* Light background for form */
}

.page-login__form-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto;
}

.page-login__login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.page-login__form-group {
    display: flex;
    flex-direction: column;
}

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

.page-login__form-input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

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

.page-login__form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    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;
}

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

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

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

.page-login__register-prompt {
    text-align: center;
    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;
}

/* Features Section */
.page-login__features-section {
    padding: 80px 0;
}

.page-login__features-grid {
    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;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-login__feature-icon {
    width: 100%; /* Ensure image fills container */
    max-width: 400px; /* Max width for feature images */
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px;
    object-fit: cover;
}

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

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

/* Video Section */
.page-login__video-section {
    padding: 80px 0;
    background-color: #017439; /* Dark background */
    color: #ffffff;
    text-align: center;
}

.page-login__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 1000px; /* Max width for video */
    margin: 40px auto;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-login__video-link {
    display: block; /* Make the whole video wrapper clickable */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10; /* Ensure link is above video controls if any */
}

.page-login__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}

.page-login__video-cta {
    margin-top: 40px;
}

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

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

.page-login__faq-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.page-login__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    background-color: #f9f9f9;
    transition: background-color 0.3s ease;
}

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

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

.page-login__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: #017439;
    transition: transform 0.3s ease;
}

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

.page-login__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    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; /* Ensure it expands sufficiently */
    padding: 15px 25px;
}

.page-login__faq-answer p {
    margin-bottom: 10px;
    color: #555555;
}

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

/* CTA Section at bottom */
.page-login__cta-section {
    padding: 60px 0;
    background-color: #017439;
    color: #ffffff;
    text-align: center;
}

/* Buttons */
.page-login__btn-primary,
.page-login__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
}

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

.page-login__btn-primary:hover {
    background-color: #a00606;
    transform: translateY(-2px);
}

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

.page-login__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #00502a;
    transform: translateY(-2px);
}

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

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

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

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

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

@media (max-width: 768px) {
    .page-login {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-login__hero-section {
        height: 500px; /* Adjust height for tablet */
    }

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

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

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

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

    .page-login__btn-primary,
    .page-login__btn-secondary,
    .page-login__btn-submit,
    .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-group,
    .page-login__button-group,
    .page-login__btn-container,
    .page-login__video-section,
    .page-login__video-container,
    .page-login__video-wrapper,
    .page-login__form-card,
    .page-login__features-section,
    .page-login__faq-section,
    .page-login__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Prevent horizontal scroll */
    }

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

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

    .page-login__form-card {
        padding: 30px 20px;
    }

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

    .page-login__features-grid {
        grid-template-columns: 1fr;
    }

    .page-login__feature-item {
        padding: 25px;
    }
    
    .page-login__feature-icon {
        max-width: 100%; /* Ensure mobile images don't overflow */
    }

    .page-login__video-wrapper {
        margin: 30px auto;
    }
    
    /* Mobile image responsive styles */
    .page-login img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    /* Mobile video responsive styles */
    .page-login video,
    .page-login__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
}

@media (max-width: 480px) {
    .page-login__hero-section {
        height: 400px;
    }

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

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

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

    .page-login__btn-primary,
    .page-login__btn-secondary,
    .page-login__btn-submit {
        padding: 12px 20px;
        font-size: 1em;
    }
    
    .page-login__faq-question {
        padding: 15px 20px;
    }

    .page-login__faq-title {
        font-size: 1.1em;
    }

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

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

/* Color contrast enforcement (assuming default light body background) */
.page-login__dark-section {
    background-color: #017439;
    color: #ffffff;
}

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

/* Ensure all text in main content area is readable */
.page-login p,
.page-login li,
.page-login label {
    color: #333333; /* Default for light backgrounds */
}

/* Override for dark sections */
.page-login__dark-section p,
.page-login__dark-section li,
.page-login__dark-section label {
    color: #ffffff;
}