@use "sass:math";
@use "../abstracts/mixins";
@use "../abstracts/variables";

.pSection{
    position: relative;
    min-height: 100vh;

    @include mixins.respondTo('sm'){
        overflow: hidden;
    }
    
    @include mixins.respondTo('xs'){
        min-height: calc(var(--vh, 1vh) * 100);
        overflow: hidden;
        min-height: auto;
    }

    &_target{
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        pointer-events: none;
    }

    &_header{
        position: relative;
        min-height: 100vh;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        padding-top: 12vh;
        padding-bottom: 12vh;

        @include mixins.respondTo('xs'){
            min-height: auto;
            justify-content: flex-start;
            padding-top: 8vh;
            padding-bottom: 8vh;
        }

        &_inner{
            position: relative;
            z-index: 1;
            max-width: 82.9%;
            margin-left: math.div(variables.$containerWidth, variables.$gridColsNb);
            margin-right: math.div(variables.$containerWidth, variables.$gridColsNb) * 2;

            @include mixins.respondTo('md'){
                margin-right: math.div(variables.$containerWidth, variables.$gridColsNb);
            }

            @include mixins.respondTo('sm'){
                margin-left: 0;
            }

            @include mixins.respondTo('xs'){
                margin-left: 0;
                margin-right: 0;
                max-width: none;
            }
        }

        &_cover{
            position: absolute;
            top: 0; right: 0; bottom: 0;
            z-index: 0;
            width: 64vw;
            background-color: variables.$cGreyDark;
            background-position: center center;
            background-size: cover;
            background-repeat: no-repeat;
            
            @include mixins.respondTo('xs'){
                width: auto;
                right: -(variables.$containerPaddingXs);
                left: -(variables.$containerPaddingXs);
            }

            &::after{
                content: "";
                position: absolute;
                z-index: 1;
                top: 0; left: 0; right: 0; bottom: 0;
                background-color: variables.$cDark;
                opacity: 0.15;
            }
        }

        &--center{
            justify-content: center;
        }

        &--top{
            justify-content: flex-start;
            padding-top: 25vh;
            
            @include mixins.respondTo('xs'){
                padding-top: 8vh;
            }
        }

        &--fullMobile{
            @include mixins.respondTo('xs'){
                min-height: 100vh;
                min-height: calc(var(--vh, 1vh) * 100);
                justify-content: flex-end;
                padding-top: 8vh;
                padding-bottom: 8vh;

                &.pSection_header--top{
                    justify-content: flex-start;
                }
            }
        }
    }

    &_content{
        padding-top: 12vh;
        
        @include mixins.respondTo('xs'){
            padding-top: 8vh;
        }
    }
}