/* Body
======================
font-family: 'основной шрифт', далее запасной, если основной не загрузится*/
body {
    margin: 0;

    font-family: 'Raleway', sans-serif;
    font-size: 14px;
    color: #6c7279;
    -webkit-font-smoothing: antialiased; /* сглаживание шрифтов */

    background-color: #fff;
}

/* * - для всех (но before и after не входят), box-sizing: border-box - фиксация ширины бокса (т.е. если будут какие-то поля, то они будут внутри бокса и ширина не изменится)*/
*,
*:before,
*:after {
    box-sizing: border-box;
}

h1, h2, h3, h4 ,h5 ,h6 {
    margin: 0;
}

p {
    margin: 0 0 10px;
}
/* Container
=============
margin: 0 auto - значит, что поля (margin) сверху и снизу 0, а по горизонтали по центру (auto)
width 100% - контейнер займет всю ширину экрана, но не более 1170px (max-width)*/
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header
=============
при указании: если 1 число - со всех сторон, 2 числа - 1е вертикальные, 2е горизонтальные, 3 или 4 числа - 1е -верх, 2е - горизонтальные (только справа), 3е - низ (4е - лево), т.е. по часовой стрелке*/
.header {
    width: 100%;
    height: 120px;

    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;

    background-color: rgba(18, 31, 40, 0.9);
}

/* Работа с классом "header fixed" (header.addClass("fixed")) */
.header.fixed {
    height: auto;
    position: fixed;

    background-color: rgba(18, 31, 40, 0.9);
}

/* Если мы находимся в .header.fixed, то мы работаем с элементом .header__inner */
.header.fixed .header__inner {
    padding-bottom: 15px;
    padding-top: 15px;

    border-bottom: ;
}

/* header__inner
=======================
justify-content: space-between - свойство флексов, что означает, что м-у ними будет расстояние
border-bottom - нижняя граница: толщина, тип (сплошной в данном случае), цвет*/
.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 35px 0;
}

.header__logo {
    max-height: 100px;
}

/* header__contact
======================*/
.header__contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    color: rgba(255, 255, 255, 0.75);
    font-size: 1.3em;
}

.header__phone {
    margin-right: 40px;
}

/* Nav
======================*/
.nav {
    display: flex;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.nav__link {
    margin-left: 50px;
    color: #fff;
    text-decoration: none;
    opacity: .75;

    transition: opacity .1s linear; /* плавные переходы свойств: чего (свойство), как быстро, каким образом*/
}

/* псевдокласс - первая ссылка*/
.nav__link:first-child {
    margin-left: 0px;
}

/* псевдокласс - наведение курсора*/
.nav__link:hover {
    /* text-decoration: underline; - подчеркивание*/
    opacity: 1;
}

/* Intro
=======================*/
.intro {
    display: flex;
    flex-direction: column; /* каждый номей эл-т Интро будет начинаться с новой строки. Вместе с флекосм это надо для позиционирования контента в интро по центру*/
    justify-content: center; /* выравнивание по центру по вертикали в блоке Интро?*/
    height: 750px;
    padding-top: 100px;

    background: #31344e url("img/intro_bg.jpg") center no-repeat;
    background-size: cover; /* cover - чтобы картинка занимала пропорциаонально всю ширину и высоту блока*/
}

.intro__inner {
    width: 100%;
    max-width: 1170px;
    margin: 0 auto;
    text-align: center; /* выравнивание по центру*/
}

.intro__title {
    margin: 0 0 30px;

    font-family: 'Open Sans', sans-serif;
    font-size: 60px;
    line-height: 1.1; /* если такое число, то это соотношение к шрифту, либо указать в пикселях, например "71px"*/
    color: #d45953;
    font-weight: 700;
}

.intro__subtitle {
    margin: 0 160px 60px;

    font-size: 22px;
    color: #d45953;
    line-height: 1.5;
    font-weight: 600;
}

/* Button
==========================*/
.btn {
    display: inline-block; /* Чтобы мы могли задавать внутренние отступы нашей кнопки, размеры и т.д.*/
    vertical-align: top; /* Выравнивание по вертикальной границе по верху*/
    padding: 14px 40px;

    border-radius: 2px;
    border: 0;
    cursor: pointer;

    font-family: inherit; /* Наследовать шрифт для кнопок у родителя (основной)*/
    font-size: 13;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;

    transition: background 0.1s linear;
}

.btn--red {
    background-color: #e84545;
}

.btn--red:hover {
    background-color: #ce3838;
}

.btn--long {
    min-width: 280px;
}

/* Features
====================*/
.features {
    display: flex;
    flex-wrap: wrap; /* разрешаем переносить наши элементы на новую строку если они не помещаются на текущую строку*/
    margin: 95px 0;
}

.features__item {
    width: 25%;
    padding: 0 40px;
    margin: 25px 0;

    text-align: center;
}

.features__icon {
    margin-bottom: 25px;
}

.features__title {
    margin-bottom: 20px;

    font-size: 14px;
    color: #2d3033;
    font-weight: 700;
    text-transform: uppercase;
}

.features__text {
    font-size: 14px;
    color: #6c7279;
    line-height: 1.5;
}

/* Works
====================*/
.works {
    display: flex;
    flex-wrap: wrap;
}

.works__item {
    display: flex;
    width: 50%;
    height: 600px;

    border-bottom: 1px solid #fff;
    border-right: 1px solid #fff;

    position: relative; /* чтобы связать works__item и works__photo. relative - главный*/
    overflow: hidden; /* скрываем все, что вылезает за пределы блока (обрезаем длинную картинку)*/
}

.works__item:hover .works__content {
    opacity: 1; /* Активировать при наведении*/
}

.works__item:hover .works__name {
    opacity: 0;
}

.works__photo {
    min-width: 100%;

    position: absolute; /* чтобы связать works__item и works__photo*. absolute - позиционр=ируется относительно relative*/
    top: 50%;
    left: 50%; /* центруем картинку по центру по вертикали и горизонтали */
    z-index: 1; /* приоритет в отображении (чем больше число, тем выше слой)*/

    transform: translate3d(-50%, -50%, 0); /* центруем изображение для обрезки по осям x,y,z после центровки top и left*/
}

.works__name {
    position: absolute;
    width: 100%;
    top: 150px;

    font-size: 40px;
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    z-index: 2;

    text-align: center;

    transition: opacity 0.2s linear;
}

.works__content {
    display: flex; /* Чтобы отобразить заголовок и текст*/
    flex-direction: column; /* Чтобы отобразить заголовок и текст как 2 элемента одного столбца, а не строки*/
    justify-content: center; /* выравниваем контент по центру по вертикали*/
    width: 100%;
    height: 100%;

    background-color: rgba(232, 69, 69, 0.9); /* Задаем цвет r, g, b и прозрачность*/
    opacity: 0; /* Просто так не показывать*/

    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;

    transition: opacity 0.2s linear;
}

.works__title {
    margin-bottom: 5px;

    font-size: 30px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;

    text-align: center; /* Выравнивание текста по центру по горизонтали*/
}

.works__text {
    padding: 0 20px;


    font-size: 22px;
    color: #fff;
}

/* Download
====================*/
.download {
    margin: 90px 0;
    text-align: center;
}

.download__title {
    margin-bottom: 10px;

    font-size: 28px;
    color: #2d3033;
    font-weight: 300;
}

.download__text {
    margin-bottom: 30px;

    font-size: 13px;
    color: #2d3033;
    font-weight: 700;
    text-transform: uppercase;
}

/* Footer
======================*/
.footer {
    background-color: #121f28;
}


.footer__inner {
    padding: 70px 0;
    display: flex;
    flex-wrap: wrap;
}
.footer__block {
    width: 50%;
    padding: 0 15px;

    text-align: center;
}

.footer__title {
    margin-bottom: 10px;

    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
}

.footer__address {
    font-size: 14;
    font-style: normal;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.5);
}

.footer__text {
    font-size: 14;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.5);
}

/* Copyright
================*/
.copyright {
    padding: 20px 0;

    background-color: #0c141a;
}

.copyright__text {
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
    color: #808080
}

/* Burger
=============*/
.burger {
    display: none;
    padding: 10px 2px;

    background: none;
    border: 0;
    cursor: pointer;
}

.burger__item {
    display: block;
    width: 30px;
    height: 3px;

    background-color: #fff;

    font-size: 0;
    color: transparent;

    position: relative;
}

.burger__item:before, .burger__item:after {
    content: "";
    width: 100%;
    height: 100%;

    background-color: #fff;

    position: absolute;
    left: 0;
    z-index: 1;
}

.burger__item:before {
    top: -8px;
}

.burger__item:after {
    bottom: -8px;
}

/* Media
========================
Медиа запросы:
1. медиазапрос, который будет срабатывать, когда ширина экрана будет равняться 1300px и меньше:*/
@media (max-width: 1300px) {
    /*  Works  */
    .works__item {
        width: 50%;
    }
}

@media (max-width: 991px) {
    /*  Nav  */
    .nav {
        display: none;
        width: 100%;
        flex-direction: column;

        text-align: right;
        background-color: #31344e;

        right: 0;
        top: 100%;
        position: absolute;
    }

    .nav.show {
        display: flex;
    }

    .nav__link {
        padding: 9px 15px;
    }

    /*  Burger  */
    .burger {
        display: block;
    }

    /*  Intro  */
    .intro__title{
        font-size: 40px;
    }

    /*  Features  */
    .features__item {
        width: 50%;
    }
}

@media (max-width: 767px) {

    /*  Intro  */
    .intro {
        height: auto;
        padding-top: 130px;
        padding-bottom: 30px;
    }

    .intro__title {
        font-size: 30px;
    }

    .intro__subtitle {
        margin-bottom: 30px;

        font-size: 16px;
    }

    /*  Features  */
    .features {
        margin: 40px 0;
    }

    .features__item {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    /*  Works  */
    .works__item {
        width: 100%;
        height: 300px;
    }

    /*  Intro  */
    .intro__title{
        font-size: 40px;
    }

    /*  Download  */
    .download {
        margin: 50px 0;
    }
    .download__title {
        font-size: 24px;
    }

    /*  Btn  */
    .btn--long{
        min-width: 260px;
    }

    /*  Footer  */
    .footer__inner {
        padding: 30px 0;
    }

    .footer__block {
        width: 100%;
        margin-bottom: 30px;
        padding-left: 0;
        padding-right: 0;
    }

    .footer__block:last-child {
        margin-bottom: 0;
    }
}