/* style/login.css */

/* --- Base Styles & Variables (Scoped to page-login) --- */
.page-login {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: transparent; /* Body background is handled by shared.css */
}

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

.page-login__container--narrow {
    max-width: 900px;
}

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

.page-login__sub-section-title {
    font-size: 1.8em;
    color: #ffffff;
    text-align: center;
    margin-top: 50px;
    margin-bottom: 30px;
}

.page-login__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px auto;
    color: rgba(255, 255, 255, 0.9);
}

.page-login__highlight {
    color: #FFFF00; /* Highlight color for keywords */
    font-weight: bold;
}

/* --- Hero Section --- */
.page-login__hero-section {
    position: relative;
    padding: 100px 0;
    text-align: center;
    overflow: hidden;
    background-color: #017439; /* Use brand color for hero background */
    padding-top: var(--header-offset, 120px); /* Ensure space below fixed header */
}

.page-login__hero-section .page-login__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

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

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

.page-login__intro-text {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

.page-login__login-card {
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent dark background */
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    flex: 1;
    min-width: 350px;
    max-width: 450px;
    margin-left: auto; /* Push to right on larger screens */
    text-align: center;
}

.page-login__card-title {
    font-size: 2em;
    color: #ffffff;
    margin-bottom: 30px;
    font-weight: bold;
}

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

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

.page-login__form-input {
    width: 100%;
    padding: 15px;
    border: 1px solid #017439;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1em;
    box-sizing: border-box;
}

.page-login__form-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.page-login__form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

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

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

.page-login__btn-login {
    background-color: #C30808; /* Login button color */
    color: #FFFF00; /* Login button font color */
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none; /* Make it look like a button, but it's a submit */
    box-sizing: border-box;
}

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

.page-login__register-prompt {
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1em;
}

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

.page-login__btn-register-text:hover {
    color: #ffffff;
}

.page-login__hero-image-wrapper {
    flex: 1;
    min-width: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-login__hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: block; /* Ensure no extra space below image */
}

/* --- Why Choose Section --- */
.page-login__why-choose-section {
    padding: 80px 0;
    background-color: #1a1a2e; /* Dark background for content sections */
    text-align: center;
}

.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: rgba(255, 255, 255, 0.05); /* Lighter background for cards */
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

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

.page-login__feature-icon {
    width: 100%; /* Ensure large images */
    height: auto;
    max-height: 250px; /* Limit height for consistency */
    object-fit: cover;
    margin-bottom: 20px;
    border-radius: 8px;
    display: block;
}

.page-login__feature-title {
    font-size: 1.5em;
    color: #FFFF00; /* Highlight title color */
    margin-bottom: 15px;
    font-weight: bold;
}

.page-login__feature-text {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.8);
}

/* --- Guide Section --- */
.page-login__guide-section {
    padding: 80px 0;
    background-color: #0d0d1a; /* Slightly darker background */
}

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

.page-login__step-item {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-login__step-title {
    font-size: 1.4em;
    color: #FFFF00;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-login__step-text {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.8);
}

.page-login__troubleshooting-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-login__troubleshooting-list .page-login__list-item {
    background-color: rgba(255, 255, 255, 0.03);
    padding: 15px 20px;
    border-left: 4px solid #017439;
    margin-bottom: 10px;
    border-radius: 5px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1em;
}

.page-login__troubleshooting-list .page-login__list-item strong {
    color: #FFFF00;
}

/* --- Security Section --- */
.page-login__security-section {
    padding: 80px 0;
    background-color: #1a1a2e;
}

.page-login__container--reverse {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

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

.page-login__security-features-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.page-login__security-features-list .page-login__list-item {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
    position: relative;
    padding-left: 30px;
}

.page-login__security-features-list .page-login__list-item strong {
    color: #FFFF00;
}

.page-login__security-features-list .page-login__list-item::before {
    content: '✅';
    position: absolute;
    left: 0;
    color: #017439; /* Green checkmark */
}

.page-login__security-image-wrapper {
    flex: 1;
    min-width: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-login__security-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: block;
}

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

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

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

.page-login__faq-item summary {
    list-style: none; /* Hide default marker */
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #FFFF00;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    outline: none;
}

.page-login__faq-item summary::-webkit-details-marker {
    display: none; /* Hide default marker for webkit */
}

.page-login__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
}

.page-login__faq-item[open] .page-login__faq-toggle {
    transform: rotate(45deg); /* Rotate '+' to 'x' or similar */
}

.page-login__faq-answer {
    padding: 15px 25px 20px 25px;
    font-size: 1em;
    color: rgba(255, 255, 255, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.page-login__faq-answer a {
    color: #017439; /* Link color within FAQ answer */
    text-decoration: underline;
}

.page-login__faq-answer a:hover {
    color: #FFFF00;
}

.page-login__faq-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-top: 60px;
    display: block;
}

/* --- CTA Section --- */
.page-login__cta-section {
    padding: 80px 0;
    background-color: #017439; /* Brand green background */
    text-align: center;
}

.page-login__container--cta {
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.page-login__btn-primary,
.page-login__btn-secondary {
    padding: 18px 40px;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text wrap in buttons */
    word-wrap: break-word; /* Allow text wrap in buttons */
    max-width: 100%; /* Ensure buttons don't overflow */
}

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

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

.page-login__btn-secondary {
    background-color: transparent;
    color: #FFFF00; /* Use highlight color for secondary button text */
    border: 2px solid #FFFF00;
}

.page-login__btn-secondary:hover {
    background-color: #FFFF00;
    color: #017439; /* Dark green text on yellow hover */
}

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

    .page-login__hero-section .page-login__container {
        flex-direction: column;
        text-align: center;
    }

    .page-login__hero-content {
        text-align: center;
    }

    .page-login__login-card {
        margin: 40px auto 0 auto; /* Center the login card */
    }

    .page-login__container--reverse {
        flex-direction: column-reverse; /* Image above text on smaller screens */
    }
    
    .page-login__security-content {
        text-align: center;
    }

    .page-login__security-features-list {
        padding: 0 20px;
    }

    .page-login__security-features-list .page-login__list-item {
        padding-left: 0;
        text-align: center;
    }

    .page-login__security-features-list .page-login__list-item::before {
        position: static;
        margin-right: 10px;
    }
}

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

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

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

    .page-login__intro-text,
    .page-login__section-description,
    .page-login__feature-text,
    .page-login__step-text,
    .page-login__troubleshooting-list .page-login__list-item,
    .page-login__security-features-list .page-login__list-item,
    .page-login__faq-item summary,
    .page-login__faq-answer {
        font-size: 1em; /* Adjust font size for mobile readability */
    }
    
    .page-login__hero-content,
    .page-login__login-card,
    .page-login__hero-image-wrapper,
    .page-login__security-content,
    .page-login__security-image-wrapper,
    .page-login__faq-list,
    .page-login__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

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

    /* Buttons responsive */
    .page-login__btn-login,
    .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;
    }
    .page-login__form-actions {
        flex-direction: column;
        gap: 15px;
    }
    .page-login__forgot-password {
        order: 2; /* Move below button */
    }
    .page-login__btn-login {
        order: 1;
    }

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

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

    .page-login__feature-icon,
    .page-login__security-image,
    .page-login__faq-image {
        margin-left: auto;
        margin-right: auto;
    }
}