/* Media page gallery alignment only. Existing theme styles are unchanged. */
.media-aligned-gallery {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 20px;
    margin-left: 0;
    margin-right: 0;
    height: auto !important;
}
.media-aligned-gallery > .filter-item {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}
.media-aligned-gallery .single-project-style4,
.media-aligned-gallery .img-holder,
.media-aligned-gallery .img-holder > .inner {
    width: 100%;
}
.media-aligned-gallery .img-holder > .inner {
    height: 290px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
}
.media-aligned-gallery .img-holder > .inner > img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    object-fit: contain;
}
@media (max-width: 991px) {
    .media-aligned-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
    .media-aligned-gallery { grid-template-columns: 1fr; gap: 20px; }
    .media-aligned-gallery .img-holder > .inner { height: 340px; }
}
