body {
    font-family: Roboto, sans-serif;
    color: #434455;
    background-color: #ffffff;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: 0.02em;
        font-style: normal;
}
p {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #434455;
}
img { 
    display: block; max-width: 100%; 
}
h2 {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.111;
    letter-spacing: 0.02em;
    color: #2E2F42;
}

h3 {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #2E2F42;
}
ul,
ol {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

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

a {
    text-decoration: none;
}

.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.167;
        letter-spacing: 0.03em;
        color: #2E2F42;
        text-decoration: none;
        text-transform: uppercase;
}

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

.header-logo .logo-top {
    color: #4D5AE5;
}

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

.nav-link {
    position: relative;
        display: inline-block;
        text-decoration: none;
        font-weight: 500;
        font-size: 16px;
        line-height: 1.5;
        letter-spacing: 0.02em;
        color: #2e2f42;
        padding-top: 24px;
        padding-bottom: 24px;
        transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link.current {
    color: #404bbf;
}
.nav-link::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -1px;
        width: 100%;
        height: 4px;
        border-radius: 2px;
        background-color: #404bbf;
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover::after,
.nav-link:focus::after,
.nav-link.current::after {
    opacity: 1;
}

.nav-link.current::after {
    transform: scaleX(1);
}
.contacts {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    font-style: normal;
    margin-left: auto;
}

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

.contacts-link {
    color: #434455;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: 0.02em;
    font-style: normal;
    text-decoration: none;
    display: block;
    padding: 24px 0;
}

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

.contacts-link {
    transition:
        background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
        color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
/* main-hero */

.main-hero {
background-color: #2e2f42;
    max-width: 1440px;
    margin: 0 auto;
    padding-top: 188px;
    padding-bottom: 188px;
    background-image:
        linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
        url("../images/hero-background.jpg");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
.main-hero-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.main-hero-text {
    font-weight: 700;
    font-size: 56px;
    line-height: 1.07143;
    letter-spacing: 0.02em;
    text-align: center;
    color: #fff;
    text-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
    max-width: 496px;
    margin: auto;
    padding-top: 0px;
    padding-bottom: 0px;
}
.main-hero-button {
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
    background: #4d5ae5;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: #fff;
    border-radius: 4px;
    padding: 16px 32px;
    width: 169px;
    height: 56px;
    border: none;
    text-align: center;
    white-space: nowrap;
    display: block;
    margin: 48px auto 0 auto;
    cursor: pointer;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.main-hero-button:hover {
    background-color: #404BBF;
}
.main-hero-button:focus {
    background-color: #404BBF;
}

/* features */

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

.features .container {
    padding-top: 0;
    padding-bottom: 0;
}
.conteiner-features {
    border: 1px solid #8e8f99;
    border-radius: 4px;
    width: 264px;
    height: 112px;
    background: #f4f4fd;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.features-list {
    flex-wrap: wrap;
    gap: 24px;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
}

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

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

.text-features {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #434455;
    margin-top: 8px;
}

/* team */

.team {
    background-color: #F4F4FD;
    padding: 120px 0;
}
.team-container {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 72px;
}
.team-text{
    text-align: center;
    font-weight: 700;
    font-size: 36px;
    line-height: 1.111;
    letter-spacing: 0.02em;
    color: #2E2F42;

}
.team-list {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 24px;
   
}
.employee-card {
    background-color: #ffffff;
    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);
    border-radius: 0 0 4px 4px;
    width: calc((100% - (24px*3)) / 4);
    

}
.card-wrapper {
    padding: 0;
    display: flex;
    flex-direction: column;
}
.border-team {
    padding: 32px 16px;
    
}
.social-links {
    display: flex;
    gap: 24px;
    margin-top: 8px;
}
.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background-color: #4d5ae5;
    transition: background 250ms cubic-bezier(0.4, 0, 0.2, 1);

}

.icon {
    fill: #f4f4fd;
}

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

.employee-name{
    text-align: center;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #2E2F42;
    margin-bottom: 8px;
    
}
.employee-profession {
    text-align: center;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #434455;
}

/* portfolio */
.portfolio {
    background-color: #ffffff;
    padding: 120px 0;
}
.portoflio .container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 72px;
}
.portfolio-text {
    text-align: center;
    font-weight: 700;
    font-size: 36px;
    line-height: 1.111;
    letter-spacing: 0.02em;
    color: #2E2F42;
    margin-bottom: 72px;
}
.portfolio-list {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    column-gap: 24px;
    row-gap: 48px;
}

.portfolio-card {
    background: #fff;
    width: 360px;
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-relative {
position: relative;
    overflow: hidden;
}
.portfolio-relative img {
    display: block;
}
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #4d5ae5;
    color: #fff;
    padding: 40px 32px;
    box-sizing: border-box;
    transform: translateY(100%);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.hidden-text-overlay {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: #F4F4FD;
    letter-spacing: 0.02em;
}
.portfolio-card:hover, .portfolio-card:focus {
    cursor: pointer;
        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:hover .portfolio-overlay {
    transform: translateY(0);
}

.item-wrapper {
    border-bottom: 1px solid #e7e9fc;
    border-left: 1px solid #e7e9fc;
    border-right: 1px solid #e7e9fc;
    padding: 32px 16px;
    width: 360px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);

}
.service-name {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #2E2F42;
}

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

.portfolio-card:hover,
.portfolio-card:focus {
    cursor: pointer;
}

.item-wrapper:hover,
.item-wrapper:focus {
    cursor: pointer;
    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);
}

/* footer */

.footer {
    background: #2e2f42;
    padding: 100px 0;
}
.logo-item-footer {
    margin-right: 120px;
}
.footer-logo {
    display: block;
    margin-bottom: 16px;
    text-transform: uppercase;
}

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

.footer-logo-part-one {
    font-weight: 700;
    font-size: 18px;
    line-height: 1.16667;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #4d5ae5;
    font-family: "Raleway", sans-serif;
}

.footer-logo-part-two {
    font-weight: 700;
    font-size: 18px;
    line-height: 1.16667;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #f4f4fd;
    font-family: "Raleway", sans-serif;
}
.social-media {
    margin-right: 80px;
}
.social-media-text {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #ffffff;
}

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

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

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

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

.form {
    display: flex;
        justify-content: center;
        flex-direction: column;
        max-width: 453px;
        max-height: 80px;
        margin-left: auto;
}
.mail-text {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #fff;
    margin-bottom: 16px;
}

.input-row {
    display: flex;
    gap: 24px;
}
.input-email {
    border: 1px solid #fff;
    border-radius: 4px;
    width: 264px;
    height: 40px;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
    font-weight: 400;
    font-size: 12px;
    line-height: 2;
    letter-spacing: 0.04em;
    color: #fff;
    background-color: #2e2f42;
    padding: 16px;
    outline: none;
    transition: border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.input-email::placeholder {
    color: #fff;
    font-weight: 400;
    font-size: 12px;
    line-height: 2;
    letter-spacing: 0.04em;
}

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

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

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

.icon-scr {
    fill: #fff;
    width: 24px;
    height: 24px;
}

.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
    background: 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;
}

.popup-review {
    position: absolute;
    top: 50%;
    left: 50%;
    padding: 72px 24px 24px 24px;
    transform: translate(-50%, -50%);
    background-color: #fcfcfc;
    border-radius: 4px;
    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);
    width: 408px;
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.close-popup {
    border-radius: 100%;
    background-color: #e7e9fc;
    position: absolute;
    top: 24px;
    right: 24px;
    border-width: 1px;
    border-color: rgba(0, 0, 0, 0.1);
    padding: 0;
    line-height: 0;
    width: 24px;
    height: 24px;

    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
        fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
    border-style: solid;

}

.close-btn {
    fill: #2E2F42;
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.close-popup:hover>.close-btn,
.close-popup:focus>.close-btn {
    fill: #fff;
}


.close-popup:hover,
.close-popup:focus {
    background-color: #404bbf;
}

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

}

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

.icon-inner {
    position: relative;
}

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

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

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

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

.input-field:hover,
.input-field:focus,
.comment-field:hover,
.comment-field:focus {
    border: 1px solid #4d5ae5;
}

.input-field:hover+.icon-wrapper,
.input-field:focus+.icon-wrapper {
    fill: #4d5ae5;
}

.comment-field {
    border: 1px solid rgba(46, 47, 66, 0.4);
    border-radius: 4px;
    width: 100%;
    height: 120px;
    padding: 8px 16px;
    resize: none;
    outline: none;
    transition: border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.comment-field::placeholder {
    font-weight: 400;
    font-size: 12px;
    line-height: 1.16667;
    letter-spacing: 0.04em;
    color: rgba(46, 47, 66, 0.4);

}

.checkbox-wrapper {
    padding-top: 0;
    margin-top: 16px;
}

.input-checkbox:checked+.text-terms .custom-checkbox {
    background-color: #404bbf;
    fill: #f4f4fd;
}

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

.input-checkbox:checked+label .custom-checkbox .check-icon {
    opacity: 1;
}

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

}

.text-terms {
    font-weight: 400;
    font-size: 12px;
    line-height: 1.33333;
    letter-spacing: 0.04em;
    color: #8e8f99;
    border-radius: 4px;
    width: 360px;
    height: 16px;
}

.privacy-link {
    text-decoration: underline;
    color: #4d5ae5;
    line-height: 1.33333;
}

.botton-field {
    border-radius: 4px;
    padding: 16px 32px;
    width: 169px;
    height: 56px;
    background-color: #4d5ae5;
    color: #fff;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    text-align: center;
    transition: background 250ms cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
    margin: 0 auto;
    margin-top: 24px;
    border: none;
}

.botton-field:hover,
.botton-field:focus {
    background-color: #404bbf;
}
