/* style/login.css */

/* Custom Properties based on provided color scheme */
:root {
    --primary-color: #11A84E;
    --secondary-color: #22C768;
    --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --card-bg: #11271B; /* Darker background for cards/sections */
    --bg-color-page: #08160F; /* Main page background */
    --text-main: #F2FFF6; /* Light text for dark backgrounds */
    --text-secondary: #A7D9B8; /* Secondary light text */
    --border-color: #2E7A4E;
    --glow-color: #57E38D;
    --gold-color: #F2C14E;
    --divider-color: #1E3A2A;
    --deep-green: #0A4B2C;
}

/* Global styles for the page content, scoped to .page-login */
.page-login {
    background-color: var(--bg-color-page); /* Main page background */
    color: var(--text-main); /* Default text color for the page */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    font-size: 16px;
}

.page-login a {
    color: var(--secondary-color);
    text-decoration: none;
}

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

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

.page-login__section-padding {
    padding: 80px 0;
}

.page-login__section-title {
    font-size: 3em;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    line-height: 1.2;
}

.page-login__section-title--light {
    color: var(--text-main);
}

.page-login__sub-title {
    font-size: 1.8em;
    color: var(--secondary-color);
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-login__text-center {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.page-login__text-center--light {
    color: var(--text-secondary);
}

/* Buttons */
.page-login__btn-primary,
.page-login__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow long words to break */
    max-width: 100%; /* Ensure button doesn't overflow */
}

.page-login__btn-primary {
    background: var(--button-gradient);
    color: var(--text-main); /* White text on dark button */
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-login__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

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

.page-login__btn-secondary:hover {
    background: var(--secondary-color);
    color: var(--bg-color-page); /* Dark text on light button */
}

.page-login__large-button {
    padding: 18px 35px;
    font-size: 1.1em;
}

/* Images */
.page-login img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Hero Section */
.page-login__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--bg-color-page);
    color: var(--text-main);
    overflow: hidden; /* Ensure content doesn't overflow */
}

.page-login__hero-image-wrapper {
    width: 100%;
    max-height: 700px; /* Limit height for hero image */
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.page-login__hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0;
}

.page-login__hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin-top: -150px; /* Pull content up over the image slightly */
    padding: 40px;
    background: var(--card-bg); /* Dark card background */
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
    margin-bottom: 60px;
    border: 1px solid var(--border-color);
}

.page-login__main-title {
    font-size: clamp(2.5em, 4vw, 3.5em); /* Responsive font size */
    color: var(--gold-color);
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

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

.page-login__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.page-login__form-group {
    text-align: left;
}

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

.page-login__form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--deep-green); /* Darker input 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(--secondary-color);
    box-shadow: 0 0 0 3px rgba(34, 199, 104, 0.3); /* Glow effect */
}

.page-login__form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95em;
}

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

.page-login__checkbox {
    margin-right: 8px;
}

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

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

.page-login__login-button {
    width: 100%;
    margin-top: 10px;
}

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

.page-login__register-link {
    color: var(--glow-color);
    font-weight: bold;
}

/* Grid Layouts */
.page-login__grid-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.page-login__grid-two-columns--reversed {
    grid-template-areas: "image content";
}

.page-login__grid-two-columns--reversed .page-login__image-block {
    grid-area: image;
}

.page-login__grid-two-columns--reversed .page-login__content-block {
    grid-area: content;
}

.page-login__content-block p {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.page-login__content-block--light-text p {
    color: var(--text-secondary);
}

/* Dark Section styling */
.page-login__dark-section {
    background-color: var(--card-bg); /* Use card background for dark sections */
    color: var(--text-main);
}

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

.page-login__troubleshoot-item {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-login__troubleshoot-title {
    font-size: 1.5em;
    color: var(--gold-color);
    margin-bottom: 15px;
    font-weight: bold;
}

.page-login__troubleshoot-item p {
    color: var(--text-secondary);
}

.page-login__cta-center {
    text-align: center;
    margin-top: 50px;
}

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

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

.page-login__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    background-color: var(--deep-green); /* Slightly different background for question */
    color: var(--text-main);
    user-select: none;
    transition: background-color 0.3s ease;
    list-style: none; /* For details/summary */
}

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

.page-login__faq-question:hover {
    background-color: var(--border-color);
}

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

.page-login__faq-toggle {
    font-size: 1.5em;
    margin-left: 15px;
    color: var(--glow-color);
}

.page-login__faq-item[open] .page-login__faq-toggle {
    content: "−"; /* Change to minus when open */
}

.page-login__faq-answer {
    padding: 20px 25px;
    border-top: 1px solid var(--divider-color);
    color: var(--text-secondary);
    font-size: 1em;
}

/* Call to Action Section */
.page-login__cta-section {
    text-align: center;
    padding: 100px 0;
    position: relative;
}

.page-login__cta-container {
    position: relative;
    z-index: 2;
}

.page-login__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    width: 100%; /* Ensure container takes full width for wrapping */
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-login__cta-image-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    opacity: 0.2;
}

.page-login__cta-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5); /* Darken background image for text contrast */
    border-radius: 0;
}


/* Responsive styles */
@media (max-width: 992px) {
    .page-login__hero-content {
        margin-top: -100px;
        padding: 30px;
    }

    .page-login__main-title {
        font-size: clamp(2em, 5vw, 3em);
    }

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

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

    .page-login__grid-two-columns--reversed {
        grid-template-areas: unset; /* Reset grid area for single column */
    }

    .page-login__grid-two-columns .page-login__image-block {
        order: -1; /* Image appears before text on mobile */
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .page-login__hero-content {
        margin-top: -80px;
        padding: 20px;
    }

    .page-login__main-title {
        font-size: clamp(1.8em, 6vw, 2.5em);
    }

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

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

    .page-login__section-padding {
        padding: 60px 0;
    }

    .page-login__container {
        padding: 0 15px; /* Add side padding for mobile */
    }

    /* Force full width and auto height for images */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    /* Ensure containers for images/videos/buttons are responsive */
    .page-login__section,
    .page-login__card,
    .page-login__container,
    .page-login__cta-buttons,
    .page-login__form {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

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

    /* Buttons responsive */
    .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; /* Add padding to buttons themselves */
        padding-right: 15px;
    }

    .page-login__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
    }

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

    .page-login__forgot-password {
        margin-left: 0;
    }

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