.hidden{
    display: none;
}
body {
    color: #434455;
    background-color: #fff;
    font-family: "Roboto", sans-serif;
}

/*rezet*/
ul,
ol {
    list-style-type: none;
    margin: 0px;
    padding: 0px;

}

a {
    text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin: 0;
}
img{
    display: block;
    max-width: 100%;
    height: auto;
}
button{
    cursor: pointer;
}

/*header */
.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;
}

/*common */
.container {
    max-width: 320px;
    padding: 0 16px;
    margin: 0 auto;
}

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

/*header mobile*/
 @media screen and (min-width: 320px){
.page-header {
    border-bottom: 1px solid #e7e9fc;
    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);
}
.container-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-list
{
    display: none;
}
.contacts {
    display: none;
}

.logo {
    font-weight: 700;
    font-size: 18px;
    line-height: 1.17;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #4d5ae5;
    font-family: "Raleway", sans-serif;
}
.header-logo {
    padding: 16px 0px;
    display: block;
}
.header-logo .logo-link-header {
    color: #2e2f42;
}
.burger-btn{
    padding: 0;
    border: none;
    background-color: transparent;
}
.burger-icon{
    display: block;
    fill: #2f2f37;
}
}
/*tablet*/
@media screen and (min-width: 768px) {
    .burger-btn{
        display: none;
    }
.header-nav {
    display: flex;
    align-items: center;
}
.nav-list {
    display: flex;
    align-items: center;
    gap: 40px;
}
.header-logo {
    padding: 24px 0px;
    margin-right: 120px;
}
.nav-link {
    display: block;
    padding: 24px 0px;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #2E2F42;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link.current {
    position: relative;
    color: #404bbf;
}
.nav-link.current::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    border-radius: 2px;
    background-color: #404bbf;
    width: 100%;
    height: 4px;
}

.contacts {
    font-style: normal;
    display: block;
}
.contacts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.contacts-link {
    display: block;
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #434455;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover,
.nav-link:focus,
.contacts-link:hover,
.contacts-link:focus,
.logo-link-header.current {
    color: #404bbf;
}}

/*desktop*/
@media screen and (min-width: 1158px) {
    .header-logo {
    margin-right: 76px;
}
.contacts-list {
    align-items: center;
    flex-direction: row;
    gap: 40px;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.contacts-link {
    padding: 24px 0px;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
}
}

/*mobile menu*/
.mobile-menu{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1), visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/*.mobile-menu.is-open{
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}*/
.mobile-menu-container{
    position: relative;
    padding-top: 72px;
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.mobile-menu-close{
    position: absolute;
    top: 24px;
    right: 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #2e2f42;
    background-color: #e7e9fc;
    fill: #2e2f42;
    padding: 0px;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu-close:hover,
.mobile-menu-close:focus {
    background-color: #404bbf;
    border: none;
    fill: #ffffff;
}
.mobile-menu-nav{
    margin-bottom: auto;
}
.mobile-menu-nav-list{
    display: flex;
    flex-direction: column;
    row-gap: 40px;
}

.mobile-menu-nav-link{
     font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    letter-spacing: 0.02em;
    color: #2E2F42;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu-nav-link.current{
    position: relative;
    color: #404bbf;
}
.mobile-menu-nav-link.current::after {
    position: absolute;
    left: 0;
    bottom: -1px;
    border-radius: 2px;
    background-color: #404bbf;
    width: 100%;
    height: 4px;
}
.mobile-menu-nav-link:hover,
.mobile-menu-nav-link:focus,
.mobile-contacts-link:hover,
.mobile-contacts-link:focus{
    color: #404bbf;
}
.mobile-contacts{
    margin-bottom: 48px;
}
.mobile-contacts-list{
    display: flex;
    flex-direction: column;
    row-gap: 24px;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-contacts-link{
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #434455; 
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-contacts-link.current {
    position: relative;
    color: #4d5ae5;
}
.mobile-list-social{
    display: flex;
    justify-content: space-between;
    width: 100%;
    height: 40px;    
}
.mobile-item-social{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
}
.mobile-icon-link{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: #4d5ae5;
    border-radius: 50%;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-icon-link:hover,
.mobile-icon-link:focus{
    background-color: #31d0aa;
}
.icon {
    fill: #F4F4FD;
}

@media screen and (min-width: 768px) {
.mobile-menu{
    display: none;
}
.mobile-contacts-link.current {
    position: relative;
    color: #434455;
}
}

/*hero mobile*/
 @media screen and (min-width: 320px){
.hero {
    background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url("../images/hero/hero-1-min.jpg");
    max-width: 320px;
    margin: 0 auto;
    padding: 72px 0px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}
.hero-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.11;
    letter-spacing: 0.02em;
    margin: 0px auto;
    color: #fff;
    text-align: center;
    padding: 0px 52px 72px 52px;
}
.hero-button {
    display: block;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: #fff;
    background-color: #4d5ae5;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
    padding: 16px 32px;
    border: none;
    border-radius: 4px;
    min-width: 169px;
    height: 56px;
    margin: 0px auto;
    transition-property: background-color;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-button:hover,
.hero-button:focus {
    background-color: #404bbf;
    cursor: pointer;
}
@media (min-resolution: 2x) {
.hero{
    background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url("../images/hero/hero-1@2x-min.jpg");
}
}}

/*hero tablet*/
@media screen and (min-width: 768px) {
.hero {
    background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url("../images/hero/hero-tab-1-min.jpg");
    max-width: 767px;
    margin: 0 auto;
    padding: 112px 0px;
}
 .hero-title {
    font-size: 56px;
    line-height: 1.07;
    margin: 0px auto;
    max-width: 600px;
    padding-bottom: 36px;
}
.hero-button{
    transition-property: background-color;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
}
 @media (min-resolution: 2x) {
.hero {
    background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url("../image/hero/hero-tab-1@2x-min.jpg");
}}

/*hero desktop*/
@media screen and (min-width: 1158px) {
.hero {
    background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url("../images/hero/hero-desk-1-min.jpg");
    max-width: 1440px;
    margin: 0 auto;
    padding: 188px 0px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
} 
.hero-title {
    font-size: 56px;
    line-height: 1.07;
    margin: 0 auto;
    max-width: 600px;
    padding-bottom: 48px;
 }
.hero-button {
    line-height: 1.5;
    margin: 0 auto;
    transition-property: background-color;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
}  
@media (min-resolution: 2x) {
.hero {
    background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url("../images/hero/hero-desk-1@2x-min.jpg");
}
}

/*benefits mobile*/

@media screen and (max-width: 1157px) {
    .icon-benefits {
        display: none;
    }}
 @media screen and (min-width: 320px) {

.benefits-list {
    display: flex;
    align-items: center;
    flex-direction: column;
    row-gap: 72px;
    width: 100%;
    margin: 96px auto;
}
.benefits-item-title {
    font-family: "Roboto", sans-serif;
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    letter-spacing: 0.02em;
    color: #2e2f42;
    margin-bottom: 8px;
    text-align: center;
}
.benefits-text {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #434455;
}}
/*benefits tablet*/
@media screen and (min-width: 768px) {
.benefits-list {
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 24px; 
}
.benefits-item {
    flex-basis: calc((100% - 72px) / 2);
}
.benefits-item-title {
    width: 356px;
    text-align: left;
}
}
/*benefits desctop*/
@media screen and (min-width: 1158px) {
.benefits-list {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 120px auto;   
}
    
.benefits-item {
    max-width: calc((100% - 3*24px) / 4);
}
.icon-benefits {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    height: 112px;
    padding-top: 24px;
    padding-bottom: 24px;
    background-color: rgba(244, 244, 253, 1);
    border-radius: 4px;
    border: 1px solid rgba(142, 143, 153, 1)
}
.benefits-item-title {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
}
.benefits-text {
    font-weight: 400;
}
}

    /*team mobile*/
        @media screen and (min-width: 320px) {
.team-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 28px;
    background-color: #f4f4fd;
    margin-bottom: 96px;
}
.team-list {
    display: flex;
    justify-content: center;
    flex-direction: column;
    margin-bottom: 96px;
    gap: 72px;
}
.team-title {
    font-family: "Roboto", sans-serif;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.11;
    letter-spacing: 0.02em;
    text-transform: capitalize;
    text-align: center;
    color: #2e2f42;
    margin-bottom: 72px; 
    margin-top: 96px; 
}
 .team-images-title {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-align: center;
    color: #2e2f42;
    margin-bottom: 8px;
}
    
.team-text {
    text-align: center;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #434455;
    margin-bottom: 8px;
}
.team-item { 
    border-radius: 0px 0px 4px 4px;
    box-shadow: 0px 2px 1px 0px rgba(46, 47, 66, 0.08),
    0px 1px 1px 0px rgba(46, 47, 66, 0.16),
    0px 1px 6px 0px rgba(46, 47, 66, 0.08);
}
.team-nickname {
    text-align: center;
    padding: 32px 16px;
}
.team-social {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 0 auto;
}  
.team-item-social {
    position: relative;
    width: 40px;
    height: 40px;
}
    
.team-icon-link:hover,
.team-icon-link:focus {
    background-color: #404bbf;
}
.team-icon-link {
    display: flex;
    align-items: center;
    position: absolute;
    justify-content: center;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    height: 100%;
    background-color: #4d5ae5;
    cursor: pointer;
    border-radius: 50%;
}
.icon {
     fill: #F4F4FD;
}
}
/*team tablet*/
@media screen and (min-width: 768px) {
.team-list {
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 24px;
    row-gap: 64px;
    }
}
/*team desktop*/
@media screen and (min-width: 1158px) {
.team-container {
    max-height: 540px;
    width: 100%;
    padding: 0;
    margin: 120px auto;
}
.team-title {
    margin-top: 0px;
    margin-bottom: 72px;
}
.team-list {
    width: 100%;
    margin: 0px 156px;
    flex-basis: calc((100% - 3*24px) / 4);
    
}
}

/*portfolio mobile*/
@media screen and (min-width: 320px) {
.portfolio-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 96px auto;    
}
.portfolio-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.11;
    letter-spacing: 0.02em;
    text-transform: capitalize;
    text-align: center;
    color: #2e2f42;
    margin-bottom: 72px;
}
.portfolio-list {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 48px;
}
.portfolio-images-title {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #2e2f42;
    margin-bottom: 8px;
}
.portfolio-item {
    position: relative;
    overflow: hidden;
    background-color: #fff;
    cursor: pointer;
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
    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);
}     
.portfolio-item:hover {
    box-shadow: 0px 2px 1px 0px rgba(46, 47, 66, 0.08),
        0px 1px 1px 0px rgba(46, 47, 66, 0.16),
        0px 1px 6px 0px rgba(46, 47, 66, 0.08);
}
.portfolio-item:hover .overlay-text {
    transform: translateY(0px);
    background-image: to top;
}
.portfolio-text {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #434455;
}
.overlay-text {
    position: absolute;
    top: 0;
    color: #F4F4FD;
    font-size: 16px;
    background-color: #4D5AE5;
    width: 100%;
    height: 100%;
    letter-spacing: 0.02em;
    line-height: 1.5;
    padding: 40px 32px;
    transform: translateY(100%);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-overlay {
    position: relative;
    overflow: hidden;
}
.portfolio-name {
    padding: 32px 16px;
    border: 1px solid #e7e9fc;
    border-top: none;
    background-size: cover;
}
}

/*portfolio tablet*/
@media screen and (min-width: 768px) {
.portfolio-container{
    
    margin-top: 96px;
    margin-bottom: 68px;
}   
.portfolio-list {
    flex-wrap: wrap;
    flex-direction: row;
    row-gap: 72px;
    column-gap: 24px;
}
.portfolio-item{
    flex-basis: calc((100% - 24px) / 2);
}
}
/*portfolio desktop*/
@media screen and (min-width: 1158px) {
    .portfolio-container {

        margin: 120px auto;
        
    }

    .portfolio-list {
        flex-wrap: wrap;
        flex-direction: row;
        row-gap: 48px;
        column-gap: 24px;
    }

    .portfolio-item {
        flex-basis: calc((100% - 2*24px) / 3);
    }
}

/*footer mobile*/
@media screen and (min-width: 320px) {
.footer-container {
    display: flex;
    max-width: 320px;
    height: auto;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
    background-color: #2e2f42;
    padding: 96px 16px;
}
.logo-block{
    margin-bottom: 72px;
    text-align: center;
}
.footer-logo {
    display: inline-block;
    margin-bottom: 16px;
}
.footer-logo .logo-link-footer {
    color: #f4f4fd;
}
.footer-text {
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #f4f4fd;
    text-align: left;
    }
.footer-social {
    display: flex;
    flex-direction: column;
    row-gap: 16px;
    justify-content: center;
    align-items: center;
    margin-bottom: 72px;
}
.footer-title-social {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    color: #fff;
    letter-spacing: 0.02em;
    margin: 0 auto;
}
.footer-list-social {
    display: flex;
    justify-content: center;
    gap: 16px;
    width: 100%;
    height: 40px;
}
.footer-item-social {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
}
.footer-icon-link:hover,
.footer-icon-link:focus {
    background-color: #31d0aa;
}
.footer-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: #4d5ae5;
    border-radius: 50%;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.footer-subscribe {
    display: flex;
    flex-direction: column;
    row-gap: 16px;
    justify-content: center;
    align-items: center;
}

.footer-title-subscribe {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #fff;
}
.footer-subscribe-email {
    border: 1px solid #fff;
    border-radius: 4px;
    width: 264px;
    height: 40px;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
    background-color: transparent;
    font-size: 12px;
    line-height: 2;
    letter-spacing: 0.04em;
    color: #fff;
    opacity: 0.3;
    margin-bottom: 16px;
    padding-left: 16px;

}
.footer-subscribe-email:hover,
.footer-subscribe-email:focus {
    border: 1px solid #4d5ae5;
    border-radius: 4px;
    width: 264px;
    height: 40px;
}
.footer-subscribe-email::placeholder {
    padding-right: 16px;
    color: #fff;
    font-weight: 400;
    line-height: 2;
    letter-spacing: 0.04em;
}
.footer-button {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    border-radius: 4px;
    min-width: 165px;
    height: 40px;
    background-color: #4d5ae5;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #fff;
    transition-property: background-color;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    padding: 8px 24px;
    border: none;
    margin: 0 auto;
}
.footer-button:hover,
.footer-button:focus {
    background-color: #404bbf;
    cursor: pointer;
}
.icon-telegram {
    margin-left: 16px;
}
}

/*footer tablet*/
@media screen and (min-width: 768px) {
.footer-container {
        display: flex;
        flex-wrap: wrap;
        max-width: 768px;
        height: auto;
        flex-direction: row;
        column-gap: 24px ;
        row-gap: 72px;
        justify-content: start;
        background-color: #2e2f42;
        padding-top: 96px;
        padding-bottom: 96px;
        padding-left: 108px;
        padding-right: 164px;
        align-items: baseline;
    }
.logo-block {
    display: block;
    max-width: 264px;
    margin-bottom: 0px;
    text-align: start;
}
.footer-social {
    display: inline-block;
    text-align: start;
    margin-bottom: 0px;
}
.footer-title-social {
    margin-bottom: 16px;
}
.footer-subscribe {
    display: block;
    align-items: start;
}
.footer-subscribe-form {
    display: flex;
    gap: 24px;
}
.footer-title-subscribe {
    margin-bottom: 16px;
}
.footer-subscribe-email {
margin-bottom: 0px;
}
}
/*footer desktop*/
@media screen and (min-width: 1158px) {
    .footer{
        width: 1440px;
        margin: 0 auto; 
    }
.footer-container {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    column-gap: 0px;
    max-width: 100%;
    align-items: baseline;
    padding-top: 100px; 
    padding-bottom: 100px; 
    padding-left: 156px;
}

.logo-block {
    width: 264px;
    margin-right: 120px;
}
.footer-text {
    width: 264px;
}
.footer-social {
    margin-right: 80px;
}
}