/**
 * =========================================================
 * YUMBAKER: Service Strip centered ribbon styles 2026 06 05
 * ---------------------------------------------------------
 * Зачем:
 * - превратить сервисные блоки в единую узкую горизонтальную ленту;
 * - убрать разрывы между секциями: лента должна быть одним цельным объектом;
 * - выровнять содержимое всех секций по центру;
 * - сохранить одинаковую визуальную модель на desktop и mobile;
 * - на desktop показывать всю ленту целиком, на mobile дать горизонтальный скролл;
 * - использовать только CSS-переменные YUMBAKER без хардкода палитры.
 * =========================================================
 */

.yb-service-strip {
    width: 100%;
    margin: 24px 0 28px;
    box-sizing: border-box;
}

.yb-service-strip__track {
    width: 100%;
    min-height: 112px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--yb-accent) 12%, transparent);
    border-radius: var(--yb-radius-card);
    background: linear-gradient(90deg, var(--yb-cream-light), var(--yb-cream));
    box-shadow: 0 10px 28px color-mix(in srgb, var(--yb-graphite) 8%, transparent);
    box-sizing: border-box;
}

/**
 * =========================================================
 * YUMBAKER: Ribbon section base
 * ---------------------------------------------------------
 * Зачем:
 * - каждая секция является частью одной общей ленты;
 * - разделители создаются линиями, а не внешними отступами;
 * - весь контент внутри секций выравнивается по центру.
 * =========================================================
 */

.yb-service-card {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    min-height: 112px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 22px;
    background: transparent;
    color: var(--yb-graphite);
    overflow: hidden;
    text-align: center;
}

.yb-service-card + .yb-service-card {
    border-left: 1px solid color-mix(in srgb, var(--yb-accent) 14%, transparent);
}

.yb-service-card__body,
.yb-hero-content {
    position: relative;
    z-index: 2;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.yb-service-card__title {
    margin: 0 0 5px;
    color: var(--yb-accent);
    font-size: 16px;
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.yb-service-card__subtitle,
.yb-service-card__text {
    margin: 0;
    color: var(--yb-graphite-light);
    font-size: 12px;
    line-height: 1.32;
}

.yb-service-card__subtitle {
    color: var(--yb-cream-light);
}

.yb-service-card__link,
.yb-hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    color: var(--yb-accent);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.yb-service-card__link--light {
    color: var(--yb-cream-light);
}

.yb-service-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--yb-cream-dark);
    color: var(--yb-accent);
}

.yb-service-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/**
 * =========================================================
 * YUMBAKER: Centered delivery/contact composition
 * ---------------------------------------------------------
 * Зачем:
 * - при включенных иконках держать иконку над текстом;
 * - сохранить симметрию левого и правого блоков;
 * - убрать ощущение, что заголовки и подписи «плывут».
 * =========================================================
 */

.yb-service-card--delivery,
.yb-service-card--contact {
    flex-direction: column;
}

.yb-service-card--delivery {
    flex: 1 1 0;
    min-width: 240px;
}

.yb-service-card--contact {
    flex: 0.95 1 0;
    min-width: 240px;
}

.yb-service-card--delivery .yb-service-icon,
.yb-service-card--contact .yb-service-icon {
    margin-bottom: 8px;
}

.yb-service-card__phone {
    display: inline-block;
    margin-bottom: 5px;
    color: var(--yb-accent);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.1;
    text-decoration: none;
    white-space: nowrap;
}

/**
 * =========================================================
 * YUMBAKER: Booking section in centered ribbon
 * ---------------------------------------------------------
 * Зачем:
 * - оставить бронирование главным действием;
 * - сделать его центральной секцией общей ленты;
 * - сохранить две внешние ссылки до появления собственного booking engine.
 * =========================================================
 */

.yb-service-card--booking {
    flex: 1.45 1 0;
    min-width: 360px;
    flex-direction: column;
    text-align: center;
    background: var(--yb-matcha);
    color: var(--yb-cream-light);
}

.yb-service-card--booking + .yb-service-card,
.yb-service-card + .yb-service-card--booking {
    border-left-color: color-mix(in srgb, var(--yb-matcha-dark) 22%, transparent);
}

.yb-service-card--booking .yb-service-card__title {
    color: var(--yb-cream-light);
    margin-bottom: 2px;
    font-size: 18px;
}

.yb-booking-actions {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
}

.yb-booking-actions__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    min-width: 132px;
    padding: 8px 12px;
    border-radius: 7px;
    background: var(--yb-cream-light);
    color: var(--yb-matcha-dark);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.15;
    text-decoration: none;
    white-space: nowrap;
}

/**
 * =========================================================
 * YUMBAKER: Hero section in compact ribbon
 * ---------------------------------------------------------
 * Зачем:
 * - Hero Product остаётся промо-секцией внутри общей ленты;
 * - контент центрируется, но изображение может занимать правую часть блока;
 * - фото не должно превращать ленту в отдельный большой баннер.
 * =========================================================
 */

.yb-service-card--hero {
    flex: 1.35 1 0;
    min-width: 340px;
    justify-content: center;
    background: color-mix(in srgb, var(--yb-cream-light) 78%, transparent);
}

.yb-hero-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 4px 8px;
    margin-bottom: 5px;
    border-radius: 999px;
    background: var(--yb-cream);
    color: var(--yb-accent);
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.yb-hero-button {
    min-height: 30px;
    padding: 8px 12px;
    border-radius: 7px;
    background: var(--yb-accent);
    color: var(--yb-cream-light);
}

.yb-hero-image {
    position: relative;
    z-index: 1;
    flex: 0 0 38%;
    align-self: stretch;
    min-height: 112px;
    margin: -18px -22px -18px 10px;
    background-image: var(--yb-service-hero-image);
    background-size: cover;
    background-position: center;
}

.yb-hero-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--yb-cream-light), transparent 62%);
}

/**
 * =========================================================
 * YUMBAKER: Visibility helpers
 * ---------------------------------------------------------
 * Зачем:
 * - управлять видимостью каждого блока отдельно для desktop/mobile;
 * - не менять порядок секций и не ломать shortcode.
 * =========================================================
 */

.yb-service-card--hidden {
    display: none !important;
}

@media (min-width: 768px) {
    .yb-service-card--hide-desktop {
        display: none !important;
    }
}

/**
 * =========================================================
 * YUMBAKER: Mobile ribbon behavior
 * ---------------------------------------------------------
 * Зачем:
 * - сохранить тот же визуальный принцип, что на desktop;
 * - мобильная версия остаётся узкой единой лентой без разрывов между блоками;
 * - ленту можно скроллить вправо-влево.
 * =========================================================
 */

@media (max-width: 767px) {
    .yb-service-strip {
        margin: 18px 0 22px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .yb-service-strip::-webkit-scrollbar {
        display: none;
    }

    .yb-service-strip__track {
        width: max-content;
        min-height: 106px;
        overflow: visible;
        border-radius: var(--yb-radius-mobile);
        box-shadow: 0 8px 22px color-mix(in srgb, var(--yb-graphite) 8%, transparent);
    }

    .yb-service-card {
        flex: 0 0 auto;
        min-height: 106px;
        padding: 15px 16px;
    }

    .yb-service-card + .yb-service-card {
        margin-left: 0;
    }

    .yb-service-card--delivery {
        width: 240px;
        min-width: 240px;
    }

    .yb-service-card--booking {
        width: 330px;
        min-width: 330px;
        background: var(--yb-matcha);
    }

    .yb-service-card--contact {
        width: 248px;
        min-width: 248px;
    }

    .yb-service-card--hero {
        width: 330px;
        min-width: 330px;
        background: color-mix(in srgb, var(--yb-cream-light) 78%, transparent);
    }

    .yb-service-card__title {
        font-size: 15px;
    }

    .yb-service-card--booking .yb-service-card__title {
        font-size: 17px;
    }

    .yb-service-card__text,
    .yb-service-card__subtitle {
        font-size: 12px;
    }

    .yb-service-icon {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
    }

    .yb-service-icon svg {
        width: 21px;
        height: 21px;
    }

    .yb-booking-actions {
        gap: 7px;
    }

    .yb-booking-actions__button {
        min-width: 120px;
        min-height: 32px;
        padding: 7px 10px;
        font-size: 12px;
    }

    .yb-service-card__phone {
        font-size: 16px;
    }

    .yb-hero-image {
        min-height: 106px;
        margin: -15px -16px -15px 8px;
    }

    .yb-service-card--hide-mobile {
        display: none !important;
    }
}

/**
 * =========================================================
 * YUMBAKER: Mobile outer edge rounding 2026 06 07
 * ---------------------------------------------------------
 * Зачем:
 * - на мобильной горизонтальной ленте крайние видимые карточки должны выглядеть как края одного общего блока;
 * - если часть карточек скрыта настройками desktop/mobile, скругления должны переехать на фактически крайние видимые карточки;
 * - PHP добавляет классы yb-service-card--mobile-edge-left/right, потому что CSS :first-child/:last-child не учитывает скрытые карточки.
 * =========================================================
 */

@media (max-width: 767px) {
    .yb-service-strip__track {
        border-radius: var(--yb-radius-mobile);
    }

    .yb-service-card {
        border-radius: 0;
    }

    .yb-service-card--mobile-edge-left {
        border-top-left-radius: var(--yb-radius-mobile);
        border-bottom-left-radius: var(--yb-radius-mobile);
    }

    .yb-service-card--mobile-edge-right {
        border-top-right-radius: var(--yb-radius-mobile);
        border-bottom-right-radius: var(--yb-radius-mobile);
    }
}
