/* News Card Component */

/* Обертка-ссылка для всей карточки */
.news-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.news-card-link:hover {
    transform: translateY(-2px);
}

.news-card {
    display: flex;
    flex-direction: column;
    background: #EAEAEA;
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
}

/* Часть 1: Изображение */
.news-card__image-part {
    padding: 10px;
    position: relative;
    width: 100%;
    aspect-ratio: 16/9; /* Унифицированное соотношение сторон 16:9 */
    overflow: hidden;
}

.news-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Обеспечивает заполнение всего контейнера без искажений */
    border-radius: 10px;
    display: block;
}

/* Часть 2: Контент */
.news-card__content-part {
    padding-top: 10px;
    padding-left: clamp(20px, calc(20px + (30 - 20) * ((100vw - 991px) / (1920 - 991))), 30px);
    padding-right: clamp(20px, calc(20px + (30 - 20) * ((100vw - 991px) / (1920 - 991))), 30px);
    padding-bottom: clamp(20px, calc(20px + (30 - 20) * ((100vw - 991px) / (1920 - 991))), 30px);
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Позволяет блоку растягиваться */
    justify-content: space-between; /* Распределяет содержимое между верхом и низом */
}

/* Бейдж даты */
.news-card__date-badge {
    background: #FFFFFF;
    padding: 6px 7px;
    border-radius: 5px;
    display: inline-block;
    width: fit-content;
    font-family: 'Commissioner', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: clamp(10px, calc(10px + (12 - 10) * ((100vw - 991px) / (1920 - 991))), 12px);
    line-height: 100%;
    letter-spacing: -3%;
    color: #353331;
    margin-bottom: 10px;
}

/* Заголовок */
.news-card__title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: clamp(24px, calc(24px + (30 - 24) * ((100vw - 991px) / (1920 - 991))), 30px);
    line-height: 90%;
    letter-spacing: -5%;
    color: #353331;
    margin: 0 0 20px 0;
}

/* Верхняя часть контента (дата, заголовок, подзаголовок) */
.news-card__top-content {
    display: flex;
    flex-direction: column;
}

/* Подзаголовок */
.news-card__subtitle {
    font-family: 'Commissioner', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: clamp(12px, calc(12px + (14 - 12) * ((100vw - 991px) / (1920 - 991))), 14px);
    line-height: 100%;
    letter-spacing: -3%;
    color: #353331;
    margin: 0 0 20px 0; /* Уменьшен нижний отступ */
    
    /* Ограничение до 3 строк */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

/* Добавляем "...далее" если текст обрезается */
.news-card__subtitle::after {
    content: "...далее";
    position: absolute;
    bottom: 0;
    right: 0;
    background: #EAEAEA;
    color: #9C9B9A;
    padding-left: 5px;
    display: none;
}

/* Показываем "...далее" только если текст действительно обрезается */
.news-card__subtitle.text-clamped::after {
    display: inline;
}

/* Элемент "Читать статью" */
.news-card__read-more {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-bottom: 1px solid #353331;
    padding-bottom: 5px;
    margin-top: auto; /* Отталкивает блок вниз при наличии свободного пространства */
}

.news-card__read-text {
    font-family: 'Commissioner', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: clamp(12px, calc(12px + (14 - 12) * ((100vw - 991px) / (1920 - 991))), 14px);
    line-height: 100%;
    letter-spacing: -3%;
    color: #353331;
}

.news-card__read-icon {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.news-card-link:hover .news-card__read-icon {
    transform: rotate(45deg);
} 