body {
    font-family: 'Roboto', sans-serif;
    background-color: #ffffff;
    font-weight: 400;
    line-height: 1.5;
    font-size: 16px;
    color: #434455;
}

*,
::before,
::after {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

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

.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-nav {
    display: flex;
    margin: 0 auto;
    justify-content: space-between;
}

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

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

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

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

.nav-list-item {
    padding: 20px 0;
}

.nav-text::after{
    content: "";
    width: 100%;
    position: absolute;
    left: 0;
    bottom: -1px;
    height: 4px;
    background-color: #404bbf;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.current {
    color: #404BBF;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-text {
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 24px 0;    
    position: relative;
}

.nav-text:hover,.nav-text:focus {
    color: #404BBF;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.address-link {
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
    color: #2e2f42;
}

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

.benefits {
    padding: 120px 0;
}

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

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

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

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

.name-and-position-div .p-text {
    margin-bottom: 8px;
}

a {
    text-decoration: none;
    color: inherit;
}

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

.button {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: #FFFFFF;
    background-color: #4D5AE5;
    min-width: 169px;
    height: 56px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: block;
    margin: auto;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.button:hover, .button:focus {
    background-color: #404BBF;
}

.first-main-part {
    background-color: #2E2F42;
    padding: 188px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url("../images/background-first-section.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    max-width: 1440px;
    margin: auto;
}

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

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

.name-and-position-div {
    padding: 32px 0;
    text-align: center;
}

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

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

.social-media-link {
    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-media-link:hover, .social-media-link:focus {
    background-color: #404bbf;
}

.social-media-svg {
    fill: #f4f4fd;
}

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

.name-and-app-div {
    padding: 32px 16px;
    border: 1px solid #e7e9fc;
    border-top: none;
}

header {
    color: #2E2F42;
}

ul {
    list-style: none;
}

.address {
    color: #434455;
    font-style: normal;
}

.address-link {
    letter-spacing: 0.02em;
}

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

.footer {
    background-color: #2E2F42;
    color: #F4F4FD;
    padding: 100px 0;
}

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

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

.footer-container-social-media {
    margin-right: auto;
}

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

.logo-right-part-footer {
    color: #F4F4FD;
}

.p-text-footer {
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: inherit;
    max-width: 300px;
}

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


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

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

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

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

.social-media-svg-footer {
    fill: #f4f4fd;
}

.footer-form {
    display: flex;
    gap: 24px;
}

.footer-input {
    width: 264px;
    height: 40px;
    border: 1px solid #ffffff;
    background-color: transparent;
    font-size: 12px;
    line-height: 2;
    letter-spacing: 0.04em;
    padding-left: 16px;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    color: #ffffff;
}

.footer-input::placeholder {
    color: #ffffff;
}

.social-media-svg-footer-button {
    fill: #f4f4fd;
    margin-left: 16px;
}

.button-footer {
    min-width: 165px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 2 section */
.benefits-list {
    display: flex;
    gap: 24px;
}

.list-item-second-section {
    flex-basis: calc((100% - 72px) / 4);
}

/* 3 section */
.our-team-list {
    display: flex;
    gap: 24px;
}

.list-item-third-section {
    width: calc((100% - 3 * 24px) / 4);
    background-color: #ffffff;
    border-radius: 0 0 4px 4px;
    overflow: hidden;
    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);
}

/* 4 section */
.our-portfolio-list {
    display: flex;
    flex-wrap: wrap;
    column-gap: 24px;
    row-gap: 48px;
}

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

.list-item-fourth-section: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);
}

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

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

.list-item-fourth-section:hover .our-portfolio-img-text {
    transform: translateY(0%);
}

.modal-window-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(46, 47, 66, 0.4);
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
        visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-window-background.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-window {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 408px;
    min-height: 584px;
    background: #fcfcfc;
    box-shadow:0px 1px 1px rgba(0, 0, 0, 0.14),
        0px 1px 3px rgba(0, 0, 0, 0.12),
        0px 2px 1px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
    padding: 72px 24px 24px 24px;
}

.modal-window-button {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e7e9fc;
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    padding: 0;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-window-button:hover, .modal-window-button:focus {
    background-color: #404bbf;
    border: none;
}

.modal-window-svg {
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-window-button:hover .modal-window-svg, .modal-window-button:focus .modal-window-svg {
    fill: #ffffff;
}

.modal-window-p {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    text-align: center;
    color: #2e2f42;
    margin-bottom: 16px;
}

.modal-window-form-div {
    margin-bottom: 8px;
}

.modal-window-label {
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #8e8f99;
    display: block;
    margin-bottom: 4px;
}

.modal-window-label {
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #8e8f99;
    display: block;
    margin-bottom: 4px;
}

.modal-window-div-for-input {
    position: relative;
}

.modal-window-input {
    width: 100%;
    height: 40px;
    border: 1px solid rgba(46, 47, 66, 0.4);
    background-color: transparent;
    outline: transparent;
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(46, 47, 66, 0.4);
    padding-left: 38px;
    border-radius: 4px;
}

.modal-window-input:focus {
    border-color: #4D5AE5;
}

.modal-window-input-svg {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-window-input:focus + .modal-window-input-svg {
    fill: #4D5AE5;
}

.modal-window-text-input {
    margin-bottom: 16px;
}

.modal-window-textarea {
    width: 100%;
    height: 120px;
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: rgba(46, 47, 66, 0.4);
    border: 1px solid rgba(46, 47, 66, 0.4);
    border-radius: 4px;
    padding: 8px 16px;
    background-color: transparent;
    outline: transparent;
    resize: none;
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(46, 47, 66, 0.4);
}

.modal-window-textarea:focus {
    border-color: #4D5AE5;
}

.modal-window-textarea::placeholder {
    color: rgba(46, 47, 66, 0.4);
}

.modal-window-checkbox {
    margin-bottom: 24px;
}

.modal-window-checkbox-label {
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #8e8f99;
}

.modal-window-checkbox-label-span {
    width: 16px;
    height: 16px;
    border: 1px solid rgba(46, 47, 66, 0.4);
    border-radius: 2px;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border 250ms cubic-bezier(0.4, 0, 0.2, 1), fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    fill: transparent;
    margin-right: 8px;
}

.modal-window-checkbox-input:checked+.modal-window-checkbox-label .modal-window-checkbox-label-span {
    background-color: #404bbf;
    border: none;
    fill: #F4F4FD;
}

.link-privacy-policy {
    color: #4D5AE5;
}

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

.modal-window-bottom-button:hover, .modal-window-bottom-button:focus {
    background-color: #404BBF;
}