body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

.search-bar {
    display: flex;
    justify-content: center;
    margin: 20px;
    gap: 10px;
}

.search-bar input,
.search-bar select {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    justify-content: center;
}

.project {
    flex: 0 1 calc(20% - 15px); /* 4 projects per row (gap included) */
    background: linear-gradient(to bottom,  #f4f4f4, #a0c4ff);
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    padding: 10px;
}

.project img {
    width: 100%;
    height: 600px;
    max-height: 150px; /* Limit image height for consistency */
    object-fit:cover;
}

.project-details {
    padding: 10px;
}

.project-details h3 {
    margin: 5px 0;
    font-size: 14px;
    color: #333;
}

.project-details p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.project-details .view-project {
    display: inline-block;
    margin-top: 10px;
    padding: 10px;
    background: #fff;
    color: #feb900;
    text-decoration: none;
    border: 1px solid #feb900;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.project-details .view-project:hover {
    background: #feb900;
    color: #fff;
}

.project.hidden {
    display: none;
}

/* Responsive Layout */
@media (max-width: 1024px) {
    .project {
        flex: 0 1 calc(50% - 20px); /* 2 cards per row on tablets */
    }
}

@media (max-width: 768px) {
    .project {
        flex: 0 1 calc(50% - 20px); /* 2 cards per row */
    }
}

@media (max-width: 480px) {
    .project {
        flex: 0 1 calc(100% - 20px); /* 1 card per row */
    }
}

/* Mobile-specific styles for screens with a max-width of 678px */
@media screen and (max-width: 678px) {
    .search-bar {
        flex-direction: column;       /* Stack input and select vertically */
        margin: 10px;                 /* Reduce margin for mobile */
        gap: 15px;                    /* Increase gap between elements */
    }

    .search-bar input,
    .search-bar select {
        width: 100%;                  /* Make input and select take full width */
        font-size: 14px;              /* Adjust font size for smaller screens */
        padding: 12px;                /* Increase padding for better touch accessibility */
    }
}

.pagination {
    text-align: center;
    margin: 20px 0;
}

.pagination button {
    padding: 10px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    cursor: pointer;
}

.pagination button.active {
    background-color: #feb900;
    color: #fff;
}


.pagination button.disabled {
    background-color: #f0f0f0;
    cursor: not-allowed;
}