/*
* Login Page CSS with responsive design
* This stylesheet controls the appearance of the login page
*/

/* Reset default styles and set basic properties for all elements */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    color: #fff; /* White text color for better contrast */
}

/* Main wrapper for full-page layout that uses flexbox to ensure footer stays at bottom */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Full viewport height */
}

/* Background image only applies to content area, not footer */
.main-content {
    flex: 1; /* Takes up all available space, pushing footer down */
    background-image: url('../images/main.png');
    background-size: cover; /* Image covers entire area */
    background-position: center; /* Centers the background image */
    background-attachment: fixed; /* Fixed background for parallax effect */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px; /* Vertical and horizontal padding */
}

/* Centered form container with semi-transparent background */
.container {
    width: 100%;
    max-width: 500px; /* Limit width on larger screens */
    padding: 25px;
    background-color: rgba(0, 0, 0, 0.85); /* Dark background with 85% opacity */
    border-radius: 12px; /* Rounded corners */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6); /* Drop shadow effect */
    text-align: center;
    color: white;
    margin-top: 60px; /* Allow space for fixed navigation */
}

/* Form headings style */
h1, h2 {
    color: #4CAF50; /* Green color for brand consistency */
    margin-bottom: 20px;
}

/* Main heading with underline */
h1 {
    text-underline-offset: 0.3em; /* Space between text and underline */
    text-decoration: underline;
    font-size: 28px; /* Base size for desktop */
}

/* Form field group container */
.form-group {
    margin-bottom: 15px;
    text-align: left;
    padding-right: 20px;
}

/* Label styling for form fields */
label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 16px;
}

/* Input field styling */
input[type="email"],
input[type="password"] {
    width: 100%; /* Full width of container */
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.9); /* Slightly transparent white */
    color: #333; /* Dark gray text */
    font-size: 16px;
    box-sizing: border-box; /* Include padding in width calculation */
}

/* Textarea styling (for forms with textareas) */
textarea {
    resize: vertical; /* Allow vertical resizing only */
    min-height: 100px;
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 16px;
    box-sizing: border-box;
}

/* Submit button styling */
button {
    background-color: #4CAF50; /* Green background */
    color: white;
    border: none;
    padding: 12px 20px;
    margin-top: 20px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 16px;
    width: 25%; /* Button width */
    transition: background-color 0.3s, transform 0.2s; /* Smooth transitions */
}

/* Button hover effect */
button:hover {
    background-color: #45a049; /* Slightly darker green */
    transform: scale(1.05); /* Slightly enlarge on hover */
}

/* Error message styling */
.error {
    color: #ff6b6b; /* Salmon-red color */
    font-size: 14px;
    margin-top: 5px;
}

/* Mobile hamburger menu button (hidden by default) */
.menu-toggle {
    display: none; /* Hidden on desktop */
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    background: #4CAF50;
    color: #000;
    border: none;
    border-radius: 4px;
    padding: 10px;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Navigation bar styling */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100;
}

/* Navigation links container */
.nav-links {
    display: flex;
    gap: 30px;
}

/* Individual navigation links */
.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    padding: 5px 10px;
    transition: background-color 0.3s;
}

/* Hover effect for navigation links */
.nav-links a:hover {
    background-color: #45a049;
    border-radius: 4px;
}

/* Login button styling */
.login-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 15px;
    background-color: #4CAF50;
    color: #000;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: #45a049;
}

/* Dark overlay effect on top of the background image */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.2) 100%);
    z-index: 1;
}

 .error {
            color: #f44336;
            font-size: 0.9rem;
            margin-top: 5px;
            margin-bottom: 10px;
        }
        
        .input-error {
            border: 1px solid #f44336 !important;
        }
        
        .alert {
            padding: 10px 15px;
            margin-bottom: 20px;
            border-radius: 4px;
        }
        
        .alert-danger {
            background-color: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }
        
        .alert-success {
            background-color: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }

/* Responsive design for tablets */
@media (max-width: 1024px) {
    /* Adjust container size for tablets */
    .container {
        width: 90%;
        max-width: 450px;
    }
    
    /* Slightly reduce heading size */
    h1 {
        font-size: 26px;
    }
    
    /* Allow more space at top for navigation */
    .main-content {
        padding-top: 80px;
    }
    
    /* Adjust button width for tablets */
    button {
        width: 35%;
    }
}

/* Responsive design for mobile devices */
@media (max-width: 768px) {
    /* Further reduce container size */
    .container {
        width: 95%;
        max-width: none;
        padding: 20px;
    }
    
    /* Show hamburger menu */
    .menu-toggle {
        display: block;
    }
    
    /* Adjust navigation for mobile */
    nav {
        padding: 10px 0;
    }
    
    /* Mobile menu styling */
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%; /* Hide off-screen by default */
        width: 70%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 20px;
        transition: 0.3s ease-in-out;
        z-index: 9998;
    }
    
    /* Style for open mobile menu */
    .nav-links.active {
        left: 0; /* Show when active */
    }
    
    /* Larger touch targets for mobile */
    .nav-links a {
        font-size: 16px;
        padding: 10px 20px;
        width: 100%;
        text-align: center;
    }
    
    /* Adjust login button position */
    .login-btn {
        top: 15px;
        right: 70px;
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Smaller text for mobile */
    h1 {
        font-size: 24px;
    }
    
    label {
        font-size: 14px;
    }
    
    input[type="email"],
    input[type="password"],
    textarea {
        font-size: 14px;
        padding: 10px;
    }
    
    /* Button adjustments for mobile */
    button {
        width: 40%;
        padding: 10px;
        font-size: 14px;
    }
}

/* Footer styling */
footer {
    background: #000; /* Black background */
    color: #fff; /* White text */
    text-align: center;
    padding: 20px 10px;
}

/* Container for footer content */
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Social media icons container */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

/* Individual social icon styling */
.social-icons a {
    color: #fff;
    font-size: 22px;
    transition: 0.3s; /* Smooth transition for hover effect */
}

/* Hover effect for social icons */
.social-icons a:hover {
    color: #4CAF50; /* Green color on hover */
    transform: scale(1.2); /* Slightly increase size on hover */
}

/* Footer credits text styling */
.footer-credits {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.8; /* Slightly transparent */
}

/* Copyright text styling */
.copyright {
    font-size: 14px;
    font-weight: bold;
}

/* Very small screens additional adjustments */
@media (max-width: 480px) {
    /* Further reduce text sizes */
    h1 {
        font-size: 22px;
    }
    
    .container {
        padding: 15px;
    }
    
    label {
        font-size: 13px;
    }
    
    input[type="email"],
    input[type="password"],
    textarea {
        font-size: 13px;
        padding: 8px;
    }
    
    /* Make button wider on very small screens */
    button {
        width: 50%;
        font-size: 13px;
    }
    
    /* Smaller social icons */
    .social-icons a {
        font-size: 18px;
    }
    
    /* Smaller footer text */
    .footer-credits, .copyright {
        font-size: 12px;
    }
}