.cases-section {
    padding: 4rem 0 6rem;
}

.cases-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: stretch;
}

.case-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 0 0 calc(50% - 1rem);
    max-width: calc(50% - 1rem);
    display: flex;
    flex-direction: column;
}

.case-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.case-image,
.media-list-page .case-image {
    width: 100%;
    height: clamp(320px, 28vw, 520px);
    min-height: 320px;
    max-height: 520px;
    object-fit: contain !important;
    object-position: center;
    background: #f5f7fb;
    background-image: linear-gradient(45deg, rgba(79, 70, 229, 0.03) 25%, transparent 25%, transparent 50%, rgba(79, 70, 229, 0.03) 50%, rgba(79, 70, 229, 0.03) 75%, transparent 75%, transparent);
    background-size: 18px 18px;
}

.case-content {
    padding: 2rem;
    flex: 1;
}

.case-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.4;
    height: 1.93em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.case-desc {
    color: var(--text-light);
    line-height: 1.7;
    height: 5.1em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

@media (max-width: 768px) {
    .cases-grid {
        display: block;
    }

    .case-card {
        max-width: 100%;
        flex: 0 0 100%;
    }

    .case-image,
    .media-list-page .case-image {
        height: 300px;
        min-height: 300px;
        max-height: 300px;
    }
}
