/* Modern African tech startup design: Blue + dark theme, fully responsive */

/* ==============================
   Global Styles
============================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #0c036d; /* Dark background */
    color: #ffffff; /* Light text */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #ffffff;
    text-decoration: none;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ==============================
   Header & Navigation
============================== */
header {
    background-color: #0d47a1; /* Dark blue */
    padding: 10px 20px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

nav ul {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

nav ul li {
    margin: 5px 0;
}

/* Responsive select */
select {
    background-color: #1e88e5; /* Blue */
    color: #ffffff;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
}

/* ==============================
   Main Content
============================== */
main {
    flex: 1;
    padding: 20px;
    width: 100%;
}

/* ==============================
   Footer
============================== */
footer {
    background-color: #0d47a1;
    text-align: center;
    padding: 15px 10px;
    width: 100%;
    margin-top: auto;
}

/* ==============================
   Forms
============================== */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 100%;
    width: 400px;
    margin: auto;
}

input, select, textarea, button {
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
}

button {
    background-color: #1e88e5;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background-color: #1565c0;
}

/* ==============================
   Tables
============================== */
table {
    width: 100%;
    border-collapse: collapse;
    overflow-x: auto;
}

th, td {
    padding: 10px;
    border: 1px solid #333;
    text-align: left;
}

/* ==============================
   Listings / Cards
============================== */
.category-content {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap; /* Makes it wrap on smaller screens */
    justify-content: center;
}

.item-card, .listing-card {
    border-radius: 8px;
    background: #1f1f1f;
    padding: 15px;
    width: 220px;
    text-align: center;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s;
}

.item-card:hover, .listing-card:hover {
    transform: scale(1.03);
}

.item-card img, .listing-card img {
    max-width: 100%;
    border-radius: 5px;
    object-fit: cover;
}

/* ==============================
   Admin Tabs
============================== */
.admin-tabs {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-tabs a {
    padding: 10px 15px;
    background: #ff9800;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.admin-tabs a:hover {
    background: #e68900;
}

/* ==============================
   Responsive Media Queries
============================== */
@media (max-width: 1024px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .category-content {
        justify-content: flex-start;
    }

    form {
        width: 100%;
        padding: 10px;
    }

    .item-card, .listing-card {
        width: calc(50% - 20px); /* 2 per row */
    }
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .item-card, .listing-card {
        width: 100%; /* full width on mobile */
    }
}

@media (max-width: 480px) {
    header, footer {
        padding: 10px;
    }

    .logo {
        font-size: 1.2rem;
    }

    button, input, select, textarea {
        font-size: 0.95rem;
        padding: 8px;
    }

    .admin-tabs a {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}