/* style/login.css */

/* Base Styles for page-login */
.page-login {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: var(--dark-bg-1); /* Inherited from shared.css */
}

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

/* Hero Section */
.page-login__hero-section {
    position: relative;
    padding: 80px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    background-color: #017439; /* Brand color for hero */
    color: #ffffff;
    padding-top: var(--header-offset, 120px); /* Ensure header offset */
    overflow: hidden; /* To contain image */
}

.page-login__hero-section .page-login__container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    z-index: 1;
}

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

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

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

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

.page-login__hero-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    object-fit: cover;
}

/* Buttons */
.page-login__btn-primary,
.page-login__btn-submit {
    display: inline-block;
    background-color: #C30808; /* Custom login/register color */
    color: #FFFF00; /* Custom login/register font color */
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
    max-width: 100%; /* For mobile responsiveness */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-login__btn-primary:hover,
.page-login__btn-submit:hover {
    background-color: #a00606;
    transform: translateY(-2px);
}

/* Form Section */
.page-login__form-section {
    background-color: #ffffff; /* Light background for form */
    padding: 60px 0;
    color: #333333; /* Dark text for light background */
}

.page-login__login-card {
    background-color: #f9f9f9;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    border: 1px solid #e0e0e0; /* Added for contrast */
}

.page-login__card-title {
    font-size: 2em;
    margin-bottom: 30px;
    color: #017439; /* Brand color for title */
}

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

.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 #ccc;
    border-radius: 6px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.page-login__form-input:focus {
    border-color: #017439;
    outline: none;
}

.page-login__form-options {
    display: flex;
    justify-content: flex-end;
    margin-top: -10px;
}

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

.page-login__forgot-password:hover,
.page-login__register-link:hover {
    color: #005f2e;
    text-decoration: underline;
}

.page-login__register-text {
    margin-top: 25px;
    font-size: 1em;
    color: #555555;
}

/* Section Illustrations */
.page-login__section-illustration {
    width: 100%;
    height: auto;
    max-width: 800px;
    margin: 30px auto 50px auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

/* Benefits Section */
.page-login__benefits-section {
    background-color: #017439; /* Brand color */
    padding: 80px 0;
    color: #ffffff;
}

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

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

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

.page-login__benefit-item {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-login__benefit-item:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.15);
}

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

.page-login__benefit-text {
    font-size: 1em;
    color: #f0f0f0;
}

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

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

.page-login__step-item {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #017439;
}

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

.page-login__step-text {
    font-size: 1em;
    color: #555555;
}

.page-login__step-text a {
    color: #017439;
    text-decoration: none;
}

.page-login__step-text a:hover {
    text-decoration: underline;
}

.page-login__troubleshooting {
    margin-top: 60px;
    background-color: #fff8e1;
    border-left: 5px solid #ffc107;
    padding: 30px;
    border-radius: 8px;
}

.page-login__troubleshooting-title {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #333333;
}

.page-login__troubleshooting-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-login__troubleshooting-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    font-size: 1.05em;
    color: #555555;
}

.page-login__list-icon {
    color: #017439;
    font-weight: bold;
    margin-right: 10px;
    font-size: 1.2em;
}

/* Why Choose Section */
.page-login__why-choose-section {
    background-color: #017439;
    padding: 80px 0;
    color: #ffffff;
}

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

.page-login__feature-item {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-login__feature-item:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.15);
}

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

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

.page-login__feature-text a {
    color: #FFFF00; /* Yellow for links on dark background */
    text-decoration: none;
}

.page-login__feature-text a:hover {
    text-decoration: underline;
}

/* FAQ Section */
.page-login__faq-section {
    background-color: #ffffff;
    padding: 80px 0;
    color: #333333;
}

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

.page-login__faq-item {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.page-login__faq-item:hover {
    background-color: #f2f2f2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.page-login__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    color: #333333;
    transition: color 0.3s ease;
}

.page-login__faq-question:hover {
    color: #017439;
}

.page-login__faq-title {
    margin: 0;
    font-size: 1.2em; /* Adjusted for h3 in FAQ */
    color: inherit;
}

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

.page-login__faq-item.active .page-login__faq-toggle {
    transform: rotate(45deg); /* Change + to X or - */
}

.page-login__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #555555;
}

.page-login__faq-item.active .page-login__faq-answer {
    max-height: 1000px !important; /* Ensure it expands */
    padding: 15px 25px 25px 25px;
}

.page-login__faq-answer p {
    margin: 0;
    font-size: 1em;
    color: #555555;
}

.page-login__faq-answer a {
    color: #017439;
    text-decoration: none;
}

.page-login__faq-answer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-login__main-title {
        font-size: 2.8em;
    }
    .page-login__section-title {
        font-size: 2.2em;
    }
    .page-login__hero-section .page-login__container {
        flex-direction: column;
        text-align: center;
    }
    .page-login__hero-content {
        max-width: 100%;
    }
    .page-login__hero-image-wrapper {
        order: -1; /* Image above text on smaller screens */
        margin-bottom: 30px;
    }
    .page-login__section-illustration {
        max-width: 100%;
    }
}

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

    .page-login__container {
        padding: 0 15px;
    }

    .page-login__hero-section {
        padding: 60px 0;
        min-height: auto;
        padding-top: var(--header-offset, 120px) !important;
    }

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

    .page-login__hero-description {
        font-size: 1em;
        margin-bottom: 25px;
    }

    .page-login__btn-primary,
    .page-login__btn-submit {
        padding: 12px 20px;
        font-size: 1em;
        width: 100% !important; /* Mobile button full width */
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-login__form-section,
    .page-login__benefits-section,
    .page-login__guide-section,
    .page-login__why-choose-section,
    .page-login__faq-section {
        padding: 40px 0;
    }

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

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

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

    .page-login__card-title {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    .page-login__benefit-item,
    .page-login__step-item,
    .page-login__feature-item {
        padding: 25px;
    }

    .page-login__benefit-title,
    .page-login__step-title,
    .page-login__feature-title {
        font-size: 1.3em;
    }

    .page-login__troubleshooting {
        padding: 20px;
    }

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

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

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

    /* Images responsiveness for mobile */
    .page-login img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-login__section,
    .page-login__card,
    .page-login__container,
    .page-login__hero-section,
    .page-login__form-section,
    .page-login__benefits-section,
    .page-login__guide-section,
    .page-login__why-choose-section,
    .page-login__faq-section,
    .page-login__hero-image-wrapper,
    .page-login__login-card,
    .page-login__benefits-grid,
    .page-login__guide-steps,
    .page-login__features-grid,
    .page-login__faq-list {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      overflow: hidden !important; /* Prevent horizontal scroll */
    }
}

@media (max-width: 480px) {
    .page-login__main-title {
        font-size: 1.8em;
    }
    .page-login__section-title {
        font-size: 1.6em;
    }
    .page-login__card-title {
        font-size: 1.6em;
    }
    .page-login__benefits-grid,
    .page-login__guide-steps,
    .page-login__features-grid {
        grid-template-columns: 1fr;
    }
}

/* Color Contrast Safeguards */
.page-login__dark-bg {
  color: #ffffff; /* Deep background, light text */
  background: #017439;
}

.page-login__light-bg {
  color: #333333; /* Light background, dark text */
  background: #ffffff;
}

/* Ensure link color contrast */
.page-login a {
    color: #017439; /* Default link color for light sections */
}
.page-login__dark-bg a {
    color: #FFFF00; /* Yellow for links on dark background */
}

/* Form input placeholder color */
.page-login__form-input::placeholder {
    color: #888888;
    opacity: 1; /* Firefox fix */
}