html,
body {
    background: var(--Black, #12141A);
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    padding: 0 80px 120px 80px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
    justify-content: center;
    position: relative;
}

.header {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.card__wrapper {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
    min-width: 1120px;
}

.card {
    display: flex;
    gap: 24px;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    padding: 80px 40px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: visible;
}

.card--market::before {
    content: "";
    position: absolute;
    top: -12px;
    left: -130px;
    width: 600px;
    height: 293px;
    background: url("../images/market.png") no-repeat;
    background-size: 600px 293px;
    z-index: 0;
}

.card--configurator::before {
    content: "";
    position: absolute;
    left: -95px;
    top: 20px;
    width: 560px;
    height: 293px;
    background: url("../images/car.png") no-repeat;
    background-size: 510px 270px;
    z-index: 0;
}

.card__text-block,
.card__buttons {
    position: relative;
    z-index: 1;
}


.card__text-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 38%;
}

.card__title {
    color: var(--White, #FFF);
    text-align: center;
    font-family: Montserrat;
    font-size: 24px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
}

.card__text {
    color: var(--White, #FFF);
    text-align: center;
    font-family: Montserrat;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
}

.text--market {
    width: 78%;
    align-self: center;
}

.card__buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 26%;
}

.card__button {
    display: flex;
    height: 48px;
    padding: 12px 16px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    align-self: stretch;
    border-radius: 16px;
    text-decoration: none;

    transition: all 0.2s ease-in-out;
}

.button--website {
    background: linear-gradient(90deg, #3853FF 0%, #6194FF 100%);
}

.button--whatsapp {
    background: linear-gradient(90deg, #00983D 0%, #00C71E 100%);
}

.button--website:hover {
    box-shadow: 0 4px 12px rgba(56, 83, 255, 0.4),
        0 2px 4px rgba(97, 148, 255, 0.3);
}

.button--whatsapp:hover {
    box-shadow: 0 4px 12px rgba(0, 152, 61, 0.4),
        0 2px 4px rgba(0, 199, 30, 0.3);
}

.button--app {
    background: rgba(255, 255, 255, 0.10);
}

.button--app:hover {
    opacity: 0.7;
}

.button__text {
    color: var(--New-Main-White-Primary, #FFF);
    text-align: center;
    font-family: Montserrat;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 24px;
    text-transform: capitalize;
}

.header__button {
    position: relative;
    display: flex;
    padding: 4px;
    gap: 4px;
    border-radius: 1000px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.header__lang {
    position: relative;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    color: #85868B;
    font-family: Montserrat;
    font-weight: 700;
    cursor: pointer;
    z-index: 1;
    font-size: 14px;
    transition: color .3s;
}

.header__lang.is-active {
    color: #FFF;
}

.choosed {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 0;
    width: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1000px;
    transition: left .2s ease, width .2s ease;
    z-index: 0;
}

.header__logo {
    height: 30px;
    align-self: center;
}

.video {
    position: absolute;
    left: calc(100% - 20px);
    top: 130px;
}

.video__bubbles {
    display: flex;
    flex-direction: column;
    height: 500px;
    min-width: 200px;
    justify-content: space-between;
    align-items: center;
}

.video__bubble {
    position: relative;
    aspect-ratio: 1/1;
    width: 115px;
    height: 115px;
    flex-shrink: 0;
    overflow: hidden;
    cursor: pointer;
    border-radius: 1000px;
    border: 3px solid #80ADFF;
    background: lightgray 50% / cover no-repeat;
    box-shadow: 0 0 50px 0 #0075FF;
    transition: transform .25s ease, width .35s ease, height .35s ease;
}

.video__bubble:hover {
    transform: scale(1.06);
}

.video__bubble.is-active {
    width: 200px;
    height: 200px;
}

.video__thumb {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 1;
    transition: opacity .25s ease;
}

.video__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
    transition: transform .35s ease, opacity .25s ease;
}

.video__media-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    /* больше НЕ display:none — оставляем рендериться для iOS */
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    will-change: opacity;
}

.video__media-wrap video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Воспроизведение — показываем видео, прячем превью через opacity */
.video__bubble.is-buffering .video__media-wrap,
.video__bubble.is-playing .video__media-wrap {
    opacity: 1;
    pointer-events: auto;
}

.video__bubble.is-buffering .video__thumb,
.video__bubble.is-playing .video__thumb {
    opacity: 0;
}

/* ===== Модалка ===== */
html.modal-open,
body.modal-open {
    overflow: hidden;
}

.modal {
    border: none;
    padding: 60px 40px;
    background: transparent;
    display: none;
    overflow: hidden;
}

.modal[open] {
    display: grid;
    place-items: center;
    border-radius: 16px;
}

.modal::backdrop {
    background: rgba(6, 10, 18, .82);
    backdrop-filter: blur(8px);
}

.modal__frame {
    position: relative;
    width: min(960px, 90vw);
    aspect-ratio: 16 / 9;

    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 96px rgba(0, 0, 0, .6);
    transform: scale(.98);
    opacity: 0;
    animation: modal-in .18s ease forwards;
}

.modal__frame {
    max-width: calc(100vw - 2rem);
    max-height: calc(100dvh - 7rem);
}

.modal--vertical .modal__frame {
    width: min(480px, 88vw);
    height: auto;
    aspect-ratio: 9 / 16;
}

.modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    font-size: 20px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    z-index: 3;

    background: linear-gradient(135deg, rgba(70, 74, 78, 0.85), rgba(30, 32, 34, 0.85));
    box-shadow: 0 4px 16px rgba(0, 0, 0, .35), 0 0 12px rgba(0, 150, 255, 0.25);
    backdrop-filter: blur(6px);

    transition: transform 0.25s ease, background 0.25s ease;
}

.modal__close:hover {
    transform: scale(1.15) rotate(8deg);
    background: linear-gradient(135deg, rgba(100, 180, 255, 0.95), rgba(30, 40, 60, 0.95));
}

.modal__close:active {
    transform: scale(0.92) rotate(-4deg);
    background: linear-gradient(135deg, rgba(50, 60, 70, 0.95), rgba(20, 22, 24, 0.95));
    box-shadow: 0 2px 8px rgba(0, 0, 0, .5), 0 0 10px rgba(0, 150, 255, 0.35);
}

@keyframes modal-in {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 560px) {
    .modal {
        padding: 16px;
    }

    .modal__close {
        width: 44px;
        height: 44px;
    }
}

.modal__frame iframe {
    pointer-events: auto;
}

.modal__poster,
.modal__player {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.modal__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal__play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: none;
    border: 0;
    cursor: pointer;
    z-index: 2;
}

.modal__play img {
    width: 84px;
    height: 84px;
    filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .35));
}

.modal__play:hover img {
    transform: scale(1.06);
}

.modal--playing .modal__poster,
.modal--playing .modal__play {
    opacity: 0;
    visibility: hidden;
    transition: .18s ease;
}

.modal__player iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 0;
    pointer-events: auto;
}

.video__bubble {
    background: transparent;
    overflow: hidden;
    position: relative;
}

.modal__close {
    touch-action: manipulation;
}

/* убрать синюю подсветку модалки в iOS */
.modal,
.modal:focus,
.modal:focus-visible,
.modal__frame,
.modal__frame:focus,
.modal__frame:focus-visible {
  outline: none !important;
}

/* убрать синий tap-highlight на iOS */
* { -webkit-tap-highlight-color: transparent; }