@charset 'utf-8';

/*
 * Project: mw-grid
 * Description: Powerfull and lightweight CSS layout framework
 * Homepage: https://github.com/Malahov-web/mw-grid
 * Author: Kirill Malahov
 * Author URI: http://malahov-web.com
 */

/*
 * Table of contents   Содержание
 *
 *  0. General Vars, Mixins, Extends
 *  1. Header
 *  2. menu-top
 *  3. 
 *  4. Footer
 *  5. menu-side

 *  14.
 *
 */

// @import 'mwgrid';       // layout framework

@import 'mwgrid';       // our options in this demo project

@import '../../src/mwgrid';       // src


@import 'fonts';        // fonts add
@import 'svgfontstyle'; // for generate web fonts from svg
@import 'libs';         // external libs
@import 'base';         // base, mixin, extends, etc..
@import 'media'; //

// @import 'hamburgers/hamburgers'; //

// @import 'components';   // blocks and components
@import 'plugins/highlighter';   // blocks and components

// @debug "Fonts array: #{$fonts}";

/* 0. General Vars, Mixins, Extends
 *
 *
*/

.container--main {
    @media (min-width: get_grid_bp('ds_')+px) {
        display: flex;
        justify-content: space-between;
        flex-direction: row-reverse;


        // .main {

        // }
        .sidebar {
            margin-right: 40px;
        }

    }
}


.main {
 // background: $accent;
    @include h_rhytm('column', $fb);
    float: right;
    width: 100%;
    margin-bottom: 2*$l_h_base;

    @media (min-width: get_grid_bp('ds_')+px) {
        width: calc(100% - #{$sidebar_width}px - #{$sidebar_offset});
        // padding-right: $sidebar_width+px;
    }
    
    $padding_right:  (360/100)+vw; 
    $padding_right:  100vw / 360 * 100; 
    // sidebar_width 
    @media (min-width: get_grid_bp('hd_')+px) {
        width: calc(100% - #{$sidebar_width}px - #{$sidebar_offset});
        // width: calc(100% - #{$padding_right} );

        // padding-right: $padding_right;
        padding-right: 18vw;
    }
}

.sidebar {
// background: $grey;
    // @extend .section__block;

    // position: sticky; /* Липкое позиционирование */
    // top: 0; /* Положение сверху */

    @include h_rhytm('column', $fb);
    float: left;
    width: 100%;
    // color: $grey_alt;
    background-color: $grey_alt;
    background-color: $grey;
    color: $white;

    // @media (min-width: #{map-get($devices, 'ds_')}px) {
    @media (min-width: get_grid_bp('ds_')+px) {
        margin: 0;
        width: $sidebar_width+px;
    }
}

.main--sidebar--left {
    float: right;
}

.main--sidebar--right {
    float: left;
}

.main--sidebar--right + .sidebar {
    float: right;
}



/* 1. Header
 * **********************************************************************
 *  
*/

.header{
    background-color: $accent;
    color: $white;
}
.header-top{
    padding: 1*$l_h_base;
}
.header-left {
    @include flex(flex-start, center);
}
.logo{

    img{
        width: auto; max-width: 100%; height: auto;
    }

    @include font_size_pro('h1');
    margin-right: 1em;
    font-weight: bold;

    // color: $secondary;
    // box-shadow: ;
    // text-shadow: 3px 3px 0px transparentize($grey_lighter, 0.5);

    text-shadow: 3px 3px 0px transparentize($grey_light, 0.5);
    color: $grey_lighter;
}


@media (max-width: 768px) {
   
    
} /* media end */





/* 2. Menu top
 * **********************************************************************
 *
*/  

// moved to components _menu-top.scss



/* 3. Slider
 * **********************************************************************
 *
*/  

// .slider-outer,
// .section-slider{

//     .slider{
//         width: 100%; 
//         height: 100vh;
//     }
// }


/* 4. Footer
 * **********************************************************************
 *
*/ 

.footer {
    background-color: $grey_light;
    padding: 1.5*$l_h_base 0;
    // color: $text;
    color: #555;

    a {
        color: $accent;
        font-weight: 400;
        &:hover {
            text-decoration: underline;
        }
    }
}



/* 5. menu-side
 * **********************************************************************
 *
*/ 

// moved to components _menu-side.scss



/* 6. demo-block
 * **********************************************************************
 *
*/ 

.demo-block {
    background-color: $grey_alt;
    margin-bottom: 1*$l_h_base;
    text-align: center;
    font-size: 1rem;

    // background-color: #8D5128;
    // background-color: #6C1F53;
    // background-color: #1F405B;
    // background-color: #5786AD;
    // background: linear-gradient(to right, #8D5128, #6C1F53);
    background: linear-gradient(to right, #5786AD, #1F405B);
    
    color: $white;
}

.demo-inline-block {
    // margin-bottom: 1*$l_h_base;
    width: 100%;
    height: auto;
    padding: 1em;
    background-color: #987;
    background: linear-gradient(to right, #5786AD, #1F405B);
    font-size: 1rem;
    line-height: 1.5rem;
    color: #e9e8e7;
}

.bg-green {
    background: linear-gradient(to right, $color_add_green_3, $color_add_green);
}
.bg-purple {
    background: linear-gradient(to right, $color_purple_3, $color_purple); 
}

.section-columns-offsets,
.ssection-features-vertical-alignment {
    .demo-rows {
        [class*=row] {
            margin-bottom: 1*$l_h_base;   
            background-color: $grey_super_light;
            .demo-block {
                margin-bottom: -0px;
            }
        }        
    }

}

/* Nesting */
.demo-block {
    .demo-block {
        background-color: #fff;
        background: linear-gradient(to right, #8D6329, #C69A5D);
    }
}

/* Display-models */
[class*=section-display] {
    margin-bottom: 1*$l_h_base;  
}
.section-display-models-inline-block .row-line {
    padding-bottom: 1*$l_h_base;
    & > div {
        .demo-block {
            margin-bottom: 0;
        }
    }
}
.section-display-models-flex .row-flex {
    // padding-bottom: 1*$l_h_base;
    padding-bottom: 1*$l_h_base;
    & > div {
        // background: linear-gradient(to right, #8D6329, #C69A5D);
        .demo-block {
            margin-bottom: 0;
            position: relative;
            height: 100%;
        }
    }
}

.section-text-utilites {
    .demo-block {
        text-align: inherit;
    }
}

.section-features-columns-same-height {
    .demo-rows {
        .row-flex {
            & > div {
                background-color: #987;
                background: linear-gradient(to right, #5786AD, #1F405B);
                font-size: 1rem;
                line-height: 1.5rem;
                color: #e9e8e7;
            }
        }
    }
}

.my-class {
    // max-width:  get_grid_c_m('hd_')+px;
    padding: get_grid_property('ds_', 'my_prop');
    line-height: get_grid_property('ds_', 'line_height');
}
// body {
//     line-height: get_grid_property('mv_', 'line_height');
//     @media (min-width: get_grid_bp('ds_')+px ) {
//         line-height: get_grid_property('ds_', 'line_height')
//     }

// }
.my-block {
    font-size: get_grid_f_b('mv_');
 
    @media (min-width: get_grid_bp('ds_')+px ) {  
    
        font-size: get_grid_f_b('ds_');
        max-width: 1/2 * get_grid_c_m('hd_')+px;
    }
}  

.my-block { 
    @media (min-width: get_grid_bp('ds_')+px ) {  
        margin-top: 20px; // some code..
    }
} 

.my-block {
    font-size: get_grid_f_b('mv_');
}

.my-block {
    max-width: 1/2 * get_grid_c_m('hd_')+px;
}

$h6: get_grid_f_b('mv_') * get_grid_ms_c('mv_');
.my-block {
    line-height: $h6;
}
h6 {
    
    font-size: get_grid_f_b('mv_') * get_grid_ms_c('mv_');
}


// .media-up(hd_) {
//     // code..
// }

.my-test-block {

    @include media-up(ds_) {
        width: 50%;
        background-color: #999;
    };   
}

.my-test-block {

    @include media-down(tb_) {
        width: 100%;
        background-color: dakrblue;
    };   
}

.my-test-block {

    @include media-only(tb_) {
        background-color: lightgreen;
    };
}


.media-block {

    height: 100px;
    background-color: #ccc;

    @include media-up(ds_) {

        width: 50%;
        background-color: #999;
    };

    @include media-up('hd_') {

        width: 100%;
        background-color: #555;
    };

    @include media-down(tb_) {
        padding: 1em;
        background-color: dakrblue;
    };  

    // @include media-only(tb_) {
    //     background-color: lightgreen;
    // };  

}


// $textmap: ( 
//   'foo1': 11,
//   'foo2': 22,
//   'foo3': 33
// );

// div.text-list-or-map {
//     content:nth(map-keys($textmap), 2);
//     // z-index:nth(map-values($map), 2);
//     z-index:nth($textmap, 2);

//     // width: nth();
// }
// @debug index(1px solid red, red); // 1



.media-inline {


    @include media-only(ds_) {
        background-color: lightgreen;
    };  

}

.test_devices_by_fonts {
    @include font_size_pro('base');
    // 15  14  15  16
}