/* ===============================
   NIA YETU – Projects Tracker CSS
   Theme: Kenyan Flag (black, red, green, white)
   Responsive for all devices
================================= */

/* === General Styles === */
body {
    font-family: 'Raleway', sans-serif;
    background-color: #f9f9f9;
    color: #333;
    margin: 0;
    padding: 0;
}

h1, h2, h3 {
    font-weight: 600;
    color: #d71a28; /* Kenyan flag red */
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

a {
    color: #0d6efd;
    text-decoration: none;
}
a:hover {
    color: #198754; /* green hover */
}

/* === Container === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
}

/* === Filters === */
.filters select,
.filters button {
    min-width: 150px;
}

.filters button {
    background-color: #d71a28; /* red */
    border: none;
    color: #fff;
}

.filters button:hover {
    background-color: #0b0b0b; /* black hover */
}

/* === Table Rankings === */
table.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

table.table th,
table.table td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
}

table.table th {
    background-color: #0b0b0b; /* black */
    color: #fff;
}

table.table tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* === Project Cards === */
.d-flex.flex-wrap {
    justify-content: flex-start;
}

.project-card {
    background-color: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex: 1 1 calc(33% - 20px);
    min-width: 250px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.project-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* === Buttons === */
.btn {
    border-radius: 5px;
    transition: all 0.2s ease;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.85em;
}

.btn-primary {
    background-color: #198754; /* green */
    border: none;
    color: #fff;
}
.btn-primary:hover {
    background-color: #0b0b0b; /* black */
}

.btn-warning {
    background-color: #ffc107;
    border: none;
    color: #000;
}
.btn-warning:hover {
    background-color: #d39e00;
}

.btn-danger {
    background-color: #d71a28;
    border: none;
    color: #fff;
}
.btn-danger:hover {
    background-color: #a50f1a;
}

.btn-secondary {
    background-color: #6c757d;
    border: none;
    color: #fff;
}
.btn-secondary:hover {
    background-color: #495057;
}

.btn-success {
    background-color: #0dcaf0; /* light blue for save */
    border: none;
    color: #000;
}
.btn-success:hover {
    background-color: #198754; /* green */
}

/* === Status Badge === */
.status-badge {
    padding: 3px 8px;
    border-radius: 5px;
    color: #fff;
    font-size: 0.85em;
    text-transform: capitalize;
}

.status-pending { background-color: #ffc107; }
.status-in_progress { background-color: #0dcaf0; }
.status-completed { background-color: #198754; }

/* === Edit Form === */
.edit-form {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
}

/* === File Upload === */
.input-group-sm input[type="file"] {
    border-radius: 5px 0 0 5px;
}

/* === Responsive Media Queries === */
@media (max-width: 992px) {
    .project-card {
        flex: 1 1 calc(50% - 15px);
    }
}

@media (max-width: 600px) {
    .project-card {
        flex: 1 1 100%;
    }

    .filters {
        flex-direction: column;
        gap: 10px;
    }

    .filters select,
    .filters button {
        width: 100%;
        max-width: 100%;
    }
}

/* === Kenyan Flag Borders === */
.project-card {
    border-top: 5px solid #d71a28; /* red */
    border-left: 5px solid #0b0b0b; /* black */
    border-bottom: 5px solid #198754; /* green */
}

/* === Small Typography Adjustments === */
p {
    font-size: 0.95em;
    line-height: 1.4em;
    margin-bottom: 5px;
}

/* === Smooth Hover Animations === */
button, a, .project-card {
    transition: all 0.2s ease-in-out;
}
