:root {
    --primary-color: #11A84E;
    --secondary-color: #22C768;
    
    --button: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --card-bg: #11271B;
    --background: #08160F;
    --text-main: #F2FFF6;
    --text-secondary: #A7D9B8;
    --border: #2E7A4E;
    --glow: #57E38D;
    --glow-rgb: 87, 227, 141; /* RGB for glow for rgba() use */
    --gold: #F2C14E;
    --divider: #1E3A2A;
    --deep-green: #0A4B2C;
}

/* --- General Page Styling --- */
.page-login {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main); /* Default text color for the page, adapting to dark body background */
    background-color: var(--background); /* This will be #08160F from custom colors */
}

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

.page-login__section-title {
    font-size: 2.5em;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

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

/* --- Hero Section --- */
.page-login__hero-section {
    position: relative;
    display: flex;
    flex-direction: column; /* Default to column for mobile-first, desktop will change */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    overflow: hidden;
    background-color: var(--background); /* Ensure consistency with body background */
}

.page-login__hero-image-wrapper {
    width: 100%;
    max-width: 100%; /* Ensure it doesn't overflow */
    margin-top: 30px; /* Space between content and image */
    order: 2; /* Image after content on mobile */
}

.page-login__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    min-height: 200px; /* Minimum size requirement */
}

.page-login__hero-content {
    order: 1; /* Content before image on mobile */
    max-width: 800px;
    z-index: 1;
    position: relative;
}

.page-login__main-title {
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin-bottom: 20px;
    font-size: clamp(2em, 5vw, 3.5em); /* Responsive font size for H1 */
}

.page-login__hero-description {
    font-size: 1.2em;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.page-login__cta-buttons {
    display: flex;
    flex-direction: column; /* Default to column for mobile */
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.page-login__btn-primary,
.page-login__btn-secondary,
.page-login__submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-sizing: border-box; /* Ensure padding/border are included in width */
    max-width: 100%; /* Important for responsiveness */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow long words to break */
}

.page-login__btn-primary,
.page-login__submit-button {
    background: var(--button); /* Custom button gradient */
    color: #ffffff; /* White text on dark gradient */
}

.page-login__btn-primary:hover,
.page-login__submit-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.page-login__btn-secondary {
    background: transparent;
    color: var(--glow); /* Text color for secondary button */
    border: 2px solid var(--border); /* Border color */
}

.page-login__btn-secondary:hover {
    background: rgba(var(--glow-rgb), 0.1); /* Slight background on hover */
    transform: translateY(-2px);
}

/* --- Login Form Section --- */
.page-login__login-form-section {
    padding: 80px 0;
    background-color: var(--background);
}

.page-login__login-form {
    background-color: var(--card-bg); /* Custom card background */
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    margin: 40px auto 0 auto;
    box-sizing: border-box;
}

.page-login__form-group {
    margin-bottom: 25px;
}

.page-login__form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--text-main);
    font-size: 0.95em;
}

.page-login__form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: var(--background); /* Input background matching page background */
    color: var(--text-main);
    font-size: 1em;
    box-sizing: border-box;
}

.page-login__form-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.page-login__form-input:focus {
    outline: none;
    border-color: var(--glow);
    box-shadow: 0 0 0 2px rgba(var(--glow-rgb), 0.3);
}

.page-login__form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 0.9em;
}

.page-login__remember-me {
    display: flex;
    align-items: center;
}

.page-login__checkbox {
    margin-right: 8px;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    background-color: var(--background);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-login__checkbox:checked {
    background-color: var(--deep-green); /* Use a darker green when checked */
    border-color: var(--deep-green);
}

.page-login__checkbox:checked::before {
    content: '✔';
    color: #ffffff;
    font-size: 14px;
    line-height: 1;
}

.page-login__checkbox-label {
    color: var(--text-secondary);
    cursor: pointer;
}

.page-login__forgot-password {
    color: var(--glow); /* Use glow color for links */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-login__forgot-password:hover {
    color: var(--gold); /* Gold on hover */
    text-decoration: underline;
}

.page-login__register-prompt {
    text-align: center;
    margin-top: 30px;
    color: var(--text-secondary);
    font-size: 1em;
}

.page-login__register-link {
    color: var(--glow);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-login__register-link:hover {
    color: var(--gold);
    text-decoration: underline;
}

/* --- Benefits Section --- */
.page-login__benefits-section {
    padding: 80px 0;
    background-color: var(--deep-green); /* Using a custom deep green for contrast */
}

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

.page-login__benefit-card {
    background-color: var(--card-bg); /* Custom card background */
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 350px; /* Ensure cards have a minimum height */
}

.page-login__benefit-icon {
    width: 100%; /* Ensure image fills card width responsively */
    max-width: 250px; /* Max width for icons */
    height: auto;
    object-fit: contain;
    margin-bottom: 20px;
    min-height: 200px; /* Minimum size requirement */
}

.page-login__benefit-title {
    font-size: 1.4em;
    color: var(--text-main);
    margin-bottom: 15px;
    font-weight: bold;
}

.page-login__benefit-text {
    color: var(--text-secondary);
    font-size: 0.95em;
}

/* --- Security Info Section --- */
.page-login__security-info-section {
    padding: 80px 0;
    background-color: var(--background);
}

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

.page-login__security-item {
    background-color: var(--card-bg); /* Custom card background */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-login__security-title {
    font-size: 1.3em;
    color: var(--text-main);
    margin-bottom: 10px;
    font-weight: bold;
}

.page-login__security-text {
    color: var(--text-secondary);
    font-size: 0.95em;
}

.page-login__security-callout {
    text-align: center;
    margin-top: 50px;
    font-size: 1.1em;
    color: var(--glow);
    font-weight: bold;
}

/* --- FAQ Section --- */
.page-login__faq-section {
    padding: 80px 0;
    background-color: var(--deep-green); /* Using a custom deep green for contrast */
}

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

.page-login__faq-item {
    background-color: var(--card-bg); /* Custom card background */
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: var(--text-main);
}

.page-login__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15em;
    font-weight: bold;
    cursor: pointer;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--divider);
    color: var(--text-main);
    list-style: none; /* For <summary> tag */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.page-login__faq-question::-webkit-details-marker {
    display: none;
}

.page-login__faq-qtext {
    flex-grow: 1;
}

.page-login__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: var(--glow);
    transition: transform 0.3s ease;
}

.page-login__faq-item[open] .page-login__faq-toggle {
    transform: rotate(45deg);
}

.page-login__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1em;
    color: var(--text-secondary);
    line-height: 1.7;
}

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


/* --- CTA Section (Bottom) --- */
.page-login__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--background);
}

/* --- Responsive Adjustments --- */
@media (min-width: 769px) {
    .page-login__hero-section {
        flex-direction: row; /* Desktop: row layout for hero */
        text-align: left;
        padding: 80px 20px;
    }

    .page-login__hero-content {
        flex: 1;
        padding-right: 40px;
        order: 1;
    }
    
    .page-login__hero-image-wrapper {
        flex: 1;
        margin-top: 0;
        order: 2;
    }

    .page-login__cta-buttons {
        flex-direction: row; /* Desktop: row layout for CTA buttons */
        gap: 20px;
        justify-content: flex-start;
    }

    .page-login__section-title {
        font-size: 3em;
    }
    
    .page-login__main-title {
        font-size: clamp(3em, 4vw, 4.5em); /* Larger H1 on desktop */
    }
}

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

    .page-login__container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-login__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important; /* body already handles --header-offset */
    }

    .page-login__hero-content {
        padding-right: 0;
    }

    .page-login__main-title {
        font-size: clamp(2em, 8vw, 2.8em); /* Adjusted clamp for mobile */
    }

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

    .page-login__cta-buttons {
        flex-direction: column; /* Ensure buttons stack on mobile */
        gap: 10px;
        width: 100%;
    }
    
    .page-login__btn-primary,
    .page-login__btn-secondary,
    .page-login__submit-button,
    .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__login-form {
        padding: 30px 20px;
        margin-top: 20px;
    }

    .page-login__section-title {
        font-size: 2em;
        margin-bottom: 15px;
    }

    .page-login__section-description {
        font-size: 0.9em;
        margin-bottom: 25px;
    }

    .page-login__benefits-section,
    .page-login__security-info-section,
    .page-login__faq-section,
    .page-login__cta-section {
        padding: 50px 0;
    }

    .page-login__benefits-grid,
    .page-login__security-grid {
        grid-template-columns: 1fr; /* Stack cards on mobile */
        gap: 20px;
    }

    .page-login__benefit-card,
    .page-login__security-item {
        padding: 25px;
    }

    .page-login__faq-list {
        margin-top: 20px;
    }

    .page-login__faq-question {
        padding: 15px 20px;
        font-size: 1em;
    }

    .page-login__faq-answer {
        padding: 0 20px 15px 20px;
        font-size: 0.9em;
    }

    /* Image responsive rules */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-login__hero-image-wrapper,
    .page-login__benefits-grid,
    .page-login__security-grid,
    .page-login__login-form-section,
    .page-login__benefits-section,
    .page-login__security-info-section,
    .page-login__faq-section,
    .page-login__cta-section,
    .page-login__login-form,
    .page-login__benefit-card,
    .page-login__security-item,
    .page-login__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important; /* Prevent content overflow */
    }
}