.ecg-portfolio-grid {
display: flex;
flex-wrap: wrap;
gap: 1rem;
justify-content: center;
} .ecg-portfolio-item {
position: relative;
width: 100%;
aspect-ratio: 4/3;
overflow: hidden;
flex: 0 0 100%;
max-width: 100%;
}
@media (min-width: 600px) {
.ecg-portfolio-item {
flex: 0 0 50%;
max-width: 50%;
}
}
@media (min-width: 900px) {
.ecg-portfolio-item {
flex: 0 0 25%;
max-width: 25%;
}
} .ecg-filter-toggle {
display: none;
} .ecg-portfolio-filters {
text-align: center;
margin-bottom: 2rem;
}
.ecg-filters-list {
display: inline-flex;
flex-wrap: wrap;
justify-content: center;
gap: 1rem;
list-style: none;
padding: 0;
margin: 0;
}
.ecg-filters-list li a {
cursor: pointer;
text-decoration: none;
color: #222;
font-weight: 500;
position: relative;
padding: 5px 10px;
transition: all 0.3s ease;
}
.ecg-filters-list li a::after {
content: "→";
opacity: 0;
margin-left: 6px;
transition: opacity 0.3s ease;
}
.ecg-filters-list li a:hover::after {
opacity: 1;
} .ecg-image {
width: 100%;
height: 100%;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
transition: transform 0.3s ease;
} .ecg-portfolio-item a {
display: block;
position: relative;
width: 100%;
height: 100%;
text-align: center;
color: white;
}
.ecg-portfolio-item a::before {
content: "";
position: absolute;
inset: 0;
background-color: rgba(255, 0, 0, 0.75);
opacity: 0;
transition: opacity 0.3s ease;
z-index: 1;
}
.ecg-portfolio-item a h4 {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
margin: 0;
padding: 0 1rem;
color: white;
font-size: 1.2rem;
opacity: 0;
z-index: 2;
transition: opacity 0.3s ease;
line-height: 1.4;
text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.ecg-portfolio-item:hover a::before,
.ecg-portfolio-item:hover a h4 {
opacity: 1;
}