.project-search-container {
    margin-top: 20px;
    width: 100% !important; /* ✅ Ensure full width */
    max-width: 100% !important;
}

/* ✅ Always creates a uniform grid layout with 3 equal columns */
.project-search-container .custom-project-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; /* Always 3 columns */
    gap: 10px !important;
    margin-top: 20px;
}

/* ✅ Each project card container (remains fixed) */
.project-search-container .custom-project-item {
    width: 100%;
    height: 300px; /* ✅ Fixed height */
    overflow: hidden;
    position: relative;
    display: block;
    text-align: left;
    cursor: pointer;
}

/* Remove this rule to prevent switching to flex layout when there's only one item */
/*
.project-search-container .custom-project-grid:has(.custom-project-item:nth-child(1):nth-last-child(1)) {
    display: flex;
}
*/

/* Remove the nth-child rule if unnecessary */
/*
.project-search-container .custom-project-grid .custom-project-item:nth-child(1):nth-last-child(1) {
    max-width: 33% !important;
    flex: 1;
}
*/

/* ✅ Extra div for zoom effect (keeps the container fixed) */
.project-search-container .image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s ease-in-out; /* ✅ Smooth zoom effect */
    z-index: 0;
}

/* ✅ Zoom effect inside the container */
.project-search-container .custom-project-item:hover .image-container {
    transform: scale(1.1); /* ✅ Only the image zooms */
}

/* ✅ Gradient overlay for better text readability */
.project-search-container .custom-project-item::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to bottom,transparent 30%,black 100%);  
    z-index: 1;
}

/* ✅ Text container */
.project-search-container .project-text {
    position: absolute;
    bottom: 15px;
    left: 15px;
    z-index: 2;
}

/* ✅ Project title styling */
.project-search-container .project-title {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
    color: white;
    text-transform: uppercase;
}

/* ✅ Country name under project title */
.project-search-container .project-country {
    font-size: 14px;
    font-weight: lighter;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.8);
}

/* ✅ Remove responsive overrides for grid columns */  
/* You can optionally remove or adjust these queries if not needed anymore */
@media (max-width: 1024px), (max-width: 768px) {
    .project-search-container .custom-project-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* ✅ Filter container: Align elements in one row and remove extra gap */
.project-filter-container {
    display: flex;
    align-items: center;
    gap: 5px; /* ✅ Minimal spacing */
    margin-bottom: 20px;
}

/* ✅ Style input and dropdowns */
.project-filter-container input,
.project-filter-container select {
    flex: 1;
    max-width: 200px; /* ✅ Ensure uniform width */
    padding: 10px;
    border: 1px solid #444;
    background: #000;
    color: white;
    border-radius: 5px;
    font-size: 14px;
}

/* ✅ Adjust placeholder color */
.project-filter-container input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* ✅ Remove extra margins/padding */
.project-filter-container select,
.project-filter-container input {
    margin: 0;
}

/* ✅ Responsive Fix */
@media (max-width: 1024px) {
    .project-filter-container {
        flex-wrap: wrap; /* ✅ Wrap items on smaller screens */
        justify-content: flex-start;
    }

    .project-filter-container input,
    .project-filter-container select {
        max-width: 100%;
        width: 48%;
    }
}

@media (max-width: 768px) {
    .project-filter-container input,
    .project-filter-container select {
        width: 100%;
    }
}
