/* ---------- ADVANTAGES VARIABLES ---------- */
:root {
    --adv-max-width: 1200px;
    --adv-pad-y: 80px;
    --adv-pad-x: 20px;

    --adv-title-color: #000;
    --adv-text-color: #000;

    --adv-gap-min: 16px;
    --adv-gap-max: 70px;

    --adv-icon-size: 100px;
    --adv-icon-gap: 20px;

    --adv-mobile-left-inset: 16px;
    --adv-mobile-col-gap: 24px;
}

/* ---------- ADVANTAGES SECTION ---------- */
.advantages-section {
    width: 100%;
    background: #ffffff;
    padding: clamp(48px, 8vw, var(--adv-pad-y)) var(--adv-pad-x);
}

.advantages-container {
    max-width: var(--adv-max-width);
    margin: 0 auto;
}

/* Заголовок */
.advantages-title {
    text-align: center;
    font-size: 34px;
    font-weight: 600;
    margin-bottom: clamp(32px, 6vw, 60px);
    color: var(--adv-title-color);
}

/* Сетка преимуществ:*/
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(var(--adv-gap-min), 3.5vw, var(--adv-gap-max));
    align-items: start;
    justify-items: center;
}

/* Элемент преимущества:*/
.advantage-item {
    text-align: center;
    max-width: 420px;
    display: grid;
    grid-template-rows: calc(var(--adv-icon-size) + var(--adv-icon-gap)) auto;
    justify-items: center;
}

/* Иконка — десктоп*/
.advantage-item img {
    width: var(--adv-icon-size);
    height: auto;
    display: block;
    margin: 0;
    object-fit: contain;
    flex-shrink: 0;
    max-width: none;
    align-self: end;
}

/* Текст */
.advantage-item p {
    margin: 0;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 500;
    color: var(--adv-text-color);
    word-break: normal;
    overflow-wrap: break-word;
}

/* ---------- MOBILE LAYOUT ---------- */
@media (max-width: 768px) {
    .advantages-grid {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }

    .advantages-section {
        --adv-icon-size: 80px;
        --adv-mobile-left-inset: 24px;
        --adv-mobile-col-gap: 28px;
    }

    .advantage-item {
        text-align: left;
        grid-template-rows: auto;
        grid-template-columns: auto 1fr;
        align-items: start;
        column-gap: var(--adv-mobile-col-gap);
        row-gap: 12px;
        max-width: 100%;
        padding-left: var(--adv-mobile-left-inset);
        justify-items: start;
    }

    .advantage-item img {
        align-self: start;
        justify-self: start;
    }

    .advantage-item p {
        align-self: center;
        font-size: 18px;
    }

    .advantages-title {
        font-size: 34px;
        margin-bottom: 40px;
    }
}