body {
    font-family: "Roboto", sans-serif;
    background-color: white;
    color: #434455;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.02em;
}

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


h1 {
    font-weight: 700;
    font-size: 56px;
    line-height: 1.07;
    letter-spacing: 0.02em;

}

h2 {
    font-weight: 700;
    font-size: 36px;
    letter-spacing: 0.02em;
    color: #2e2f42;
}

h3 {
    font-weight: 500;
    font-size: 20px;
    letter-spacing: 0.02em;
    color: #2e2f42;
}

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

button {
    cursor: pointer;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: 0.04em;
}

a {
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.04em;
    text-decoration: none;
}

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

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

li {
    margin: 0;
}

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

.section {
    padding: 96px 0;
}


/* Navigation header */
.navigation {
    border-bottom: 1px solid #e7e9fc;
    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);
}

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

.nav-container .logo {
    padding: 24px 0;
}

.logo-header {
    color: #2e2f42;
    margin-right: 76px;
    margin-right: 0;
}

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


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

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

.nav-list-item:nth-child(1) .nav-link {
    position: relative;
    color: #404bbf;
}

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

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



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

}

.address-list {
    display: none;

    flex-direction: row;
    gap: 40px;
}

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

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

.mob-menu-icon {
    fill: #2F2F37;
}

.mob-menu-container {
    position: fixed;
    top: 0;
    left: 0;
    background-color: #FFFFFF;
    width: 100%;
    height: 100%;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1), visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);

}

.mob-menu-container.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mob-menu {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    padding: 72px 24px 40px 16px;
}

.mob-panel {
    display: flex;
    margin-bottom: 168px;
}


.mob-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

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

.mob-list-item:nth-child(1) .mob-link {
    position: relative;
    color: #404bbf;
}

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

.mob-address {
    font-style: normal;
    margin-bottom: 48px;
}

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

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

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

.mob-socials-container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.mob-social-link-container {
    width: 40px;
    height: 40px;
}

.mob-social-link {
    width: 100%;
    height: 100%;
    background-color: #4d5ae5;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mob-socials-icon {

    fill: #F4F4FD;
}

.mob-social-link:hover,
.mob-social-link:focus {
    background-color: #404BBF;
}

/* S1: Title card */

.title-section {
    max-width: 320px;
    /* max-width: 768px; */
    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;
    background-position: center;
    background-size: cover;



    color: #fff;
    text-align: center;
    line-height: 1.07;
    padding: 72px 0;
    margin: 0 auto;
}

.title {
    max-width: 496px;
    margin: 0 auto 48px;

    font-size: 36px;
}

.title-btn {
    background: #4d5ae5;
    color: inherit;
    padding: 0;
    display: block;
    min-width: 169px;
    height: 56px;
    border: none;
    border-radius: 4px;
    margin: 0 auto;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* S2: Positives section */

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

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

.positives-list-item {
    flex-basis: 100%;
}

.positives-icon-container {
    display: none;
}

.positives-icon {
    fill: #2E2F42;
}

.positives-title {
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 36px;
}

.positives-text {
    font-weight: 500;
}

/* S3: Team section */

.team-section {
    background: #f4f4fd;
}

.team-title {
    line-height: 1.11;
    text-align: center;
    text-transform: capitalize;
    margin-bottom: 72px;
}

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

.team-list-item {
    flex-basis: 264px;

    border-radius: 0px 0px 4px 4px;
    background-color: #fff;
    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);
}

.team-member {
    background: #FFFFFF;
}

.team-member-container {
    padding: 32px 0;
}

.team-member-title {
    line-height: 1.11;
    text-align: center;
    text-transform: capitalize;
    margin-bottom: 8px;
}

.team-member-text {
    text-align: center;
    margin-bottom: 8px;
}

.team-member-socials-container {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.social-link-container {
    width: 40px;
    height: 40px;
}

.social-link-container .social-link {
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}


.social-link {
    width: 100%;
    height: 100%;
    background-color: #4d5ae5;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;

}

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



.team-socials-icon {

    fill: #F4F4FD;
}



/* S4: Portfolio section */

.portfolio-title {
    line-height: 1.11;
    text-align: center;
    text-transform: capitalize;
    margin-bottom: 72px;
}

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

.portfolio-list-item {
    flex-basis: calc(100% - 24px);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0px 1px 6px rgba(46, 47, 66, 0.08);
}

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


.portfolio-overlay {
    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);

}

.portfolio-box:hover .portfolio-overlay {
    transform: translateY(0);
}

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

.portfolio-text-title {
    margin-bottom: 8px;
}

/* Footer */


.footer {
    line-height: 1.5;
    letter-spacing: 0.02em;
    font-weight: 400;
    font-size: 16px;
    background-color: #2e2f42;
    padding-top: 96px;
    padding-bottom: 96px;
}

.footer-items-container {
    display: flex;
    flex-direction: column;
}

.footer-misc {
    margin-bottom: 72px;
}

.footer .logo {
    display: inline-block;
    margin-bottom: 16px;
    margin-left: calc(50% - 58px);
}

.logo-footer {
    color: #f4f4fd;
}

.footer-text {
    color: #f4f4fd;
    width: 288px;
}

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

.footer-socials-container {
    text-align: center;
    margin-bottom: 72px;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 16px;
}


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

.footer-social-link {
    width: 100%;
    height: 100%;
    background-color: #4d5ae5;
    border-radius: 50%;

    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.footer-socials-icon {
    fill: #F4F4FD;
}

.footer-form-container {
    text-align: center;
}

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



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

.footer-form-input-email:focus {
    border-color: #4D5AE5;
}

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

.footer-form-btn {
    min-width: 165px;
    background-color: #4D5AE5;
    border: none;
    border-radius: 4px;
    color: #FFFFFF;
    padding: 8px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 500;

}

.footer-form-btn:hover,
.footer-form-btn:focus {
    background-color: #404BBF;

}

.footer-form-icon {
    fill: FFFFFF;
    margin-left: 16px;
}

/* Modal overlay */

.contact-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(46, 47, 66, 0.4);
    width: 100%;
    height: 100%;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1), visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-form-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #FCFCFC;
    width: 288px;
    min-height: 623px;
    padding: 72px 16px 24px 16px;
    border-radius: 4px;
    box-shadow:
        0px 2px 1px 0px rgba(0, 0, 0, 0.2),
        0px 1px 3px 0px rgba(0, 0, 0, 0.12),
        0px 1px 1px 0px rgba(0, 0, 0, 0.14);

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

.modal-exit-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    min-width: 24px;
    min-height: 24px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    background-color: #E7E9FC;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    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-exit-btn:hover,
.modal-exit-btn:focus {
    background-color: #404BBF;
    border: none;
}

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

.modal-exit-btn:hover .modal-exit-icon,
.modal-exit-btn:focus .modal-exit-icon {
    fill: #ffffff
}

.modal-title {
    margin-top: 0;
    margin-bottom: 16px;
    font-weight: 500;
    text-align: center;
    color: #2E2F42;
}

.modal-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
}

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

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

}

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

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

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

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

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

.modal-textarea-container {
    margin-bottom: 16px;
}

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

.modal-form-textarea:hover,
.modal-form-textarea:focus {
    border-color: #4D5AE5;
}

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

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

.modal-form-checkbox-box {
    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;
}

.modal-form-checkbox:checked+.form-checkbox-label .modal-form-checkbox-box {
    border: none;
    background-color: #404BBF;
    fill: #F4F4FD;
}

.pp-link {
    font-size: inherit;
    text-decoration: underline;
    color: #4d5ae5;
}

.modal-submit-btn {
    background-color: #4D5AE5;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    display: block;
    margin: 0 calc(50% - 85px);
    min-width: 169px;
    height: 56px;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-submit-btn:hover,
.modal-submit-btn:focus {
    background-color: #404BBF;
}

@media (min-width:768px) {
    .container {
        max-width: 768px;
        padding: 0 16px;
    }

    /* Navigation header */

    .logo-header {
        margin-right: 120px;
    }

    .nav-list {
        display: flex;
    }

    .address-list {
        display: block;
        display: flex;
    }

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

    .contact-link {
        font-size: 12px;
    }

    .mob-menu-icon-container {
        display: none;
    }


    /* S1: Title card */
    .title-section {
        max-width: 768px;
        line-height: 1.07;
        padding: 112px 0;
    }

    .title {
        max-width: 496px;
        margin: 0 auto 36px;
        font-size: 56px;
    }

    /* S2: Positives section */

    .positives-list {
        column-gap: 24px;
        row-gap: 72px;
    }

    .positives-list-item {
        flex-basis: calc((100% - 24px) / 2);
    }

    /* S3: Team section */
    .team-list {
        column-gap: 24px;
        row-gap: 64px;
        padding: 0 96px;
    }

    .team-list-item {
        flex-basis: calc((100% - 24px) / 2);
    }

    /* S4: Portfolio section */

    .portfolio-list-item {
        flex-basis: calc((100% - 24px) / 2);
        transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
    }

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

    /* Footer */
    .footer-items-container {
        display: flex;
        flex-direction: row;
        align-items: baseline;
        flex-wrap: wrap;
        gap: 0 24px;
        margin-left: 96px;
    }

    .footer .logo {
        margin-left: 0;
    }

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

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

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

    /* Modal overlay */
    .modal {
        width: 408px;
        min-height: 584px;
        padding: 72px 24px 24px 24px;
    }
}

@media (min-width:1158px) {

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

    .section {
        padding: 120px 0;
    }

    /* Navigation header */


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

    .nav-container {
        justify-content: space-around;
    }

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

    /* S1: Title card */
    .title-section {
        max-width: 1440px;
        padding: 188px 0;
    }

    .title {
        margin: 0 auto 48px;
    }

    /* S2: Positives section */

    .positives-list {
        gap: 72px;
    }

    .positives-list-item {
        flex-basis: calc((100% - 3 * 72px) / 4);
    }

    .positives-icon-container {
        width: 100%;
        height: 112px;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 4px;
        background-color: #F4F4FD;
        border: 1px solid #8E8F99;
        margin-bottom: 8px;
    }

    .positives-title {
        font-weight: 500;
        font-size: 20px;
    }

    .positives-text {
        font-weight: 400;
    }

    /* S3: Team section */
    .team-list {
        flex-wrap: nowrap;
        padding: 0;
    }

    .team-list-item {
        flex-basis: calc((100% - 24px * 3) / 4);
    }

    /* S4: Portfolio section */
    .portfolio-list-item {
        flex-basis: calc((100% - 24px * 2) / 3);
    }





    /* Footer */
    .footer-items-container {
        flex-wrap: nowrap;
        gap: 0;
    }

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

    .footer .logo {
        margin-left: 0;
    }

    .footer-text {
        width: 264px;
    }

    .footer-socials-container {
        margin-right: 80px;
        margin-bottom: 0px;
        text-align: left;
    }

    .footer-socials {
        display: flex;
        justify-content: baseline;
        gap: 16px;
    }

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

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

@media (min-resolution: 192dpi) {
    .title-section {
        background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url(../images/people-office1@2x.jpg);
    }
}