/* General styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px; /* Add padding for the body */
    background-color: #f9f9f9;
    color: #333;
}

/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Navbar styling */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #000000;
    padding: 10px 20px;
    width: 100%;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.logo {
    display: flex;
    align-items: center;
    margin-right: 20px; /* Add space between logo and navigation */
}

.nav-logo {
    width: 150px; /* Smaller base size */
    height: auto;
    max-width: 100%; /* Ensure it doesn't overflow container */
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center; /* Center align with logo */
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

nav ul li {
    margin: 5px 10px; /* Reduced margins for mobile */
}

nav ul li a {
    text-decoration: none;
    color: rgb(255, 136, 0);
    font-size: 16px;
    font-weight: bold;
    padding: 5px 10px; /* Add padding for better touch targets */
}

nav ul li a:hover {
    color: #ff6600;
}

/* Media Queries for Responsive Design */
@media screen and (max-width: 768px) {
    nav {
        padding: 10px;
    }

    .logo {
        margin-bottom: 10px; /* Add space between logo and nav items */
        justify-content: center; /* Center logo on mobile */
    }

    .nav-logo {
        width: 120px; /* Even smaller on mobile */
    }

    nav ul {
        justify-content: center; /* Center nav items */
    }

    nav ul li {
        margin: 5px; /* Reduced margins further for mobile */
    }
}

/* Additional responsive adjustments */
@media screen and (max-width: 480px) {
    body {
        padding: 10px; /* Reduce body padding on very small screens */
    }

    .nav-logo {
        width: 100px; /* Smallest size for very small screens */
    }

    nav ul li a {
        font-size: 14px; /* Smaller font size for very small screens */
    }
}

/* Header styling */
header {
    background-color: #ff6600;
    padding: 20px;
    text-align: center;
    color: white;
}

h1 {
    margin: 0;
}

h2 {
    color: #ff6600;
}

/* Button styling */
.btn-login, .btn-logout {
    background-color: white;
    color: #ff6600;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    border: 2px solid #ff6600;
    transition: background-color 0.3s ease;
}

.btn-login:hover, .btn-logout:hover {
    background-color: #ff6600;
    color: white;
}

/* Login form styling */
.login-container {
    width: 250px;
    margin: 100px auto;
    padding: 20px;
    background-color: white;
    border: 2px solid #ff6600;
    border-radius: 10px;
}

input {
    width: 90%;
    padding: 8px;
    margin: 10px 5%;
    border: 1px solid #ddd;
    border-radius: 5px;
}

button {
    width: 90%;
    padding: 8px;
    margin: 10px 5%; /* Added margin for spacing */
    background-color: #ff6600;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #e55b00;
}

/* Error message styling */
.error {
    color: red;
}

/* General styling remains the same */



/* Success and error messages */
.success {
    color: green;
}

.error {
    color: red;
}

table {
    width: 100%; /* Makes the table take full width of the container */
    border-collapse: collapse; /* Ensures no gaps between cells */
}

td, th {
    text-align: center; /* Center-aligns text in table cells */
    padding: 10px; /* Adds padding for spacing */
    border: 1px solid #ddd; /* Adds a border to each cell */
}


/* Table styling */

.projects-grid {
    display: grid;
    gap: 20px;
    justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    margin-top: 20px;
}

.project-table {
    width: 80%;
    margin: 20px auto;
    border-collapse: collapse;
}

.project-table td {
    padding: 20px;
    text-align: center;
}

.project-card {
    background-color: #fff;
    border: 2px solid #ff6600;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.project-card h3 {
    margin-top: 0;
    color: #ff6600;
}

.vote-btn {
    background-color: #ff6600;
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    margin-top: 10px;
}

.vote-btn:hover {
    background-color: #e55b00;
}

/* Project card with image */
.project-card img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.project-card {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    justify-content: space-between; /* Space between content and button */
    border: 1px solid #ddd; /* Border around each container */
    padding: 10px; /* Padding inside the container */
    margin: 10px; /* Margin between containers */
    height: 400px; /* Fixed height for uniformity */
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1); /* Optional shadow */
    text-align: center; /* Center-align text */
}
.project-card {
    width: 100%; /* Let grid determine width */
    max-width: 400px; /* Optional: cap width on large screens */
}

.project-details {
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.8); /* Add a semi-transparent background for better readability */
    text-align: center;
}

.project-card img {
    width: 100%;  /* Use full width of the container */
    height: 250px; /* Set height for the image */
    object-fit: cover; /* Crop the image to fit */
}

.vote-button {
    margin-top: auto; /* Push the button to the bottom */
    background-color: rgb(255, 166, 0); /* Button color */
    color: white; /* Text color */
    border: none; /* Remove border */
    padding: 5px; /* Button padding */
    cursor: pointer; /* Pointer cursor */
}

