/*
 * Full CSS for the Login Page
 * Mackindia Login Page Stylesheet
 */

/* ============================
   Typography & Base Styles
   ============================ */

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f0f2f5; /* Light gray background */
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    justify-content: space-between; /* Pushes content and footer apart */
}

a {
    color: #007bbd; /* Primary brand blue for links */
    text-decoration: none;
    transition: color 0.3s, transform 0.2s; /* Smooth hover effects */
    font-weight: 500;
}

a:hover {
    color: #005f9a; /* Darker blue on hover */
    text-decoration: underline;
    transform: translateY(-1px);
}

/* ============================
   Layout & Container Styles
   ============================ */

.login-wrapper {
    display: flex;
    height: 100%;
    flex-grow: 1; /* Allows it to fill available space */
}

/* Left side with the image and text overlay */
.login-image-side {
    width: 50%;
    background-image: url('/img/slider_bg1.jpg'); /* CHANGE THIS PATH */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Text shadow for readability */
    position: relative;
    overflow: hidden; /* Ensures pseudo-element doesn't spill out */
}

/* Semi-transparent blue overlay for the image */
.login-image-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 147, 221, 0.4); /* Mackindia's brand blue with transparency */
    z-index: 0;
}

.image-overlay {
    text-align: center;
    padding: 2rem;
    z-index: 1; /* Keeps content above the overlay */
}

.image-overlay .logo {
    max-width: 150px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.3)); /* Adds a shadow to the logo */
}

.image-overlay h1 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.image-overlay p {
    font-size: 1.1rem;
}

/* Right side with the login form */
.login-form-side {
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Subtle background gradient */
    background: linear-gradient(135deg, #ffffff 0%, #f7f9fc 100%);
}

.login-container {
    padding: 3rem;
    border-radius: 20px; /* Softer, more modern corners */
    /* Refined box shadow for a professional, floating look */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1), 0 5px 10px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 450px; /* Slightly wider container */
    background-color: #ffffff;
    border: 1px solid #e0e0e0; /* Subtle border */
    transform: translateY(-20px); /* Lifts the container for initial animation */
    animation: fadeIn 0.8s ease-out forwards; /* CSS animation */
}

/* Keyframes for the fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================
   Form Element Styles
   ============================ */

.login-container h2 {
    font-weight: 700; /* Bolder heading */
    color: #2c3e50; /* Darker, more professional color */
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: 0.5px;
}

.form-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 0.5rem;
}

.form-control {
    border-radius: 12px;
    padding: 1rem 1.25rem;
    border: 1px solid #dcdcdc;
    background-color: #f9f9f9;
    transition: border-color 0.3s, box-shadow 0.3s; /* Smooth transition on focus */
}

.form-control:focus {
    border-color: #0093dd;
    box-shadow: 0 0 0 0.25rem rgba(0, 147, 221, 0.2); /* Soft focus ring */
    background-color: #fff;
}

.btn-primary {
    background-color: #007bbd;
    border-color: #007bbd;
    border-radius: 12px;
    padding: 1rem;
    font-weight: 700;
    font-size: 1.1rem;
    transition: background-color 0.3s, transform 0.2s; /* Hover effects */
}

.btn-primary:hover {
    background-color: #005f9a;
    border-color: #005f9a;
    transform: translateY(-2px); /* Lifts the button slightly */
}

.alert {
    border-radius: 12px;
    font-size: 0.9rem;
    text-align: center;
}

/* ============================
   Footer Styles
   ============================ */

.footer {
    text-align: center;
    padding: 1rem;
    background-color: #f0f2f5;
    color: #666;
    font-size: 0.85rem;
}

/* ============================
   Media Queries for Responsiveness
   ============================ */

@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column; /* Stacks columns vertically */
    }

    .login-image-side,
    .login-form-side {
        width: 100%; /* Full width on smaller screens */
        height: auto;
    }
    
    .login-image-side {
        padding: 2rem 0;
    }

    .login-form-side {
        padding: 2rem 0;
    }

    .login-container {
        max-width: 90%; /* Adjusts form width for better fit on mobile */
        margin: auto; /* Centers the container */
    }
}