/* ----HEADER-LOGO---- */

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

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

a {
    text-decoration: none;
}

img {
    display: block;
}

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

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

.header {
    background-color: #ffffff;
    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;
    justify-content: space-between;
    align-items: center;
}

.header-navigation {
    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-span {
    color: #2e2f42;
}

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

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

.header-menu-link {
    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);
}

.header-menu-link:hover,
.header-menu-link:focus,
.header-menu-link.current {
    color: #404bbf;
}

.header-menu-link.current {
    position: relative;
}

.header-menu-link.current::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    border-radius: 2px;
    width: 100%;
    height: 4px;
    background-color: #404bbf;
}

/*-----HEADER-CONTACTS-----*/

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

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

.header-contacts-link {
    display: block;
    padding: 24px 0;
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #434455;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

/*----MAIN-HERO----*/
.hero {
    background-color: #2E2F42;
    background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url(../images/people-office.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    max-width: 1440px;
    margin: 0 auto;
    padding-top: 188px;
    padding-bottom: 188px;
}

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

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

.hero-button:hover,
.hero-button:focus {
    background-color: #404bbf;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
}

.features {
    background-color: #ffffff;
    padding-top: 120px;
    padding-bottom: 120px;
}

.features-title {
    font-family: "Roboto", sans-serif;
    font-weight: 700;
    font-size: 36px;
    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;
}

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

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

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

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

.features-text {
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #434455;
    line-height: 1.5;
    letter-spacing: 0.02em;
}

/*----MAIN-TEAM----*/

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

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

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

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

/*NEW*/

.team-img {
    display: block;
    width: 264px;
    height: 260px;
    border-radius: 4px 4px 0 0;
}

.team-name {
    text-align: center;
    padding: 32px 0;
}

/*NEW*/

.team-subtitle {
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    font-size: 20px;
    color: #2e2f42;
    line-height: 1.2;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.team-text {
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #434455;
    line-height: 1.5;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

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

.team-icon-item {
    width: 40px;
    height: 40px;
}

.team-icon-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);
}

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

.team-svg {
    fill: #f4f4fd;
}

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

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

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

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

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

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

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

.portfolio-article {
    position: absolute;
    top: 0;
    left: 0;
    color: #ffffff;
    background-color: #4d5ae5;
    padding: 20px;
    height: 100%;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #f4f4fd;
    padding: 40px 32px;
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.portfolio-subtitle {
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    font-size: 20px;
    color: #2e2f42;
    line-height: 1.2;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.portfolio-text {
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #434455;
    line-height: 1.5;
    letter-spacing: 0.02em;
}

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

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

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

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

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

.footer-span {
    color: #f4f4fd;
}

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

.footer-social {
    text-align: center;
}

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

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

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

.footer-social-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);
}

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

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

.footer-subscribe {
    display: flex;
    flex-direction: column;
    margin-left: auto;
}

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

.footer-label {
}

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

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

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

.footer-button-svg {
    margin-left: 16px;
    fill: #fff;
}

/*---------MODAL--------*/

.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(46, 47, 66, 0.4);
    z-index: 10;
    display: flex;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    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;
    pointer-events: auto;
    visibility: visible;
}

.modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 408px;
    min-height: 584px;
    padding: 72px 24px 24px 24px;
    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);
}

.modal-close {
    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);
        padding: 0;
        cursor: pointer;
        transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close-svg {
    width: 8px;
    height: 8px;
   transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-close:hover .modal-close-svg,
.modal-close:focus .modal-close-svg {
    fill: #fff;
}

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

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

.modal-label {
    font-family: "Roboto", sans-serif;
    font-weight: 400;
font-size: 12px;
line-height: 1.17;
letter-spacing: 0.04em;
color: #8e8f99;
display: block;
margin-bottom: 4px;
}

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

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

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

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

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

.modal-comment {
    margin-bottom: 16px;
}

.modal-label::placeholder {
    font-weight: 400;
}

.modal-input-wrapper {}

.modal-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;
    resize: none;
    outline: transparent;
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-checkbox-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

input:checked + label > span {
    background-color: #404bbf;
    border: none;
    fill: #f4f4fd;
}

.modal-checkbox-label {
    font-family: "Roboto", sans-serif;
    font-weight: 400;
        font-size: 12px;
        line-height: 1.17;
        letter-spacing: 0.04em;
        color: #8e8f99;
}

.modal-checkbox-svg {
    width: 10px;
    height: 8px;
}

.modal-checkbox-label span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    fill: transparent;
    width: 16px;
    height: 16px;
    border-radius: 2px;
    border: 1px solid rgba(46, 47, 66, 0.4);
    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);
}

.modal-privacy-link {
    line-height: 1.33;
        text-decoration: underline;
        text-decoration-skip-ink: none;
        color: #4d5ae5;
}

.modal-button {
    font-weight: 500;
        font-size: 16px;
        color: #ffffff;
        background-color: #4d5ae5;
        text-decoration: underline;
        line-height: 1.5;
        letter-spacing: 0.04em;
        cursor: pointer;
        border: none;
        min-width: 169px;
        height: 56px;
        border-radius: 4px;
        padding: 16px 32px;
        display: block;
        margin: 24px auto 0;
        text-decoration: none;
        transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-button:hover,
.modal-button:focus {
    background-color: #404bbf;
        box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
}