@import url('https://fonts.googleapis.com/css?family=Oswald&subset=cyrillic');

body {
    color: white;
    font-size: 18px;
    font-family: 'Oswald', sans-serif;
}
.backgroundWrapper {
    background-image: url(../img/ali-yahya-488146.jpg);
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
}
.wrapper {
    display: grid;
    min-height: 100vh;
    grid-template-rows: 50px auto 50px;
    background-color: rgba(0, 0, 0, 0.5);
}
.fix {
    display: grid;
    width: 1400px;
    min-height: 100vh;
    grid-template-rows: 50px auto 50px;
    margin: 0 auto;
}


/*_____HEADER_____*/


header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    text-align: right;
    margin: 10px 30px 0 30px;
    font-size: 16px;
}
header .name {
    text-align: left;
}
header .phone {
    line-height: 22px;
}
header .email a {
    text-decoration: none;
    color: white;
}
header .email a:hover {
    color: #FFFF00;
}


/*_____SECTION_____*/


section {
    display: grid;
    align-content: center;
    margin-left: 98px;
}
section h2 {
    margin-bottom: 30px;
    font-size: 30px;
}
section p {
    width: 550px;
    font-size: 21px;
    line-height: 30px;
    margin-bottom: 40px;
    text-align: left;
}
section a {
    text-decoration: none;
    text-transform: uppercase;
    width: 190px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    color: black;
    background-color: #FFFF00;
    cursor: pointer;
}


/*-----Form-----*/



form input {
    margin-bottom: 10px;
}


/*-----POPUP-----*/


.modal {
    position: fixed;
    top: 0;
    bottom: 50%;
    right: 0;
    left: 0;
    margin: auto;
    width: 450px;
    height: 250px;
    background-color: rgba(102, 102, 102, 0.8);
    padding: 30px 30px 30px 30px;
    display: flex;
    justify-content: space-between;
    display: none;
    opacity: 0;
    z-index: 5;
}
.modal .close {
    float: right;
    cursor: pointer;
    width: 20px;
    height: 20px;
}
.modal .sendButton {
    margin-top: 10px;
    width: 180px;
    height: 30px;
    color: black;
    background-color: #FFFF00;
    font-family: 'Oswald', sans-serif;
    border: none;
    cursor: pointer;
}
.modal p:first-child {
    margin-bottom: 20px;
}
.sendSucces {
    width: 300px;
    text-align: center;
    margin: 0 auto;
    opacity: 0;
}
.overlay {
    z-index: 3;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
}


/*_____FOOTER_____*/


footer {
    margin: 20px 30px 0 30px;
}
footer .copyright{
    font-size: 12px;
}


/*Медиа запрос для мобильных устройств*/


@media only screen and (max-width: 600px) {
    .wrapper {
        display: flex;
        flex-direction: column;
    }
    header {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .name, .email, .phone {
        margin-top: 15px;
    }
    section {
        display: flex;
        flex-direction: column;
        text-align: center;
        align-items: center;
        margin: 50px 0;
    }
    footer {
        text-align: center;
    }
    .modal {
        width: 100%;
        height: 100%;
        text-align: center;
        padding: 0;
        position: fixed;
        background-color: rgba(102, 102, 102, 1);
    }
    .sendButton {
        margin: 10px auto 0 auto;
    }
    form {
        margin: 50px auto 0 auto;
    }
    form input {
        width: 170px;
        height: 30px;
        padding: 0;
        margin: 10px 0;
    }
    .modal .close {
        position: absolute;
        right: 20px;
        top: 20px;
        width: 30px;
        height: 30px;
    }
}