/*
 * Public-facing Stylesheet for the Cargodig Platform
 * This file is for the main website, not the admin dashboard.
 */

/* General Styles and Layout */
body {
    font-family: 'Inter', Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f4f7f9;
}

.main-content-container {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* Header and Navigation */
.main-header {
    background: #004d99;
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allows items to wrap on smaller screens */
}

.logo a {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

.main-nav .menu-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.main-nav .menu-items li {
    margin-left: 20px;
}

.main-nav .menu-items a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.main-nav .menu-items a:hover {
    background-color: #003366;
}

/* --- Mobile Menu Toggle --- */
.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    color: #fff;
}

@media (max-width: 768px) {
    .main-nav {
        display: none; /* Initially hide on mobile */
        width: 100%;
        order: 1; /* Puts the menu below the logo on mobile */
        flex-direction: column;
        padding: 10px 0;
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav .menu-items {
        flex-direction: column;
        width: 100%;
    }

    .main-nav .menu-items li {
        margin: 0;
        width: 100%;
    }

    .main-nav .menu-items a {
        display: block;
        padding: 15px 20px;
        border-radius: 0;
        text-align: center;
        border-bottom: 1px solid #003366;
    }

    .menu-toggle {
        display: block;
    }
}

/* Search Section Styling */
.search-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin: 40px auto;
    max-width: 800px;
}

.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.search-form label {
    font-weight: bold;
    color: #555;
    display: block;
    margin-bottom: 5px;
}

.search-form select,
.search-form input[type="date"],
.search-form input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.search-form button {
    background-color: #004d99;
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.search-form button:hover {
    background-color: #003366;
}

/* Footer Styling */
.main-footer {
    background: #2c3e50;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    margin-top: auto; /* Ensures footer sticks to the bottom */
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-menu li {
    margin: 0 10px;
}

.footer-menu a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.footer-menu a:hover {
    color: #87ceeb;
}

.copyright {
    font-size: 14px;
    color: #bbb;
}
