/* ─────────────────────────────────────────────────────────────────
   WorkDone 4.1 (workdone41.blade.php).

   Дизайн WorkDone 4 (landing.workdone4.css) один в один — ті самі
   розміри, відступи, кольори й адаптив, — але класи й правила свої
   (wd41-*), а шрифт — Onest (assets/fonts/onest) замість Montserrat.
   Капсули під панеллю — посилання на Telegram, Viber, Instagram.

   Компонування: біла картка, ролик ліворуч, праворуч логотип, заголовок
   і фіолетова панель з вибором курсу. До 860px — одна колонка:
   логотип → заголовок → панель → ролик → месенджери.
   ───────────────────────────────────────────────────────────────── */
.wd41 {
    --violet: #7147CD;
    --violet-light: #925BFF;
    --violet-deep: #5834A8;
    --ink: #29242B;
    --muted: #776C7C;
    --lilac: #E9E6FB;
    --tint: #F2EDFD;

    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: var(--lilac);
    color: var(--ink);
    font: 500 16px/1.55 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

@supports (min-height: 100dvh) {
    .wd41 { min-height: 100dvh; }
}

.wd41 ul { margin: 0; padding: 0; list-style: none; }

.wd41-sheet {
    width: 100%;
    max-width: 1160px;
    display: grid;
    grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
    align-items: center;
    gap: 64px;
    padding: 44px 56px;
    border-radius: 32px;
    background: #fff;
    box-shadow: 0 30px 70px rgba(59, 38, 122, .12);
}

/* ─── Ролик: бузкова підкладка, екран 9:16, кнопка play посередині ─── */
.wd41-film {
    position: relative;
    padding: 12px;
    margin: -12px;
    border-radius: 32px;
    background: var(--tint);
}

.wd41-screen {
    position: relative;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border-radius: 22px;
    background: #1d1a1f;
    box-shadow: 0 8px 22px rgba(59, 38, 122, .1);
}

.wd41-screen__video,
.wd41-screen__poster {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #1d1a1f;
}

/* Кнопка — увесь екран: кадр-постер і кружок play над ним. */
.wd41-screen__start {
    position: absolute;
    inset: 0;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

/* class-правило перебиває [hidden] із браузерних стилів — повертаємо. */
.wd41-screen__start[hidden] { display: none; }

.wd41-screen__play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--violet);
    box-shadow: 0 14px 34px rgba(41, 36, 43, .28);
    transform: translate(-50%, -50%);
    transition: transform .2s ease, background-color .2s ease;
}

.wd41-screen__play svg { width: 32px; height: 32px; margin-left: 4px; }

.wd41-screen__start:hover .wd41-screen__play {
    background: #fff;
    transform: translate(-50%, -50%) scale(1.06);
}

.wd41-screen__start:focus-visible { outline: none; }

.wd41-screen__start:focus-visible .wd41-screen__play {
    outline: 3px solid #fff;
    outline-offset: 4px;
}

/* ─── Права колонка ─── */
.wd41-side {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    text-align: center;
}

.wd41-logo { display: block; }
.wd41-logo__img { display: block; width: auto; height: 64px; }

.wd41-heading {
    margin: 0;
    color: var(--ink);
    font-size: clamp(30px, 3.1vw, 40px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.02em;
    text-wrap: balance;
}

.wd41-heading__tail { display: block; color: var(--violet); }

/* ─── Фіолетова панель вибору курсу ─── */
/* Візерунок хвиль у кольорі панелі (плитка 160×160 без швів), світліша
   пляма вгорі праворуч і глибша внизу ліворуч. */
.wd41-picker {
    width: 100%;
    max-width: 620px;
    padding: 34px 44px 38px;
    border-radius: 28px;
    background-color: var(--violet);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.08' stroke-width='2'%3E%3Cpath d='M0 40C20 25 60 25 80 40S140 55 160 40'/%3E%3Cpath d='M0 120C20 105 60 105 80 120S140 135 160 120'/%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(circle at 88% 0%, rgba(146, 91, 255, .7), transparent 55%),
        radial-gradient(circle at 0% 100%, rgba(88, 52, 168, .7), transparent 55%);
    color: #fff;
    box-shadow: 0 24px 50px rgba(113, 71, 205, .28);
}

.wd41-picker__ask {
    margin: 0 0 22px;
    font-size: clamp(20px, 2vw, 25px);
    font-weight: 600;
    line-height: 1.25;
}

.wd41-picker__list { display: grid; gap: 14px; }

/* Кнопка-капсула курсу: іконка в бузковому кружечку й підпис; ховер —
   у темний. */
.wd41-course {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 66px;
    padding: 10px 30px 10px 12px;
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: clamp(17px, 1.6vw, 20px);
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 12px 26px rgba(41, 36, 43, .2);
    transition: background-color .3s ease, color .3s ease, transform .18s ease;
}

.wd41-course__badge {
    flex: none;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--tint);
    color: var(--violet);
    transition: background-color .3s ease, color .3s ease;
}

.wd41-course__badge svg { width: 22px; height: 22px; }

.wd41-course:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
.wd41-course:hover .wd41-course__badge { background: rgba(255, 255, 255, .16); color: #fff; }
.wd41-course:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ─── Telegram / Viber / Instagram — капсули, як контакти у WorkDone 4 ─── */
.wd41-socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.wd41-socials__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid rgba(113, 71, 205, .18);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    transition: border-color .18s ease;
}

.wd41-socials__link svg { flex: none; color: var(--violet); }
.wd41-socials__link:hover { border-color: var(--violet); }
.wd41-socials__link:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }

/* ─── Адаптив ─── */
@media (max-width: 1080px) {
    .wd41-sheet { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 44px; padding: 36px 40px; }
    .wd41-picker { padding: 30px 30px 34px; }
}

/* Одна колонка: права колонка розкривається (display: contents), щоб
   ролик став між панеллю й месенджерами. */
@media (max-width: 860px) {
    .wd41-sheet {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        gap: 22px;
        padding: 28px 24px 30px;
        border-radius: 28px;
        text-align: center;
    }

    .wd41-side { display: contents; }

    .wd41-logo { order: 1; }
    .wd41-heading { order: 2; }
    .wd41-picker { order: 3; }
    .wd41-film { order: 4; width: calc(100% + 24px); max-width: 304px; margin-top: -4px; }
    .wd41-socials { order: 5; }
}

/* Телефон: заголовок і обидві кнопки вміщаються на перший екран —
   менші логотип і заголовок, нижчі кнопки, вужчий ролик. */
@media (max-width: 520px) {
    .wd41 { padding: 10px; }
    .wd41-sheet { gap: 16px; padding: 20px 14px 22px; border-radius: 22px; }

    .wd41-logo__img { height: 42px; }
    .wd41-heading { font-size: 23px; line-height: 1.18; }

    .wd41-picker { padding: 18px 12px; border-radius: 20px; box-shadow: 0 14px 30px rgba(113, 71, 205, .24); }
    .wd41-picker__ask { margin-bottom: 12px; font-size: 16px; text-wrap: balance; }
    .wd41-picker__list { gap: 10px; }

    .wd41-course {
        gap: 10px;
        min-height: 52px;
        padding: 6px 16px 6px 8px;
        font-size: 15.5px;
        box-shadow: 0 8px 18px rgba(41, 36, 43, .16);
    }

    .wd41-course__badge { width: 34px; height: 34px; }
    .wd41-course__badge svg { width: 18px; height: 18px; }

    .wd41-film { width: calc(100% + 16px); max-width: 236px; margin: -4px -8px -8px; padding: 8px; border-radius: 26px; }
    .wd41-screen { border-radius: 18px; }
    .wd41-screen__play { width: 64px; height: 64px; }
    .wd41-screen__play svg { width: 24px; height: 24px; margin-left: 3px; }

    .wd41-socials { gap: 8px; }
    .wd41-socials__link { padding: 7px 12px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .wd41-course, .wd41-screen__play { transition: none; }
    .wd41-course:hover { transform: none; }
}
