/* Стилі для вспливаючого вікна та оверлея */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(46, 46, 46, 0.75);
    transform: scale(0);
    z-index: 99;
}

.overlay.open {
    display: block;
    transform: scale(1);
}

.popup-auto {
    width: 67%;
    padding: 50px;
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 999;
    transition: transform 0.3s;
}

.popup-auto__content {
    background-color: rgba(19, 19, 19, 0.9);
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}


.popup-auto.open {
    display: block;
    transform: translate(-50%, -50%) scale(1);
}

.popup-auto__head {
}
.popup-auto__close {
    border: none;
    background-color: transparent;
    top: 10px;
    right: 10px;
}
.popup-auto__body {
    padding: 20px;
}
.popup-auto__title {
    font-family: "Diablo";
    font-size: Max(calc(((100vmin - var(--page-nav-height)) / 100) * 4), 0px);
    line-height: Max(calc(((100vmin - var(--page-nav-height)) / 100) * 4), 0px);
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 2px 3px 10px #fff;
}
.popup-auto__subtitle {
    font-family: "Diablo";
    text-align: center;
    font-size: Max(calc(((100vmin - var(--page-nav-height)) / 100) * 5), 0px);
    line-height: Max(calc(((100vmin - var(--page-nav-height)) / 100) * 5), 0px);
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 2px 3px 10px #fff;
}
.popup-auto__date {
    font-family: inherit;
    font-size: Max(calc(((100vmin - var(--page-nav-height)) / 100) * 3), 0px);
    max-width: fit-content;
    margin: 0 auto 50px auto;
    padding: 15px 50px 10px;
    position: relative;
    color: #ffe59f;
    border: 2px solid #535150;
    border-top: none;
    text-transform: uppercase;
}
.popup-auto__date::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #535150;
    -webkit-transition: border 0.3s ease-in-out;
    transition: border 0.3s ease-in-out;
}

.popup-auto__date-border-left {
    width: calc(50% - 30px);
    height: 2px;
    background-color: #535150;
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    -webkit-transition: background-color 0.3s ease-in-out;
    transition: background-color 0.3s ease-in-out;
}

.popup-auto__date-border-left::after {
    content: "";
    width: 6px;
    height: 6px;
    position: absolute;
    top: 50%;
    right: 0px;
    -webkit-transform: translateY(-50%) translateX(50%);
    transform: translateY(-50%) translateX(50%);
    background-color: #535150;
    border-radius: 50%;
    -webkit-transition: background-color 0.3s ease-in-out;
    transition: background-color 0.3s ease-in-out;
}

.popup-auto__date-decore-center {
    width: 15px;
    height: 15px;
    position: absolute;
    top: -7px;
    left: calc((100% - 15px) / 2);
    border: 2px solid #535150;
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
    -webkit-transition: border 0.3s ease-in-out;
    transition: border 0.3s ease-in-out;
}

.popup-auto__date-decore-center::after {
    content: "";
    width: 5px;
    height: 5px;
    position: absolute;
    top: calc((100% - 5px) / 2);
    left: calc((100% - 5px) / 2);
    background-color: #535150;
    -webkit-transition: background-color 0.3s ease-in-out;
    transition: background-color 0.3s ease-in-out;
}

.popup-auto__date-border-right {
    width: calc(50% - 30px);
    height: 2px;
    background-color: #535150;
    position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    -webkit-transition: background-color 0.3s ease-in-out;
    transition: background-color 0.3s ease-in-out;
}

.popup-auto__date-border-right::after {
    content: "";
    width: 6px;
    height: 6px;
    position: absolute;
    top: 50%;
    left: 0px;
    -webkit-transform: translateY(-50%) translateX(-50%);
    transform: translateY(-50%) translateX(-50%);
    background-color: #535150;
    border-radius: 50%;
    -webkit-transition: background-color 0.3s ease-in-out;
    transition: background-color 0.3s ease-in-out;
}

.popup-auto__time {
    font-family: inherit;
    position: absolute;
    left: 50%;
    top: calc(100% + 10px);
    transform: translate(-50%, 0px);
    color: #ffe59f;
    padding: 3px 10px;
    font-size: Max(calc(((100vmin - var(--page-nav-height)) / 100) * 3), 0px);
}
.popup-auto__text {
    font-family: inherit;
    text-align: center;
    font-weight: 600;
    font-size: Max(calc(((100vmin - var(--page-nav-height)) / 100) * 2.5), 0px);
    line-height: 1.5;
    color: #fff;
    margin-bottom: 10px;
}
.popup-auto__link {
    font-family: inherit;
    margin: 0 auto 10px auto;
    height: Max(calc(((100vmin - var(--page-nav-height)) / 100) * 6.4), 0px);
    aspect-ratio: 350 / 64;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    background: url(../images/bg/cp_btn_bg.jpg) center center no-repeat;
    background-size: cover;
    padding-top: 4px;
    font-family: "Diablo";
    font-size: Max(calc(((100vmin - var(--page-nav-height)) / 100) * 2), 0px);
    line-height: Max(calc(((100vmin - var(--page-nav-height)) / 100) * 2), 0px);
    color: white;
    text-transform: uppercase;
    -webkit-transition: letter-spacing .3s ease-in-out, -webkit-filter .3s ease-in-out, -webkit-box-shadow .3s ease-in-out;
    transition: letter-spacing .3s ease-in-out, -webkit-filter .3s ease-in-out, -webkit-box-shadow .3s ease-in-out;
    transition: filter .3s ease-in-out, letter-spacing .3s ease-in-out, box-shadow .3s ease-in-out;
    transition: filter .3s ease-in-out, letter-spacing .3s ease-in-out, box-shadow .3s ease-in-out, -webkit-filter .3s ease-in-out, -webkit-box-shadow .3s ease-in-out;
}
.popup-auto__link:hover {
    -webkit-box-shadow: 0px 0px 40px rgba(255, 0, 0, 0.5);
    box-shadow: 0px 0px 40px rgba(255, 0, 0, 0.5);
    -webkit-filter: brightness(120%);
    filter: brightness(120%);
    letter-spacing: 2px;
}

.popup-auto__bottom {
    display: grid;
    gap: 15px;
    padding: 20px;
    border-top: 1px solid #535150;
}
.popup-auto__bottom-link {
    max-width: fit-content;
    font-family: inherit;
    display: block;
    margin: 0 auto;
    font-weight: 500;
    text-align: center;
    font-size: Max(calc(((100vmin - var(--page-nav-height)) / 100) * 2.3), 0px);
    line-height: Max(calc(((100vmin - var(--page-nav-height)) / 100) * 2.3), 0px);
    color: #fff;
    transition: all 0.3s;
}
.popup-auto__bottom-link:hover {
    color: #ffe59f;
}

.red-link {
    text-shadow: 0px 0px 30px rgba(255, 0, 0, 0.7);
}
.red-link:hover {
    text-shadow: 0px 0px 20px rgba(255, 0, 0, 1);
}
.green-link {
    text-shadow: 0px 0px 30px rgba(27, 146, 37, 0.7);
}
.green-link:hover {
    text-shadow: 0px 0px 2cqmin rgba(27, 146, 37, 1);
}
.blue-link {
    text-shadow: 0px 0px 30px rgba(26, 132, 182, 0.7);
}
.blue-link:hover {
    text-shadow: 0px 0px 20px rgba(26, 132, 182, 1);
}

@media (max-width: 1024px){
    .popup-auto {
        width: 100%;
    }
    .popup-auto__title {
        font-size: 25px;
        line-height: 1.5;
    }
    .popup-auto__subtitle {
        font-size: 30px;
        line-height: 1.5;
    }
    .popup-auto__date {
        font-size: 20px;
    }
    .popup-auto__time {
        font-size: 20px;
    }
    .popup-auto__text {
        font-size: 18px;
    }
    .popup-auto__link {
        height: 50px;
        font-size: 14px;
        line-height: 14px;
        aspect-ratio: 300 / 64;
    }
    .popup-auto__bottom-link {
        font-size: 18px;
        line-height: 1.5;
    }
}

@media (max-width: 450px){
    .popup-auto {
        padding: 40px;
    }
    .popup-auto__body,
    .popup-auto__bottom {
        padding: 20px 10px;
    }
    .popup-auto__title {
        font-size: 20px;
    }
    .popup-auto__subtitle {
        font-size: 25px;
    }
    .popup-auto__date {
        font-size: 18px;
    }
    .popup-auto__time {
        font-size: 18px;
    }
    .popup-auto__text {
        font-size: 16px;
    }
    .popup-auto__link {
        width: 100%;
        aspect-ratio: 300 / 64;
    }
    .popup-auto__bottom-link {
        font-size: 16px;
    }
}