/* ============================
   Gallery Container
============================ */
.gallery-container {
    padding: 50px 20px;
    background-color: #f9f9f9;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.gallery-container h2 {
    font-size: 32px;
    margin-bottom: 40px;
    color: #333;
}

/* ============================
   Filter Buttons
============================ */
.gallery-container .filters {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.gallery-container .filters label {
    cursor: pointer;
    padding: 8px 20px;
    background-color: #e0e0e0;
    border-radius: 25px;
    transition: background-color 0.3s;
    font-weight: 500;
}

.gallery-container .filters label:hover {
    background-color: #007bff;
    color: #fff;
}

/* ============================
   Hide radio buttons
============================ */
.gallery-container input[type="radio"] {
    display: none;
}

/* ============================
   Gallery Grid
============================ */
.gallery-container .gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center items horizontally */
    gap: 20px;
}

/* Gallery Items */
.gallery-container .gallery .item {
    width: 400px;
    height: 200px;
    overflow: hidden;
    border-radius: 10px;
    transition: transform 0.3s;
}

.gallery-container .gallery .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.gallery-container .gallery .item:hover img {
    transform: scale(1.05);
}

/* ============================
   Filtering logic (CSS only)
============================ */
#all:checked ~ .gallery .item {
    display: block;
}

#plumbing:checked ~ .gallery .item {
    display: none;
}
#plumbing:checked ~ .gallery .item.plumbing {
    display: block;
}

#residential:checked ~ .gallery .item {
    display: none;
}
#residential:checked ~ .gallery .item.residential {
    display: block;
}

#electricals:checked ~ .gallery .item {
    display: none;
}
#electricals:checked ~ .gallery .item.electricals {
    display: block;
}

#fixing:checked ~ .gallery .item {
    display: none;
}
#fixing:checked ~ .gallery .item.fixing {
    display: block;
}

/* ============================
   Responsive tweaks
============================ */
@media (max-width: 768px) {
    .gallery-container .gallery .item,
    .gallery-container .gallery .item img {
        width: 100%;
        height: auto;
    }
}