/* style/login.css */

/* Base styles for the page content, ensuring light text on dark body background */
.page-login {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Light text for dark body background */
    background-color: transparent; /* Body background handled by shared.css */
}

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

/* Section styling */
.page-login__hero-section,
.page-login__form-section,
.page-login__benefits-section,
.page-login__security-section,
.page-login__why-choose-section,
.page-login__faq-section,
.page-login__cta-section {
    padding: 60px 0;
    position: relative;
    overflow: hidden; /* Prevent content overflow for sections */
}

.page-login__hero-section {
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 600px;
    position: relative;
    color: #ffffff;
}

.page-login__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.page-login__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Dark overlay for text readability */
    z-index: 2;
}

.page-login__hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
}

.page-login__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: #FFD700; /* Auxiliary color for emphasis */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

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

.page-login__hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-login__section-title {
    font-size: 2.5em;
    color: #FFD700; /* Auxiliary color for emphasis */
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

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

/* Form Section */
.page-login__form-section {
    background-color: #1A202C; /* Main brand color for dark background */
    color: #ffffff;
}

.page-login__login-form {
    background: rgba(255, 255, 255, 0.08); /* Slightly lighter background for form */
    padding: 40px;
    border-radius: 8px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

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

.page-login__form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #f0f0f0;
}

.page-login__form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #333;
    border-radius: 5px;
    background-color: #0d0d0d;
    color: #ffffff;
    font-size: 1em;
    box-sizing: border-box;
}

.page-login__form-input::placeholder {
    color: #888;
}

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

.page-login__link-forgot-password {
    color: #FFD700;
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.3s ease;
}

.page-login__link-forgot-password:hover {
    color: #fff;
}

.page-login__register-prompt {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #cccccc;
}

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

/* Buttons */
.page-login__btn-primary,
.page-login__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    text-align: center;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons are responsive */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
}

.page-login__btn-primary {
    background-color: #FFD700; /* Auxiliary color */
    color: #1A202C; /* Main brand color for text on auxiliary background */
    border: 2px solid #FFD700;
}

.page-login__btn-primary:hover {
    background-color: #e6c200;
    border-color: #e6c200;
}

.page-login__btn-secondary {
    background-color: transparent;
    color: #FFD700; /* Auxiliary color */
    border: 2px solid #FFD700;
}

.page-login__btn-secondary:hover {
    background-color: #FFD700;
    color: #1A202C;
}

.page-login__btn-full-width {
    width: 100%;
}

/* Benefits Section */
.page-login__benefits-section {
    background-color: #0d0d0d; /* Slightly lighter dark background */
}

.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: rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.page-login__benefit-card:hover {
    transform: translateY(-5px);
}

.page-login__benefit-icon {
    width: 100%; /* Ensure image fills card width */
    height: auto;
    max-width: 250px; /* Constrain icon size */
    min-width: 200px; /* Minimum size requirement */
    display: block;
    margin: 0 auto 20px auto;
    border-radius: 5px;
    object-fit: cover;
}

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

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

/* Security Section */
.page-login__security-section {
    background-color: #1A202C; /* Main brand color */
}

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

.page-login__security-item {
    background: rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-login__security-icon {
    width: 100%; /* Ensure image fills item width */
    height: auto;
    max-width: 150px; /* Constrain icon size */
    min-width: 200px; /* Minimum size requirement */
    display: block;
    margin: 0 auto 20px auto;
    border-radius: 5px;
    object-fit: cover;
}

.page-login__security-title {
    font-size: 1.5em;
    color: #FFD700;
    margin-bottom: 10px;
}

.page-login__security-text {
    color: #cccccc;
    font-size: 0.95em;
}

/* Why Choose Section */
.page-login__why-choose-section {
    background-color: #0d0d0d;
}

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

.page-login__why-choose-item {
    background: rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.page-login__why-choose-image {
    width: 100%;
    height: auto;
    max-width: 600px; /* Ensure images are not too wide */
    min-width: 200px; /* Minimum size requirement */
    display: block;
    margin: 0 auto 20px auto;
    border-radius: 5px;
    object-fit: cover;
}

.page-login__why-choose-title {
    font-size: 1.5em;
    color: #FFD700;
    margin-bottom: 10px;
}

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

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

/* FAQ Section */
.page-login__faq-section {
    background-color: #1A202C;
}

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

.page-login__faq-item {
    background: rgba(255, 255, 255, 0.08);
    margin-bottom: 15px;
    border-radius: 8_px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-login__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
}

.page-login__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.page-login__faq-title {
    font-size: 1.2em;
    color: #f0f0f0;
    margin: 0;
}

.page-login__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: #FFD700;
    transition: transform 0.3s ease;
}

.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: #cccccc;
    font-size: 0.95em;
}

.page-login__faq-item.active .page-login__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to accommodate content */
    padding: 15px 25px 25px 25px;
}

/* Call to Action Section */
.page-login__cta-section {
    background-color: #0d0d0d;
    text-align: center;
}

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

/* Dark background text color override */
.page-login__dark-bg {
    background-color: #1A202C;
    color: #ffffff;
}

/* Ensure color contrast for buttons */
.page-login__btn-primary {
    background-color: #FFD700;
    color: #1A202C;
}

.page-login__btn-secondary {
    background-color: transparent;
    color: #FFD700;
    border-color: #FFD700;
}

.page-login__btn-secondary:hover {
    background-color: #FFD700;
    color: #1A202C;
}

/* Image responsiveness */
.page-login img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .page-login {
        font-size: 15px;
        line-height: 1.5;
    }

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

    .page-login__hero-title {
        font-size: 2.2em;
    }

    .page-login__hero-description {
        font-size: 1em;
    }

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

    .page-login__section-description {
        font-size: 0.95em;
    }

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

    .page-login__hero-buttons,
    .page-login__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

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

    .page-login__login-form {
        padding: 30px 20px;
    }

    .page-login__benefits-grid,
    .page-login__security-grid,
    .page-login__why-choose-grid {
        grid-template-columns: 1fr;
    }

    .page-login__benefit-icon,
    .page-login__security-icon,
    .page-login__why-choose-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px !important;
        box-sizing: border-box !important;
    }

    /* Ensure all images inside page-login are responsive */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    
    /* All containers within page-login should also be responsive */
    .page-login__section,
    .page-login__card,
    .page-login__container,
    .page-login__form-section,
    .page-login__benefits-section,
    .page-login__security-section,
    .page-login__why-choose-section,
    .page-login__faq-section,
    .page-login__cta-section,
    .page-login__login-form,
    .page-login__benefit-card,
    .page-login__security-item,
    .page-login__why-choose-item,
    .page-login__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }
    .page-login__faq-answer {
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-login__faq-question {
        padding-left: 15px;
        padding-right: 15px;
    }
}