/* style/login.css */

/* Base Styles for Page Login */
.page-login {
    color: #ffffff; /* Default text color for dark body background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

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

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

.page-login__dark-bg {
    background-color: #1a1a1a; /* Slightly lighter dark for content sections */
    color: #ffffff;
}

.page-login__light-bg {
    background-color: #ffffff;
    color: #333333;
}

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

.page-login__section-description {
    font-size: 1.1em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.page-login__btn-primary,
.page-login__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsiveness */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow long words to break */
}

.page-login__btn-primary {
    background-color: #C30808; /* Custom Login/Register button color */
    color: #FFFF00; /* Custom Login/Register button text color */
    border: 2px solid #C30808;
    margin: 10px;
}

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

.page-login__btn-secondary {
    background-color: transparent;
    color: #017439; /* Brand color */
    border: 2px solid #017439;
    margin: 10px;
}

.page-login__btn-secondary:hover {
    background-color: #017439;
    color: #ffffff;
}

/* Hero Section */
.page-login__hero-section {
    position: relative;
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
    padding-bottom: 80px;
    background-image: url('[GALLERY:hero_login_bg:1920x1080:login_background,abstract_lines,secure_platform,green_theme]'); /* Placeholder for background image */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    min-height: 70vh;
}

.page-login__hero-section .page-login__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 1;
}

.page-login__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: bold;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-login__hero-description {
    font-size: 1.3em;
    margin-bottom: 30px;
    max-width: 900px;
    color: #f0f0f0;
}

.page-login__login-form-wrapper {
    background: rgba(0, 0, 0, 0.6);
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 450px;
    margin-top: 30px;
    margin-bottom: 30px;
    box-sizing: border-box;
}

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

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

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

.page-login__form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #017439;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1em;
    box-sizing: border-box;
}

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

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

.page-login__form-actions {
    display: flex;
    flex-direction: column; /* Default to column for mobile first */
    gap: 15px;
    margin-top: 10px;
}

.page-login__login-button,
.page-login__register-button {
    width: 100%;
}

.page-login__forgot-password {
    display: block;
    margin-top: 15px;
    color: #f0f0f0;
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.3s ease;
}

.page-login__forgot-password:hover {
    color: #017439;
}

.page-login__hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin-top: 40px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    display: block; /* Ensure it behaves as a block element */
}

/* Why Choose Section */
.page-login__why-choose .page-login__section-title,
.page-login__why-choose .page-login__section-description {
    color: #333333;
}

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

.page-login__feature-card {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    color: #333333;
}

.page-login__feature-icon {
    width: 100%; /* Ensure image fills card width */
    height: auto;
    max-width: 200px; /* Max width for consistency */
    margin-bottom: 20px;
    border-radius: 8px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    min-width: 200px; /* Enforce minimum size */
    min-height: 200px; /* Enforce minimum size */
}

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

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

/* How To Login Section */
.page-login__how-to-login .page-login__section-title,
.page-login__how-to-login .page-login__section-description {
    color: #ffffff;
}

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

.page-login__step-card {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: left;
    color: #ffffff;
    position: relative;
    padding-top: 60px; /* Space for step number */
}

.page-login__step-number {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: #017439;
    color: #ffffff;
    font-size: 1.5em;
    font-weight: bold;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

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

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

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

.page-login__login-button--large,
.page-login__register-button--large {
    min-width: 250px;
    font-size: 1.1em;
    padding: 18px 35px;
}

/* Troubleshooting Section */
.page-login__troubleshooting .page-login__section-title,
.page-login__troubleshooting .page-login__section-description {
    color: #333333;
}

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

.page-login__issue-card {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: left;
    color: #333333;
}

.page-login__issue-title {
    font-size: 1.5em;
    color: #C30808; /* Use red for issue titles */
    margin-bottom: 15px;
}

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

/* Benefits Section */
.page-login__benefits .page-login__section-title,
.page-login__benefits .page-login__section-description {
    color: #ffffff;
}

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

.page-login__benefit-item {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    color: #ffffff;
}

.page-login__benefit-icon {
    width: 100%;
    height: auto;
    max-width: 150px;
    margin-bottom: 20px;
    border-radius: 8px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    min-width: 200px; /* Enforce minimum size */
    min-height: 200px; /* Enforce minimum size */
}

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

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

.page-login__view-promotions,
.page-login__contact-support {
    min-width: 200px;
}

/* FAQ Section */
.page-login__faq-section .page-login__section-title {
    color: #333333;
}

.page-login__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.page-login__faq-item {
    background-color: #f9f9f9;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    color: #333333;
}

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

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

.page-login__faq-title {
    margin: 0;
    font-size: 1.1em;
    color: #333333; /* Ensure title is dark on light background */
}

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

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

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

.page-login__faq-item.active .page-login__faq-answer {
    max-height: 1000px !important; /* Sufficiently large value */
    padding: 20px 25px;
}

.page-login__faq-answer p {
    margin: 0;
    color: #555555;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-login__hero-title {
        font-size: 2.8em;
    }
    .page-login__section-title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .page-login__hero-section {
        min-height: 60vh;
        padding-top: var(--header-offset, 120px) !important; /* Ensure header offset on mobile */
        padding-bottom: 50px;
    }
    .page-login__hero-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }
    .page-login__hero-description {
        font-size: 1.1em;
        margin-bottom: 25px;
    }
    .page-login__login-form-wrapper {
        padding: 25px 30px;
        max-width: 90%;
    }
    .page-login__form-group {
        margin-bottom: 15px;
    }
    .page-login__form-input {
        padding: 10px 12px;
    }
    .page-login__form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .page-login__section {
        padding: 50px 0;
    }
    .page-login__section-title {
        font-size: 1.8em;
    }
    .page-login__section-description {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .page-login__cta-buttons {
        flex-direction: column;
        gap: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .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 ensure text doesn't touch edges */
      padding-right: 15px;
    }

    /* Images responsiveness */
    .page-login img {
      max-width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    
    .page-login__section,
    .page-login__card,
    .page-login__container,
    .page-login__login-form-wrapper,
    .page-login__features-grid,
    .page-login__steps-grid,
    .page-login__issues-grid,
    .page-login__benefits-list,
    .page-login__faq-list {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      overflow: hidden !important; /* Prevent horizontal scroll */
    }
    
    .page-login__faq-question,
    .page-login__faq-answer {
      padding-left: 15px !important;
      padding-right: 15px !important;
    }

    /* Ensure content area images are not too small */
    .page-login__feature-icon,
    .page-login__benefit-icon {
        max-width: 100% !important;
        width: auto !important; /* Allow auto width to scale with max-width */
        height: auto !important;
        min-width: 200px; /* Enforce minimum size for content images */
        min-height: 200px; /* Enforce minimum size for content images */
    }
}

@media (min-width: 769px) {
    .page-login__form-actions {
        flex-direction: row; /* Horizontal for desktop */
        justify-content: center;
    }
}