/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.2
*/

html, body {
	height: 100%;
}

body {
    background: url('https://datark.ru/img/fon2.svg') top center/cover #D6D6D6 no-repeat;
}

.site-content {
	padding: 0;
}

.main {
    position: relative;
}

.grid--main {
    flex-direction: column;
    
    @media (min-width: 1024px) {
        flex-direction: row;
    }

    & > .gb-grid-column:first-of-type {
        width: 100%;
        order: 3;

        @media (min-width: 1024px) {
            width: 66%;
            order: 1;
        }


        @media (min-width: 1280px) {
            width: 60%;
        }
    }
    & > .gb-grid-column:nth-of-type(2) {
        position: relative;
        display: flex;
        width: 100%;
        align-items: center;
        order: 1;
        margin-bottom: 10px;

        @media (min-width: 1024px) {
            width: 33%;
            order: 2;
            margin-bottom: 0;
            justify-content: center;
        }

        @media (min-width: 1280px) {
            width: 40%;
        }
    }

    & > .gb-grid-column:nth-of-type(3) {
        order: 2;

        @media (min-width: 1024px) {
            order: 3;
        }
    }


    #list-ow.tns-outer {
        display: flex;
        flex-direction: column-reverse;
        position: relative;

        @media (min-width: 1024px) {
            display: block;
            padding: 50px 0 !important;
        }

        .tns-nav {
            text-align: center;

            @media (min-width: 1024px) {
                display: none;
            }

            button {
                padding: 5px;
                margin: 0 5px;
                border-radius: 10px;
                background-color: #000000;

                &.tns-nav-active {
                    background-color: #B43938;
                }
            }
        }

        .tns-controls {
            display: none;
            @media (min-width: 1024px) {
                display: block;
            }

            button:first-of-type {
                position: absolute;
                display: block;
                font-size: 0;
                text-indent: -10000px;
                width: 46px;
                height: 46px;
                top: 0;
                left: 50%;
                transform: translateX(-50%) rotate(90deg);
                background: url('./images/arrow-left.svg') 50% 50%/cover transparent no-repeat;
            }

            button:last-of-type {
                position: absolute;
                display: block;
                font-size: 0;
                text-indent: -10000px;
                width: 46px;
                height: 46px;
                bottom: 0;
                left: 50%;
                transform: translateX(-50%) rotate(-90deg);
                background: url('./images/arrow-left.svg') 50% 50%/cover transparent no-repeat;
            }

            button:disabled,
            button[disabled] {
                display: none;
            }
        }
    }    
}

.object-container {
    position: relative;
    padding: 0 30px;
	max-width: 600px;
	margin: 0 auto;
        
	@media (min-width: 1024px) {
		max-width: none;
	}

    .arrow-left {
        width: 46px;
        height: 46px;
        display: block;
        position: absolute;
        top: 50%;
        left: 0;
        transform: translateY(-50%);
        transition: opacity .2s ease-in-out;
        cursor: pointer;
        padding: 7px 10px 7px 4px;

        &:hover {
            opacity: .5;
        }
        
        @media (min-width: 1024px) {
            padding: 0;
        }
    }
    
    .arrow-right {
        width: 46px;
        height: 46px;
        display: block;
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        transition: opacity .2s ease-in-out;
        cursor: pointer;
        padding: 7px 4px 7px 10px;

        &:hover {
            opacity: .5;
        }
        
        @media (min-width: 1024px) {
            padding: 0;
        }
    }
    
    &::before {
        content: '';
        display: block;
        position: absolute;
        top: 8px;
        left: 8px;
        width: 48px;
        height: 48px;
        background: url('./images/360.png') 50% 50%/contain transparent no-repeat;
    }
}

.grid--title {
    padding: 10px;
    border-bottom: 2px solid #000;

    @media (min-width: 1024px) {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    @media (min-width: 1280px) {
        padding-top: 30px;
        padding-bottom: 30px;
    }
    
    .button-container {
        padding: 2px;
        background-color: #B43938;
        clip-path: polygon(15% -20%, 100% 0, 101% 100%, 0 100%, 0% 34%);
    }

    .gb-button {
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: 10px;
        padding: 5px 5px 5px 20px;
        background: none;
        color: #000;
        background: rgb(214 214 214);
        cursor: pointer;
        font-weight: 700;
        clip-path: polygon(15% -20%, 100% 0, 101% 100%, 0 100%, 0% 34%);
        

        &::after {
            content: '';
            display: block;
            width: 27px;
            height: 32px;
            background: url('./images/arrow.svg')
        }

        &:hover {
            background: #B43938;
            color: #FFFFFF;

            &::after {
                background: url('./images/arrow-hover.svg')
            }
        }
    }
}

.list-container {
    height: 100%;
    align-items: center;
    order: 1;
}

.submenu-container {
    width: 100%;
    order: 2;

    @media (min-width: 1024px) {
        order: 3;
    }

    ul {
        display: none;

        &.active {
            display: block;
            

            @media (min-width: 1024px) {
                display: flex;
                max-height: none;
                width: 100%;
                border-top: 2px solid #B43938;
                padding-top: 10px;
            }

            @media (min-width: 1280px) {
                padding-top: 20px;
            }
            
            margin: 0;
        
            li {
                font-size: 14px;
                list-style-type: none;
                padding: 5px 30px;
                font-weight: 400;
                cursor: pointer;

                @media (min-width: 1024px) {
                    padding: 5px;
                }

                @media (min-width: 1280px) {
                    padding: 20px;
                }
        
                &:hover,
                &.active-element {
                    background: #B43938;
                    color: #FFF;
                }
            }
        }
    }
}

.list {
    padding-left: 10px;
    max-height: 126px;
    overflow-y: auto;
    width: 100%;
    
    /*
    &::after {
        content: '';
        display: block;
        position: sticky;
        bottom: -1px;
        left: 0;
        width: 100%;
        height: 16px;
        background: linear-gradient(0deg, rgba(215,215,215,1) 0%, rgba(215,215,215,0) 100%);
    }
    */
    
    @media (min-width: 1024px) {
        max-height: 480px;
        &::after {
            display: none;
        }
    }

    @media (min-width: 1280px) {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0 30px;
        width: auto;
        overflow-y: auto;
        max-height: none;
    }
    
    @media (max-width: 1023px) {
        &:has(.active) {
            p {
                display: none;
                
                &.active {
                    display: flex;
                    align-items: center;
                }
            }
            
            .arrow-top, .arrow-bottom {
                display: none !important;
            }
        }
    }

    p {
        display: flex;
        align-items: baseline;
        gap: 8px;
        margin: 0;
        border-bottom: 1px solid #ccc;
        padding-bottom: 10px;
        padding-top: 10px;
        font-weight: 700;
        font-size: 14px;
        cursor: pointer;

        
        &:nth-last-of-type(1) {
            border: none;
        }
        
        @media (min-width: 1024px) {
            display: flex;
        }
        
        @media (min-width: 1280px) {
            padding-bottom: 15px;
            padding-top: 15px;
            &:nth-last-of-type(2) {
                border: none;
            }
        }

        &::before {
            content: '';
            flex-shrink: 0;
            display: block;
            background: url('./images/li.svg') 50% 50% transparent no-repeat;
            width: 8px;
            height: 9px;
        }

        &.active {
            color: #B43938;
            border-color: #B43938;
            
    
            @media (max-width: 1023px) {
                &::before {
                    content: '';
                    flex-shrink: 0;
                    display: block;
                    background: url('./images/arrow-left.svg') 50% 50%/contain transparent no-repeat;
                    width: 20px;
                    height: 20px;
                }
            }
        }
    }

    & > li {
        list-style-image: url('./images/li.svg');
        border-bottom: 1px solid #ccc;
        padding-bottom: 15px;
        padding-left: 10px;
        font-weight: 700;
        font-size: 14px;
        cursor: pointer;

        &:nth-last-of-type(1),
        &:nth-last-of-type(2) {
            border: none;
        }
        
        &:hover,
        &.active {
            color: #B43938;
            border-color: #B43938;
        }

        &.list-arrow-top {            
            display: block;
            font-size: 0;
            list-style-type: none;
            border: none;
            width: 46px;
            height: 46px;
            background: url('./images/arrow-left.svg');
            transform: rotate(90deg);
            margin: 0 auto;

            @media (min-width: 1280px) {
                display: none;
            }
        }

        &.list-arrow-bottom {            
            display: block;
            font-size: 0;
            list-style-type: none;
            border: none;
            width: 46px;
            height: 46px;
            background: url('./images/arrow-left.svg');
            transform: rotate(-90deg);
            margin: 0 auto;

            @media (min-width: 1280px) {
                display: none;
            }
        }
    }
}

.imp-ui-top-right {
    display: none !important;
}

.scroll-animation {
    position: absolute;
    top: 64px;
    right: 32px;
    width: 96px;
    @media (min-width: 768px) {
        display: none;
    }
}

.arrow-top, .arrow-bottom {
    position: absolute;
    right: 0;
    width: 42px;
    
    @media (min-width: 1024px) {
        display: none;
    }
}

.arrow-top {
    top: 0;
}

.arrow-bottom {
    bottom: 0;
}