:root {
    --iris: #4d5ae5;
    --ocean: #404bbf;
    --navy-blue: #2e2f42;
    --green: #31d0aa;
    --slate: #434455;
    --light-slate: #8e8f99;
    --cornflower: #e7e9fc;
    --cloud: #f4f4fd;
    --navy-blue-modal: rgba(46, 47, 66, 0.4);
    --grey: rgba(46, 47, 66, 0.7);
    --white: #fff;
    --dairy: #fcfcfc;
}

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

ul {
    margin: 0;
    padding: 0;
}

li {
    list-style-type: none;
}

body {
    font-family:"Roboto", sans-serif;
    background-color: var(--white);
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--slate);
}

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

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

.header {
    border-bottom: 1px solid #e7e9fc;
}

.header .container {
    display: flex;
}

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

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

.header-list {
    display: flex;
    padding: 24px 0;
    gap: 40px;
}

.header-links {
    padding: 24px 0;
    align-items: baseline;
}

.contacts-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 40px;
    margin-left: 332px;
    padding: 24px 0;
    margin-right: 0;
}

.contacts-list a {
    white-space: nowrap;
}

.main-tag {
    font-weight: 700;
    font-size: 56px;
    line-height: 1.07;
    letter-spacing: 0.02em;
    text-align: center;
    color: var(--white);
}

.second-tag {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    letter-spacing: 0.02em;
    text-align: center;
    text-transform: capitalize;
    color: var(--navy-blue);
}

.third-tag {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: var(--navy-blue);
}

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

.header-links {
    text-decoration: none;
    font-weight: 500;
    color: var(--navy-blue);
/*     display: block; */
}

.header-links:hover,
.header-links:focus {
    color: var(--ocean)
}

.header-contacts {
    font-style: normal;
}

.head-contact {
    text-decoration: none;
    color: var(--slate);
}

.head-contact:hover,
.head-contact:focus {
    color: var(--ocean)
}

.main {
    background-color: var(--navy-blue);
    display: block;
    padding-top: 188px;
    padding-bottom: 188px;
}

.main-tag {
    display: block;
    margin: 0 auto;
    text-align: center;
    max-width: 496px;
    max-height: 120px;
}

.main-button {
    display: block;
    margin: 0 auto;
    justify-content: center;
    font-family: inherit;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: var(--white);
    background-color: var(--iris);
    cursor: pointer;
    margin-top: 48px;
    padding: 16px 32px;
    min-width: 169px;
    height: 56px;
    border: none;
    border-radius: 4px;
}

.main-button:hover,
.main-button:focus {
    background-color: var(--ocean); 
}

.second-tag {
    text-align: center;
}

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

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

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

.advantages-list li {
    max-width: 264px;
}

.advantages-list-cell {
    width: calc((100% - 72px) / 4);
}

.advantages-list li h3 {
    margin-bottom: 8px;
}

.profiles {
    background-color: var(--cloud);
    padding: 120px 0;
}

.profiles .second-tag {
    margin-bottom: 72px;
}

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

.profiles-list li {
    background-color: var(--white);
    width: calc((100% - 72px) /4);
    border-radius: 0px 0px 4px 4px;
}

.profile-conteiner {
    padding: 32px 0;
}

.profiles-list .third-tag {
    margin-bottom: 8px;
    text-align: center;
}

.profiles-text {
    text-align: center;
}

.portfolio {
    padding: 120px 0 120px 0;
}

.portfolio .second-tag {
    margin-bottom: 72px;
}

.portfolio-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    flex-direction: row;
    gap: 24px;
    row-gap: 48px;
}

.portfolio-list-cell {
    width: calc((100% - 48px) / 3);
}

.portfolio-list .third-tag {
    margin-bottom: 8px;
}

.portfolio-list .porfolio-text {
    padding-left: 16px;
}

.portfolio-conteiner {
    padding: 32px 16px;
    border: 1px solid #e7e9fc;
    border-top: none;
    width: 360px;
    justify-content: center;
}

.footer {
    background-color: var(--navy-blue);
    padding: 100px 0;
}

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

.footer-text {
    color: var(--cloud);
    max-width: 264px;
}