:root {
    --social-link-color: #4d5ae5;
    --team-icon-color: #f4f4fd;
    --footer-text-color: #FFFFFF;
}

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


/* reset */
ul,
ol {
    list-style: none;
    margin: 0;
    padding: 0;
}


img {
    display: block;
}


h1,
h2,
h3,
h4,
h5,
h6,
p,
ul {
    margin: 0;
}


a {
    text-decoration: none;
}


/* common */


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


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


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


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


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


.contacts-list {
    display: flex;
    align-items: center;
}


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

.header-logo {
    padding: 24px 0;
    margin-right: 76px;
}


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


.footer-logo .logo-part {
    color: #f4f4fd;
}


.nav-link {
    position: relative;
    display: block;
    padding: 24px 0;
    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::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    border-radius: 2px;
    width: 100%;
    height: 4px;
    background-color: #404bbf;
    opacity: 0;
}

.nav-link:hover::after,
.nav-link:focus::after,
.nav-link.current::after {
    opacity: 1;
}

.contacts {
    margin-left: auto;
    font-style: normal;
}


.contacts-list {
    display: flex;
    gap: 40px;
    margin: 0;
    list-style: none;
}


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


.nav-link:hover,
.nav-link:focus,
.contacts-link:hover,
.contacts-link:focus,
.nav-link.current {
    color: #404bbf;
}


/* -------------------------hero-------------------- */


.hero {
    padding: 188px 0;
    background-color: #2e2f42;
    max-width: 1440px;
    background-image: linear-gradient(rgba(46, 47, 66, 0.7),
            rgba(46, 47, 66, 0.7)),
        url("../images/hero-foto.jpg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}


.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
}

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


.hero-btn {
    font-family: inherit;
    background-color: #4d5ae5;
    min-width: 169px;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: #ffffff;
    cursor: pointer;
    border-radius: 4px;
    padding: 16px 32px;
    border: none;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}


.hero-btn:hover,
.hero-btn:focus {
    background-color: #404bbf;
}


/* -------------------------features-------------------- */


.features-container {
    background-color: #FFFFFF;
    padding: 120px 0 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;
}

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

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

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

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

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


/* -------------------------team-------------------- */

.team {
    padding: 120px 0;
    background-color: #f4f4fd;
}

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

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

.team-item {
    box-shadow: 0px 1px 6px rgba(46, 47, 66, 0.08),
        0px 1px 1px rgba(46, 47, 66, 0.16),
        0px 2px 1px rgba(46, 47, 66, 0.08);
    border-radius: 0px 0px 4px 4px;
    background-color: #ffffff;
    text-align: center;
}

.team-img {
    display: block;
    margin: 0 auto;
}

.team-info {
    padding: 32px 0 32px 0;
}

.team-name {
    margin-bottom: 8px;
}

.team-position {
    color: #434455;
    margin-bottom: 8px;
}

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

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

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

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

.team-icon {
    width: 16px;
    height: 16px;
    fill: var(--team-icon-color);
}

/* -------------------------PORTFOLIO-------------------- */

.portfolio {
    padding-top: 120px;
    padding-bottom: 120px;
}

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

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

.portfolio-item:hover {
    box-shadow: 0px 1px 6px rgba(46, 47, 66, 0.08),
        0px 1px 1px rgba(46, 47, 66, 0.16),
        0px 2px 1px rgba(46, 47, 66, 0.08);
}

.portfolio-img-container {
    position: relative;
    overflow: hidden;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #4d5ae5;
    color: #f4f4fd;
    padding: 40px 32px;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    transform: translateY(100%);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.portfolio-info {
    padding: 32px 16px;
    border: 1px solid #e7e9fc;
    border-top: none;
}

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

.app-descr {
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #434455;
}


/* -------------------------FOOTER-------------------- */
.page-footer {
    padding: 100px 0;
    background-color: #2e2f42;
}

.page-footer .container {
    display: flex;
    align-items: baseline;
    /* вирівнювання по базовій лінії */
}

.footer-info {
    margin-right: 120px;
    /* відступ між логотипом/текстом та соцмережами */
}

.footer-logo {
    display: inline-block;
    margin-bottom: 16px;
}

.footer-text {
    max-width: 264px;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--footer-text-color);
}

/* --------social FOOTER-------------------- */

.footer-socials {
    flex-direction: column;
    gap: 16px;
}

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

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

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

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

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

.social-icon-footer {
    fill: #f4f4fd;
    width: 24px;
    height: 24px;
}