:root {
    --primary-text-color: #212121;
    --secondary-text-color: #757575;
    --tertiary-text-color: #ffffff;
    --address-color: rgba(255, 255, 255, 0.6);
    --accent-color: #2196f3;
    --logo-color: #000000;
    --page-header-bc: #ececec;
    --body-bc: #f5f5f5;
    --body-text-color: #212121;
    --footer-bc: #2f303a;
    --button-bc: #f5f4fa;
    --icon-color: #AFB1B8;
    --icon-bc: rgba(255, 255, 255, 0.1);
    --card-border-color: #EEEEEE;
    --timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Roboto', 'Raleway', sans-serif;
    background-color: var(--tertiary-text-color);
    color: var(--body-text-color);
    font-size: 14px;
    letter-spacing: 0.03em;
}

h1,
h2,
h3,
p {
    margin: 0;
}

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

button {
    display: block;
    cursor: pointer;
    border: none;
    border-radius: 4px;
}

label {
    font-weight: 400;
    font-size: 12px;
    line-height: 1.16;
    letter-spacing: 0.01em;
    color: var(--secondary-text-color);
}

.list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.link {
    text-decoration: none;
}

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

.section {
    padding-top: 94px;
    padding-bottom: 94px;
}

.section-images {
    padding-top: 0;
}

.header {
    border-bottom-width: 1px;
    border-bottom-style: solid;

    border-bottom-color: var(--page-header-bc);
}

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

/*------- Header------ */

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

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


.logo {
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 700;
    font-size: 26px;
    line-height: 1.2;
    color: var(--logo-color);
    text-decoration: none;
}

.colortext {
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 700;
    font-size: 26px;
    line-height: 1.2;
    color: var(--accent-color);
}

.logo-footer {
    font-family: 'Raleway';
    font-style: normal;
    font-weight: 700;
    font-size: 26px;
    line-height: 1.2;
    color: var(--tertiary-text-color);
    text-decoration: none;
}

/*---------- Navigation---------- */

.nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin-left: 93px;
}

.nav-list .item+.item {
    margin-left: 50px;
}

.header-link {
    display: block;
    padding-top: 32px;
    padding-bottom: 32px;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: 0.02em;
    color: var(--primary-text-color);
    transition: color 250ms var(--timing-function);
}

.header-link:hover,
.header-link:focus {
    color: var(--accent-color);
}

.header-link.current {
    position: relative;
    color: var(--accent-color);
}

.header-link.current::after {
    position: absolute;
    bottom: 0;
    content: "";
    display: block;
    width: 100%;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
    transition: color 250ms var(--timing-function);

}


.site-list {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.site-list .item+.item {
    margin-left: 50px;
}

.link-mail-header {
    display: flex;
    align-items: center;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: 0.02em;
    transition: color 250ms var(--timing-function);

    color: var(--secondary-text-color);
}

.link-mail-header:hover,
.link-mail-header:focus {
    color: var(--accent-color);
}

.envelope-icon {
    margin-right: 10px;
    fill: currentColor;
}

.link-phone {
    display: flex;
    align-items: center;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: 0.02em;
    transition: color 250ms var(--timing-function);

    color: var(--secondary-text-color);
}

.link-phone:hover,
.link-phone:focus {
    color: var(--accent-color);
}

.phone-icon {
    margin-right: 10px;
    fill: currentColor;
}

/*------ Hero------ */

.hero-overlay {
    max-width: 1600px;
    height: 600px;
    margin-right: auto;
    margin-left: auto;
    padding: 200px 0;
    background-color: var(--footer-bc);
    background-image: linear-gradient(to right,
            rgba(47, 48, 58, 0.4), rgba(47, 48, 58, 0.4)), url(../images/hero.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;

}

.page-title {
    margin-right: auto;
    margin-left: auto;
    width: 696px;
    font-weight: 900;
    font-size: 44px;
    line-height: 1.4;
    text-align: center;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tertiary-text-color);
}

.main-button {
    margin-left: auto;
    margin-right: auto;
    margin-top: 30px;
    margin-bottom: auto;
    padding: 10px 32px;
    font-family: inherit;

    font-weight: 700;
    font-size: 16px;
    line-height: 1.9;
    letter-spacing: 0.06em;

    color: var(--tertiary-text-color);
    background-color: var(--accent-color);
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
    transition: background-color 250ms var(--timing-function);


}

.main-button:hover,
.main-button:focus {
    background-color: #188ce8;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);

}

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

.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    transition: opacity 250ms var(--timing-function), visibility 250ms var(--timing-function);
    background-color: rgba(0, 0, 0, 0.2);

}

.backdrop.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.backdrop.is-hidden .modal {
    transform: translate(-50%, -50%) scale(0.8);
}

.modal {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 528px;
    min-height: 581px;
    padding: 40px 40px;
    visibility: visible;
    opacity: 1;
    transition: transform 250ms var(--timing-function) opacity 250ms var(--timing-function) visibility 250ms var(--timing-function);
    transform: translate(-50%, -50%) scale(1);
    border-radius: 4px;
    background-color: var(--tertiary-text-color);
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.12),
        0px 1px 1px rgba(0, 0, 0, 0.14),
        0px 2px 1px rgba(0, 0, 0, 0.2);
}

.modal-text {
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.15;
    text-align: center;
    color: var(--body-text-color);
}

.form-field {
    position: relative;
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    text-align: start;
    transition: border-color 250ms var(--timing-function);
}

.icon-input {
    position: absolute;
    top: 50%;
    left: 15px;
    fill: var(--body-text-color);
    transition: fill 250ms var(--timing-function);
}

.form-field:focus-within .form-input,
.form-field:hover .form-input {
    border: 1px solid var(--accent-color);
}

.form-field:focus-within .icon-input,
.form-field:hover .icon-input {
    fill: var(--accent-color);
}

.form-label {
    margin-bottom: 4px;
}

.form-input {
    padding: 11px 12px;
    padding-left: 43px;
    border: 1px solid rgba(33, 33, 33, 0.2);
    border-radius: 4px;
    transition: border 250ms var(--timing-function);
    outline: transparent;
}

.form-field:focus-within .form-area,
.form-field:hover .form-area {
    border: 1px solid var(--accent-color);
}

.form-textarea::placeholder {
    color: rgba(117, 117, 117, 0.5);

}

.form-textarea {
    margin-bottom: 20px;
}

.form-area {
    width: 448px;
    height: 120px;
    padding: 12px 16px;
    resize: none;
    transition: border 250ms var(--timing-function);
    outline: transparent;

    border: 1px solid rgba(33, 33, 33, 0.2);
    border-radius: 4px;
}

.agreement-form {
    margin-bottom: 30px;
    padding-right: 11px;
    padding-left: 37px;
}


.check-input {
    position: absolute;
    appearance: none;

}

.checkbox {
    position: absolute;
    bottom: 124px;
    left: 54px;
    width: 16px;
    height: 15px;
    border: 2px solid var(--body-text-color);
    border-radius: 1px;
    background-color: var(--tertiary-text-color);
}

.check-input:checked+.checkbox {
    border-color: var(--accent-color);
    background-size: contain;
    background-origin: border-box;
    background-color: var(--accent-color);
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='16' height='15' viewBox='0 0 16 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='16' height='15' rx='2' fill='%232196F3'/%3e%3cpath d='M3.95703 7.75166L3.88825 7.68604L3.81923 7.75141L2.93123 8.59258L2.85486 8.66492L2.93097 8.73753L6.42671 12.0724L6.49574 12.1382L6.56476 12.0724L14.069 4.91352L14.1449 4.84116L14.069 4.76881L13.1873 3.92764L13.1183 3.86183L13.0493 3.92761L6.49577 10.1735L3.95703 7.75166Z' fill='white' stroke='white' stroke-width='0.2'/%3e%3c/svg%3e");
}

.agreement-label {
    font-size: 14px;
    line-height: 1.7;
    letter-spacing: 0.03em;
}

.agreement-text {
    text-decoration: underline;

    color: var(--accent-color);
}

.submit-button {
    width: 200px;
    height: 50px;
    padding: 10px 52px;
    margin-right: auto;
    margin-left: auto;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.9;
    letter-spacing: 0.06em;

    transition: 0.5s;
    transition-property: box-shadow;

    color: var(--tertiary-text-color);
    background-color: var(--accent-color);
    /* box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
    transition: background-color 250ms var(--timing-function); */

    background: rgb(0, 140, 255);
    box-shadow: 0 0 25px rgb(0, 140, 255);
}

.submit-button:hover,
.submit-button:focus {
    /* background-color: #188ce8;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15); */

    box-shadow: 0 0 5px rgb(0, 140, 255),
        0 0 25px rgb(0, 140, 255),
        0 0 50px rgb(0, 140, 255),
        0 0 100px rgb(0, 140, 255);
}


.modal-button {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--tertiary-text-color);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.bounce-top {
    animation: bounce-top 0.9s both;
}




@keyframes bounce-top {
    0% {
        transform: translateY(-45px);
        animation-timing-function: ease-in;
        opacity: 1;
    }

    24% {
        opacity: 1;
    }

    40% {
        transform: translateY(-24px);
        animation-timing-function: ease-in;
    }

    65% {
        transform: translateY(-12px);
        animation-timing-function: ease-in;
    }

    82% {
        transform: translateY(-6px);
        animation-timing-function: ease-in;
    }

    93% {
        transform: translateY(-4px);
        animation-timing-function: ease-in;
    }

    25%,
    55%,
    75%,
    87% {
        transform: translateY(0px);
        animation-timing-function: ease-out;
    }

    100% {
        transform: translateY(0px);
        animation-timing-function: ease-out;
        opacity: 1;
    }
}

.close-icon {
    fill: var(--logo-color);
    transition: fill 250ms var(--timing-function);
}

.close-icon:hover,
.close-icon:focus {
    fill: var(--accent-color);
}



/*--------------- Main content--------- */

.properties-list {
    display: flex;
}

.properties-list .item+.item {
    margin-left: 30px;
}

.content {
    width: 270px;
    height: 120px;
    background-color: var(--button-bc);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.properties-title {
    margin-top: 30px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    color: var(--primary-text-color);
}

.properties-text {
    margin-top: 10px;
    line-height: 1.7;
    color: var(--secondary-text-color);
}



.section-title {
    margin-bottom: 50px;
    font-weight: 700;
    font-size: 36px;
    line-height: 1.2;
    text-align: center;
    color: var(--primary-text-color);
}

.image-list {
    display: flex;
    align-items: center;
}

.image-list .img-item+.img-item {
    margin-left: 30px;
}

.img-item {
    position: relative;
}


.img-text {
    position: absolute;
    bottom: 0;
    width: 370px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    line-height: 1.5;
    text-transform: uppercase;

    color: var(--tertiary-text-color);
    background-color: rgba(47, 48, 58, 0.8);
    ;
}

.our-team {
    background-color: #f5f4fa;
}

.workers-list {
    display: flex;
    height: 428px;

}

.workers-list .item-workers+.item-workers {
    margin-left: 30px;

}

.item-workers {
    background-color: var(--tertiary-text-color);
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.12), 0px 1px 1px rgba(0, 0, 0, 0.14), 0px 2px 1px rgba(0, 0, 0, 0.2);
    border-radius: 0px 0px 4px 4px;
}

.item-workers {
    overflow: hidden;
}

.workers-img {
    transition: transform 1000ms ease;
}

.item-workers:hover .workers-img {
    transform: scale(1.2);
}

.workers {
    padding: 30px 0;
}

.title-text {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.2;
    text-align: center;
    color: var(--primary-text-color);
}

.section-text {
    margin-top: 10px;
    font-size: 16px;
    line-height: 1.2;
    text-align: center;
    color: var(--secondary-text-color);
}

.social-list {
    display: flex;
    justify-content: center;
    margin-top: 16px;

}

.social-list .social-item+.social-item {
    margin-left: 10px;
}


.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--icon-color);
    transition: color 250ms var(--timing-function), background-color 250ms var(--timing-function);
}

.social-link:hover,
.social-link:focus {
    color: var(--tertiary-text-color);
    background-color: var(--accent-color);
}

.social-icon {
    fill: currentColor;
}

.our-clients {
    display: flex;
}


.our-clients .clients-item+.clients-item {
    margin-left: 30px;
}

.clients-item {
    width: 170px;
    height: 92px;

}

.clients-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--icon-color);
    border-radius: 4px;
    border: 1px solid;
    transition: color 250ms var(--timing-function);
}

.clients-link:hover,
.clients-link:focus {
    color: var(--accent-color);
}

.icon-client {
    fill: currentColor;
}



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

.footer {
    padding: 60px 0;
    background-color: var(--footer-bc);
}

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

.footer-address {
    margin-top: 20px;
    font-style: normal;
}

.list-footer .item:nth-child(n + 2) {
    margin-top: 9px;
}

.link-address {
    font-weight: 400;
    line-height: 1.7;
    color: var(--tertiary-text-color);
    text-decoration: none;
    transition: color 250ms var(--timing-function);
}

.link-address:hover,
.link-address:focus {
    color: var(--accent-color);
}

.link-mail {
    font-weight: 400;
    line-height: 1.7;
    color: var(--address-color);
    text-decoration: none;
    transition: color 250ms var(--timing-function);
}

.link-mail:hover,
.link-mail:focus {
    color: var(--accent-color);
}

.link-number {
    font-style: normal;
    font-weight: 400;
    line-height: 1.7;
    color: var(--address-color);
    text-decoration: none;
    transition: color 250ms var(--timing-function)
}

.link-number:hover,
.link-number:focus {
    color: var(--accent-color);
}

.join {
    margin-left: 70px;
}

.join-text {
    font-weight: 700;
    text-transform: uppercase;

    color: var(--tertiary-text-color);
    text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

.join-list {
    display: flex;
    align-items: center;
    margin-top: 20px;

}

.join-list .join-item+.join-item {
    margin-left: 10px;
}

.join-item {
    width: 44px;
    height: 44px;
}

.join-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border-radius: 50%;
    color: var(--tertiary-text-color);
    background-color: var(--icon-bc);
    transition: color 250ms var(--timing-function), background-color 250ms var(--timing-function);

}

.join-link:hover,
.join-link:focus {
    color: var(--tertiary-text-color);
    background-color: var(--accent-color);
}

.social-icon {
    fill: currentColor;
}

.signup {
    margin-left: auto;
}

.signup-text {
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;

    color: var(--tertiary-text-color);
    text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

.footer-form {
    display: flex;
    width: 570px;
}

.signup .footer-input {
    width: 358px;
    height: 50px;
    padding: 15px 16px;
    font-size: 16px;
    line-height: 1.25;

    color: var(--address-color);
    background-color: var(--footer-bc);
    border: 1px solid rgba(255, 255, 255, 0.3);
    filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.15));
    border-radius: 4px;
}

.signup-button {
    position: relative;
    width: 200px;
    margin-left: 12px;
    padding: 10px 28px;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.9;
    letter-spacing: 0.06em;
    text-align: justify;

    color: var(--tertiary-text-color);
    background-color: var(--accent-color);
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
    transition: background-color 250ms var(--timing-function);


}

.signup-button:hover,
.signup-button:focus {
    background-color: #188ce8;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);

}

.send-icon {
    position: absolute;
    margin-left: 10px;
}

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


.button-list {
    display: flex;
    justify-content: center;
}


.button-list .item+.item {
    margin-left: 9px;
}

.portfolio-btn {
    padding: 6px 22px;
    font-family: inherit;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
    color: var(--primary-text-color);
    background-color: var(--button-bc);
    letter-spacing: 0.03em;
    transition-property: color, background-color, box-shadow;
    transition-duration: 250ms;
    transition-timing-function: var(--timing-function);
}

.portfolio-btn:hover,
.portfolio-btn:focus {
    color: var(--tertiary-text-color);
    background: var(--accent-color);
    box-shadow: 0px 3px 1px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.08),
        0px 2px 2px rgba(0, 0, 0, 0.12);
}

.projects-list {
    display: flex;
    flex-wrap: wrap;
    margin-top: 50px;
    gap: 30px;

}

.cards-link {
    display: block;
    text-decoration: none;
    transition: box-shadow 250ms var(--timing-function);
}

.cards-link:hover,
.cards-link:focus {
    box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.12), 0px 4px 4px rgba(0, 0, 0, 0.06), 1px 4px 6px rgba(0, 0, 0, 0.16);
}

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

.cards-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 63px 24px;
    transform: translateY(101%);
    transition: transform 250ms var(--timing-function);

    background-color: rgba(33, 150, 243, 0.9);
    ;
}

.cards-link:hover .cards-overlay,
.cards-link:focus .cards-overlay {
    transform: translateY(0);

}

.cards-text {
    font-size: 18px;
    line-height: 1.5;
    color: var(--tertiary-text-color);
}

.cards {
    padding: 20px 24px;
    border: 1px solid #EEEEEE;
}

.title {
    font-weight: 700;
    font-size: 18px;
    line-height: 2;
    letter-spacing: 0.06em;
    color: var(--primary-text-color);
}

.text {
    margin-top: 4px;
    font-size: 16px;
    line-height: 1.8;
    color: var(--secondary-text-color);
}