:root {
    --border-color: #d0d0d0;
    --bg-primary: #f5f5f5;
    --text-primary: #383838;
    --text-secondary: #606060;
    --text-tertiary: #979797;
    --main-accent: #d40510;
}

.cases {
    padding: 0 30px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.tabs {
    display: flex;
    margin-bottom: 24px;
}

.tab {
    cursor: pointer;
    width: 300px;
    height: 60px;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.tab.active {
    background: var(--bg-primary);

    .tab-title {
        font-weight: 700;
    }
}

.tab.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0px;
    width: 100%;
    height: 3px;
    background: var(--main-accent);
    transform: translateX(-50%);
    animation: underline 0.3s ease;
}

@keyframes underline {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.tab-title {
    padding: 18px 0;
    text-align: center;
    font-weight: 400;
    font-size: 14px;
    line-height: 24px;
    color: var(--text-primary);
}

.content {
    display: none;
}

.show {
    display: block;
}

.select-title {
    font-weight: 400;
    font-size: 12px;
    line-height: 14px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}

.option-select {
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    padding: 10px 16px;
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    color: var(--text-secondary);
    max-width: 100%;

    &:focus {
        outline: none;
    }
}

.cards {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.card {
    width: calc((100% - 48px) / 4);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: 8px;
}

.card-img {
    width: 100%;
    margin-bottom: 16px;
    height: 168px;
    object-fit: cover;
}

.card-title {
    font-weight: 700;
    font-size: 20px;
    line-height: 24px;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-decoration: none;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-description {
    font-weight: 400;
    font-size: 16px;
    line-height: 26px;
    color: var(--text-secondary);

    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pagination {
    margin: 48px auto 0;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.page-link {
    font-size: 16px;
    width: 40px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    border-radius: 4px;

    &:hover {
        color: var(--text-primary);

        &:not(.active, .dots) {
            background-color: #f3f3f7;
        }
    }
}

.page-link.active {
    border: 1px solid var(--text-primary);
}

@media (max-width: 1024px) {
    .card {
        width: calc((100% - 32px) / 3);
    }
}
@media (max-width: 768px) {
    .card {
        width: calc((100% - 16px) / 2);
    }
}
@media (max-width: 576px) {
    .tab {
        height: 40px;
    }

    .tab-title {
        padding: 8px;
    }

    .card {
        width: 100%;
    }
}
