/* style/login.css */

/* Custom colors based on provided scheme */
:root {
    --page-bg: #08160F; /* Background */
    --card-bg: #11271B; /* Card BG */
    --text-main: #F2FFF6; /* Text Main */
    --text-secondary: #A7D9B8; /* Text Secondary */
    --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button */
    --border-color: #2E7A4E; /* Border */
    --glow-color: #57E38D; /* Glow */
    --gold-color: #F2C14E; /* Gold */
    --divider-color: #1E3A2A; /* Divider */
    --deep-green: #0A4B2C; /* Deep Green */
    --brand-primary: #11A84E; /* Main color */
    --brand-secondary: #22C768; /* Auxiliary color */
}

/* Base styles for the page content, ensuring contrast with dark body background */
.page-login {
    background-color: var(--page-bg); /* Dark background */
    color: var(--text-main); /* Light text for readability */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding-bottom: 40px; /* Add some padding at the bottom */
}

/* Hero Section */
.page-login__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image first, then content */
    align-items: center;
    padding: 10px 0 60px 0; /* Small top padding, more bottom padding */
    text-align: center;
    overflow: hidden; /* Ensure no overflow from image */
}

.page-login__hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 500px; /* Limit height for hero image */
    display: block;
}

.page-login__hero-content {
    position: relative; /* Not absolute, to be below the image */
    max-width: 900px;
    margin-top: 40px; /* Spacing between image and text */
    padding: 0 20px;
}

.page-login__main-title {
    font-size: clamp(2em, 4vw, 3.2em); /* Responsive font size for H1 */
    color: var(--gold-color); /* Gold color for main title */
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-login__description {
    font-size: 1.1em;
    color: var(--text-secondary); /* Secondary text color */
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-login__highlight {
    color: var(--gold-color); /* Highlight important keywords */
    font-weight: bold;
}

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

/* Generic button styles */
.page-login__btn-primary,
.page-login__btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none; /* Remove default border */
    cursor: pointer;
    max-width: 100%; /* Ensure buttons adapt to container width */
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow long words to break */
}

.page-login__btn-primary {
    background: var(--button-gradient); /* Custom button gradient */
    color: var(--text-main); /* Light text on dark button */
}

.page-login__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 15px var(--glow-color);
}

.page-login__btn-secondary {
    background-color: transparent;
    color: var(--brand-primary); /* Brand primary color for text */
    border: 2px solid var(--brand-primary); /* Border with brand primary */
}

.page-login__btn-secondary:hover {
    background-color: var(--brand-primary);
    color: var(--text-main);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Form Section */
.page-login__form-section {
    padding: 60px 20px;
    background-color: var(--page-bg); /* Match body background */
}

.page-login__container {
    max-width: 900px;
    margin: 0 auto;
    box-sizing: border-box;
    width: 100%; /* Ensure container takes full width up to max-width */
}

.page-login__section-title {
    font-size: 2.2em;
    color: var(--gold-color); /* Gold color for section titles */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

.page-login__login-card {
    background-color: var(--card-bg); /* Dark card background */
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 20px var(--brand-primary);
    max-width: 500px;
    margin: 0 auto;
    border: 1px solid var(--border-color); /* Border for the card */
}

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

.page-login__form-group {
    display: flex;
    flex-direction: column;
}

.page-login__form-label {
    color: var(--text-secondary); /* Secondary text color for labels */
    font-size: 1em;
    margin-bottom: 8px;
    font-weight: bold;
}

.page-login__form-input {
    background-color: var(--deep-green); /* Deep green for input background */
    border: 1px solid var(--border-color); /* Border for inputs */
    border-radius: 8px;
    padding: 12px 15px;
    color: var(--text-main); /* Light text for input values */
    font-size: 1em;
    outline: none;
    transition: border-color 0.3s ease;
}

.page-login__form-input::placeholder {
    color: var(--text-secondary); /* Lighter placeholder text */
    opacity: 0.7;
}

.page-login__form-input:focus {
    border-color: var(--glow-color); /* Glow color on focus */
    box-shadow: 0 0 8px rgba(87, 227, 141, 0.5);
}

.page-login__form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95em;
    color: var(--text-secondary);
}

.page-login__remember-me {
    display: flex;
    align-items: center;
}

.page-login__checkbox {
    margin-right: 8px;
    accent-color: var(--brand-primary); /* Brand primary for checkbox */
}

.page-login__checkbox-label {
    color: var(--text-secondary);
}

.page-login__forgot-password {
    color: var(--brand-primary); /* Brand primary for links */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-login__forgot-password:hover {
    color: var(--glow-color); /* Glow color on hover */
    text-decoration: underline;
}

.page-login__submit-button {
    background: var(--button-gradient); /* Custom button gradient */
    color: var(--text-main);
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-width: 100%; /* Ensure buttons adapt to container width */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-login__submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 15px var(--glow-color);
}

.page-login__register-prompt {
    text-align: center;
    margin-top: 25px;
    color: var(--text-secondary);
}

.page-login__register-link {
    color: var(--gold-color); /* Gold color for register link */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-login__register-link:hover {
    color: var(--glow-color);
    text-decoration: underline;
}

/* Security Section */
.page-login__security-section {
    padding: 60px 20px;
    background-color: var(--deep-green); /* Deep green background for security section */
    color: var(--text-main);
    text-align: center;
}

.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-color: var(--card-bg); /* Dark card background */
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.page-login__security-item:hover {
    transform: translateY(-5px);
}

.page-login__security-icon {
    width: 100%; /* Ensure images fill their container */
    height: auto;
    max-width: 150px; /* Max width for icons */
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 8px; /* Slightly rounded corners for images */
}

.page-login__security-heading {
    font-size: 1.6em;
    color: var(--gold-color); /* Gold color for headings */
    margin-bottom: 15px;
    font-weight: bold;
}

.page-login__security-text {
    font-size: 1em;
    color: var(--text-secondary);
}

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

/* Benefits Section */
.page-login__benefits-section {
    padding: 60px 20px;
    background-color: var(--page-bg); /* Match body background */
    color: var(--text-main);
    text-align: center;
}

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

.page-login__benefit-card {
    background-color: var(--card-bg); /* Dark card background */
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

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

.page-login__benefit-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 250px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
}

.page-login__benefit-heading {
    font-size: 1.6em;
    color: var(--gold-color); /* Gold color for headings */
    margin-bottom: 15px;
    font-weight: bold;
}

.page-login__benefit-text {
    font-size: 1em;
    color: var(--text-secondary);
}

/* FAQ Section */
.page-login__faq-section {
    padding: 60px 20px;
    background-color: var(--deep-green); /* Deep green background for FAQ section */
    color: var(--text-main);
}

.page-login__faq-list {
    max-width: 900px;
    margin: 40px auto 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.page-login__faq-item {
    background-color: var(--card-bg); /* Dark card background */
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.page-login__faq-item summary {
    list-style: none; /* Remove default marker */
    cursor: pointer;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text-main);
    background-color: var(--card-bg);
    transition: background-color 0.3s ease;
}

.page-login__faq-item summary::-webkit-details-marker {
    display: none; /* Hide Chrome's default marker */
}

.page-login__faq-item summary:hover {
    background-color: rgba(var(--brand-primary), 0.1); /* Slight hover effect */
}

.page-login__faq-qtext {
    color: var(--gold-color); /* Gold color for questions */
}

.page-login__faq-toggle {
    font-size: 1.5em;
    color: var(--glow-color); /* Glow color for toggle icon */
    margin-left: 15px;
    transition: transform 0.3s ease;
}

.page-login__faq-item[open] .page-login__faq-toggle {
    transform: rotate(45deg); /* Rotate for 'x' effect */
}

.page-login__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1em;
    color: var(--text-secondary);
    line-height: 1.6;
}

.page-login__faq-answer p {
    margin-top: 10px;
}

.page-login__faq-answer a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-login__faq-answer a:hover {
    color: var(--glow-color);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-login__main-title {
        font-size: clamp(1.8em, 5vw, 2.8em);
    }
    .page-login__description {
        font-size: 1em;
    }
    .page-login__section-title {
        font-size: 2em;
    }
    .page-login__security-item,
    .page-login__benefit-card {
        padding: 25px;
    }
    .page-login__security-heading,
    .page-login__benefit-heading {
        font-size: 1.4em;
    }
    .page-login__faq-item summary {
        font-size: 1.1em;
    }
}

@media (max-width: 768px) {
    .page-login {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-login__hero-section {
        padding: 10px 0 40px 0;
    }
    .page-login__hero-content {
        margin-top: 30px;
    }
    .page-login__main-title {
        font-size: clamp(1.5em, 7vw, 2.5em);
    }
    .page-login__description {
        font-size: 0.95em;
    }
    .page-login__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }
    .page-login__btn-primary,
    .page-login__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 15px !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-login__form-section,
    .page-login__security-section,
    .page-login__benefits-section,
    .page-login__faq-section {
        padding: 40px 15px;
    }
    .page-login__container {
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-login__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-login__login-card {
        padding: 30px 20px;
    }
    .page-login__form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .page-login__security-grid,
    .page-login__benefits-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .page-login__security-item,
    .page-login__benefit-card {
        padding: 20px;
    }
    .page-login__security-icon,
    .page-login__benefit-image {
        max-width: 120px;
        margin-bottom: 15px;
    }
    .page-login__security-heading,
    .page-login__benefit-heading {
        font-size: 1.3em;
    }
    .page-login__faq-list {
        margin-top: 30px;
    }
    .page-login__faq-item summary {
        padding: 18px 20px;
        font-size: 1em;
    }
    .page-login__faq-answer {
        padding: 0 20px 18px 20px;
    }

    /* All images must be responsive */
    .page-login img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    
    /* All image containers must be responsive */
    .page-login__hero-section,
    .page-login__security-item,
    .page-login__benefit-card,
    .page-login__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important; /* Prevent content overflow */
    }
}

/* Ensure content area images don't go below 200px (desktop) */
.page-login__security-icon,
.page-login__benefit-image {
    min-width: 200px; /* Enforce minimum size for content images */
    min-height: 200px;
}