/* style/login.css */

/* General Page Styling */
.page-login {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background: #FFFFFF; /* Explicitly set body background as per instruction */
}

/* Hero Section */
.page-login__hero-section {
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
    background: linear-gradient(135deg, #017439, #004d2c); /* Darker gradient for hero background */
    color: #ffffff; /* White text for dark background */
    text-align: center;
    position: relative;
    overflow: hidden;
    padding-bottom: 60px;
}

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

.page-login__hero-image {
    width: 100%;
    margin-bottom: 30px;
    max-width: 800px; /* Limit image width in hero for better composition */
}

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

.page-login__main-title {
    font-size: 2.8em;
    margin-bottom: 15px;
    color: #FFFF00; /* Login/Register font color */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-login__description {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 30px auto;
    color: #f0f0f0;
}

.page-login__cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-login__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    min-width: 180px; /* Ensure buttons are not too small */
    text-align: center;
    box-sizing: border-box; /* Include padding in width calculation */
}

.page-login__cta-button--primary {
    background: #C30808; /* Login button color */
    color: #FFFF00; /* Login font color */
    border: 2px solid #C30808;
}

.page-login__cta-button--primary:hover {
    background: #e00b0b;
    border-color: #e00b0b;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-login__cta-button--secondary {
    background: #017439; /* Primary brand color */
    color: #ffffff;
    border: 2px solid #017439;
}

.page-login__cta-button--secondary:hover {
    background: #005f2e;
    border-color: #005f2e;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Section General Styling */
.page-login__section-title {
    font-size: 2.2em;
    margin-bottom: 20px;
    text-align: center;
    color: #017439; /* Primary brand color for titles */
}

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

/* Form Section */
.page-login__form-section {
    padding: 60px 20px;
    background: #f8f8f8;
}

.page-login__container {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

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

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

.page-login__form-input:focus {
    border-color: #017439;
    outline: none;
    box-shadow: 0 0 0 2px rgba(1, 116, 57, 0.2);
}

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

.page-login__checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-login__checkbox {
    width: 18px;
    height: 18px;
    accent-color: #017439;
}

.page-login__checkbox-label {
    color: #555555;
}

.page-login__forgot-password {
    color: #017439;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-login__forgot-password:hover {
    color: #004d2c;
    text-decoration: underline;
}

.page-login__submit-button {
    background: #C30808; /* Login button color */
    color: #FFFF00; /* Login font color */
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-login__submit-button:hover {
    background: #e00b0b;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-login__register-prompt {
    text-align: center;
    margin-top: 30px;
    font-size: 1.1em;
    color: #555555;
}

.page-login__register-link {
    color: #017439;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-login__register-link:hover {
    color: #004d2c;
    text-decoration: underline;
}

/* Benefits Section */
.page-login__benefits-section {
    padding: 80px 20px;
    background: #017439; /* Dark background for this section */
    color: #ffffff; /* White text for dark background */
}

.page-login__benefits-section .page-login__section-title {
    color: #FFFF00; /* Yellow title on dark background */
}

.page-login__benefits-section .page-login__section-description {
    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: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-login__benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-login__benefit-icon {
    width: 100%; /* Ensure images take full width of container */
    max-width: 150px; /* Max width for benefit icons */
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px; /* Slightly rounded corners for icons */
}

.page-login__benefit-title {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: #FFFF00; /* Yellow for benefit titles */
}

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

/* Security Info Section */
.page-login__security-info {
    padding: 80px 20px;
    background: #ffffff; /* Light background */
}

.page-login__security-info .page-login__section-title {
    color: #017439; /* Primary brand color for titles */
}

.page-login__security-info .page-login__section-description {
    color: #555555;
}

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

.page-login__security-item {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-login__security-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-login__security-icon {
    width: 100%; /* Ensure images take full width of container */
    max-width: 120px; /* Max width for security icons */
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px;
}

.page-login__security-title {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: #017439; /* Primary brand color for security titles */
}

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

.page-login__security-call-to-action {
    text-align: center;
    margin-top: 40px;
    font-size: 1.1em;
    color: #555555;
}

.page-login__contact-link {
    color: #017439;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-login__contact-link:hover {
    color: #004d2c;
    text-decoration: underline;
}

/* FAQ Section */
.page-login__faq-section {
    padding: 80px 20px;
    background: #f0f5f0; /* Light green tint background */
}

.page-login__faq-section .page-login__section-title {
    color: #017439;
}

.page-login__faq-section .page-login__section-description {
    color: #555555;
    margin-bottom: 50px;
}

/* FAQ container styles */
.page-login__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* FAQ default state - answer hidden */
.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, opacity 0.4s ease;
    padding: 0 20px;
    opacity: 0;
    background: #fefefe;
    color: #555555;
}

/* FAQ expanded state - ⚠️ Use !important and sufficiently large max-height */
.page-login__faq-item.active .page-login__faq-answer {
    max-height: 2000px !important; /* ⚠️ Use !important, value large enough for any content */
    padding: 20px !important;
    opacity: 1;
    background: #fefefe;
    border-radius: 0 0 8px 8px;
}

/* Question styles */
.page-login__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    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, box-shadow 0.3s ease;
    position: relative;
}

.page-login__faq-item.active .page-login__faq-question {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: #017439;
}

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

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

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

/* Toggle icon */
.page-login__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #017439;
    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: 32px;
    height: 32px;
}

.page-login__faq-item.active .page-login__faq-toggle {
    color: #C30808; /* Red for active toggle */
    transform: rotate(180deg);
}

/* Responsive Design for Desktop, Tablet, Mobile */
@media (max-width: 1024px) {
    .page-login__main-title {
        font-size: 2.2em;
    }
    .page-login__description {
        font-size: 1.1em;
    }
    .page-login__section-title {
        font-size: 1.8em;
    }
    .page-login__benefits-grid,
    .page-login__security-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    /* Fixed header offset for mobile */
    .page-login__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-login__hero-image {
        margin-bottom: 20px;
    }

    .page-login__hero-image img {
        border-radius: 8px;
    }

    .page-login__main-title {
        font-size: 1.8em;
        line-height: 1.3;
    }

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

    .page-login__cta-group {
        flex-direction: column;
        gap: 15px;
    }

    .page-login__cta-button {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

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

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

    .page-login__container {
        padding: 25px;
        border-radius: 8px;
    }

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

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

    .page-login__submit-button {
        font-size: 1.1em;
        padding: 12px 25px;
        width: 100% !important; /* Ensure button takes full width */
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-login__benefits-section,
    .page-login__security-info,
    .page-login__faq-section {
        padding: 40px 15px;
    }

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

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

    .page-login__benefit-icon,
    .page-login__security-icon {
        max-width: 100px;
        margin-bottom: 15px;
    }

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

    .page-login__benefit-text,
    .page-login__security-text {
        font-size: 0.9em;
    }

    /* FAQ Mobile specific styles */
    .page-login__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-login__faq-question h3 {
        font-size: 1em;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    
    .page-login__faq-toggle {
        margin-left: 10px;
        width: 28px;
        height: 28px;
        font-size: 24px;
    }
    
    .page-login__faq-answer {
        padding: 0 15px;
    }
    
    .page-login__faq-item.active .page-login__faq-answer {
        padding: 15px !important;
    }

    /* Ensure all images are responsive and do not cause overflow */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important; /* Important for images inside padding containers */
    }

    .page-login__section,
    .page-login__card,
    .page-login__container,
    .page-login__hero-section,
    .page-login__form-section,
    .page-login__benefits-section,
    .page-login__security-info,
    .page-login__faq-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* Padding handled by specific sections for better control */
    }
    .page-login__cta-group,
    .page-login__button-group,
    .page-login__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden;
        padding-left: 15px; /* Add padding to button containers */
        padding-right: 15px;
        flex-direction: column !important; /* Force vertical stacking for button groups */
        gap: 10px;
    }
}

/* Ensure no filter is used on images */
.page-login img {
    filter: none; /* Explicitly remove any potential filters */
}