/*
 * 2026-11 — promotions («Акції»): the promotion page (.kvp) and the home page popup (.kvp-pop).
 * Loaded on a promotion page and on the home page when its popup is on. Motion is decorative and switched off
 * for visitors who ask for less motion (prefers-reduced-motion).
 */

/* ---------- Shared ---------- */
.kvp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 12px 30px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.kvp-btn:hover { text-decoration: none; transform: translateY(-1px); }
.kvp-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px #c41230; }
.kvp-btn--primary { background: #c41230; color: #fff; box-shadow: 0 10px 30px rgba(196, 18, 48, .35); }
.kvp-btn--primary:hover { background: #a10e27; color: #fff; }
.kvp-btn--ghost { border-color: rgba(255, 255, 255, .6); color: #fff; background: rgba(255, 255, 255, .06); }
.kvp-btn--ghost:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .14); }
.kvp-btn--white { background: #fff; color: #c41230; }
.kvp-btn--white:hover { background: #f4f4f4; color: #a10e27; }
.kvp-btn--outline-white { border-color: #fff; color: #fff; }
.kvp-btn--outline-white:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.kvp-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
    padding: 8px 16px 8px 12px;
    border-radius: 999px;
    background: #c41230;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}
.kvp-badge--small { margin-bottom: 12px; padding: 5px 12px 5px 9px; font-size: 12px; }
.kvp-badge__dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: kvp-pulse 1.6s ease-in-out infinite; }

@keyframes kvp-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@keyframes kvp-zoom { from { transform: scale(1.02) translateX(0); } to { transform: scale(1.12) translateX(-2%); } }
@keyframes kvp-shine { 0% { transform: translateX(-120%) skewX(-20deg); } 30%, 100% { transform: translateX(360%) skewX(-20deg); } }
@keyframes kvp-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Promotion page: first screen ---------- */
.kvp-hero {
    position: relative;
    min-height: 720px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #0b0b0c;
    color: #fff;
}
.kvp-hero__bg { position: absolute; inset: 0; overflow: hidden; }
.kvp-hero__photo, .kvp-hero__video {
    position: absolute;
    top: 0;
    right: 0;
    width: 62%;
    height: 100%;
    overflow: hidden;
}
.kvp-hero__photo img { position: absolute; inset: 0; width: 100%; height: 100%; }
/* The shine runs over the photo area only (a box of the same size as the photo, above it). */
.kvp-hero__glow { z-index: 1; pointer-events: none; }
.kvp-hero__photo img, .kvp-hero__video { object-fit: cover; animation: kvp-zoom 18s ease-in-out infinite alternate; transform-origin: 60% 50%; }
.kvp-hero__video { z-index: 1; }
/* The photo fades into the black on the left (text side) and at the bottom. */
.kvp-hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(90deg, #0b0b0c 38%, rgba(11, 11, 12, .65) 55%, rgba(11, 11, 12, .1) 80%),
        linear-gradient(0deg, #0b0b0c 0, rgba(11, 11, 12, 0) 30%),
        linear-gradient(180deg, rgba(0, 0, 0, .55) 0, rgba(0, 0, 0, 0) 160px);
}
.kvp-hero__shine {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 30%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .14), rgba(255, 255, 255, 0));
    animation: kvp-shine 10s ease-in-out infinite;
    pointer-events: none;
}
.kvp-hero--ended .kvp-hero__shine { display: none; }
.kvp-hero__box { position: relative; z-index: 4; padding-top: 130px; padding-bottom: 80px; }
.kvp-hero__box > * { animation: kvp-rise .7s ease both; }
.kvp-hero__box > :nth-child(2) { animation-delay: .08s; }
.kvp-hero__box > :nth-child(3) { animation-delay: .16s; }
.kvp-hero__box > :nth-child(4) { animation-delay: .24s; }
.kvp-hero__box > :nth-child(5) { animation-delay: .32s; }
.kvp-hero__title { max-width: 760px; margin: 0 0 22px; font-size: 52px; line-height: 1.08; font-weight: 700; letter-spacing: -.01em; color: #fff; }
.kvp-hero__text { max-width: 620px; margin: 0 0 30px; font-size: 19px; line-height: 1.5; color: rgba(255, 255, 255, .86); }
.kvp-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.kvp-timer { margin: 0 0 30px; }
.kvp-timer__label { margin: 0 0 10px; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: rgba(255, 255, 255, .75); }
.kvp-timer__date { text-transform: none; letter-spacing: 0; }
.kvp-timer__cells { display: flex; gap: 10px; }
.kvp-timer__cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 72px;
    padding: 10px 8px 8px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    backdrop-filter: blur(4px);
}
.kvp-timer__cell b { font-size: 32px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; color: #fff; }
.kvp-timer__cell small { margin-top: 4px; font-size: 12px; color: rgba(255, 255, 255, .7); }

.kvp-hero--ended .kvp-hero__photo img { filter: grayscale(1); opacity: .6; animation: none; }
.kvp-hero--ended .kvp-badge { background: #444; }
.kvp-hero--ended .kvp-badge__dot { animation: none; }
.kvp-ended { max-width: 620px; padding: 22px 24px; border-radius: 14px; background: rgba(255, 255, 255, .08); }
.kvp-ended__title { margin: 0 0 6px; font-size: 22px; font-weight: 700; color: #fff; }
.kvp-ended p { margin: 0 0 18px; line-height: 1.5; color: rgba(255, 255, 255, .85); }

/* ---------- Reasons ---------- */
.kvp-points { padding: 80px 0; background: #f4f4f4; }
.kvp-points__title { margin: 0 0 36px; font-size: 36px; line-height: 1.2; font-weight: 700; color: #000; }
.kvp-points__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.kvp-point {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    transition: transform .25s ease, box-shadow .25s ease;
}
.kvp-point:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0, 0, 0, .1); }
/* A single card left in the last row takes the whole row (photo on the left). */
@media (min-width: 1200px) {
    .kvp-point:last-child:nth-child(3n+1) { grid-column: 1 / -1; flex-direction: row; }
    .kvp-point:last-child:nth-child(3n+1) .kvp-point__img { flex: 0 0 40%; aspect-ratio: auto; min-height: 240px; }
    .kvp-point:last-child:nth-child(3n+1) .kvp-point__body { align-self: center; padding: 28px 36px; }
}
.kvp-point__img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #e9e9e9; }
.kvp-point__img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.kvp-point:hover .kvp-point__img img { transform: scale(1.05); }
.kvp-point__body { position: relative; padding: 22px 22px 24px; }
.kvp-point__number { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; letter-spacing: .1em; color: #c41230; }
.kvp-point__title { margin: 0 0 8px; font-size: 20px; line-height: 1.25; font-weight: 700; color: #000; }
.kvp-point__text { margin: 0; font-size: 15px; line-height: 1.5; color: #444; }

/* ---------- Final call ---------- */
.kvp-final { padding: 56px 0; background: linear-gradient(110deg, #c41230 0, #8f0c22 100%); color: #fff; }
.kvp-final__box { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px 40px; }
.kvp-final__title { margin: 0 0 8px; font-size: 32px; line-height: 1.2; font-weight: 700; color: #fff; }
.kvp-final p { margin: 0; font-size: 17px; color: rgba(255, 255, 255, .92); }
.kvp-final .kvp-btn:focus-visible { outline: 3px solid #0b0b0c; outline-offset: 3px; box-shadow: 0 0 0 6px #fff; }
.kvp-final__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Home page popup ---------- */
.kvp-pop { position: fixed; right: 24px; bottom: 24px; z-index: 99; width: 380px; max-width: calc(100vw - 32px); }
.kvp-pop[hidden] { display: none; }
.kvp-pop.is-in .kvp-pop__card { animation: kvp-rise .45s ease both; }
.kvp-pop__card { position: relative; overflow: hidden; border-radius: 18px; background: #0b0b0c; color: #fff; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.kvp-pop__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    cursor: pointer;
}
.kvp-pop__close svg { fill: #fff; }
.kvp-pop__close:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
.kvp-pop__img { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; background: #f2f2f2; }
.kvp-pop__img img { display: block; width: 100%; height: 100%; object-fit: cover; animation: kvp-zoom 14s ease-in-out infinite alternate; }
.kvp-pop__shine {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 35%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .25), rgba(255, 255, 255, 0));
    animation: kvp-shine 8s ease-in-out infinite;
}
.kvp-pop__body { padding: 18px 20px 20px; }
.kvp-pop__title { margin: 0 0 6px; font-size: 20px; line-height: 1.25; font-weight: 700; color: #fff; }
.kvp-pop__text { margin: 0 0 16px; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, .85); }
.kvp-pop__btn { width: 100%; min-height: 48px; }

/* ---------- Tablets ---------- */
@media (max-width: 1199px) {
    .kvp-points__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kvp-hero__title { font-size: 44px; max-width: 640px; }
    .kvp-hero__photo, .kvp-hero__video { width: 75%; }
    .kvp-hero__bg::after {
        background:
            linear-gradient(90deg, #0b0b0c 45%, rgba(11, 11, 12, .75) 65%, rgba(11, 11, 12, .2) 90%),
            linear-gradient(0deg, #0b0b0c 0, rgba(11, 11, 12, 0) 30%),
            linear-gradient(180deg, rgba(0, 0, 0, .55) 0, rgba(0, 0, 0, 0) 160px);
    }
}

/* Popup: a compact horizontal card up to tablets (a tall card took half of a portrait tablet). */
@media (max-width: 1023px) {
    .kvp-pop { left: 12px; right: 12px; width: auto; max-width: 560px; margin-left: auto; }
    .kvp-pop__card { display: flex; align-items: stretch; border-radius: 14px; }
    .kvp-pop__img { flex: 0 0 34%; aspect-ratio: auto; }
    .kvp-pop__body { padding: 12px 52px 14px 14px; }
    .kvp-pop .kvp-badge--small { margin-bottom: 6px; font-size: 11px; }
    .kvp-pop__title { font-size: 16px; margin-bottom: 4px; }
    .kvp-pop__text { display: none; }
    .kvp-pop__btn { min-height: 44px; font-size: 14px; padding: 8px 14px; }
}

/* ---------- Phones ---------- */
@media (max-width: 767px) {
    .kvp-hero { min-height: 0; align-items: flex-end; }
    .kvp-hero__photo, .kvp-hero__video { width: 100%; height: 340px; }
    .kvp-hero__bg::after { background: linear-gradient(180deg, rgba(0, 0, 0, .5) 0, rgba(11, 11, 12, .1) 90px, rgba(11, 11, 12, .2) 220px, #0b0b0c 340px); }
    .kvp-hero__box { padding-top: 300px; padding-bottom: 40px; }
    .kvp-hero__title { font-size: 32px; }
    .kvp-hero__text { font-size: 16px; }
    .kvp-badge { font-size: 12px; margin-bottom: 14px; }
    .kvp-timer__cells { gap: 6px; }
    .kvp-timer__cell { flex: 1 1 0; min-width: 0; }
    .kvp-timer__cell b { font-size: 26px; }
    .kvp-hero__actions { flex-direction: column; }
    .kvp-hero__actions .kvp-btn { width: 100%; }
    .kvp-points { padding: 48px 0; }
    .kvp-points__title { font-size: 26px; margin-bottom: 22px; }
    .kvp-points__list { grid-template-columns: 1fr; gap: 14px; }
    .kvp-final { padding: 40px 0; }
    .kvp-final__title { font-size: 26px; }
    .kvp-final__actions { width: 100%; flex-direction: column; }
    .kvp-final__actions .kvp-btn { width: 100%; }

    .kvp-pop { max-width: none; }
}

@media (max-width: 359px) {
    .kvp-pop .kvp-badge { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .kvp-hero__photo img, .kvp-hero__video, .kvp-hero__shine, .kvp-pop__img img, .kvp-pop__shine, .kvp-badge__dot,
    .kvp-hero__box > *, .kvp-pop.is-in .kvp-pop__card { animation: none !important; }
    .kvp-btn, .kvp-point, .kvp-point__img img { transition: none; }
}
