/* NOTE: 3D MODEL (inc/new/sections/model-3d.php). Wide thumbnail first; once the viewer is loaded the frame
   becomes square, which suits the rotating model. */

.kmd-model-3d__frame {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    background: #0B0B0B;
}

.kmd-model-3d__frame:has(iframe) {
    aspect-ratio: 1 / 1;
    max-height: 80vh;
}

.kmd-model-3d__frame iframe,
.kmd-model-3d__launch {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.kmd-model-3d__launch {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    background: #0B0B0B;
    color: var(--kmd-white);
    cursor: pointer;
}

.kmd-model-3d__launch img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}

.kmd-model-3d__launch::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    transition: background-color .2s;
}

.kmd-model-3d__launch:hover img {
    transform: scale(1.03);
}

.kmd-model-3d__launch:hover::after {
    background: rgba(0, 0, 0, .2);
}

.kmd-model-3d__cta {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.kmd-model-3d__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border: 2px solid var(--kmd-white);
    border-radius: 50%;
    background: var(--kmd-black);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: .02em;
    transition: transform .2s;
}

.kmd-model-3d__launch:hover .kmd-model-3d__icon {
    transform: scale(1.06);
}

.kmd-model-3d__label {
    padding: 8px 16px;
    background: rgba(0, 0, 0, .55);
    font-size: 16px;
    font-weight: 700;
}

@media screen and (max-width: 599px) {
    .kmd-model-3d__frame {
        aspect-ratio: 4 / 3;
    }

    .kmd-model-3d__icon {
        width: 64px;
        height: 64px;
        font-size: 22px;
    }

    .kmd-model-3d__label {
        font-size: 14px;
    }
}
