/* #region base */
body {
    font-family: "Roboto", sans-serif;
    color: #434455;
    background-color: #ffffff;
}

a {
    text-decoration: none;
}

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

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

img {
    display: block;
}

.container {
    width: 1158px;
    padding-left: 15px;
    padding-right: 15px;
    margin: 0 auto;
}
/* #endregion */

/* #region header */
.page-header {
    border-bottom: 1px solid #e7e9fc;
    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);
}

.logo-h {
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.17;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #4d5ae5;
    margin-right: 76px;
    padding-top: 24px;
    padding-bottom: 24px;
    display: block;
}

.header-logo {
    color: #2e2f42;
}

.header-container {
    display: flex;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 15px;
    padding-right: 15px;
}

.header-nav {
    display: flex;
    align-items: center;
    margin-right: auto;
}

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

.nav-link {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #2e2f42;
    padding-top: 24px;
    padding-bottom: 24px;
    display: block;
    transition-property: color;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.current {
    position: relative;
    color: #404bbf;
}

.current::after {
    content: "";
    display: block;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background-color: #404bbf;
    position: absolute;
    left: 0;
    bottom: -1px;
}

.contacts {
    font-style: normal;
}

.contacts-list {
    display: flex;
    gap: 40px;
    justify-content: space-between;
}

.contacts-link {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color:#434455;
    padding-top: 24px;
    padding-bottom: 24px;
    display: block;
    transition-property: color;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.contacts-link:hover {
    color: #404bbf
}

.contacts-link:focus {
    color: #404bbf
}
/* #endregion */

/* #region hero */
.hero-section {
    background-color: #2e2f42;
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7), 
        rgba(46, 47, 66, 0.7)
        ),
        url(../images/people-office.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    max-width: 1440px;
    margin: 0 auto;
    padding-top: 188px;
    padding-bottom: 188px;
}

.hero-header {
    font-weight: 700;
    font-size: 56px;
    line-height: 1.07;
    letter-spacing: 0.02em;
    text-align: center;
    color: #ffffff;
    max-width: 496px;
    margin: 0 auto 48px;
}

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

.hero-button:hover  {
     background-color: #404BBF
 }

.hero-button:focus {
    background-color: #404BBF
}
/* #endregion */

/* #region values */
.values-section {
    padding-top: 120px;
    padding-bottom: 120px;
}

.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;
}

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

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

.values-container {
    display: flex;
    gap: 24px;
}

.values-item {
    display: block;
    flex-basis: calc((100% - 72px) / 4);
}

.values-icon-container {
    border: 1px solid #8e8f99;
    border-radius: 4px;
    width: 264px;
    height: 112px;
    background-color: #f4f4fd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

/* #endregion */

/* #region team */
.team-section {
    padding-top: 120px;
    padding-bottom: 120px;
}

.team-header {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    letter-spacing: 0.02em;
    text-align: center;
    text-transform: capitalize;
    color: #2e2f42;
    margin-bottom: 72px;
}

.team-container {
    display: flex;
    gap: 24px;
}

.team-title {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #2e2f42;
    text-align: center;
}

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

.team-section {
    background-color: #f4f4fd;
}

.team-item {
    background-color: #ffffff;
    border-radius: 0px 0px 4px 4px;
    flex-basis: 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);
}

.team-item-container {
    padding-top: 32px;
    padding-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
}

.team-social-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.team-social-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: 40px;
    height: 40px;
}

.team-social-link {
    width: 100%;
    height: 100%;
    background-color: #4d5ae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition-property: background-color;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.team-social-icon {
    fill: #f4f4fd;
}

.team-social-link:hover {
    background-color: #404bbf;
}

.team-social-link:focus {
    background-color: #404bbf;
}
/* #endregion */

/* #region portfolio */
.portfolio-section {
    padding-top: 120px;
    padding-bottom: 120px;
}

.portfolio-header {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    letter-spacing: 0.02em;
    text-align: center;
    text-transform: capitalize;
    color: #2e2f42;
    margin-bottom: 72px;
}

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

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

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

.portfolio-item {
    flex-basis: calc((100% - 48px) / 3);
    transition-property: box-shadow;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); 
}

.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);
}

.portfolio-item:focus {
    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-section {
    padding: 32px 16px;
    border: 1px solid #e7e9fc;
    border-top: none;
}

.portfolio-cover {
    position: relative;
    overflow: hidden;
}

.portfolio-cover-text {
    position: absolute;
    top: 0;
    left: 0;
    padding: 40px 32px;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    background-color: #4D5AE5;
    height: 100%;
    color: #f4f4fd;
    transform: translateY(100%);
    transition-property: transform;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); 
}

.portfolio-item:hover .portfolio-cover-text {
    transform: translateY(0);
}

/* #endregion */

/* #region footer */
.page-footer {
    background-color: #2e2f42;
    color:#f4f4fd;
    padding-top: 100px;
    padding-bottom: 100px;
}

.footer-container {
    display: flex;
    align-items: baseline;
}

.footer-first-container {
    margin-right: 120px;
}

.logo-f {
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.17;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #4d5ae5;
    display: inline-block;
    margin-bottom: 16px;
}

.footer-logo {
    color:#f4f4fd;
}

.first-container-text {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    max-width: 264px;
}

.footer-social {
    width: 208px;
}

.social-text {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
    color: #ffffff
}

.footer-social-list {
    display: flex;
    gap: 16px;
}

.footer-social-item {
    width: 40px;
    height: 40px;
}

.footer-social-link {
    width: 100%;
    height: 100%;
    background-color: #4d5ae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition-property: background-color;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-social-icon {
    fill: #f4f4fd;
}

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

.footer-social-link:focus {
    background-color: #31d0aa;
}
/* #endregion */