/* ==========================================================================
   MEBELF — новости на главной странице
   4 карточки на ПК, 2 на планшете, 1 на телефоне.
   ========================================================================== */

#home-news.home-news {
    --home-news-accent: #f03327;
    --home-news-accent-dark: #d9271c;
    --home-news-ink: #1f1d1c;
    --home-news-text: #6f6964;
    --home-news-muted: #918a84;
    --home-news-line: #e8e2dc;
    --home-news-card: #faf8f5;

    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: var(--mf-section-py, clamp(72px, 7vw, 104px)) 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 7% 92%, rgba(240, 51, 39, .025), transparent 24%),
        #fff;
    color: var(--home-news-text);
}

#home-news,
#home-news * {
    box-sizing: border-box;
}

#home-news .home-news__container {
    display: block;
    width: min(1380px, calc(100% - 64px));
    max-width: 1380px;
    margin: 0 auto;
    padding: 0;
}

#home-news .home-news__header {
    display: grid;
    grid-template-columns: minmax(0, 760px) auto;
    gap: 40px;
    align-items: end;
    justify-content: space-between;
    width: 100%;
    margin: 0 0 var(--mf-content-gap, clamp(40px, 4vw, 56px));
}

#home-news .home-news__heading {
    min-width: 0;
    max-width: 760px;
}

#home-news .home-news__eyebrow {
    display: block;
    margin: 0 0 var(--mf-heading-gap, 14px);
    padding: 0;
    color: var(--home-news-accent);
    font-size: var(--mf-eyebrow-size, 12px);
    font-weight: 700;
    letter-spacing: var(--mf-eyebrow-letter-spacing, .14em);
    line-height: var(--mf-eyebrow-line-height, 1.3);
    text-transform: uppercase;
}

#home-news .home-news__title {
    display: block;
    max-width: 760px;
    margin: 0;
    padding: 0;
    color: var(--home-news-ink);
    font-family: inherit;
    font-size: var(--mf-h2-size, clamp(40px, 4vw, 56px));
    font-weight: 600;
    letter-spacing: var(--mf-h2-letter-spacing, -.035em);
    line-height: var(--mf-h2-line-height, 1.06);
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    text-wrap: balance;
}

#home-news .home-news__subtitle {
    display: block;
    max-width: 760px;
    margin: var(--mf-description-gap, 20px) 0 0;
    padding: 0;
    color: var(--home-news-text);
    font-size: var(--mf-subtitle-size, 17px);
    font-weight: 400;
    line-height: var(--mf-subtitle-line-height, 1.6);
}

#home-news .home-news__all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-width: 176px;
    min-height: 52px;
    margin: 0 0 4px;
    padding: 13px 23px;
    border: 1px solid var(--home-news-accent);
    border-radius: 999px;
    background: var(--home-news-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(240, 51, 39, .15);
    transition:
        transform .2s ease,
        background-color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

#home-news .home-news__all:hover,
#home-news .home-news__all:focus-visible {
    border-color: var(--home-news-accent-dark);
    background: var(--home-news-accent-dark);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(240, 51, 39, .21);
}

#home-news .home-news__all-arrow {
    font-size: 21px;
    font-weight: 400;
    line-height: 1;
}

#home-news .home-news__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(16px, 1.5vw, 22px);
    width: 100%;
    min-width: 0;
}

#home-news .home-news__card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100%;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(66, 54, 47, .08);
    border-radius: 14px;
    background: var(--home-news-card);
    box-shadow: 0 8px 28px rgba(42, 34, 29, .04);
    transition:
        transform .28s ease,
        border-color .28s ease,
        box-shadow .28s ease;
}

#home-news .home-news__media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1.36 / 1;
    overflow: hidden;
    background: #ddd6cf;
    color: #fff;
    text-decoration: none;
}

#home-news .home-news__media img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    transform: scale(1.01);
    transition: transform .65s cubic-bezier(.2, .65, .3, 1);
}

#home-news .home-news__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 7px;
    padding: 22px;
    background:
        radial-gradient(circle at 78% 22%, rgba(240, 51, 39, .3), transparent 28%),
        linear-gradient(135deg, #37322f 0%, #6d635c 100%);
}

#home-news .home-news__placeholder-brand {
    color: #fff;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1;
}

#home-news .home-news__placeholder-label {
    color: rgba(255, 255, 255, .76);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    line-height: 1.35;
    text-transform: uppercase;
}

#home-news .home-news__shade {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: block;
    background: linear-gradient(180deg, rgba(18, 13, 10, .02), rgba(18, 13, 10, .18));
    opacity: .62;
    pointer-events: none;
    transition: opacity .28s ease;
}

#home-news .home-news__media-arrow {
    position: absolute;
    z-index: 2;
    top: 16px;
    right: 16px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, .52);
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: var(--home-news-ink);
    font-size: 19px;
    line-height: 1;
    box-shadow: 0 8px 20px rgba(25, 18, 14, .12);
    backdrop-filter: blur(8px);
    transition:
        color .22s ease,
        background-color .22s ease,
        border-color .22s ease,
        transform .22s ease;
}

#home-news .home-news__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    padding: 20px 20px 21px;
}

#home-news .home-news__date {
    display: block;
    margin: 0 0 11px;
    color: var(--home-news-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    line-height: 1.35;
    text-transform: uppercase;
}

#home-news .home-news__card-title {
    display: block;
    margin: 0;
    padding: 0;
    color: var(--home-news-ink);
    font-family: inherit;
    font-size: clamp(18px, 1.35vw, 21px);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.28;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

#home-news .home-news__card-title a {
    display: -webkit-box;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

#home-news .home-news__description {
    display: -webkit-box;
    margin: 13px 0 0;
    overflow: hidden;
    color: var(--home-news-text);
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

#home-news .home-news__more {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    margin-top: auto;
    padding-top: 19px;
    color: var(--home-news-accent);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: color .2s ease, gap .2s ease;
}

#home-news .home-news__more span:last-child {
    font-size: 19px;
    font-weight: 400;
    line-height: 1;
}

#home-news .home-news__more:hover,
#home-news .home-news__more:focus-visible,
#home-news .home-news__card-title a:hover,
#home-news .home-news__card-title a:focus-visible {
    color: var(--home-news-accent-dark);
}

#home-news .home-news__more:hover,
#home-news .home-news__more:focus-visible {
    gap: 16px;
}

#home-news a:focus-visible {
    outline: 3px solid rgba(240, 51, 39, .25);
    outline-offset: 3px;
}

@media (hover: hover) {
    #home-news .home-news__card:hover {
        border-color: rgba(240, 51, 39, .14);
        transform: translateY(-4px);
        box-shadow: 0 16px 38px rgba(42, 34, 29, .085);
    }

    #home-news .home-news__card:hover .home-news__media img {
        transform: scale(1.045);
    }

    #home-news .home-news__card:hover .home-news__shade {
        opacity: .36;
    }

    #home-news .home-news__card:hover .home-news__media-arrow {
        border-color: var(--home-news-accent);
        background: var(--home-news-accent);
        color: #fff;
        transform: translate(2px, -2px);
    }
}

@media (max-width: 1199px) {
    #home-news .home-news__container {
        width: min(100% - 44px, 1180px);
    }

    #home-news .home-news__header {
        gap: 28px;
    }

    #home-news .home-news__body {
        padding: 18px 17px 19px;
    }

    #home-news .home-news__media-arrow {
        top: 13px;
        right: 13px;
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 991px) {
    #home-news .home-news__header {
        grid-template-columns: 1fr;
        align-items: start;
    }

    #home-news .home-news__all {
        justify-self: start;
        margin: 0;
    }

    #home-news .home-news__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    #home-news .home-news__media {
        aspect-ratio: 1.48 / 1;
    }

    #home-news .home-news__card-title {
        font-size: 20px;
    }
}

@media (max-width: 640px) {
    #home-news.home-news {
        padding: var(--mf-section-py, 56px) 0;
    }

    #home-news .home-news__container {
        width: calc(100% - 28px);
    }

    #home-news .home-news__header {
        gap: 22px;
        margin-bottom: var(--mf-content-gap, 32px);
    }

    #home-news .home-news__all {
        min-width: 164px;
        min-height: 48px;
        padding: 12px 20px;
        font-size: 13px;
    }

    #home-news .home-news__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    #home-news .home-news__media {
        aspect-ratio: 1.45 / 1;
    }

    #home-news .home-news__body {
        padding: 18px 18px 20px;
    }

    #home-news .home-news__date {
        margin-bottom: 9px;
    }

    #home-news .home-news__card-title {
        font-size: 20px;
    }

    #home-news .home-news__description {
        margin-top: 10px;
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #home-news *,
    #home-news *::before,
    #home-news *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
