.cases-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    padding: 0 40px 20px 40px;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
}
.cases-grid:first-of-type {
 padding: 40px 40px 20px 40px;
}
.cases-grid:last-of-type {
 padding: 0 40px 40px 40px;
}

.case-item {
    flex: none;
    width: 100%;
    transition: flex 0.5s ease, opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.case-item a {
    display: block;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.case-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.case-text {
    display: none;
    padding: 10px;
    background-color: #fff;
    position: absolute;
    bottom: 0;
}

.case-title span {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #09202E;
    display: block;
    margin-bottom: 2px;
}

.case-cat {
    display: block;
    position: static;
    opacity: 1 !important;
    transform: none !important;
    font-size: 12px;
    margin-top: 8px;
}

.case-text span {
    font-size: 12px;
    line-height: 1.5;
    white-space: normal;
    word-break: break-word;
}

.case-item:hover .case-text {
    display: block;
}
.case-item:hover .case-cat {
    display: block;
}

.case-cat span {
    transition: transform 0.4s ease;
}

.case-item:hover .case-cat span {
    transform: translateY(0);
}

.cases-grid .case-item:hover {
    flex: none;
    z-index: auto;
}




@media (min-width: 768px) {

    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 40px 20px 40px;
    }
    .cases-grid:first-of-type {
        padding: 40px 40px 20px 40px;
    }
    .cases-grid:last-of-type {
        padding: 0 40px 40px 40px;
    }
}

@media (min-width: 1200px) {

    .cases-grid {
        display: flex;
        grid-template-columns: none;
        padding: 0px 80px 20px 80px;
    }

    .cases-grid:first-of-type {
        padding: 80px 80px 20px 80px;
    }

    .cases-grid:last-of-type {
        padding: 0 80px 80px 80px;
    }

    .case-item {
        flex: 1;
    }

    .case-title span {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .case-text span {
        font-size: 13px;
        line-height: normal;
    }

    .case-cat {
        display: none;
        position: static;
        opacity: initial;
        transform: initial;
        font-size: initial;
        margin-top: 0;
    }

    .cases-grid .case-item:hover {
        flex: 2.2;
        z-index: 2;
    }
}

.subtext-wrapper {
    position: relative;
    min-height: 40px;
    margin: 0 15px 15px;
    overflow: hidden;
}

.subtext-wrapper p {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    transition: opacity 0.3s ease;
}

.subtext-default {
    opacity: 1;
    color: #4b4b4b;
}

.subtext-hover {
    opacity: 0;
    color: #4b4b4b;
}

.case-item:hover .subtext-default {
    opacity: 0;
}
.case-item:hover .subtext-hover {
    opacity: 1;
}



#custom-cursor {
    position: absolute;
    width: 30px; 
    height: 30px;
    border: 2px solid #999;
    background-color: transparent;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
 	transform: translate(-50%, -50%);
	transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#custom-cursor.cursor-clickable {
    background: rgba(221,221,221,0.8);
    border: none;
    transform: translate(-50%, -50%) scale(2);
}
