body {
    font-family: "Roboto", sans-serif;
    color: #434455;
    background-color: #ffffff;
    letter-spacing: 0.02em;
}

h1,
h2,
h3,
p {
    margin: 0;
}

ul {
    margin: 0;
    padding-left: 0;
    list-style-type: none;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

.button{
    cursor: pointer;
}

.container {
    max-width: 320px;
    padding: 0 16px;
    margin-left: auto;
    margin-right: auto;
}

@media screen and (min-width: 768px) {
    .container {
            max-width: 768px;
        }
}

@media screen and (min-width: 1158px) {
    .container {
        max-width: 1158px;
        padding: 0 15px;
    }
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header {
    box-shadow: 0px 2px 1px rgba(46, 47, 66, 0.08),
        0px 1px 1px rgba(46, 47, 66, 0.16),
        0px 1px 6px rgba(46, 47, 66, 0.08);
    border-bottom: 1px solid #e7e9fc;
}

.header-menu, .adress-container{
    display: none;
}

.page-logo {
    display: block;
    padding: 16px 0;
    color: #4d5ae5;
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.17;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.web-logo {
    color: #2E2F42;
}

.burger{
    border: none;
    padding: 0;
    background-color: transparent;
}
.burger-icon{
    display: block;
    fill: #2f2f37;
}

@media screen and (min-width: 768px) {
    .burger {
        display: none;
    }
    .header-menu {
        display: flex;
        gap: 40px;
        align-items: center;
    }
    .adress-container {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .contacts {
        display: block;
        color: #434455;
        font-style: normal;
        font-size: 12px;
        line-height: 1.17;
        letter-spacing: 0.04em;
        transition-property: color;
        transition-duration: 250ms;
        transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    }
    .nav-container {
        display: flex; 
        align-items: center;
        margin-right: auto;
    }
    .page-logo{
        padding: 24px 0;
        margin-right: 120px;
    }
        .nav-link {
            padding: 24px 0;
            display: flex;
            gap: 20px;
            flex-direction: column;
            align-items: center;
            color: #2E2F42;
            font-weight: 500;
            line-height: 1.5;
            transition-property: color;
            transition-duration: 250ms;
            transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
        }
        .current {
            position: relative;
            color: #404bbf;
        }
        .current::after {
            width: 100%;
            position: absolute;
            left: 0;
            bottom: -1px;
            height: 4px;
            background-color: #404bbf;
            border-radius: 2px;
            display: block;
            content: "";
            transition-property: width, height, border-radius, background-color;
            transition-duration: 250ms;
            transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
        }
        .nav-link:hover::after {
            width: 100%;
            width: 48px;
            height: 4px;
            border-radius: 2px;
            background-color: #404BBF;
        }
                .nav-link:hover,
                .contacts:hover,
                .nav-link:focus {
                    color: #404bbf;
                }
        
        
                .contacts:focus {
                    color: #404bbf;
                }
        
}

@media screen and (min-width: 1158px){
    .page-logo{
        margin-right: 76px;
    }
    .contacts-list{
        display: flex;
    }
    .adress-container{
        align-items: center;
        gap: 40px;
        flex-direction: row;
    }
    .contacts{
        padding: 24px 0;
        font-size: 16px;
        line-height: 1.5;
        letter-spacing: 0.02em;
    }
}

.button {
    min-width: 169px;
    height: 56px;
    border: none;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
    padding: 16px 32px;
    font-family: "Roboto", sans-serif;
    cursor: pointer;
    color: #ffffff;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.04em;
    background: #4d5ae5;
    transition-property: background-color;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.button:hover,
.subscribe-button:hover {
    background-color: #404bbf;
}

.button:focus,
.subscribe-button:focus {
    background-color: #404bbf;
}

@media screen and (min-width:768px){
    .mobile-menu{
        display: none;
    }
}
.mobile-menu{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1), visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
    
}
.mobile-menu .container{
    align-items: flex-start;
}
.mobile-menu-container{
    position: relative;
    padding-top: 72px;
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.mobile-menu-nav{
    margin-bottom: auto;
}
.mobile-nav-link{
    font-weight: 700;
    font-size: 36px;
    line-height: 111%;
    letter-spacing: 0.02em;
}
.current {
    position: relative;
    color: #404bbf;
}
.mobile-nav-item:not(:last-child){
    margin-bottom: 40px;
}

.mobile-adress-link{
    font-style: normal;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
}
.mobile-adress-item:first-child{
    margin-bottom: 24px;
}
.mobile-nav-link:hover, .mobile-nav-link:focus, .mobile-adress-link:hover, .mobile-adress-link:focus{
    color: #404bbf;
}
.mobile-adress-container{
    margin-bottom: 48px;
}
.social-media {
    display: flex;
    gap: 40px;
    justify-content: center;
}
.social-link {
    position: relative;
    background: #4D5AE5;
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition-property: background-color;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link:hover,
.social-link:focus {
    background-color: #404BBF;
}

.social-link .media-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.first-section {
    margin: 0 auto;
    background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url(../images/people@1x.jpg);
    padding: 72px 0;
    max-width: 320px;
    background-color: #2E2F42;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.page-title {
    margin: 0 auto 72px;
    max-width: 216px;
    color: #fff;
    text-align: center;
    letter-spacing: 0.02em;
    font-size: 36px;
    line-height: 1.11;
}
@media screen and (min-resolution: 2x) and (max-width: 767px){
    .first-section{
        background-image:linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url(../images/people@2x.jpg);
    }
}
@media screen and (min-width: 768px){
    .first-section{
        padding: 112px 0;
        max-width: 768px;
        background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url(../images/people_tablet@1x.jpg);
    } 
    .page-title{
        margin-bottom: 36px;
        max-width: 496px;
        font-size: 56px;
        line-height: 1.07;
    }
}
@media screen and (min-resolution: 2x) and (min-width: 768px){
    .first-section{
        background-image:linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url(../images/people_tablet@2x.jpg);
    }
}
@media screen and (min-width: 1158px){
    .first-section{
        max-width: 1440px;
        padding: 188px 0;
        background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
            url(../images/people_tablet@1x.jpg), url(../images/people_desktop@1x.jpg);
    }
    .page-title{
        margin-bottom: 48px;
    }
}
@media screen and (min-resolution: 2x) and (min-width: 1158px){
    .first-section{
        background-image: linear-gradient(rgba(46, 47, 66, 0.7)), url(../images/people_desktop@2x.jpg);
    }
}

.section{
    padding: 96px 0;
}

.icon-box{
    display: none;
}
.properties-container{
    display: flex;
    flex-direction: column;
    gap: 72px;
}

.feature {
    text-align: center;
    margin-bottom: 8px;
    color: #2E2F42;
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    letter-spacing: 0.02em;
}
.feature-description{
    font-weight: 500;
    line-height: 1.5;
}

@media screen and (min-width: 768px) {
    .properties-container {
        flex-direction: row;
        flex-wrap: wrap;
        column-gap: 24px;
        row-gap: 72px;
    }

    .prop-item {
        flex-basis: calc((100% - 24px) / 2);
    }
    .feature{
        text-align: left;
    }
}
@media screen and (min-width: 1158px){
    .properties-container{
        flex-wrap: nowrap;
    }
    .section {
        padding: 120px 0;
    }
    .feature {
        color: #2E2F42;
        font-weight: 500;
        font-size: 20px;
        line-height: 1.2;
    }
    .feature-description {
        font-weight: 400px;
    }
    .icon-box {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 112px;
        margin-bottom: 8px;
        background-color: #f4f4fd;
        border: 1px solid #8e8f99;
        border-radius: 4px;
        padding: 24px 100px;
    }
    .prop-item {
        flex-basis: calc((100% - 3 * 24px) / 4);
    }
}

.team {
    padding: 96px 0;
    background-color: #F4F4FD;
}

.section-title {
    margin-bottom: 72px;
    font-size: 36px;
    line-height: 1.11;
    letter-spacing: 0.02em;
    text-align: center;
}

.card-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 72px;
}

@media screen and (min-width: 768px){
    .card-container{
        flex-direction: row;
        flex-wrap: wrap;
        column-gap: 24px;
        row-gap: 64px;
    }
    .card{
        width: calc((100% - 24px) / 2);
    }
}
@media screen and (min-width: 1158px){
    .team{
        padding: 120px 0;
    }
    .card-container{
        flex-wrap: nowrap;
    }
}
.person {
    padding: 32px 0;
}

.card {
    background-color: #FFFFFF;
    width: 264px;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 1px 0 rgba(46, 47, 66, 0.08), 0 1px 1px 0 rgba(46, 47, 66, 0.16), 0 1px 6px 0 rgba(46, 47, 66, 0.08);
}

.name {
    margin-bottom: 8px;
    color: #2E2F42;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.type {
    line-height: 1.5;
    margin-bottom: 8px;
}

.person .name,
.person .type {
    text-align: center;
}

.person .social-media{
    gap: 24px;
}

.portfolio {
    padding: 96px 0;
}
.app-list {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 48px;
}
@media screen and (min-width: 768px){
    .app-list{
        flex-direction: row;
        flex-wrap: wrap;
        column-gap: 24px;
        row-gap: 72px;
    }
    .app-card{
        width: calc((100% - 24px) / 2);
    }
}
@media screen and (min-width: 1158px){
    .app-list{
        row-gap: 48px;
    }
    .app-card{
        width: calc((100% - 2*24px) / 3)
    }
    .portfolio {
        padding: 120px 0;
    }
}
.box {
    position: relative;
    overflow: hidden;
}

.overlay {
    padding: 40px 32px;
    color: #F4F4FD;
    letter-spacing: 0.02em;
    line-height: 24px;
    background-color: #4D5AE5;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateY(100%);
    transition-property: transform;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.app-card:hover .overlay {
    transform: translate(0);
}
.app-card {
    transition-property: box-shadow;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.app-card:hover {
    cursor: pointer;
    box-shadow: 0 2px 1px 0 rgba(46, 47, 66, 0.08), 0 1px 1px 0 rgba(46, 47, 66, 0.16), 0 1px 6px 0 rgba(46, 47, 66, 0.08);
}
.text {
    padding: 32px 16px;
    border: 1px solid #e7e9fc;
    border-top: none;
}

.page-footer {
    background: #2e2f42;
    color: #f4f4fd;
    padding: 96px 0;
}
.footer-text {
    line-height: 1.5;
}
.page-footer .page-logo {
    display: block;
    text-align: center;
    margin-bottom: 16px;
    padding: 0;
}
.web-logo-footer {
    color: #F4F4FD;
}
.page-footer .container {
    display: flex;
    flex-direction: column;
    row-gap: 72px;
}
.footer-social-media {
    text-align: center;
    font-weight: 500;
    line-height: 1.5;
    color: #fff;
    margin-bottom: 16px;
}
.container-footer-media {
    display: flex;
    gap: 16px;
    justify-content: center;
}
.footer-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%)
}
.social-item-footer {
    width: 40px;
    height: 40px;
}
.social-link-footer {
    position: relative;
    background-color: #4D5AE5;
    display: flex;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    transition-property: background-color;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.social-link-footer:hover,
.social-link-footer:focus {
    background-color: #31D0AA;
}
.media-icon {
    fill: #F4F4FD;
}
.footer-input {
    display: block;
    margin: 16px auto;
    font-size: 12px;
    line-height: 2;
    letter-spacing: 0.04em;
    border: 1px solid #fff;
    border-radius: 4px;
    width: 288px;
    height: 40px;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
    background-color: transparent;
    padding: 8px 16px;
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
    outline: transparent;
    color: #fff;
    opacity: 0.3;
}

@media screen and (min-width: 768px){
    .page-footer .container {
        padding-left: 92px;
        flex-direction: row;
        flex-wrap: wrap;
        column-gap: 24px;
        row-gap: 72px;
    }
    .page-logo-paragraph{
        max-width: 264px;
    }
    .footer-social-media{
        text-align: left;
    }
    .page-footer .page-logo{
        text-align: left;
    }
    .footer-form{
        display: flex;
        gap: 24px;
        justify-content: center;
    }
    .footer-input{
        margin: 0;
        width: 264px;
    }
}

@media screen and (min-width: 1158px){
    .page-footer .container {
        padding-left: 15рх;
        flex-wrap: nowrap;
        gap: 0;
    }
    .container-social {
        margin-right: 80px;
    }
    .page-logo-paragraph {
        margin-right: 120px;
    }
    .footer-input{
        opacity: 1;
    }
    .footer-input::placeholder{
        opacity: 1;
    }
}
.footer-input:focus {
    border-color: #4d5ae5;
}

.footer-input::placeholder {
    color: #fff;
    font-size: 12px;
    line-height: 2;
    letter-spacing: 0.04em;
    opacity: 0.6;
}
.subscribe-button {
    margin: 0 auto;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.04em;
    text-align: center;
    border-radius: 4px;
    min-width: 165px;
    height: 40px;
    color: #fff;
    background-color: #4d5ae5;
    border: none;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.icon-send {
    fill: #fff;
    margin-left: 16px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    white-space: nowrap;
    clip-path: inset(100%);
    clip: rect(0 0 0 0);
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(46, 47, 66, 0.4);
    opacity: 0;
    z-index: 999;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1), visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.is-open, .mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 72px 16px 24px;
    width: 288px;
    min-height: 623px;
    border-radius: 4px;
    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 2px 1px 0 rgba(0, 0, 0, 0.2);
    background-color: #fcfcfc;
    overflow: auto;
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media screen and (min-width: 768px){
    .modal{
        padding: 72px 24px 24px;
        width: 408px;
        min-height: 584px;
    }
}

.close-button {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 24px;
    height: 24px;
    position: absolute;
    right: 24px;
    top: 24px;
    border-radius: 50%;
    background-color: #e7e9fc;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu-container .close-button{
    background-color: transparent;
}
.close {
    fill: #2e2f42;
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.close-button:hover,
.close-button:focus {
    background-color: #404bbf;
    border: none;
}
.close-button:hover .close,
.close-button:focus .close {
    fill: #ffffff;
}

.modal-field-comment {
    margin-bottom: 16px;
}
.modal-header {
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.02em;
    text-align: center;
    margin-bottom: 16px;
    color: #2e2f42;
}
.form-input {
    border: 1px solid rgba(46, 47, 66, 0.4);
    border-radius: 4px;
    width: 100%;
    min-height: 40px;
    outline: transparent;
    padding-left: 38px;
    background-color: transparent;
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.form-label,
.textarea {
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #8e8f99;
}

.form-label {
    display: block;
    margin-bottom: 4px;
}

.modal-field-box {
    margin-bottom: 8px;
}

.modal-input-wrapper {
    position: relative;
}

.modal-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.textarea {
    height: 120px;
    resize: none;
    color: rgba(46, 47, 66, 0.4);
    padding: 8px 16px;
}


input:focus,
textarea:focus {
    border-color: #4d5ae5;
}

input:focus+.modal-icon {
    fill: #4d5ae5;
}
.modal-field {
    display: flex;
    align-items: center;
    margin-top: 16px;
    margin-bottom: 24px;
}

.modal-field .policy {
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #8e8f99;
    display: flex;
    align-items: center;
}
.modal-link {
    display: block;
    line-height: 1.33;
    text-decoration: underline;
    text-decoration-skip-ink: none;
    color: #4d5ae5;
}
.accept{
    display: block;
}
@media screen and (min-width: 768px){
    .modal-link{
        display: inline;
    }
    .accept {
        display: inline;
    }
}
.checkbox {
    fill: transparent;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 16px;
    height: 16px;
    border-radius: 2px;
    border: 1px solid rgba(46, 47, 66, 0.4);
    background-color: transparent;
    margin-right: 8px;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border 250ms cubic-bezier(0.4, 0, 0.2, 1), fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.check-icon {
    fill: transparent;
}

.modal-check:checked+.policy>.checkbox {
    background-color: #404bbf;
    fill: #F4F4FD;
    border: none;
}

.modal-check:checked+.policy>.checkbox>.check-icon {
    fill: #F4F4FD;
}
.form .button {
    margin-top: 24px;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
}