/*Svg syles*/
.icon.icon-close{
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.icon-path-one{
    fill: #f4f4fd;
}

.icon-path-two{
    fill: #4d5ae5;
}

.icon-path-three{
    fill: #2e2f42;
}

/*Global styles*/
body{
    font-family: 'Roboto', sans-serif;
    background-color: #FFFFFF; /*White*/
    color: #2E2F42; /*Navy Blue*/
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: 0.02em;
}

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

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

img {
    display: block;
}

.container {
    max-width: 1158px;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
}

main {
  flex-grow: 1;
}

.section{
    padding-top: 120px;
    padding-bottom: 120px;
    margin: 0;
}

/*Logo*/
.logo {
    display: inline-block;
    text-transform: uppercase;
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.167;
    letter-spacing: 0.03em;
    text-decoration: none;
    padding: 1.5px 0px;
}

.logo-accent {
    color: #4D5AE5;
}

/*Header*/
header{
    border-bottom: 1px solid #E7E9FC;
    background-color: #FFFFFF;
    box-shadow: 0 1px 6px 0 rgba(46, 47, 66, 0.08), 0 1px 1px 0 rgba(46, 47, 66, 0.16), 0 2px 1px 0 rgba(46, 47, 66, 0.08);
}

header .container{
    display: flex;
    align-items: center;
}

.logo--header {
    color: #2E2F42;
    margin-right: 76px;
    padding: 24px 0;
}

.navigation-list{
    display: flex;
    gap: 40px;
}

.nav-address-list{
    display: flex; 
    gap: 40px;
}

.navigation-link, .navigation-link-studio{
    color: #2E2F42;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    text-decoration: none;
    padding: 24px 0;
    position: relative;
    display: inline-block;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.navigation-link:hover {
    color: #404BBF;
}

.navigation-link:focus {
    color: #404BBF;
}

.navigation-link-studio:hover{
    color: #404BBF;
}

.navigation-link-studio:focus{
    color: #404BBF;
}

.navigation-link-studio:active {
    color: #404BBF;
}

.navigation-link-studio:after,
.navigation-link:after {
    content: "";
    position: absolute;
    opacity: 0;
    left: 0;
    bottom: -1px;
    border-radius: 2px;
    width: 100%;
    height: 4px;
    background-color: #404BBF;
}

.navigation-link-studio.current::after,
.navigation-link.current::after {
    opacity: 1;
}

.navigation-link-studio.current{
    color: #404bbf;
}

.nav-address{
    margin-left: auto;
}

.nav-address-link{
    font-style: normal;
    color: #434455;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    text-decoration: none;
    white-space: nowrap;
    display: block;
    padding: 24px 0;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-address-link:hover{
    color: #404BBF;
}

.nav-address-link:focus{
    color: #404BBF;
}

/*Main page*/
.section:first-of-type{
    background-color: #2E2F42;
    background-image: linear-gradient(
        to bottom,
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)), 
        url(../images/bg-img.jpg);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    padding: 188px 0;
    text-align: center;
    max-width: 1440px;
    margin: 0 auto;
}

.main-page-title{
    color: #FFFFFF;
    font-size: 56px;
    font-weight: 700;
    line-height: 1.07;
    letter-spacing: 0.02em;
    margin: 0 auto 48px;
    max-width: 496px;
}

.main-page-button{
    background-color: #4D5AE5;
    cursor: pointer;
    color: #FFFFFF;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    font-weight: 500;
    border-radius: 4px;
    padding: 16px 32px;
    border: 0px;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.main-page-button:hover{
    background-color: #404BBF;
}

.main-page-button:focus{
    background-color: #404BBF;
}

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

.our-features-list{
    display: flex;
    flex-direction: row;
    gap: 24px;
}

.our-features-item{
    width: calc((100% - 72px) / 4);
}

.icon-bg{
    border: 1px solid #8E8F99;
    border-radius: 4px;
    background-color: #F4F4FD;
    height: 112px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}

.our-features-main-text{
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
    text-align: left;
}

.our-features-text{
    color: #434455;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-align: left;
}

/*Our Team*/
.section:nth-of-type(3){
    background-color: #F4F4FD;
}

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

.our-team-list{
    display: flex;
    flex-direction: row;
    gap: 24px;
}

.our-team-element {
    background-color: #FFFFFF;
    border-radius: 0 0 4px 4px;
    width: calc((100% - 72px) / 4);
    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);
}

.our-team-block{
    padding: 32px 16px;
}

.our-team-name {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-align: center;
    margin-bottom: 8px;
}

.our-team-text{
    color: #434455;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-align: center;
    margin-bottom: 8px;
}

.social-links{
    display: flex;
    flex-direction: row;
    gap: 24px;
}

.social-links .link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #4D5AE5;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.social-links .icon {
    fill: #F4F4FD;
}

/*Our Portfolio*/
.our-portfolio-title{
    font-size: 36px;
    font-weight: bold;
    line-height: 1.11;
    letter-spacing: 0.02em;
    text-align: center;
    margin-bottom: 72px;
}

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

.our-portfolio-item{
    width: calc((100% - 48px) / 3);
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.our-portfolio-item:hover{
    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);
    cursor: pointer;
}

.box {
    position: relative;
    overflow: hidden;
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateY(100%);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #4D5AE5;
    color: #F4F4FD;
    padding-top: 40px;
    padding-left: 32px;
    padding-right: 32px;
}

.our-portfolio-item:hover .overlay{
    transform: translateY(0);
}

.our-portfolio-block{
    border-bottom: 1px solid #E7E9FC;
    border-left: 1px solid #E7E9FC;
    border-right: 1px solid #E7E9FC;
    padding: 32px 16px;
}

.our-portfolio-name{
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.our-portfolio-text{
    color: #434455;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/*Footer*/
.page-footer{
    background-color: #2E2F42;
    padding-top: 100px;
    padding-bottom: 100px;
}

.footer-content{
    display: flex;
    gap: 120px;
    align-items: baseline
}

.logo--footer {
    color: #F4F4FD;
    margin-bottom: 16px;
    padding: 0px;
}

.page-footer-text{
    color: #F4F4FD;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: 0.02em;
    max-width: 264px;
}

.footer-sl-text{
    color: #FFFFFF;
    margin-bottom: 16px;
    font-weight: 500;
}

.footer-social-links{
    display: flex;
    flex-direction: row;
    gap: 16px;
}

.footer-social-links .link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #4D5AE5;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-social-links .link:hover {
    background-color: #31D0AA;
}

.footer-social-links .link:focus {
    background-color: #31D0AA;
}

.footer-social-links .icon {
    fill: #F4F4FD;
}