.hidden{
    display: none;
}
body {
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #434455;
    background-color: #fff;
}
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    padding: 0;
}
p {
    margin: 0;
}
ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}
a {
    text-decoration: none;
    font-style: normal;
    color: #2e2f42;
}
img {
    display: block;
    max-width: 100%;
    height: auto;
}
button {
    padding: 0;
    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 styles */

.page-header {
    border-bottom: 1px solid #e7e9fc;
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 999;
    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);
}
.page-header > .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-list, 
.header-contacts {
    display: none;
}
.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-logo {
    padding: 16px 0;
    display: block;
}
.header-logo > .logo-part{
    color: #2e2f42;
}
.burger-btn {
    border: none;
    background-color: transparent;
}
.burger-icon {
    display: block;
    fill: #2e2f42;
}
@media screen and (min-width: 768px) {
    .burger-btn {
        display: none;
    }
    .header-nav, .nav-list {
        display: flex;
        align-items: center;
    }
    .header-logo {
        padding: 24px 0;
        margin-right: 120px;
    }
    .nav-list{
        gap: 40px;
    }
    .header-contacts{
        font-style: normal;
        display: block;
    }
    .nav-link{
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    display: block;
    padding: 24px 0;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
    }
    .nav-link.current {
        position: relative;
    }
    .nav-link.current::after{
        content: '';
        position: absolute;
        left: 0;
        bottom: -1px;
        width: 100%;
        height: 4px;
        background-color: #404bbf;
        border-radius: 2px;
    }
    .contacts-list {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        flex-direction: column;
    }
    .contacts-link{
        font-size: 12px;
        line-height: 1.17;
        letter-spacing: 0.04em;
        color: #434455;
        display: block;
        transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
    }
    .nav-link:hover,
    .nav-link:focus,
    .contacts-link:hover,
    .contacts-link:focus,
    .nav-link.current{
        color: #404bbf;
    }
}
@media screen and (min-width: 1158px) {
    .header-logo {
        margin-right: 76px;
    }
    .contacts-list {
        gap: 40px;
        flex-direction: row;
    }
    .contacts-link{
        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%;
    z-index: 999;
    background: #fff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(100%);
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
                visibility 250ms cubic-bezier(0.4, 0, 0.2, 1),
                transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}
.mobile-menu-container{
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-top: 72px;
    padding-bottom: 24px;
}
.mobile-close-button{
    border: 1px solid #e7e9fc;
    border-radius: 100%;
    padding: 8px;
    position: absolute;
    top: 24px;
    right: 24px;
}
.mobile-menu-nav {
    margin-bottom: auto;
}
.menu-nav-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}
.menu-nav-list-item-link {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11111;
    letter-spacing: 0.02em;
    color: #2e2f42;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu-contacts {
    margin-bottom: 48px;
}
.mobile-menu-contacts-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.menu-contacts-item-link {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu-socials-list {
    display: flex;
    align-items: center;
    gap: 40px;
}
.socials-item-link-icon {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 100%;
    background-color: #4d5ae5;
}
.menu-nav-list-item-link:hover,
.menu-nav-list-item-link:focus,
.menu-contacts-item-link:hover,
.menu-contacts-item-link:focus,
.menu-nav-list-item-link.current,
.menu-contacts-item-link.current {
    color: #404bbf;
}
@media screen and (min-width: 768px) {
    .mobile-menu{
        display: none;
    }
}

/* Main sections paddings */
.section {
    padding: 96px 0;
}
.start-screen.section {
    padding: 72px 0;
}
@media screen and (min-width: 768px) {
    .start-screen.section{
        padding: 112px 0;
    }
}
@media screen and (min-width: 1158px) {
    .start-screen.section {
        padding: 188px 0;
    }
    .section {
        padding: 120px 0;
    }
}

/* Start-screen section */

.start-screen.section {
    background-color: #2e2f42;
    background-image: linear-gradient(to bottom, rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url(../images/start-screen-background.jpg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    max-width: 320px;
    margin: 0 auto; 
}
.start-screen > .container {
    text-align: center;
}
.start-screen-title {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11111;
    letter-spacing: 0.02em;
    text-align: center;
    color: #fff;
    max-width: 216px;
    margin: 0 auto 72px auto;
}
.start-screen-button {
    background-color: #4d5ae5;
    color: #fff;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: 0.04em;
    padding: 16px 32px;
    border: none;
    border-radius: 4px;
    display: block;
    margin: 0 auto 0 auto;
    min-width: 169px;
    cursor: pointer;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.start-screen-button:hover,
.start-screen-button:focus {
    cursor: pointer;
    background-color: #404bbf;
}
@media screen and (min-width: 768px) {
    .start-screen.section {
        max-width: 768px;
    }
    .start-screen-title {
    font-size: 56px;
    line-height: 1.07;
    margin-bottom: 36px;
    max-width: 496px;
    }
}
@media screen and (min-width: 1158px) {
    .start-screen.section {
        max-width: 1440px;
    }
    .start-screen-title {
        font-weight: 700;
        line-height: 1.07;
        margin-bottom: 48px;
    }
}

/* Advantages section */

.advantages-title{
    font-weight: 700;
    font-size: 36px;
    line-height: 40px;
    text-align: center;
    color: #2e2f42;
}
.advantages-list {
    display: flex;
    flex-wrap: wrap;
    gap: 72px;
}
.item-icon-container {
    display: none;
}
.advantages-item-title {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11111;
    letter-spacing: 0.02em;
    text-align: center;
    color: #2e2f42;
    margin-bottom: 8px;
}
.advantages-item-text {
    font-weight: 500;
    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 {
        flex-basis: calc((100% - 24px) / 2);
    }
    .advantages-item-title {
        text-align: start;
    }
}
@media screen and (min-width: 1158px) {
    .advantages.section > .container {
        display: flex;
    }
    .advantages-list {
        gap: 24px;
        flex-wrap: nowrap;
    }
    .advantages-item {
        flex-basis: calc((100% - 72px) / 4);
    }
    .item-icon-container {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 112px;
        background: #f4f4fd;
        border: 1px solid #8e8f99;
        border-radius: 4px;
        margin-bottom: 8px;
        box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
    }
    .advantages-item-icon {
        width: 64px;
        height: 64px;
    }    
    .advantages-item-title {
        font-weight: 500;
        font-size: 20px;
        line-height: 1.2;
    }
    .advantages-item-text {
        font-weight: 400;
    }
}

/* Our Team section */

.our-team {
    background-color:  #f4f4fd;
}
.our-team-header {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    letter-spacing: 0.02em;
    text-align: center;
    color: #2e2f42;
    margin-bottom: 72px;
}
.our-team-list {
    display: flex;
    flex-wrap: wrap;
    gap: 72px;
    justify-content: center;
}
.our-team-item {
    background-color: #fff;
    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;
}
.team-item-info {
    padding: 32px 0px;
}
.team-info-header {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-align: center;
    color: #2e2f42;
    margin-bottom: 8px;
}
.team-info-text {
    letter-spacing: 0.02em;
    text-align: center;
    margin-bottom: 8px;
}
.team-social-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 0px 16px;
}
.team-social-links .link-icon {
    width: calc((100% - 24px * 3) / 4);
}
.team-social-links .link-icon .link{
    background-color: #4d5ae5;
    padding: 12px 12px;
    border-radius: 50%;
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.team-social-links .link-icon .link .icon {
    width: 16px;
    height: 16px;
    fill: #f4f4fd;
}
.our-team-item:hover .link:hover,
.our-team-item .link-icon .link:focus{
    background-color: #404bbf;
}
@media screen and (min-width: 768px) {
    .our-team-list {
        gap: 64px 24px;
    }
}
@media screen and (min-width: 1158px) {
    .our-team-list {
        gap: 24px;
    }
}

/* Portfolio section */

.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;
}
.portfolio-item {
    box-shadow: 0 1px 6px 0 rgba(46, 47, 66, 0.08);
}
.portfolio-item .thumb {
    position: relative;
    overflow: hidden;
}
.thumb-text {
    position: absolute;
    top: 0;
    letter-spacing: 0.02em;
    background-color: #4d5ae5;
    color: #f4f4fd;
    padding: 40px 32px;
    transform: translateY(100%);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    width: 100%;
}
.portfolio-item:hover .thumb .thumb-text{
    transform: translateY(0%);
}
.portfolio-item-info {
    padding: 32px 16px;
    border: 1px solid #e7e9fc;
    border-top: none;
}
.portfolio-item-title {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #2e2f42;
    margin-bottom: 8px;
}
.portfolio-item-text {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #434455;
}
@media screen and (min-width: 768px) {
    .portfolio-list {
        gap: 72px 24px;
    }
    .portfolio-item {
        flex-basis: calc((100% - 24px) / 2);
    }
}
@media screen and (min-width: 1158px) {
    .portfolio-list {
        gap: 48px 24px;
    }   
    .portfolio-item {
        box-shadow: none;
        flex-basis: calc((100% - 48px) / 3);
        transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
    }
    .portfolio-item:hover {
        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);
    }
}

/* Footer bottom section */

.bottom-section {
    background-color: #2e2f42;
}
.bottom-section>.container {
    display: flex;
    gap: 72px;
    flex-wrap: wrap;
    text-align: center;
    justify-content: center;
}
.logo-bottom {
    display: inline-block;
    margin-bottom: 16px;
}
.logo-part.bottom{
    color: #f4f4fd;
}
.bottom-section-text {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #f4f4fd;
    text-align: start;
}
.bottom-socials-text {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #fff;
    margin-bottom: 16px;
}
.bottom-socials-links{
    display: flex;
    gap: 16px;
}
.bottom-socials-links .link-item .link-icon .icon {
    width: 24px;
    height: 24px;
    fill: #f4f4fd;
}
.bottom-socials-links .link-item .link-icon{
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #4d5ae5;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.bottom-socials-links .link-item .link-icon:hover,
.bottom-socials-links .link-item .link-icon:focus{
    background-color: #31d0aa;
}
.bottom-section-subscribe {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}
.subscribe-title {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #fff;
}
.subscribe-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: center;
}
.subscribe-input {
    width: 288px;
    height: 40px; 
    border: 1px solid #fff;
    border-radius: 4px;
    background:none;
    padding: 8px 16px;
    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;
    outline: transparent;
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.3;
}
.subscribe-input::placeholder {
    font-weight: 400;
    font-size: 12px;
    line-height: 2;
    letter-spacing: 0.04em;
    color: #fff;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.subscribe-lable:hover .subscribe-input,
.subscribe-lable:focus .subscribe-input,
.subscribe-input:focus{
    border-color: #31d0aa;
}
.subscribe-lable:focus .subscribe-input::placeholder,
.subscribe-lable:hover .subscribe-input::placeholder,
.subscribe-input:focus::placeholder{
    color: #31d0aa;
}
.subscribe-button {
    min-width: 165px;
    display: flex;
    gap: 16px;
    background-color: #4d5ae5;
    justify-content: center;
    align-items: center;
    padding: 8px 24px;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.subscribe-button:hover,
.subscribe-button:focus {
    background-color: #31d0aa;
}
@media screen and (min-width: 768px) {
    .bottom-section>.container {
        gap: 72px 24px;
        text-align: start;
        justify-content: flex-start;
        padding: 0px 108px;
    }
    .bottom-section-info {
        max-width: 264px;
    }
    .bottom-section-subscribe {
        flex-direction: column;
        align-self: flex-start;
    }
    .subscribe-form {
        gap: 24px;
    }
    .subscribe-input {
        width: 264px;
    }
}
@media screen and (min-width: 1158px) {
    .bottom-section {
        padding: 100px 0;
    }
    .bottom-section>.container{
        align-items: baseline;
        padding: 0px 15px;
        gap: 0;

    }
    .bottom-section-info {
        margin-right: 120px;
    }
    .bottom-section-subscribe{
        margin-left: auto;
    }
    .subscribe-form{
        align-items: flex-start;
    }
}
.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    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%);
    width: 288px;
    min-height: 623px;
    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);
    background-color: #fcfcfc;
    padding: 72px 16px 24px 16px;
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.backdrop:not(.is-open) .modal {
    transform: translate(-50%, -100%) scale(1.5);
}
.modal .close-button {
    position: absolute;
    top: 24px;
    right: 24px;
    border-radius: 50%;
    background-color: #e7e9fc;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 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 svg {
    fill: #2e2f42;
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.close-button:hover,
.close-button:focus{
    background-color: #404bbf;
    border: none;
}
.close-button:hover svg,
.close-button:focus svg {
    fill: #fff;
}
.modal-text {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    text-align: center;
    color: #2e2f42;
    margin-bottom: 16px;
}
.form-box {
    margin-bottom: 8px;
}
.input-label {
    font-weight: 400;
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #8e8f99;
    display: block;
    margin-bottom: 8px;
}
.input-container {
    position: relative;
}
.input-area {
    width: 100%;
    border: 1px solid rgba(46, 47, 66, 0.4);;
    border-radius: 4px;
    background-color: transparent;
    height: 40px;
    padding-left: 38px;
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    outline: transparent;
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.input-icon{
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    fill: #2e2f42;
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.form-box.textarea{
    margin-bottom: 16px;
}.input-area.textarea {
    resize: none;
    padding: 8px 16px;
    height: 120px;
}
.input-area.textarea::placeholder{
    font-weight: 400;
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: rgba(46, 47, 66, 0.4);
}
.input-area:hover,
.input-area:focus {
    border-color: #4d5ae5;
}
.input-area:hover + .input-icon,
.input-area:focus + .input-icon{
    fill: #4d5ae5;
}
.privacy-policy-container{
    margin-bottom: 24px;
}
.privacy-policy-label {
    font-weight: 400;
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #8e8f99;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.checkbox-box {
    flex-shrink: 0;
    fill: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 2px;
    margin-right: 8px;
    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);
}
.checkbox-box .checkbox-icon {
    fill: transparent;
    opacity: 0;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
input.visually-hidden:checked + .privacy-policy-label .checkbox-box {
    background-color: #404bbf;
    border: none;
    fill: #f4f4fd;
}
input.visually-hidden:checked + .privacy-policy-label .checkbox-box .checkbox-icon{
    opacity: 1;
    fill: #f4f4fd;
}
.privacy-link {
    line-height: 1.33333;
    text-decoration: underline;
    text-decoration-skip-ink: none;
    color: #4d5ae5;
}
.modal-button-submit {
    display: block;
    margin: 0 auto;
    border-radius: 4px;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
    background-color: #4d5ae5;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    text-align: center;
    color: #fff;
    min-width: 169px;
    height: 56px;
    cursor: pointer;
    border: none;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-button-submit:hover, 
.modal-button-submit:focus {
    background-color: #404bbf;
}
@media screen and (min-width: 768px) {
    .modal {
        width: 408px;
        min-height: 584px;
    }
}