/*
 * styles.css
 *
 * This file contains the main CSS (Cascading Style Sheets) for our
 * Nyamekye Church OMS. It dictates how our HTML elements will look.
 *
 * Think of it as the interior designer for our web application.
 */

/* Universal Box Sizing */
/* This makes sure that padding and borders are included in an element's total width and height,
   which makes layout calculations much easier. */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Body Styles */
/* These styles apply to the entire page. */
body {
    font-family: 'Inter', sans-serif; /* A nice, modern, readable font */
    margin: 0; /* Remove default browser margin */
    padding: 0; /* Remove default browser padding */
    background-color: #f4f7f6; /* A light, calming background color */
    color: #333; /* Dark grey text for readability */
    line-height: 1.6; /* Spacing between lines of text for better readability */
}

/* Container for centering content */
.container {
    max-width: 1200px; /* Maximum width of our content area */
    margin: 20px auto; /* Center the container horizontally with some top/bottom margin */
    padding: 20px; /* Inner spacing */
    background-color: #fff; /* White background for content blocks */
    border-radius: 8px; /* Slightly rounded corners for a softer look */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); /* A subtle shadow for depth */
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: #2c3e50; /* A darker blue-grey for headings */
    margin-top: 0; /* Remove default top margin */
    margin-bottom: 15px; /* Add some space below headings */
}

/* Forms - General Styling */
form {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    max-width: 400px; /* Limit form width for better appearance */
    margin: 40px auto; /* Center the form */
}

.form-group {
    margin-bottom: 20px; /* Space between form elements */
}

.form-group label {
    display: block; /* Make label take its own line */
    margin-bottom: 8px; /* Space between label and input */
    font-weight: bold; /* Make labels stand out */
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%; /* Make inputs fill their container */
    padding: 12px; /* Inner spacing */
    border: 1px solid #ddd; /* Light grey border */
    border-radius: 5px; /* Rounded corners for inputs */
    font-size: 1rem; /* Standard font size */
    transition: border-color 0.3s ease; /* Smooth transition for focus effect */
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #4f46e5; /* Highlight border on focus */
    outline: none; /* Remove default outline */
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2); /* Subtle glow on focus */
}

/* Buttons - General Styling */
.btn {
    display: inline-block; /* Allow padding and margin */
    padding: 12px 25px; /* Inner spacing */
    font-size: 1rem; /* Standard font size */
    font-weight: bold; /* Make text bold */
    text-align: center; /* Center text */
    text-decoration: none; /* Remove underline for links acting as buttons */
    border-radius: 5px; /* Rounded corners */
    cursor: pointer; /* Indicate it's clickable */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth transitions */
    border: none; /* Remove default button border */
}

/* Primary Button (e.g., Submit) */
.btn-primary {
    background-color: #4f46e5; /* A vibrant purple/blue */
    color: #fff; /* White text */
}

.btn-primary:hover {
    background-color: #4338ca; /* Slightly darker on hover */
    transform: translateY(-2px); /* Subtle lift effect */
}

/* Secondary Button (e.g., Cancel, Back) */
.btn-secondary {
    background-color: #6c757d; /* Grey */
    color: #fff;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

/* Alert/Error Messages */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
}

.alert-danger {
    background-color: #f8d7da; /* Light red background */
    color: #721c24; /* Dark red text */
    border: 1px solid #f5c6cb; /* Red border */
}

.alert-success {
    background-color: #d4edda; /* Light green background */
    color: #155724; /* Dark green text */
    border: 1px solid #c3e6cb; /* Green border */
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
    }

    form {
        margin: 20px auto;
        padding: 20px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}
