/* ==========================================================================
   MEBELF — преимущества на главной
   Белый фон, 4 преимущества в один ряд на desktop.
   Данные (icon, name, description) остаются динамическими из EUS CMS.
   ========================================================================== */

:root {
    --mebelf-advantages-accent: #f03327;
    --mebelf-advantages-accent-dark: #d9271c;
    --mebelf-advantages-ink: #1f1d1c;
    --mebelf-advantages-text: #817b76;
    --mebelf-advantages-line: #e8e2dc;
    --mebelf-advantages-bg: #fff;
}

#home-advantages.home-advantages {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    margin: 0;
    padding: clamp(72px, 6vw, 96px) 0 clamp(76px, 6vw, 96px);
    background: var(--mebelf-advantages-bg);
    color: var(--mebelf-advantages-text);
}

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

#home-advantages .home-advantages__header {
    display: block;
    max-width: 760px;
    margin: 0 0 clamp(34px, 3.5vw, 48px);
    padding: 0;
}

#home-advantages .home-advantages__eyebrow {
    display: block;
    margin: 0 0 12px !important;
    padding: 0;
    color: var(--mebelf-advantages-accent) !important;
    -webkit-text-fill-color: var(--mebelf-advantages-accent) !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: .15em !important;
    line-height: 1.35 !important;
    text-transform: uppercase !important;
}

#home-advantages .home-advantages__heading {
    position: static !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 760px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    white-space: normal !important;
    border: 0 !important;
    color: var(--mebelf-advantages-ink) !important;
    -webkit-text-fill-color: var(--mebelf-advantages-ink) !important;
    font-family: inherit !important;
    font-size: clamp(42px, 3.8vw, 58px) !important;
    font-weight: 800 !important;
    letter-spacing: -.045em !important;
    line-height: .99 !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    text-wrap: balance;
}

#home-advantages .home-advantages__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--mebelf-advantages-line);
    border-bottom: 1px solid var(--mebelf-advantages-line);
}

#home-advantages .home-advantages__item {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 190px;
    margin: 0;
    padding: 32px clamp(24px, 2.6vw, 42px) 30px;
    background: #fff;
    transition:
        background-color .25s ease,
        transform .25s ease;
}

#home-advantages .home-advantages__item:first-child {
    padding-left: 0;
}

#home-advantages .home-advantages__item:last-child {
    padding-right: 0;
}

#home-advantages .home-advantages__item + .home-advantages__item::before {
    content: "";
    position: absolute;
    top: 28px;
    bottom: 28px;
    left: 0;
    width: 1px;
    background: var(--mebelf-advantages-line);
}

#home-advantages .home-advantages__top {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

#home-advantages .home-advantages__icon,
#home-advantages .home-advantages__index {
    display: grid !important;
    flex: 0 0 54px;
    place-items: center;
    width: 54px !important;
    min-width: 54px !important;
    height: 54px !important;
    margin: 0;
    padding: 0 !important;
    border: 1px solid rgba(240, 51, 39, .22) !important;
    border-radius: 50% !important;
    background: rgba(240, 51, 39, .035) !important;
    color: var(--mebelf-advantages-accent) !important;
    box-shadow: none !important;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    transition:
        border-color .25s ease,
        background-color .25s ease,
        transform .25s ease;
}

#home-advantages .home-advantages__icon::before,
#home-advantages .home-advantages__icon::after {
    display: none !important;
    content: none !important;
}

#home-advantages .home-advantages__icon > i,
#home-advantages .home-advantages__icon > span,
#home-advantages .home-advantages__icon [class*="linearicons-"],
#home-advantages .home-advantages__icon [class*="fa-"] {
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    color: currentColor !important;
    font-size: 28px !important;
    line-height: 1 !important;
}

#home-advantages .home-advantages__icon > i::before,
#home-advantages .home-advantages__icon > span::before,
#home-advantages .home-advantages__icon [class*="linearicons-"]::before,
#home-advantages .home-advantages__icon [class*="fa-"]::before {
    color: currentColor !important;
    font-size: 28px !important;
    line-height: 1 !important;
}

#home-advantages .home-advantages__icon svg,
#home-advantages .home-advantages__icon img {
    display: block !important;
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    object-fit: contain;
    color: currentColor !important;
    background: transparent !important;
    box-shadow: none !important;
}

#home-advantages .home-advantages__icon svg,
#home-advantages .home-advantages__icon svg * {
    fill: none;
    stroke: currentColor;
}

#home-advantages .home-advantages__name {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 5px 7px;
    align-items: baseline;
    min-width: 0;
    min-height: 0;
    margin: 0 !important;
    padding: 0;
    color: var(--mebelf-advantages-ink) !important;
    font-family: inherit;
    line-height: 1;
}

#home-advantages .home-advantages__name strong {
    display: inline-block;
    color: var(--mebelf-advantages-accent) !important;
    -webkit-text-fill-color: var(--mebelf-advantages-accent) !important;
    font-size: clamp(34px, 2.45vw, 44px) !important;
    font-weight: 800 !important;
    letter-spacing: -.045em !important;
    line-height: .95 !important;
    white-space: nowrap;
}

#home-advantages .home-advantages__prefix,
#home-advantages .home-advantages__suffix {
    display: inline-block;
    color: var(--mebelf-advantages-ink) !important;
    -webkit-text-fill-color: var(--mebelf-advantages-ink) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

#home-advantages .home-advantages__description {
    display: block;
    max-width: 230px;
    margin: 19px 0 0 !important;
    padding: 0;
    color: var(--mebelf-advantages-text) !important;
    -webkit-text-fill-color: var(--mebelf-advantages-text) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.55 !important;
}

@media (hover: hover) {
    #home-advantages .home-advantages__item:hover {
        background: #fcfaf8;
        transform: translateY(-2px);
    }

    #home-advantages .home-advantages__item:hover .home-advantages__icon,
    #home-advantages .home-advantages__item:hover .home-advantages__index {
        border-color: rgba(240, 51, 39, .48) !important;
        background: rgba(240, 51, 39, .07) !important;
        transform: translateY(-2px);
    }
}

@media (max-width: 1100px) {
    #home-advantages > .home-advantages__container {
        width: calc(100% - 44px);
    }

    #home-advantages .home-advantages__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #home-advantages .home-advantages__item,
    #home-advantages .home-advantages__item:first-child,
    #home-advantages .home-advantages__item:last-child {
        min-height: 175px;
        padding: 28px 30px;
    }

    #home-advantages .home-advantages__item:nth-child(odd) {
        padding-left: 0;
    }

    #home-advantages .home-advantages__item:nth-child(even) {
        padding-right: 0;
    }

    #home-advantages .home-advantages__item:nth-child(odd)::before {
        display: none;
    }

    #home-advantages .home-advantages__item:nth-child(n + 3) {
        border-top: 1px solid var(--mebelf-advantages-line);
    }

    #home-advantages .home-advantages__description {
        max-width: 320px;
    }
}

@media (max-width: 640px) {
    #home-advantages.home-advantages {
        padding: 54px 0 64px;
    }

    #home-advantages > .home-advantages__container {
        width: calc(100% - 28px);
    }

    #home-advantages .home-advantages__header {
        margin-bottom: 28px;
    }

    #home-advantages .home-advantages__eyebrow {
        font-size: 10px !important;
        letter-spacing: .16em !important;
    }

    #home-advantages .home-advantages__heading {
        font-size: clamp(36px, 10.5vw, 46px) !important;
        line-height: 1.01 !important;
    }

    #home-advantages .home-advantages__list {
        grid-template-columns: 1fr;
    }

    #home-advantages .home-advantages__item,
    #home-advantages .home-advantages__item:first-child,
    #home-advantages .home-advantages__item:last-child,
    #home-advantages .home-advantages__item:nth-child(odd),
    #home-advantages .home-advantages__item:nth-child(even) {
        min-height: 0;
        padding: 24px 0;
        border-top: 0;
    }

    #home-advantages .home-advantages__item + .home-advantages__item::before,
    #home-advantages .home-advantages__item:nth-child(odd)::before {
        display: block;
        top: 0;
        right: 0;
        bottom: auto;
        left: 0;
        width: auto;
        height: 1px;
    }

    #home-advantages .home-advantages__top {
        gap: 16px;
    }

    #home-advantages .home-advantages__icon,
    #home-advantages .home-advantages__index {
        flex-basis: 48px;
        width: 48px !important;
        min-width: 48px !important;
        height: 48px !important;
    }

    #home-advantages .home-advantages__icon > i,
    #home-advantages .home-advantages__icon > span,
    #home-advantages .home-advantages__icon [class*="linearicons-"],
    #home-advantages .home-advantages__icon [class*="fa-"],
    #home-advantages .home-advantages__icon > i::before,
    #home-advantages .home-advantages__icon > span::before,
    #home-advantages .home-advantages__icon [class*="linearicons-"]::before,
    #home-advantages .home-advantages__icon [class*="fa-"]::before {
        font-size: 25px !important;
    }

    #home-advantages .home-advantages__icon svg,
    #home-advantages .home-advantages__icon img {
        width: 25px !important;
        height: 25px !important;
        max-width: 25px !important;
        max-height: 25px !important;
    }

    #home-advantages .home-advantages__name strong {
        font-size: 36px !important;
    }

    #home-advantages .home-advantages__description {
        max-width: none;
        margin-top: 14px !important;
        padding-left: 64px;
        font-size: 13px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    #home-advantages *,
    #home-advantages *::before,
    #home-advantages *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* MEBELF DESIGN AUDIT — shared section rhythm and typography. */
#home-advantages.home-advantages {
    padding: var(--mf-section-py) 0;
}

#home-advantages .home-advantages__header {
    margin-bottom: var(--mf-content-gap);
}

#home-advantages .home-advantages__eyebrow {
    margin-bottom: var(--mf-heading-gap) !important;
    font-size: var(--mf-eyebrow-size) !important;
    font-weight: 700 !important;
    letter-spacing: var(--mf-eyebrow-letter-spacing) !important;
    line-height: var(--mf-eyebrow-line-height) !important;
}

#home-advantages .home-advantages__heading {
    font-size: var(--mf-h2-size) !important;
    font-weight: 600 !important;
    letter-spacing: var(--mf-h2-letter-spacing) !important;
    line-height: var(--mf-h2-line-height) !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
}
