.main-page__news-item {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    display: block;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.main-page__news-item-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.main-page__news-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.1) 100%);
    z-index: 2;
    transition: all 0.3s ease;
}

.main-page__news-item:hover .main-page__news-item-overlay {
    background: rgba(0,0,0,0.8);
}

.main-page__news-item-content {
    position: relative;
    z-index: 3;
    padding: 25px;
    height: 100%;
    display: flex;
    flex-direction: column;

    justify-content: flex-end;
}

.main-page__news-item-title h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.3;
    transition: all 0.3s ease;
}

.main-page__news-item:hover .main-page__news-item-title h3 {
    transform: translateY(-5px);
}

.main-page__news-item-desc p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    opacity: 0.9;
    max-height: 0;
    display: -webkit-box;
    -webkit-line-clamp: 7; /* Количество строк */
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    overflow: hidden;
    transition: all 0.4s ease;
}

.main-page__news-item:hover .main-page__news-item-desc p {
    max-height: 250px;
}

.main-page__news-item-button {
    display: inline-block;
    padding: 8px 20px;
    background: var(--color-primary); /* Ваш основной цвет */
    color: white;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    align-self: flex-start;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease 0.1s;
}

.main-page__news-item-date{
    font-size: var(--font-base);
    color: var(--color-primary);
    font-weight: bold;
    margin-bottom: 10px;
}

.main-page__news-item-price {
    font-size: var(--font-base);
    color: var(--color-primary);
    font-weight: bold;
}

.main-page__news-item:hover .main-page__news-item-button {
    opacity: 1;
    transform: translateY(0);
}


.main-page__news-item.is-active .main-page__news-item-desc p,
.main-page__news-item:hover .main-page__news-item-desc p {
    max-height: 250px;
}

.main-page__news-item.is-active .main-page__news-item-button,
.main-page__news-item:hover .main-page__news-item-button {
    opacity: 1;
    transform: translateY(0);
}

.main-page__news-item.is-active .main-page__news-item-title h3,
.main-page__news-item:hover .main-page__news-item-title h3 {
    transform: translateY(-5px);
}

.main-page__news-item.is-active .main-page__news-item-overlay,
.main-page__news-item:hover .main-page__news-item-overlay {
    background: rgba(0, 0, 0, 0.8);
}
