/* Tanke Masonry - Sorted Vertical Version */
.tm-masonry-container,
.tm-masonry-container * {
    box-sizing: border-box;
}

.tm-masonry-container {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
}

.tm-grid-items {
    width: 100% !important;
    margin: 0 !important;
}

.tm-grid-items .tm-element {
    width: 20%;
    /* 5 Columns */
    float: left;
    position: relative;
    overflow: hidden;
}

/* Height Styles */
.tm-grid-items .tm-element.regular {
    aspect-ratio: 1 / 1;
}

.tm-grid-items .tm-element.tall {
    aspect-ratio: 2 / 3;
}

/* Image Style */
.tm-grid-items .tm-element img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1.2s cubic-bezier(0.1, 0.2, 0.2, 1);
}

.tm-grid-items .tm-element:hover img {
    transform: scale(1.1);
}

/* Overlays */
.tm-overlay-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 5;
}

.tm-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    text-align: center;
    padding: 20px;
    z-index: 10;
    transition: all 0.4s ease;
}

.tm-element:hover .tm-overlay-bg,
.tm-element:hover .tm-content {
    opacity: 1;
}

.tm-content h3 {
    color: #fff !important;
    font-size: 1.2vw;
    margin: 0 0 5px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.tm-content p {
    color: #fff !important;
    font-size: 0.8vw;
    opacity: 0.6;
    margin: 0;
}

/* Filters */
.tm-filters {
    text-align: center;
    padding: 40px 0;
    background: #fff;
}

.tm-filters ul {
    padding: 0;
    list-style: none;
    margin: 0;
}

.tm-filters ul li {
    display: inline-block;
    margin: 0 15px;
}

.tm-filters a {
    text-decoration: none;
    color: #111;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 2px;
    border-bottom: 2px solid transparent;
}

.tm-filters a.tm-active {
    border-color: #000;
}

/* Responsive */
@media (max-width: 1200px) {
    .tm-grid-items .tm-element {
        width: 33.33%;
    }

    .tm-content h3 {
        font-size: 18px;
    }

    .tm-content p {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .tm-grid-items .tm-element {
        width: 50%;
    }
}

@media (max-width: 480px) {
    .tm-grid-items .tm-element {
        width: 100%;
        aspect-ratio: 1 / 1 !important;
    }
}