.modal-popup {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: hidden;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff !important;
    padding: 30px;
    border: 1px solid #888;
    width: 60%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s;
    position: relative;
    margin: auto !important;
    display: block;
    height: 600px;
    overflow-y: scroll;
    border-radius: 20px;
}

.modal-content:has(.elementor-video) {
    background-color: transparent !important;
    padding: 0;
    height: fit-content;
    border-radius: 30px;
    overflow-y: inherit;
}

.modal-content:has(.elementor-video) .close-modal {
    right: 15px;
  top: 15px;
  border-radius: 50%;
}

.close-modal {
    color: #333;
    float: right;
    font-size: 24px;
    cursor: pointer;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content .close-modal {
    font-size: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: 50px;
    height: 50px;
    text-align: center;
    line-height: 1;
    z-index: 1;
    border: 1px solid #000000;
    border-radius: 10px;
    background-color: var(--primarycolor);
}

.modal-content .close-modal:before,
.modal-content .close-modal:after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    height: 20px;
    width: 2px;
    background-color: #ffffff;
    margin: auto;
    transition: all 0.3s ease-out;
}

.modal-content .close-modal:before {
    transform: rotate(-45deg);
}

.modal-content .close-modal:after {
    transform: rotate(45deg);
}

.modal-content .close-modal:hover:before {
    transform: rotate(45deg);
}

.modal-content .close-modal:hover:after {
    transform: rotate(-45deg);
}

@media screen and (max-width:560px) {
    .modal-content {
        width: 90%;
    }
}

.modal-popup.popup-position-center {
    transform: scale(0);
    transform-origin: center;
    transition: transform 0.3s ease-out;
    overflow: hidden;
}

.modal-popup.popup-position-center.open {
    transform: scale(1);
}

.modal-popup.popup-position-top {
    transform: scaleY(0);
    transform-origin: bottom left;
    transition: transform 0.7s cubic-bezier(.22, .61, .36, 1);
}

.modal-popup.popup-position-top.open {
    transform: scaleY(1);
    transform-origin: top left;
}

.modal-popup.popup-position-bottom {
    transform: scaleY(0);
    transform-origin: bottom left;
    transition: transform 0.7s cubic-bezier(.22, .61, .36, 1);
}

.modal-popup.popup-position-bottom.open {
    transform: scaleY(1);
}

.modal-popup.popup-position-left {
    transform: scaleX(0);
    transform-origin: top left;
    transition: transform 0.9s cubic-bezier(.22, .61, .36, 1);
}

.modal-popup.popup-position-left.open {
    transform: scaleX(1);
}

.modal-popup.popup-position-right {
    transform: scaleX(0);
    transform-origin: top right;
    transition: transform 0.9s cubic-bezier(.22, .61, .36, 1);
}

.modal-popup.popup-position-right.open {
    transform: scaleX(1);
}


/* Model pop 3d ------------------------------------------------------------------------------------------------------------------------- */
.modal-popup-button { transition: all 0.3s ease-out; }
.modal-popup-button:has(.line) {
    font-size: clamp(3.125rem, 2.6923rem + 1.9231vw, 5rem); /* 80px to 50px */
    padding: 0px;
    border: 0px;
    background-color: transparent;
    line-height: 0;
    color: var(--primarycolor);
    position: relative;
    z-index: 99999999;
    cursor: pointer;
}

.emts-model-popup .modal-popup-button svg .line {
    fill: none;
    stroke: var(--primarycolor);
    stroke-width: 4;
    transition: stroke-dasharray .6s cubic-bezier(.4, 0, .2, 1), stroke-dashoffset .6s cubic-bezier(.4, 0, .2, 1);
}

.emts-model-popup .modal-popup-button svg .line1,
.emts-model-popup .modal-popup-button svg .line3 {
    stroke-dasharray: 60 207;
    stroke-width: 4;
    margin-top: -22px;
}

.emts-model-popup .modal-popup-button svg .line2 {
    stroke-dasharray: 40 60;
    stroke-width: 4;
}

body:has(.popup-position-3d.open) .modal-popup-button svg .line1,
body:has(.popup-position-3d.open) .modal-popup-button svg .line3 {
    stroke-dasharray: 90 207;
    stroke-dashoffset: -134;
    stroke-width: 4;
}

body:has(.popup-position-3d.open) .modal-popup-button svg .line2 {
    stroke-dasharray: 1 60;
    stroke-dashoffset: -30;
    stroke-width: 4;
}

/* Main Menu Popup Style */
.modal-popup.popup-position-3d .modal-content {
    width: 100%;
    height: 100%;
    background-color: var(--bodybgcolor) !important;
    border: 0;
    display: flex;
    align-items: center;
}

.modal-popup.popup-position-3d {
    box-shadow: 0 25px 25px -2px #000;
}

.modal-popup.popup-position-3d { pointer-events: none; }
.modal-popup.popup-position-3d.open { pointer-events: painted; }

.modal-popup.popup-position-3d {
    perspective: 1000px;
}

.modal-popup.popup-position-3d .modal-content {
    transform: translateY(-100%) scaleX(0.2) rotateX(90deg);
    transform-origin: center center;
    transition: transform 0.6s cubic-bezier(.22, .61, .36, 1);
}

.modal-popup.popup-position-3d.open .modal-content {
    opacity: 1;
    transform: translateY(0) scaleX(1) rotateX(0deg);
}

.popup-position-3d .elementor-widget-video .elementor-wrapper {
    aspect-ratio: 0 !important;
}

.modal-popup.popup-position-3d {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.modal-popup.popup-position-3d.open {
    opacity: 1;
}


@media screen and (max-width: 1280px) {

    .modal-popup.popup-position-3d {
        box-shadow: none;
    }

    .modal-popup.popup-position-3d {
        left: auto;
        top: 0;
        right: 0;
        perspective: inherit;
        width: 340px;
    }

    .modal-popup.popup-position-3d .modal-content {
        transform: translateY(0) translateX(100%) scaleX(1) rotateX(0deg);
        transform-origin: top right;
    }

    .modal-popup.popup-position-3d.open .modal-content {
        opacity: 1;
        transform: translateY(0) scaleX(1) rotateX(0deg);
    }

    .emts-model-popup:before {
        content: "";
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        background-color: #5d5d5d73;
        transform: translateX(100%);
        transition: transform 0.6s cubic-bezier(.22, .61, .36, 1);
        z-index: 1000;
    }

    .emts-model-popup:has(.modal-popup.popup-position-3d.open):before {
        transform: translateX(0);
    }

    .modal-popup.popup-position-3d .modal-content {
        align-items: flex-start;
        padding-top: 100px;
    }
}


body.emts-popup-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}


body:has(.popup-position-3d.open) .emts-header { position: static !important; }