/*Vars*/
:root{
    --headerwidth: 360px;
}
/*Format*/

:root :where(.is-layout-flow) > p {
    margin-block-start: 0;
}

iframe{
    filter: grayscale(1);
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
    border: 0;
}

h1, h2, h3, h4, p, ul{
    max-width: 75ch;
    text-wrap: balance;
}

.is-style-sticky{
        align-self: auto !important;

        .wp-block-group{
            display: flex;
            flex-direction: column;
            justify-content: end;
            position: sticky;
            top: 0;
            min-height: 100dvh;
            padding-bottom: var(--wp--preset--font-size--2-dvw);
        }
}

.newsprev{
    position: absolute;
    top: calc(var(--headerwidth) / 2);
    left: calc(var(--headerwidth) / 1.5);
    background: var(--wp--preset--color--light);
    color: var(--wp--preset--color--text);
    z-index: 100;
    width: calc(var(--headerwidth) / 1.5);

    display: flex;
    flex-direction: column;
    gap: 2vh;
    box-sizing: border-box;

    transition: var(--wp--custom--main-trans);
    box-shadow: 0px 0px 0px 0px var(--wp--preset--color--text);

   

    figure{
        text-align: right;
        margin-bottom: 0;

        img{
            width: 50%;
            margin-left: auto;
        }

        &::after{
            content: '+';
            display: block;
            font-size: 4rem;
            padding: 1rem;
            line-height: .5;
            opacity: 0;
            margin-right:  -1rem;
            transition: var(--wp--custom--main-trans);
        }
    }

    b{
        padding: 0 1rem;
    }

    p{
        padding: 1rem;
        margin: 0 0 1rem 0;

        b{
            padding: 0;
        }
    }

     &:hover{
        box-shadow: 10px -10px 0px 0px var(--wp--preset--color--text);

        figure{
            &::after{
                opacity: 1;
                margin-right: 0;
            }
        }
    }

   
}

/*Head*/

header{
    width: var(--headerwidth);
    height: 100dvh;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;

    padding: var(--wp--preset--font-size--2-dvw);
    box-sizing: border-box;


    nav{
        ul{
            display: flex;
            flex-direction: column;
            list-style: none;
            margin: 0;
            padding: 0;

            .spacer{
                margin-bottom: 2.5rem;
            }

            a{
                font-weight: 600;
                color: var(--wp--preset--color--text);
                display: flex;
                justify-content: space-between;
                align-items: center;
                transition: var(--wp--custom--main-trans);


                &::after{
                    content: '';
                    width: 1.5rem;
                    height: 1.5rem;
                    display: inline-block;
                    transition: var(--wp--custom--main-trans);
                    background-color: currentcolor; 
                    mask-repeat: no-repeat;
                    mask-position: center;
                    mask-size: contain;
                    opacity: 0;
                    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' fill-rule='evenodd' d='M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8'/%3E%3C/svg%3E");
                }

                &:hover{
                    padding-right: var(--wp--preset--font-size--2-dvw);
                    &::after{
                        opacity: 1;
                    }
                }

                &[aria-current="page"]{
                    color: var(--wp--preset--color--accent);
                    padding-right: var(--wp--preset--font-size--2-dvw);
                    &::after{
                        opacity: 1;
                    }
                }
            }

           
        }
    }

    .wpml-ls-statics-shortcode_actions{
        padding: 0;
        margin: 1rem 0 0;

        ul{
            display: flex;
            flex-direction: row;
            list-style: none;
            margin: 0;
            padding: 0;
            gap: .5rem;

            li{
                border-right: var(--wp--custom--main-border);
                border-color: var(--wp--preset--color--text);

                &:last-child{
                    border-right:0;
                }
            }

            a{
                padding: 0 .5rem 0 0;
                font-weight: 600;
                font-size: .8rem;
                color: var(--wp--preset--color--text);

                 a{
                    &::after{
                        display: none;
                    }
                }
            }

            .wpml-ls-current-language{
                a{
                    color: var(--wp--preset--color--accent);
                }
            }
        }
    }
}

/*Main*/

main{
    margin-left: var(--headerwidth);
    width: calc(100% - var(--headerwidth));

    display: flex;
    justify-content: end;
    flex-direction: column;
    min-height: 100dvh;
    padding: 0 0 var(--wp--preset--font-size--2-dvw) 0;
    box-sizing: border-box;

    ul{
        padding: 0 0 1.5em 1.5em;
    }
}

/*Footer*/

footer,
.wpml-ls-statics-footer,
.otgs-development-site-front-end{
    margin-left: var(--headerwidth);
    width: calc(100% - var(--headerwidth));
    box-sizing: border-box;
}

footer{
    display: flex;
    gap: 0;
    justify-content: space-between;
    font-weight: 600;
    font-size: .8rem;
    padding: 0 var(--wp--preset--font-size--2-dvw) var(--wp--preset--font-size--2-dvw) 0;

    address{
        font-style: normal;
        display: flex;
        gap: 1vw;
        justify-content: space-between;
    }

    a{
        color: var(--wp--preset--color--text);
    }

    ul{
        display: flex;
        flex-direction: row;
        list-style: none;
        margin: 0;
        padding: 0;
        gap: 1vw;
    }
}

@media screen and (max-width: 1190px){
    footer{
        gap: var(--wp--preset--font-size--2-dvw);
        flex-direction: column;

        
    }
}


@media screen and (max-width: 990px){

    :root{
        --headerwidth: 100%;
    }

    :root :where(.wp-block-columns-is-layout-flex) {
        gap: var(--wp--preset--font-size--5-dvw);
    }

    header{
        height: auto;
        position: relative;
        padding: var(--wp--preset--font-size--5-dvw);
        flex-direction: row;
        border-bottom: var(--wp--custom--main-border);

        div{
            width: 50%;
        }

        nav{
            ul{

                .spacer{
                    margin-bottom: 1rem;
                }
            }
        }

    }

    .newsprev{
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        padding: var(--wp--preset--font-size--5-dvw);
        border-bottom: var(--wp--custom--main-border);
        box-shadow: none;

        figure{
            display: none;
        }

        b,
        p{
            padding: 0;
        }

        &:hover{
            box-shadow: none;
        }
    }

    .is-style-sticky{
        align-self: auto !important;

        .wp-block-group{
            display: flex;
            flex-direction: column;
            justify-content: end;
            position: relative;
            top: 0;
            min-height: 50dvh;
            padding-bottom: var(--wp--preset--font-size--5-dvw);
        }
    }

    main,
    footer{
        margin-left: auto;
        width: 100%;
        padding: var(--wp--preset--font-size--5-dvw);
    }

    footer{
        
        border-top: var(--wp--custom--main-border);
        flex-direction: column;

        address{
            flex-direction: column;
            gap: 0;
        }
    }
}