/* VIA Derm — кейси «до/після», мобільний блок запису, бейдж знижки.
   Кольори узгоджені з рештою сайту (золото #d4af37). */

:root {
    --vc-gold: #d4af37;
    --vc-gold-soft: #cbab72;
    --vc-dark: #14140e;
}

/* ─────────── Кейси «до / після» ─────────── */
.ba-cases { margin: 40px 0 10px; }
.ba-cases__lead { color: rgba(255, 255, 255, .58); font-size: 16px; }
.ba-cases__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 26px;
}
.ba-case { margin: 0; }
.ba-case__caption {
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 500;
    /* Сторінка послуги має темний фон — підпис має бути світлим */
    color: rgba(255, 255, 255, .85);
    text-align: center;
}

.ba-compare {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, .16);
    background: #efeae0;
    /* горизонтальний жест → рухає слайдер (drag), вертикальний → скрол сторінки */
    touch-action: pan-y;
    cursor: ew-resize;
    -webkit-user-select: none;
    user-select: none;
    --pos: 50%;
}
.ba-compare__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
}
/* верхнє зображення «до» обрізаємо до позиції повзунка */
.ba-compare__before {
    clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.ba-compare__label {
    position: absolute;
    top: 14px;
    z-index: 3;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(20, 20, 14, .72);
    border-radius: 30px;
    backdrop-filter: blur(2px);
}
.ba-compare__label--before { left: 14px; }
.ba-compare__label--after { right: 14px; background: rgba(212, 175, 55, .9); color: #14140e; }

/* вертикальна лінія-роздільник + кругла ручка */
.ba-compare__divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--pos);
    width: 2px;
    margin-left: -1px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
    z-index: 4;
    pointer-events: none;
}
.ba-compare__handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--vc-gold);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
}
.ba-compare__handle::before,
.ba-compare__handle::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}
.ba-compare__handle::before {
    left: 9px;
    transform: translateY(-50%);
    border-right: 8px solid var(--vc-gold);
}
.ba-compare__handle::after {
    right: 9px;
    transform: translateY(-50%);
    border-left: 8px solid var(--vc-gold);
}
/* Нативний range лишаємо лише для доступності (Tab + стрілки клавіатури).
   pointer-events: none — щоб перетягування ловив контейнер через Pointer Events
   (інакше на iOS range не реагує на дотик по доріжці/ручці). */
.ba-compare__range {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}
.ba-compare__range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 44px;
    height: 100%;
    cursor: ew-resize;
}
.ba-compare__range::-moz-range-thumb {
    width: 44px;
    height: 100%;
    border: 0;
    background: transparent;
    cursor: ew-resize;
}

/* ─────────── Бейдж знижки в сайдбарі послуги ─────────── */
.pbmit-service-discount-badge {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .03em;
    color: #14140e;
    background: linear-gradient(135deg, #e8d8a8, var(--vc-gold));
    border-radius: 30px;
}

/* ─────────── Мобільний блок запису під описом ─────────── */
.service-mobile-cta {
    margin: 22px 0 8px;
    padding: 20px;
    border-radius: 16px;
    background: var(--vc-dark);
    border: 1px solid rgba(212, 175, 55, .3);
    text-align: center;
}
.service-mobile-cta__discount {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #14140e;
    background: linear-gradient(135deg, #e8d8a8, var(--vc-gold));
    border-radius: 30px;
}
.service-mobile-cta__price {
    font-size: 26px;
    font-weight: 700;
    color: var(--vc-gold);
    margin-bottom: 14px;
}
.service-mobile-cta__btns {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.service-mobile-cta__btns .pbmit-btn { width: 100%; justify-content: center; }

/* ─────────── Бейдж «-20%» на картках консультацій ─────────── */
.pbmit-consult-discount {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 4;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    color: #14140e;
    background: linear-gradient(135deg, #e8d8a8, var(--vc-gold));
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}
.pbmit-service-image-wrapper { position: relative; }
