/* style/login.css */

/* --- General Page Styles --- */
.page-login {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background */
    background-color: #ffffff; /* Assuming body background is white from shared.css var(--secondary-color) */
}

/* --- 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 space for fixed header */
    background: linear-gradient(135deg, #e0ffe0, #ffffff); /* Lighter gradient for hero background */
}

.page-login__hero-container {
    display: flex;
    flex-direction: row; /* Desktop: side-by-side */
    align-items: center;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    gap: 40px;
}

.page-login__hero-content {
    flex: 1;
    text-align: left;
}

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

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

.page-login__login-form-wrapper {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
    margin-top: 20px;
    margin-left: auto; /* Center form on larger screens when image is present */
    margin-right: auto;
}

.page-login__login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.page-login__form-group {
    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 15px;
    border: 1px solid #cccccc;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
}

.page-login__form-input::placeholder {
    color: #aaaaaa;
}

.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;
    color: #555555;
}

.page-login__remember-me input {
    margin-right: 8px;
}

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

.page-login__forgot-password:hover {
    color: #005a2e;
}

.page-login__login-button {
    background: #C30808; /* Login color */
    color: #FFFF00; /* 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, transform 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.page-login__login-button:hover {
    background: #a30606;
    transform: translateY(-2px);
}

.page-login__no-account {
    text-align: center;
    margin-top: 20px;
    color: #555555;
}

.page-login__register-button {
    display: block;
    background: #C30808; /* Register color */
    color: #FFFF00; /* Register 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, transform 0.3s ease;
    text-decoration: none;
    text-align: center;
    margin-top: 15px;
    width: 100%;
    box-sizing: border-box;
}

.page-login__register-button:hover {
    background: #a30606;
    transform: translateY(-2px);
}

.page-login__hero-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-login__hero-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* --- Features Section --- */
.page-login__features-section {
    padding: 80px 20px;
    text-align: center;
    background-color: #f9f9f9; /* Light background for contrast */
}

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

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

.page-login__features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.page-login__feature-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-login__feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-login__feature-icon {
    width: 250px; /* Min 200x200px */
    height: 187.5px; /* Maintain 4:3 aspect ratio for 250x187.5 */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

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

/* --- CTA Section --- */
.page-login__cta-section {
    background: #017439; /* Primary brand color for dark background */
    color: #ffffff; /* White text for contrast */
    padding: 80px 20px;
    text-align: center;
}

.page-login__cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.page-login__cta-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #ffffff;
}

.page-login__cta-description {
    font-size: 1.1em;
    margin-bottom: 40px;
    color: #f0f0f0;
}

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

.page-login__btn-primary,
.page-login__btn-secondary {
    padding: 15px 35px;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 300px; /* Limit button width for desktop */
    width: 100%; /* Ensure buttons take full width on mobile */
}

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

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

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

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

/* --- FAQ Section --- */
.page-login__faq-section {
    padding: 80px 20px;
    text-align: center;
    background-color: #f9f9f9;
}

.page-login__faq-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

.page-login__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    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: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-login__faq-item.active .page-login__faq-question {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: #017439;
    background-color: #e0ffe0;
}

.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: 1.1em;
    font-weight: 600;
    line-height: 1.5;
    color: #333333;
    pointer-events: none;
}

.page-login__faq-item.active .page-login__faq-question h3 {
    color: #017439;
}

.page-login__faq-toggle {
    font-size: 2em;
    font-weight: bold;
    line-height: 1;
    color: #666;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.page-login__faq-item.active .page-login__faq-toggle {
    color: #017439;
    transform: rotate(45deg); /* Rotate for 'x' effect, or just change to '-' */
}

.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: #fdfdfd;
    border-top: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.page-login__faq-item.active .page-login__faq-answer {
    max-height: 2000px !important; /* Sufficiently large */
    padding: 20px 25px !important;
    opacity: 1;
    border-color: #017439;
}

.page-login__faq-answer p {
    margin: 0;
    color: #555555;
    font-size: 0.95em;
    line-height: 1.7;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .page-login__hero-container {
        flex-direction: column; /* Stack vertically on tablets */
        gap: 30px;
    }

    .page-login__hero-content {
        text-align: center;
    }
    
    .page-login__login-form-wrapper {
        margin-top: 30px;
        max-width: 500px;
    }

    .page-login__hero-image-container {
        order: -1; /* Image above content on tablets */
        margin-bottom: 30px;
    }

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

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

    .page-login__cta-title {
        font-size: 2.2em;
    }

    .page-login__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .page-login__btn-primary,
    .page-login__btn-secondary {
        max-width: 400px;
        margin: 0 auto;
    }
}

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

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

    .page-login__hero-description {
        font-size: 1em;
    }
    
    .page-login__login-form-wrapper {
        padding: 20px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0;
        margin-right: 0;
    }

    .page-login__login-button,
    .page-login__register-button {
        padding: 12px 20px;
        font-size: 1em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    .page-login__hero-image img,
    .page-login__feature-icon {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
        padding-left: 0; /* Images don't need padding if container handles it */
        padding-right: 0;
    }
    
    .page-login__features-section,
    .page-login__cta-section,
    .page-login__faq-section {
        padding: 40px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

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

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

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

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

    .page-login__feature-title {
        font-size: 1.3em;
    }
    
    .page-login__cta-title {
        font-size: 1.8em;
    }

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

    .page-login__cta-buttons {
        gap: 10px;
        padding-left: 0;
        padding-right: 0;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-login__btn-primary,
    .page-login__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 15px;
        font-size: 1em;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin: 0; /* Remove auto margin to ensure full width */
    }

    .page-login__faq-question {
        padding: 15px 20px;
    }

    .page-login__faq-question h3 {
        font-size: 1em;
    }

    .page-login__faq-toggle {
        font-size: 1.8em;
        width: 25px;
        height: 25px;
    }

    .page-login__faq-answer {
        padding: 0 20px;
    }
    
    .page-login__faq-item.active .page-login__faq-answer {
        padding: 15px 20px !important;
    }
}