/* style/login.css */

/* Base styles for the login page */
.page-login {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: #f8f8f8; /* Light background for the page */
}

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

.page-login__section-title {
    font-size: 2.5em;
    color: #26A9E0; /* Brand color for titles */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

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

/* Hero Section */
.page-login__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
    background: linear-gradient(135deg, #26A9E0, #FFFFFF); /* Brand color gradient */
    color: #333333; /* Default text color for the hero section */
}

.page-login__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.page-login__hero-image-wrapper {
    width: 100%;
    max-width: 800px; /* Constrain image width for better presentation */
    margin-bottom: 30px;
}

.page-login__hero-image-wrapper img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.page-login__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 600px;
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    margin-top: -80px; /* Overlap with image slightly */
}

.page-login__main-title {
    font-size: 2.2em;
    margin-bottom: 15px;
    color: #26A9E0;
    font-weight: bold;
}

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

/* Login Form */
.page-login__login-form-wrapper {
    width: 100%;
}

.page-login__login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 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 #cccccc;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.page-login__form-input:focus {
    border-color: #26A9E0;
    outline: none;
    box-shadow: 0 0 0 3px rgba(38, 169, 224, 0.2);
}

.page-login__forgot-password-link {
    display: block;
    text-align: right;
    font-size: 0.9em;
    color: #26A9E0;
    text-decoration: none;
    margin-top: -10px;
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.page-login__forgot-password-link:hover {
    color: #1a7bb0;
    text-decoration: underline;
}

.page-login__login-button {
    display: block;
    width: 100%;
    padding: 15px 25px;
    background: #EA7C07; /* Custom color for login button */
    color: #ffffff;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-sizing: border-box;
}

.page-login__login-button:hover {
    background: #d46c06;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-login__register-prompt {
    margin-top: 20px;
    font-size: 0.95em;
    color: #555555;
}

.page-login__register-prompt p {
    margin-bottom: 10px;
}

.page-login__register-button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: #26A9E0;
    color: #ffffff;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-sizing: border-box;
}

.page-login__register-button:hover {
    background: #1a7bb0;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

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

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

.page-login__benefit-item {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.page-login__benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.page-login__benefit-item img {
    width: 100%;
    height: auto;
    max-width: 200px; /* Smaller images for benefit icons */
    margin: 0 auto 20px;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

.page-login__benefit-title {
    font-size: 1.3em;
    color: #26A9E0;
    margin-bottom: 10px;
}

.page-login__benefit-text {
    font-size: 0.95em;
    color: #555555;
}

/* Troubleshooting Section */
.page-login__troubleshooting-section {
    padding: 80px 0;
    background-color: #26A9E0; /* Dark background */
    color: #ffffff; /* Light text for dark background */
}

.page-login__dark-bg-text {
    color: #ffffff; /* Ensure text is white on dark background */
}

.page-login__troubleshoot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
    margin-bottom: 40px;
}

.page-login__troubleshoot-item {
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent white */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-login__troubleshoot-item img {
    width: 100%;
    height: auto;
    max-width: 250px; /* Adjust size for troubleshooting images */
    margin: 0 auto 20px;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

.page-login__troubleshoot-title {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.page-login__troubleshoot-text {
    font-size: 0.9em;
    opacity: 0.9;
}

/* CTA Buttons in Troubleshooting */
.page-login__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.page-login__btn-primary,
.page-login__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure responsiveness */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-login__btn-primary {
    background: #EA7C07; /* Custom login color */
    color: #ffffff;
    border: 2px solid transparent;
}

.page-login__btn-primary:hover {
    background: #d46c06;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-login__btn-secondary {
    background: #ffffff;
    color: #26A9E0;
    border: 2px solid #26A9E0;
}

.page-login__btn-secondary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.page-login__why-choose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: center;
}

.page-login__why-choose-item {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.page-login__why-choose-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.page-login__why-choose-item img {
    width: 100%;
    height: auto;
    max-width: 300px;
    margin: 0 auto 20px;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

.page-login__why-choose-title {
    font-size: 1.3em;
    color: #26A9E0;
    margin-bottom: 10px;
}

.page-login__why-choose-text {
    font-size: 0.95em;
    color: #555555;
}

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

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

.page-login__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.page-login__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-login__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.page-login__faq-question:active {
    background: #eeeeee;
}

.page-login__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.5;
    color: #333333;
    pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-login__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #26A9E0;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from blocking click event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-login__faq-item.active .page-login__faq-toggle {
    color: #EA7C07; /* Highlight toggle when active */
    transform: rotate(45deg); /* Optional: rotate for 'x' effect */
}

.page-login__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
    padding: 0 25px;
    opacity: 0;
    color: #555555;
    background: #fcfcfc;
}

.page-login__faq-item.active .page-login__faq-answer {
    max-height: 2000px !important; /* IMPORTANT: Ensure it expands fully */
    padding: 20px 25px !important;
    opacity: 1;
    background: #fcfcfc;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 8px 8px;
}

/* CTA Download Section */
.page-login__cta-download-section {
    padding: 80px 0;
    background-color: #26A9E0;
    color: #ffffff;
    text-align: center;
}

.page-login__cta-download-content {
    max-width: 800px;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-login__main-title {
        font-size: 2em;
    }
    .page-login__section-title {
        font-size: 2em;
    }
    .page-login__hero-image-wrapper {
        max-width: 600px;
    }
    .page-login__hero-content {
        max-width: 500px;
        margin-top: -60px;
    }
}

@media (max-width: 768px) {
    /* General mobile adaptations */
    .page-login__container {
        padding: 20px 15px;
    }

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

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

    /* Hero Section Mobile */
    .page-login__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Override desktop padding-top for mobile */
        padding-bottom: 40px;
    }

    .page-login__hero-image-wrapper {
        max-width: 100%;
        margin-bottom: 20px;
    }
    .page-login__hero-image-wrapper img {
        border-radius: 8px;
    }

    .page-login__hero-content {
        max-width: 100%;
        padding: 25px;
        margin-top: -40px; /* Adjust overlap */
        border-radius: 8px;
    }

    .page-login__main-title {
        font-size: 1.8em;
        margin-bottom: 10px;
    }

    .page-login__hero-description {
        font-size: 0.9em;
        margin-bottom: 20px;
    }

    .page-login__form-input {
        padding: 10px 12px;
        font-size: 0.95em;
    }

    .page-login__login-button,
    .page-login__register-button {
        padding: 12px 20px;
        font-size: 1em;
        max-width: 100% !important; /* Ensure buttons fit */
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    .page-login__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px; /* Add padding to container */
    }
    .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;
    }

    /* Grid sections mobile */
    .page-login__benefits-grid,
    .page-login__troubleshoot-grid,
    .page-login__why-choose-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-login__benefit-item,
    .page-login__troubleshoot-item,
    .page-login__why-choose-item {
        padding: 20px;
        border-radius: 8px;
    }

    .page-login__benefit-item img,
    .page-login__troubleshoot-item img,
    .page-login__why-choose-item img {
         /* Adjust image sizes for mobile */
        margin-bottom: 15px;
    }

    .page-login__benefit-title,
    .page-login__troubleshoot-title,
    .page-login__why-choose-title {
        font-size: 1.1em;
    }

    .page-login__benefit-text,
    .page-login__troubleshoot-text,
    .page-login__why-choose-text {
        font-size: 0.85em;
    }

    /* FAQ Mobile */
    .page-login__faq-question {
        padding: 15px 20px;
    }
    .page-login__faq-question h3 {
        font-size: 1em;
    }
    .page-login__faq-toggle {
        font-size: 20px;
        width: 24px;
        height: 24px;
        margin-left: 10px;
    }
    .page-login__faq-item.active .page-login__faq-answer {
        padding: 15px 20px !important;
    }
    .page-login__faq-answer {
        padding: 0 20px;
    }

    /* Image responsive adaptions (global for .page-login img) */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Ensure containers don't overflow */
    .page-login__section,
    .page-login__card,
    .page-login__container,
    .page-login__hero-container,
    .page-login__login-form-wrapper,
    .page-login__benefits-section,
    .page-login__troubleshooting-section,
    .page-login__why-choose-section,
    .page-login__faq-section,
    .page-login__cta-download-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-login__cta-download-content {
        padding-left: 15px;
        padding-right: 15px;
    }
}