.hidden {
    display: none;
}

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

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

a {
    text-decoration: none;
}

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

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

button {
    cursor: pointer;
}

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

.container {
    max-width: 320px;
    padding: 0 16px;
    margin: 0 auto;
}

@media screen and (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media screen and (min-width: 1158px) {
    .container {
        max-width: 1158px;
        padding: 0 15px;
    }
}

/* 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;
    justify-content: space-between;
}

.nav-list,
.address {
    display: none;
    gap: 40px;
}

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

.main-logo-design {
    padding: 16px 0;
    display: block;
}

.text-logo {
    color: #2e2f42;
}

.burger-btn {
    padding: 0;
    border: none;
    background-color: transparent;
}

.burger-icon {
    display: block;
    fill: #2f2f37;
}

/* Desktop header */
@media screen and (min-width: 768px) {
    .burger-btn {
        display: none;
    }

    .nav-list,
    .address {
        display: flex;
    }

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

    .main-logo-design {
        padding: 24px 0;
        margin-right: 120px;
    }

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

    .nav-link.is-active {
        position: relative;
        color: #404bbf;
    }

    .nav-link.is-active::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -1px;
        width: 100%;
        height: 4px;
        background-color: #404bbf;
        border-radius: 2px;
    }

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

    .address-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
        font-style: normal;
    }

    .address-item-contact {
        font-size: 12px;
        line-height: 1.17;
        letter-spacing: 0.04em;
        color: #434455;
        transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
    }

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

@media screen and (min-width: 1158px) {
    .main-logo-design {
        margin-right: 76px;
    }

    .address-list {
        flex-direction: row;
        gap: 40px;
    }

    .address-item-contact {
        padding: 24px 0;
        font-size: 16px;
        line-height: 1.5;
        letter-spacing: 0.02em;
    }
}

/* mobile menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    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);
}

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

.mobile-menu-container {
    position: relative;
    padding-top: 72px;
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.button-mobile-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);
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
        border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.button-mobile-close:hover .mobile-close,
.button-mobile-close:focus .mobile-close {
    fill: #fff;
}

.nav-list-mobile {
    display: flex;
    flex-direction: column;
    row-gap: 40px;
}

.mobile-link-nav {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    letter-spacing: 0.02em;
    color: #2e2f42;
}

.mobile-link-nav.current {
    color: #404bbf;
}

.mobile-nav{
    margin-bottom: auto;
}

.mobile-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mobile-link {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #434455;
    font-style: normal;
}

.mobile-link.current {
    color: #4d5ae5;
}

.social-list-mobile {
    margin-top: 48px;
    display: flex;
    gap: 40px;
    justify-content: center;
}

.icons-item-mobile {
    width: 40px;
    height: 40px;
}

.icons-link-mobile {
    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);
}

.icons-link-mobile:hover,
.icons-link-mobile:focus {
    background-color: #404bbf;
}

.link-item-mobile {
    fill: #f4f4fd;
}

/* image */
.section-image {
    padding: 72px 0;
    margin: 0 auto;
    background: #2e2f42;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
        url(../images/people-office-m.jpg);
    max-width: 320px;
}

@media screen and (max-width: 767px) and (min-resolution: 192dpi) {
    .section-image {
        background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
            url(../images/people-office-m@2x.jpg);
    }
}

@media screen and (min-width: 768px) and (max-width: 1157px) {
    .section-image {
        padding: 112px 0;
        max-width: 768px;
        background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
            url(../images/people-office-t.jpg);
    }
}

@media screen and (min-width: 768px) and (max-width: 1157px) and (min-resolution: 192dpi) {
    .section-image {
        background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
            url(../images/people-office-t@2x.jpg);
    }
}

@media screen and (min-width: 1158px) {
    .section-image {
        padding: 188px 0;
        max-width: 1440px;
        background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
            image-set(url(../images/people-office.jpg) 1x,
                url(../images/people-office@2x.jpg) 2x);
    }
}

@media screen and (min-width: 1158px) and (min-resolution: 192dpi) {
    .section-image {
        background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
            url(../images/people-office.jpg);
    }
}

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

@media screen and (min-width: 768px) {
    .title-image {
        max-width: 496px;
        margin-bottom: 36px;
        font-size: 56px;
    }
}

@media screen and (min-width: 1158px) {
    .title-image {
        max-width: 496px;
        margin: 0 auto 48px;
        font-size: 56px;
    }
}

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

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

/* advantages */
.section-advantages {
    padding: 96px 0;
}

.advantages-list {
    display: flex;
    flex-wrap: wrap;
    gap: 72px;
}

.advantages-icon-list {
    display: none;
}

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

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


@media screen and (min-width: 768px) {
    .advantages-list {
        gap: 72px 24px;
    }

    .advantages-item {
        width: calc((100% - 24px) / 2);
    }

    .advantages-item-title {
        text-align: left;
    }
}

@media screen and (min-width: 1158px) {
    .section-advantages {
        padding: 120px 0;
    }

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

    .advantages-list {
        gap: 24px;
        flex-wrap: nowrap;
    }

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

    .advantages-item-title {
        font-weight: 500;
        font-size: 20px;
        text-align: left;
    }
}

/* our team */
.section-team {
    background-color: #f4f4fd;
    padding: 96px 0;
}

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

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

.team-item {
    background-color: #ffffff;
    border-radius: 0 0 4px 4px;
    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);
}

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

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

.about-team {
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #434455;
    margin-bottom: 8px;
}

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

.icons-item {
    width: 40px;
    height: 40px;
}

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

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

.link-item {
    fill: #f4f4fd;
}

@media screen and (min-width: 768px) {
    .team-list {
        gap: 64px 24px;
    }
}

@media screen and (min-width: 1158px) {
    .section-team {
        padding: 120px 0;
    }
}

/* portfolio */
.section-portfolio {
    padding: 96px 0;
}

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

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

.profile-list {
    width: 100%;
    background-color: #fff;
    box-shadow: 0 1px 6px 0 rgba(46, 47, 66, 0.08);
}

@media (min-width: 768px) {
    .profile-list {
        width: calc((100% - 24px) / 2);
    }
}

@media (min-width: 1158px) {
    .profile-list {
        width: calc((100% - 48px) / 3);
        box-shadow: none;
        transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
    }
    .profile-list: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);
    }
    .section-portfolio {
        padding: 120px 0;
    }

}

.portfolio-thumb {
    position: relative;
    overflow: hidden;
}

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

.profile-list:hover .not-vision {
    transform: translateY(0);
}

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

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

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

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

.under-container {
    display: flex;
    flex-wrap: wrap;
    gap: 72px;
    justify-content: center;
}

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

.footer-logo-wrapper {
    color: #f4f4fd;
}

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

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

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

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

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

.link-item {
    fill: #f4f4fd;
}

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

.subscribe-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

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

.subscribe-button {
    min-width: 165px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    color: #ffffff;
    cursor: pointer;
    background-color: #4d5ae5;
    border: none;
    border-radius: 4px;
    letter-spacing: 0.04em;
}

.subscribe-icon {
    margin-left: 16px;
    fill: #ffffff;
}

@media screen and (min-width: 768px) {
    .container-footer {
        max-width: 264px;
    }

    .under-container {
        justify-content: left;
        gap: 72px 24px;
        padding: 0 108px;
    }

    .footer-logo {
        text-align: left;
    }

    .footer-text {
        text-align: left;
    }

    .subscribe-intro {
        text-align: left;
    }

    .subscribe-input {
        width: 264px;
    }
}

@media screen and (min-width: 1158px) {
    .under-container {
        gap: 0;
        padding: 0 15px;
    }

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

    .footer-social{
        margin-right: 80px;
    }

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

/* modal */
.backdrop {
    position: fixed;
    inset: 0;
    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%) scale(1);
    width: 288px;
    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;
    padding: 72px 16px 24px;
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

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

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

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

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

.input,
.input-last {
    margin-bottom: 8px;
}

.input-last {
    margin-bottom: 16px;
}

.input-image {
    position: relative;
}

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

.form-field:focus {
    border-color: #4d5ae5;
}

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

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

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

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

.privacy {
    margin-bottom: 24px;
}

.label-checkbox {
    font-weight: 400;
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #8e8f99;
    cursor: pointer;
}

.form-custom-checkbox {
    width: 16px;
    height: 16px;
    border: 1px solid rgba(46, 47, 66, 0.4);
    border-radius: 2px;
    margin-right: 8px;
    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),
        fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

#user-privacy:checked+.label-checkbox .form-custom-checkbox {
    background-color: #404bbf;
    border: none;
    fill: #f4f4fd;
}

.label-intro {
    color: #4d5ae5;
}

.modal-button {
    display: block;
    min-width: 169px;
    height: 56px;
    margin: 0 auto;
    padding: 16px 32px;
    background-color: #4d5ae5;
    border: none;
    border-radius: 4px;
    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);
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

@media screen and (min-width: 768px) {
    .modal {
        width: 408px;
        padding: 72px 24px 24px;
    }
}