:root {
    --primary-color: #11A84E;
    --secondary-color: #22C768;
    --btn-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --card-bg: #11271B;
    --page-bg: #08160F;
    --text-main: #F2FFF6;
    --text-secondary: #A7D9B8;
    --border-color: #2E7A4E;
    --glow-color: #57E38D;
    --gold-color: #F2C14E;
    --divider-color: #1E3A2A;
    --deep-green: #0A4B2C;

    /* Default text for light/dark body backgrounds */
    --body-text-color: var(--text-main); /* Since page-bg is dark */
    --body-link-color: var(--gold-color);
}

/* Base styles for the login page, ensuring contrast with dark body background */
.page-login {
    font-family: 'Arial', sans-serif;
    color: var(--body-text-color); /* Light text on dark body background */
    background-color: var(--page-bg); /* Explicitly set page background to match body or be consistent */
    line-height: 1.6;
    padding-bottom: 50px; /* Ensure space above footer */
}

.page-login a {
    color: var(--body-link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-login a:hover {
    color: var(--glow-color);
    text-decoration: underline;
}

/* Section styling */
.page-login__hero-section,
.page-login__benefits-section,
.page-login__guide-section,
.page-login__troubleshooting-section,
.page-login__security-section,
.page-login__cta-section,
.page-login__faq-section {
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Specific section backgrounds based on custom colors */
.page-login__hero-section,
.page-login__guide-section,
.page-login__security-section,
.page-login__faq-section {
    background-color: var(--page-bg);
    color: var(--text-main);
}

.page-login__benefits-section,
.page-login__troubleshooting-section,
.page-login__cta-section {
    background-color: #ffffff; /* Light background for contrast sections */
    color: #333333; /* Dark text for light background */
}

.page-login__benefits-section p,
.page-login__troubleshooting-section p,
.page-login__cta-section p,
.page-login__benefits-section h2,
.page-login__troubleshooting-section h2,
.page-login__cta-section h2,
.page-login__benefits-section h3,
.page-login__troubleshooting-section h3,
.page-login__cta-section h3 {
    color: #333333; /* Ensure dark text on light background */
}

.page-login__benefits-section a,
.page-login__troubleshooting-section a,
.page-login__cta-section a {
    color: var(--primary-color); /* Link color on light background */
}


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

/* Hero Section */
.page-login__hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 80px;
}

.page-login__hero-image-wrapper {
    width: 100%;
    max-height: 70vh;
    overflow: hidden;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.page-login__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 70vh;
}

.page-login__hero-content {
    width: 100%;
    max-width: 800px;
    background-color: var(--card-bg); /* Dark background for form area */
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    z-index: 2;
    margin-top: -100px; /* Overlap slightly with image for visual flow */
    position: relative;
    border: 1px solid var(--border-color);
}

.page-login__main-title {
    font-size: clamp(2.2rem, 4vw, 3rem); /* H1 font size with clamp */
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--gold-color);
    line-height: 1.2;
}

.page-login__description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.page-login__form-title {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 25px;
}

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

.page-login__form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 1rem;
}

.page-login__form-input {
    width: calc(100% - 20px);
    padding: 12px 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--deep-green);
    color: var(--text-main);
    font-size: 1rem;
}

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

.page-login__form-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

/* Button styles */
.page-login__btn-primary,
.page-login__btn-secondary {
    display: block;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-login__btn-primary {
    background: var(--btn-gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.page-login__btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.page-login__btn-secondary:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

.page-login__forgot-password {
    display: block;
    margin-top: 15px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.page-login__forgot-password:hover {
    color: var(--glow-color);
}

/* General section titles */
.page-login__section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 30px;
    color: inherit; /* Inherit color from section for contrast */
}

.page-login__text-block {
    font-size: 1.05rem;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: inherit;
}

/* Benefits Section */
.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); /* Dark card background */
    color: var(--text-main); /* Light text on dark card */
    padding: 30px;
    border-radius: 10px;
    text-align: left;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

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

.page-login__card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--gold-color);
}

.page-login__card-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Guide Section */
.page-login__guide-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.page-login__guide-item {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    text-align: left;
    border: 1px solid var(--border-color);
}

.page-login__guide-step-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--gold-color);
}

.page-login__guide-step-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Troubleshooting Section */
.page-login__troubleshooting-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.page-login__troubleshooting-item {
    background-color: #f8f8f8; /* Lighter background for troubleshooting cards */
    color: #333333;
    padding: 30px;
    border-radius: 10px;
    text-align: left;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-login__troubleshooting-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.page-login__troubleshooting-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #555555;
}

/* Security Section */
.page-login__security-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.page-login__security-item {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.page-login__security-icon {
    width: 80px; /* Adjust size to be content image, not tiny icon */
    height: 80px;
    object-fit: contain;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.page-login__security-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--gold-color);
}

.page-login__security-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* CTA Buttons */
.page-login__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 50px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

/* FAQ Section */
.page-login__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.page-login__faq-item {
    background-color: var(--card-bg);
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.page-login__faq-item summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    background-color: var(--deep-green);
    border-bottom: 1px solid var(--divider-color);
    transition: background-color 0.3s ease;
}

.page-login__faq-item summary:hover {
    background-color: var(--primary-color);
}

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

.page-login__faq-qtext {
    flex-grow: 1;
    color: var(--text-main);
}

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

.page-login__faq-item[open] .page-login__faq-toggle {
    transform: rotate(45deg); /* Rotate plus to become cross */
}

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

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-login__hero-content {
        margin-top: -60px;
        padding: 30px;
    }
    .page-login__main-title {
        font-size: clamp(2rem, 4.5vw, 2.8rem);
    }
    .page-login__section-title {
        font-size: clamp(1.6rem, 3.8vw, 2.5rem);
    }
}

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

    .page-login__hero-section,
    .page-login__benefits-section,
    .page-login__guide-section,
    .page-login__troubleshooting-section,
    .page-login__security-section,
    .page-login__cta-section,
    .page-login__faq-section {
        padding: 40px 0;
    }

    .page-login__container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-login__hero-image-wrapper {
        margin-bottom: 20px;
    }
    
    .page-login__hero-content {
        margin-top: -40px;
        padding: 25px;
        width: calc(100% - 30px); /* Account for container padding */
        max-width: none;
    }

    .page-login__main-title {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .page-login__description {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .page-login__form-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }

    .page-login__form-input {
        width: calc(100% - 20px);
        padding: 10px;
    }

    .page-login__form-actions {
        gap: 10px;
        margin-top: 20px;
        flex-direction: column;
    }
    
    .page-login__btn-primary,
    .page-login__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 15px;
    }

    .page-login__section-title {
        font-size: 2rem;
        margin-bottom: 25px;
    }

    .page-login__text-block {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .page-login__benefits-grid,
    .page-login__guide-list,
    .page-login__troubleshooting-list,
    .page-login__security-list {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 20px;
    }

    .page-login__card-image {
        height: 180px;
    }
    
    .page-login__cta-buttons {
        flex-direction: column;
        gap: 15px;
        margin-top: 40px;
    }
    
    .page-login__faq-item summary {
        padding: 15px 20px;
        font-size: 1rem;
    }

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

    /* Mobile image responsive rules */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-login__hero-section,
    .page-login__benefits-section,
    .page-login__guide-section,
    .page-login__troubleshooting-section,
    .page-login__security-section,
    .page-login__cta-section,
    .page-login__faq-section,
    .page-login__card,
    .page-login__container,
    .page-login__login-form-container,
    .page-login__form,
    .page-login__benefits-grid,
    .page-login__guide-list,
    .page-login__troubleshooting-list,
    .page-login__security-list,
    .page-login__cta-buttons,
    .page-login__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important; /* Ensure no horizontal scroll */
    }
    
    .page-login__hero-section {
        padding-top: 10px !important; /* body already handles --header-offset */
    }
}