@font-face {
    font-family: 'Arame_Mono_Bold';
    src: url('/public/wp-content/plugins/custom-slider-carousel/assets/css/Arame_Mono_Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
}

.csc-slider-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    max-width: 1312px;
    margin: 0 auto;
    padding: 0 24px 0 0;
    max-height: 630px;

    @media (max-width: 768px) {
        max-width: calc(100dvw - 40px);
        padding: 0;
    }

    *:focus {
        outline: none; /* Убираем обвод при фокусе */
    }
}

.csc-slider-container {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.csc-slider {
    display: flex;
    -webkit-transition: -webkit-transform 0.5s ease;
    transition: transform 0.5s ease;
    will-change: transform;
    gap: 24px;

    @media (min-height: 551px) {
        /*transform: translateX(-50%);*/
    }
    user-select: none;

    * {
        user-select: none;
    }
}

.csc-slide {
    flex: 0 0 48.5%;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #15151533;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    user-select: none; /* Запрещает выделение текста */
    cursor: grab; /* Устанавливает курсор grab */
    position: relative;
}

.csc-slide:active {
    cursor: grabbing; /* Курсор grabbing при зажатии */
}

.csc-slide-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.csc-slide h3 {
    font-family: 'Roboto Mono', monospace;
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    letter-spacing: -0.5px;
    text-align: center;

    @media (max-width: 768px) {
        font-size: 18px;
        line-height: 25.2px;
        padding: 18px 15px;
        margin: 0 !important;
    }
}

.csc-subtitle {
    font-family: 'Roboto Mono', monospace;
    font-size: 18px;
    font-weight: 400;
    line-height: 25.2px;
    letter-spacing: -0.5px;
    text-align: center;
    padding: 0 15px;

    @media (max-width: 768px) {
        font-size: 15px;
        line-height: 19.5px;
        padding: 18px 15px;
        margin: 0 !important;
    }
}

.csc-slide p {
    font-family: 'Arial', sans-serif;
    font-size: 1em;
    line-height: 1.5;
    color: #666666;
    margin: 0 0 10px;
}

.csc-slide .csc-modal-trigger {
    background-color: #ffffff;
    color: #151515;
    border: 2px solid #151515;
    padding: 17px 32px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease; /* Добавляем плавный переход для transform */
    align-self: center;
    font-family: 'Arame_Mono_Bold', monospace;
    font-size: 16px;
    font-weight: 700;
    line-height: 17.6px;
    letter-spacing: -0.25px;
    text-align: left;
    position: relative;

    @media (max-width: 768px) {
        font-size: 15px;
        line-height: 16.5px;
        padding: 17px 16px;
    }
}

.csc-slide .csc-modal-trigger:focus {
    outline: none; /* Убираем обвод при фокусе */
}

.csc-slide .csc-modal-trigger:active {
    border: 2px solid #151515; /* Оставляем ту же толщину бордера */
    outline: none; /* Убираем обвод при нажатии */
    transform: scale(1); /* Предотвращаем увеличение */
}

.csc-slide .csc-modal-trigger::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -8px;
    width: 22px;
    height: 22px;
    background: white;
    clip-path: polygon(22px 0, 22px 22px, 0% 22px);
}

.csc-slide .csc-modal-trigger::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 15px;
    height: 15px;
    background: #151515;
    clip-path: polygon(15px 0, 15px 15px, 0% 15px);
}


.csc-slide-image {
    width: 100%;
    margin-top: auto;
    align-self: center;
}

.csc-slide-image img {
    max-height: 390px;
    width: 100%;
    /*border-radius: 8px;*/
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);

    @media (max-width: 768px) {
        max-height: 225px;
    }
}

.csc-slider-prev,
.csc-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.8em;
    z-index: 20;
    width: 46px;
    height: 46px;
    border: 1px solid #F0F0F0;
    background: #FFFFFF;
}

.csc-slider-prev {
    left: -30px;

    @media (max-width: 1400px) {
        left: 0;
    }

    @media (max-width: 768px) {
        left: -20px;
    }
}

.csc-slider-next {
    right: 0px;

    @media (max-width: 768px) {
        right: -20px;
    }
}

.csc-slider-prev:hover,
.csc-slider-next:hover {

}

.csc-pagination {
    display: none; /* по умолчанию скрыта */
    position: absolute;
    bottom: -10px; /* Отступ ниже карусели */
    left: 50%;
    transform: translateX(-50%);
    justify-content: center;
}

.csc-dot {
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.csc-dot.active {
    background-color: #717171;
}

.csc-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.csc-modal-content {
    background: #fff;
    /*padding: 20px;*/
    /*border-radius: 8px;*/
    position: fixed;
    top: 0;
    right: 0;
    max-width: 85vw;
    width: 85vw;
    max-height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;

    @media (max-width: 1000px) {
        max-width: 90vw;
        width: 90vw;
        min-height: auto;
    }

    @media (max-width: 480px) {
        max-width: 95vw;
        width: 95vw;
        max-height: 100vh;
        min-height: 100px;
    }
}

.modal-middle-container {
    display: flex;
    padding: 46px 36px;
    background: #FDDA64;
    min-height: 55vh;

    @media (max-width: 768px) {
        padding: 20px 36px;
        flex-direction: column;
    }
}

.csc-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0,0,0,0);
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 4px;
}

.modal-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: start;

    h2 {
        font-family: 'Arame_Mono_Bold', monospace;
        font-size: 54px;
        font-weight: 700;
        line-height: 59.4px;
        letter-spacing: -0.5px;
        text-align: start;
        padding: 0 36px 24px 36px;
        margin: 0;
        color: #151515;

        @media (max-width: 768px) {
            font-size: 24px;
            line-height: 26.4px;
        }
    }

    h5 {
        font-family: 'Roboto Mono', monospace;
        font-size: 24px;
        font-weight: 700;
        line-height: 33.6px;
        text-align: start;
        padding: 24px 36px 16px 36px;
        margin: 0;
        color: #5c5c5c;

        @media (max-width: 768px) {
            font-size: 16px;
            line-height: 22.4px;
        }
    }
}

.modal-title {
    font-family: 'Arame_Mono_Bold', monospace;
    font-size: 54px;
    font-weight: 700;
    line-height: 59.4px;
    letter-spacing: -0.5px;
    text-align: left;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.modal-subtitle {
    font-family: 'Arame_Mono_Bold', monospace;
    font-size: 42px;
    font-weight: 700;
    line-height: 46.2px;
    letter-spacing: -0.5px;
    text-align: left;
    margin: 0;
    padding: 0;

    @media (max-width: 768px) {
        font-size: 22px;
        line-height: 22.4px;
    }
}

.modal-image {
    flex: 1;
    display: flex;
    justify-content: center;

    img {
        width: 100%;
        border-radius: 8px;
        height: auto;
    }
}

.modal-description {
    max-width: 55%;
    margin-right: 32px;

    @media (max-width: 768px) {
        max-width: 100%;
        margin-right: 0px;
    }
}

.modal-description p {
    color: #151515;
    font-family: 'Roboto Mono', monospace;
    font-size: 20px;
    font-weight: 400;
    line-height: 26px;
    letter-spacing: -0.5px;
    text-align: left;

    @media (max-width: 768px) {
        font-size: 16px;
        line-height: 22.4px;
    }
}

.noscroll {
    overflow: hidden !important;
}

.modal-extra-block {
    width: 100%;
    max-height: 100px;
    background: #C6C6C6;
    padding: 46px 36px;
    display: flex;
    overflow: hidden;

    h2 {
        font-family: 'Arame_Mono_Bold', monospace;
        font-size: 42px;
        font-weight: 700;
        line-height: 46.2px;
        letter-spacing: -0.5px;
        padding: 0;
        margin: 0;
        color: #151515;

        @media (max-width: 768px) {
            font-size: 22px;
            line-height: 22.4px;
        }
    }
}

.modal-extra-block-modal-image {
    min-width: 40%;
    width: 40%;
    margin-right: 32px;

    img {
        width: 100%;
        height: auto;
    }
}

.modal-extra-block h4 {
    margin-bottom: 10px;
}

.modal-extra-block ul {
    list-style-type: disc;
    padding-left: 20px;
}

@media (max-width: 550px) {
    .csc-slide {
        flex: 0 0 100%; /* Слайды занимают 100% ширины */
        box-sizing: border-box;
        padding: 0 12px; /* По 12px с каждой стороны для создания gap в 24px */
    }

    .csc-slider {
        /*transform: translateX(-100%); !* Начальная позиция для первого реального слайда *!*/
    }

    .csc-slider-prev,
    .csc-slider-next {
        /*display: none; !* Скрываем стрелки на малых экранах *!*/
    }

    .csc-pagination {
        display: flex; /* Показываем пагинацию на малых экранах */
    }
}

@media (min-width: 769px) {
    .csc-pagination {
        display: none; /* Скрываем точки на больших экранах */
    }

    .csc-slider-prev,
    .csc-slider-next {
        display: block; /* Показываем стрелки на больших экранах */
    }
}

#wp--skip-link--target > div:has(.csc-slider-wrapper) {
    position: relative;
    padding: 0 0 64px 0;

    > h1 {
        font-family: 'Arame_Mono_Bold', monospace;
        font-size: 42px;
        font-weight: 700;
        line-height: 46.2px;
        letter-spacing: -0.5px;
        text-align: center;
        text-transform: uppercase;

        @media (max-width: 768px) {
            font-size: 24px;
            line-height: 26.4px;
            padding-top: 40px;
        }
    }

    > p {
        font-family: 'Roboto Mono', monospace;
        font-size: 22px;
        font-weight: 400;
        line-height: 30.8px;
        letter-spacing: -0.5px;
        text-align: center;
        padding-bottom: 32px;

        @media (max-width: 768px) {
            font-size: 18px;
            line-height: 25.2px;
        }
    }

    @media (max-width: 480px) {
        padding: 0;
    }
}

#wp--skip-link--target > div:has(.csc-slider-wrapper)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    height: 60%; /* Высота синей линии */
    background-color: #C6C6C6; /* Цвет синей линии */
    z-index: -1;

    @media (max-width: 768px) {
        top: 120px;
        height: calc((100% - 120px) * 0.4); /* Высота синей линии */
    }

    @media (max-width: 480px) {
        top: 145px;
        height: calc((100% - 145px) * 0.5); /* Высота синей линии */
    }
}

#wp--skip-link--target > div:has(.csc-slider-wrapper)::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 476px;
    height: 60%; /* Высота желтой линии */
    background-color: #FDDA64; /* Цвет желтой линии */
    z-index: -1;

    @media (max-width: 768px) {
        height: calc((100% - 120px) * 0.4); /* Высота синей линии */
        width: 376px;
    }

    @media (max-width: 480px) {
       display: none;
    }
}

/* Центрирование слайда, если только один */
.csc-slider-wrapper.single-slide .csc-slider {
    justify-content: center; /* Центрирование по горизонтали */
}

.csc-slider-wrapper.single-slide .csc-slide {
    flex: 0 0 auto; /* Отменяем фиксированную ширину */
    width: 100%; /* Устанавливаем ширину слайда на 100% контейнера */
    max-width: 600px; /* Можно задать максимальную ширину для эстетики */
    margin: 0 auto; /* Центрирование слайда */
}
