.tmk-project-cover {
    position: relative !important;
    overflow: hidden !important;
    isolation: isolate;
}

.tmk-project-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition:
        transform 0.4s ease,
        filter 0.4s ease;
}

.tmk-project-title-overlay {
    position: absolute;
    inset: 0;
    z-index: 15;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.92) 0%,
        rgba(0, 0, 0, 0.4) 48%,
        transparent 78%
    );
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.tmk-project-title-overlay span {
    display: block;
    color: #ffffff;
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 700;
    line-height: 1.25;
    text-transform: capitalize;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    transform: translateY(12px);
    transition: transform 0.3s ease;
}

.tmk-project-cover:hover img,
.tmk-project-cover:focus-within img {
    transform: scale(1.06);
    filter: brightness(0.7);
}

.tmk-project-cover:hover .tmk-project-title-overlay,
.tmk-project-cover:focus-within .tmk-project-title-overlay {
    opacity: 1;
    visibility: visible;
}

.tmk-project-cover:hover .tmk-project-title-overlay span,
.tmk-project-cover:focus-within .tmk-project-title-overlay span {
    transform: translateY(0);
}

@media (hover: none), (max-width: 767px) {
    .tmk-project-title-overlay {
        opacity: 1;
        visibility: visible;
        padding: 15px;
        background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.88),
            transparent 68%
        );
    }

    .tmk-project-title-overlay span {
        transform: none;
        font-size: 0.95rem;
    }
}
