@import url("../design-tokens.css");

.news-block {
    position: relative;
    overflow: hidden;
}

.news-block__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--gap-md);
    margin-bottom: var(--gap-lg);
}

.news-block__head-content {
    max-width: 760px;
}

.news-block__label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
    color: var(--color-red);
    font-size: var(--text-xs);
    line-height: 1.3;
    font-weight: 800;
    text-transform: uppercase;
}

.news-block__label::before {
    content: "";
    width: 36px;
    height: 2px;
    background: var(--color-red);
}

.news-block__title {
    margin: 0;
}

.news-block__text {
    max-width: 620px;
    margin-top: var(--space-4-5);
    color: var(--color-text);
    font-size: var(--text-md);
    line-height: 1.6;
}

.news-block__text p {
    margin: 0;
}

.news-block__all-link {
    min-height: 46px;
    padding: 0 24px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-red);
    display: inline-flex;
    align-items: center;
    gap: var(--space-4-5);
    color: var(--color-white);
    font-size: var(--text-sm);
    line-height: 1;
    font-weight: 800;
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease;
}

.news-block__all-link:hover {
    background: rgba(239,52,45,.12);
}

.news-block__all-link svg {
    width: 18px;
    height: 18px;
    color: var(--color-red);
}

.news-block__slider-wrap {
    position: relative;
}

.news-block__slider {
    overflow: hidden;
}

.news-block .swiper-slide {
    height: auto;
}





/* card */

.news-slider-card {
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.news-slider-card:hover {
    transform: translateY(-3px);
    border-color: rgba(239,52,45,.55);
    box-shadow: 0 16px 38px rgba(0,0,0,.32);
}

.news-slider-card__link {
    height: 100%;
    min-height: 390px;
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}

.news-slider-card__media {
    position: relative;
    aspect-ratio: 1.55 / 1;
    overflow: hidden;
    background: var(--color-dark);
}

.news-slider-card__image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .35s ease;
}

.news-slider-card:hover .news-slider-card__image {
    transform: scale(1.04);
}

.news-slider-card__content {
    flex: 1;
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
}

.news-slider-card__badge {
    align-self: flex-start;
    margin-top: -36px;
    margin-bottom: var(--space-4-5);
    position: relative;
    z-index: 2;
    padding: 6px 10px;
    border-radius: var(--radius-xs);
    background: var(--color-red);
    color: var(--color-white);
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
}

.news-slider-card__date {
    margin-bottom: var(--space-3);
    color: var(--color-muted);
    font-size: var(--text-xs);
    line-height: 1.35;
}

.news-slider-card__title {
    margin: 0 0 12px;
    color: var(--color-white);
    font-size: clamp(1.05rem, 1.35vw, 1.25rem);
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: -.015em;
}

.news-slider-card__excerpt {
    margin-bottom: var(--space-6);
    font-size: var(--text-sm);
    line-height: 1.55;
    color: var(--muted);
}

.news-slider-card__button {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2-5);
    color: var(--color-white);
    font-size: var(--text-xs);
    line-height: 1;
    font-weight: 800;
}

.news-slider-card__button svg {
    width: 17px;
    height: 17px;
    color: var(--color-red);
    transition: transform .2s ease;
}

.news-slider-card:hover .news-slider-card__button svg {
    transform: translateX(3px);
}

@media (max-width: var(--container-layout)) {
    .news-block__nav--prev {
        left: 8px;
    }

    .news-block__nav--next {
        right: 8px;
    }
}

@media (max-width: 991px) {
    .news-block__head {
        align-items: flex-start;
        flex-direction: column;
    }

    .news-block__head-side {
        width: 100%;
    }
}

@media (max-width: 575px) {
    .news-block__nav {
        display: none;
    }

    .news-slider-card__link {
        min-height: 360px;
    }

    .news-slider-card__content {
        padding: var(--space-4-5);
    }
}
.news-block--grid .news-block__slider {
    overflow: visible;
}

.news-block--grid .swiper-wrapper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gap-sm);
    transform: none !important;
}

.news-block--grid .swiper-slide {
    width: auto !important;
    margin-right: 0 !important;
}

.news-block--grid .news-block__nav,
.news-block--grid .news-block__pagination {
    display: none;
}

.news-block--grid .news-slider-card {
    height: 100%;
}
@media (max-width: 991px) {
    .news-block--grid .swiper-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .news-block--grid .swiper-wrapper {
        grid-template-columns: 1fr;
    }
}