/* Contact Header - move title down */
.mc--contact-header h1 {
    margin-top: 2rem !important;
}

/* Projecten listing: filters */
.mc--project-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.mc--search-container {
    position: relative;
    width: 620px;
}

.mc--search-container input {
    width: 100%;
    height: 40px; /* Match height of filter triggers */
    padding: 0 1rem 0 2.5rem !important;
    border-radius: 0.3rem !important;
    border: 1px solid #ddd !important;
    background: white !important;
    font-size: 0.95rem !important;
}

.mc--search-container i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

.mc--filter-dropdown {
    position: relative;
}

.mc--filter-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 44px; /* Explicit height to match search */
    padding: 0 1rem;
    min-width: 210px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0.3rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--color-content-text);
    transition: all 0.2s ease;
    position: relative;
}

.mc--filter-trigger:hover {
    border-color: var(--color-content-primary);
}

.mc--filter-trigger i { 
    color: #888;
    font-size: 0.8rem;
}

.mc--dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 250px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0.3rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    padding: 1rem;
}

.mc--dropdown-content.show {
    display: block;
}

.mc--dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.mc--dropdown-header span {
    font-weight: 600;
    color: var(--color-content-heading);
}

.mc--dropdown-reset {
    background: none;
    border: none;
    color: var(--color-content-primary);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
}

.mc--dropdown-reset:hover {
    text-decoration: underline;
}

.mc--filter-options {
    max-height: 200px;
    overflow-y: auto;
}

.mc--filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    cursor: pointer;
}

.mc--filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.mc--filter-option label {
    cursor: pointer;
    flex: 1;
    margin: 0;
    font-size: 0.95rem;
}

.mc--filter-clear {
    display: none;
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    cursor: pointer;
    font-size: 0.9rem;
}

.mc--filter-clear.show {
    display: block;
}

.mc--filter-badge {
    display: none;
    position: absolute;
    top: 50%;
    right: 1.8rem;
    transform: translateY(-50%);
    background: var(--color-content-primary);
    color: white;
    font-size: 0.75rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}

.mc--filter-badge.show {
    display: flex;
}

/* Utility class for hiding elements - high specificity */
.mc--filter-badge.hidden,
.mc--filter-clear.hidden {
    display: none !important;
}

/* Hide default us-grid styles */
.w-grid-preloader {
    display: none !important;
}

/* Responsive */
@media (max-width: 900px) {
    .mc--project-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mc--search-container {
        width: 100% !important;
    }
    
    .mc--filter-dropdown {
        width: 100%;
    }
    
    .mc--filter-trigger {
        width: 100%;
        min-width: auto;
    }
    
    .mc--dropdown-content {
        width: 100%;
        min-width: auto;
    }
}

/* Mobile responsive for contact header */
@media (max-width: 768px) {
    .mc--contact-header {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Title size on mobile */
    .mc--contact-header h1 {
        font-size: 2.5rem !important;
    }
}

@media (max-width: 600px) {
    .mc--project-filters {
        flex-direction: column;
        align-items: stretch;
    }
    .mc--search-container {
        width: 100% !important;
    }
}

/* Grid Layout */
.w-grid.layout_259 .w-grid-item-h {
    background: var(--color-content-bg);
    color: var(--color-content-text);
    border-radius: 0.5rem;
    box-shadow: 0 0.03rem 0.06rem rgba(0,0,0,0.1), 0 0.1rem 0.3rem rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Project/News Card Hover Effects */
.no-touch .w-grid.layout_259 .w-grid-item-h:hover {
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.15), 0 0.25rem 0.5rem rgba(0,0,0,0.1);
    transform: translateY(-8px);
}

/* Title color change on hover */
.w-grid.layout_259 .w-grid-item-h .usg_post_title_1 a {
    transition: color 0.3s ease;
}

.no-touch .w-grid.layout_259 .w-grid-item-h:hover .usg_post_title_1 a {
    color: var(--color-content-primary) !important;
}

.layout_259 .usg_post_image_1 {
    margin-bottom: -2rem !important;
}

.layout_259 .usg_post_title_1 {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.5rem !important;
}

.layout_259 .usg_vwrapper_1 {
    margin-top: 2rem !important;
    padding: 1.5rem !important;
}

@media (max-width: 576px) {
    .layout_259 .usg_post_title_1 {
        font-size: 1.2rem !important;
    }
}

/* Gallery Hover */
.mc--gallery-item:hover {
    transform: translateY(-5px);
}

/* ============================================
   HOMEPAGE PROJECTS - OVERRIDE STYLES
   ============================================ */

/* Homepage projects grid - 4 columns */
.mc--homepage-projects {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1.5rem !important;
}

@media (max-width: 1024px) {
    .mc--homepage-projects {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .mc--homepage-projects {
        grid-template-columns: 1fr !important;
    }
}

/* Homepage project cards */
.mc--homepage-projects .w-grid-item {
    background: white !important;
    border-radius: 0.3rem !important;
    box-shadow: 0 0.03rem 0.06rem rgba(0,0,0,0.1), 0 0.1rem 0.3rem rgba(0,0,0,0.1) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.mc--homepage-projects .w-grid-item-h {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

/* Fix image container - override the negative margin */
.mc--homepage-projects .w-post-elm.post_image {
    width: 100% !important;
    height: 200px !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
}

.mc--homepage-projects .w-post-elm.post_image .w-image-h,
.mc--homepage-projects .w-post-elm.post_image > div {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    position: relative !important;
}

.mc--homepage-projects .w-post-elm.post_image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    position: relative !important;
}

/* Content area */
.mc--homepage-projects .w-vwrapper {
    padding: 1.5rem !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    margin-top: 0 !important;
}

.mc--homepage-projects .portfolio_intro {
    flex: 1 !important;
    margin-bottom: 1rem !important;
}

.mc--homepage-projects .portfolio_intro p {
    margin: 0 !important;
}
