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

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

img {
    display: block;
    object-fit: cover;
    max-width: 100%;
}

a {
    text-decoration: none;
}

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

/* common */

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

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

.logo {
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.17;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #2e2f42;
    padding: 24px 0;
    margin-right: 76px;
}

.logo .logo-part {
    color: #4d5ae5;
}

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

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

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

.nav-link.current::after {
    content: '';

    width: 100%;
    height: 4px;
    position: absolute;
    left: 0;
    bottom: -1px;
    background-color: #404bbf;
    border-radius: 2px;
}

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

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

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

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

.main-section-title {
    background-color: #2e2f42;
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7), 
        rgba(46, 47, 66, 0.7)),
         url(../images/people-office1.jpg);
    background-repeat: no-repeat;
    max-width: 1440px;
    margin: 0 auto;
    background-size: cover;
    background-position: center;

    padding: 188px 0;
    justify-content: center;
    display: block;
    align-items: center;
    text-align: center;
}


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

.main-button{
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: #fff;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
    background-color: #4d5ae5;
    cursor: pointer;
    padding: 16px 32px;
    min-width: 169px;
    display: block;
    margin: 0 auto;
    margin-top: 48px;
    border-radius: 4px;
    border: none;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.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-list {
    display: flex;
    gap: 24px;
}

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

.main-section-features {
    padding: 120px 0;
}

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


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

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

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

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

}

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

.team-item {
    background-color: #fff;
    width: calc((100% - 72px) / 4);
    border-radius: 0 0 4px 4px;
    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-list {
    display: flex;
    gap: 24px;
}

.team-card {
    padding: 32px 16px;
}

.team-icon-list {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 0;
    margin: 0;
    list-style: none;
}

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

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



.team-icon {
    fill: #f4f4fd;
}


.team-vocation {
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    text-align: center;
    margin-bottom: 8px;
}
 
.portfolio-section {
    padding: 120px 0 120px 0;
    text-align: center;
}
.portfolio-name {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #2e2f42;
    margin-bottom: 8px;
}

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

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

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

.portfolio-item:hover,
.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-card-image {
    position: relative;
    overflow: hidden;
}

.portfolio-image {
    display: block;
    width: 100%;
    height: auto;
}

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

.portfolio-item:hover .text-overlay {
    transform: translatey(0);
}

.portfolio-card-image:hover {
    transform: translateY(0%);
}

.portfolio-card-text {
    padding: 32px 16px;
    border: 1px solid #e7e9fc;
    border-top: none;
    text-align: left;
}

.portfolio-category {
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
}

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

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



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


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

.footer-logo {
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.16667;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #f4f4fd;
    display: flex;
    margin-bottom: 16px;
}

.footer-logo .footer-logo-part {
    color: #4d5ae5;
    display: inline-block;
}

.footer-icon-list {
    display: flex;
    justify-content: flex-start;

    gap: 16px;
    padding: 0;
    margin: 0;
    list-style: none;
}


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



.footer-icon-item {
    list-style: none;
}


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

.footer-icon {
    fill: #f4f4fd;
}
        

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


.footer-form-input {
    font-size: 12px; 
    line-height: 2;
    letter-spacing: 0.04em;
    color: #fff;
    background-color: transparent;
    border: 1px solid #fff;
    border-radius: 4px;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
    width: 264px;
    height: 40px;
    padding-left: 16px;
    outline: none;
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}


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


.footer-form-input:hover,
.footer-form-input:focus {
    border: 1px solid #31d0aa;
    border-color: #31d0aa;
}


.footer-form-input::placeholder {
    color: #fff;
}


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

.footer-subscribe {
    margin-left: auto;
}


.footer-form-button {
    display: flex;
    background-color: #4d5ae5;
    border-radius: 4px;
    padding: 8px 24px;
    width: 165px;
    height: 40px;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #fff;
    cursor: pointer;
    border: none;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    text-align: center;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}


.footer-form-button:hover,
.footer-form-button:focus {
    background-color: #31d0aa;
}


.footer-form-icon {
    fill: #fff;
}

.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(46, 47, 66, 0.4);

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

    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1), visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}


.backdrop.is-open {
    opacity: 1;
        visibility: visible;
        pointer-events: auto;
}

.modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 72px 24px 24px;

    width: 408px;
    min-height: 584px;
    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 2px 1px 0 rgba(0, 0, 0, 0.2);
    background-color: #fcfcfc;
    border-radius: 4px;

    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.backdrop:not(.is-open) .modal {
    transform: translate(-50%, -50%) scale(1.5);
}


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

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

.modal-close {
    fill: #2e2f42;
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

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


.modal-container {
    margin-bottom: 8px;
}

.modal-input {
    display: block;
    border: 1px solid #8e8f99;
    border-radius: 4px;
    width: 100%;
    height: 40px;
    background-color: transparent;
    padding-left: 38px;
    outline: transparent;
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

}

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

.modal-button {
        border-radius: 4px;
        padding: 16px 32px;
        width: 169px;
        height: 56px;
        box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
        background-color: #4d5ae5;
        color: #fff;
        border: none;
        font-weight: 500;
        font-size: 16px;
        line-height: 1.5;
        letter-spacing: 0.04em;
        text-align: center;
        align-items: center;
        justify-content: center;

        cursor: pointer;
        display: block;
        margin: 24px auto 0;
        transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}



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


.modal-privacy {
    line-height: 1.3;
    text-decoration: underline;
    text-decoration-skip-ink: none;
    color: #4d5ae5;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
}



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

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

.modal-input-container {
    position: relative;
}


.modal-form-icon {
    fill: #2e2f42;
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    pointer-events: none;
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}


.modal-form-icon:hover,
.modal-form-icon:focus {
    fill: #4d5ae5;
}


.modal-container {
    position: relative;
}

.modal-input:focus+.modal-form-icon {
    fill: #4d5ae5;
}


.checkbox-label {
        display: block;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        font-size: 12px;
        line-height: 1.17;
        letter-spacing: 0.04em;
        color: #8e8f99;
    }


.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.modal-container-checkbox .checkbox-icon-span {
    display: inline-flex;
    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);
    align-items: center;
        justify-content: center;
        box-sizing: border-box;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #8e8f99;
}

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

.checkbox-icon {
    fill: #f4f4fd;
    opacity: 0;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-accept:checked+.checkbox-label .checkbox-icon-span {
    background-color: #404bbf;
    border: none;
}

.modal-accept:checked+.checkbox-label .checkbox-icon {
    opacity: 1;
}