/* ========= Global styles ========= */

:root {
    --primary-color: #4d5ae5;
    --primary-hover-color: #404bbf;
    --secondary-color: #2e2f42;
    --text-color: #434455;
    --light-color: #f4f4fd;
    --footer-hover-color: #31d0aa;
    --icon-color: #f4f4fd;
    --icon-hover-color: #ffffff;
}

body {
    font-family: "Roboto", sans-serif;
    color: var(--text-color);
    background-color: #fff;
}

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

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

a {
    text-decoration: none;
}

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

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

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

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

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

.header-nav {
    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: var(--primary-color);
}

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

.header-logo .logo-part {
    color: var(--secondary-color);
}

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

.nav-link {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--secondary-color);
    padding: 24px 0;
    display: block;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link.current {
    position: relative;
}

.nav-link.current::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background-color: var(--primary-hover-color);
}

.nav-link:hover,
.nav-link:focus,
.nav-link.current {
    color: var(--primary-hover-color);
}

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

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

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

.contacts-link:hover,
.contacts-link:focus {
    color: var(--primary-hover-color);
}

/* ========= Hero ========= */
.hero {
    background-color: var(--secondary-color);
    padding: 188px 0;
    background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
        url('../images/office-1.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    max-width: 1440px;
    margin: 0 auto;
}

.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

.order-button {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: #fff;
    background-color: var(--primary-color);
    cursor: pointer;
    padding: 16px 32px;
    margin: 0 auto;
    border-radius: 4px;
    min-width: 169px;
    height: 56px;
    border: none;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.order-button:hover,
.order-button:focus {
    background-color: var(--primary-hover-color);
}

/* ========= Features ========= */
.features-section {
    padding: 120px 0;
}

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

.sections-list .section-icon {
    border-radius: 4px;
    width: 264px;
    height: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-color);
    margin-bottom: 8px;
    border: 1px solid #8e8f99;
}

.section-title {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: var(--secondary-color);
    margin: 8px 0;
}

.section-item {
    width: calc((100% - 3 * 24px) / 4);
}

.section-text {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--text-color);
}

/* ========= Team ========= */
.team-section {
    background-color: var(--light-color);
    padding: 120px 0;
}

.team-hero {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    letter-spacing: 0.02em;
    text-align: center;
    color: var(--secondary-color);
    text-transform: capitalize;
    margin-bottom: 72px;
}

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

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

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

.team-title {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

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

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

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

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

.social-link:hover,
.social-link:focus {
    background-color: var(--primary-hover-color);
}

.social-icon {
    fill: var(--icon-color);
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========= Portfolio ========= */
.portfolio-section {
    padding: 120px 0;
}

.portfolio-hero {
    color: var(--secondary-color);
    font-size: 36px;
    line-height: 1.11;
    letter-spacing: 0.02em;
    text-transform: capitalize;
    text-align: center;
    margin-bottom: 72px;
}

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

.portfolio-item {
    flex-basis: 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-image-wrapper {
    position: relative;
    overflow: hidden;
}

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

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

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

.portfolio-title {
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: var(--secondary-color);
    text-transform: capitalize;
    margin-bottom: 8px;
}

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

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

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

.footer-description {
    margin-right: 120px;
}

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

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

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

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

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

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

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

.footer-social-link:hover,
.footer-social-link:focus {
    background-color: var(--footer-hover-color);
}

.footer-icon {
    fill: #f4f4fd;
}