/* general h1 h2 h3 body list link logo */
.site {
    background-color: #FFFFFF;
    color: #434455;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
}
h1,
h2,
h3,
p {
    margin: 0 auto;
}
.header-one {
    color: #ffffff;
    font-weight: bold;
    font-size: 56px;
    line-height: 1.07;
    letter-spacing: 0.02em;
    text-align: center;
    display: block;
    max-width: 496px;
}
.header-two {
    color: #2E2F42;
    font-weight: bold;
    font-size: 36px;
    letter-spacing: 0.02em;
    text-align: center;
}
.skils .header-two {
    line-height: 1.2;
}
.portfolio .header-two,
.team .header-two {
    line-height: 1.11;
    text-transform: capitalize;
}
.header-three {
    color: #2E2F42;
    font-weight: 500;
    font-size: 20px;
    letter-spacing: 0.02em;
    line-height: 1.2;
}
.list {
    list-style-type: none;
    margin: 0;
    padding-left: 0;
}

.link, .current {
    color: #434455;
    font-size: 12px;
    line-height: 1.333;
    letter-spacing: 0.04em;
    text-decoration: none;
    padding: 24px 0;
    display: block;
}

.image {
    display: block;
}
.logo {
    color: #4D5AE5;
    font-family: Raleway, sans-serif;
    font-weight: bold;
    font-size: 18px;
    line-height: 1.17;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-decoration: none;
}
.top-logo {
    color: #2E2F42;
}
.down-logo {
    color: #F4F4FD;
}
.container {
    width: 1158px;
    margin: 0 auto;
    padding: 0 15px;
}

/* top-line*/
.top-line {
    border-bottom: 1px solid #E7E9FC;
    box-shadow: 0px 2px 1px rgba(46, 47, 66, 0.08),
                0px 1px 1px rgba(46, 47, 66, 0.16),
                0px 1px 6px rgba(46, 47, 66, 0.08);
}
.top-line .container{
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.menu {
    display: flex;
    align-items: center;
}
.menu .logo {
    margin-right: 76px;
}
.menu .list {
    display: flex;
    gap: 40px;
}
.conect .list {
    display: flex;
    align-items: center;
    gap: 40px;
}
.menu .current,
.menu .link {
    color: #2E2F42;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.02em;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.menu .current{
    color: #404BBF;
    position: relative;
}
.menu .current::after{
    display: block;
    height: 4px;
    width: 100%;
    background-color: #404BBF;
    border-radius: 2px;
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
}


.conect .link {
    color: #434455;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0.02em;
    font-style: normal;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.menu .link:focus,
.conect .link:focus,
.conect .link:hover,
.menu .link:hover {
    color: #404BBF;
}

/*service*/
.service {
    background-color: #2E2F42;
    background-image: linear-gradient(
        to bottom,
        rgba(46,
            47,
            66,
            0.7),
        rgba(46,
            47,
            66,
            0.7)
        ),
        url(../images/bg-img.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    padding: 188px 0;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
}
.service .container{
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
}
.button-text {
    font-family: "Roboto", sans-serif;
    background-color: #4D5AE5;
    color: #FFFFFF;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    cursor: pointer;
    height: 56px;
    min-width: 169px;
    border: none;
    border-radius: 4px;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.button-text:focus,
.button-text:hover {
    background-color: #404BBF;
}
/*soft skils*/
.skils {
    padding: 120px 0;
}
.skils .container {
    margin: 0 156px;
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    clip-path: inset(100%);
    padding: 0;
}
.skils .list{
    display: flex;
    gap: 24px;
    justify-content: center;
}
.skils-pins {
    flex-basis: calc((100% - 72px) / 4);
}
.skils-pins .header-three{
    margin-bottom: 8px;
}
.skils-pins .icons{
    display: flex;
    height: 112px;
    justify-content: center;
    align-items: center;
    background-color: #F4F4FD;
    border: 1px solid #8E8F99;
    border-radius: 4px;
    margin-bottom: 8px;
}
/*team*/
.team {
    background-color: #F4F4FD;
    padding: 120px 0;
}
.team .container {
    margin: 0 156px;
}
.team .header-two {
    margin-bottom: 72px;
}
.team .list {
    display: flex;
    gap: 24px;
    justify-content: center;
}
.card {
    width: calc((100% - 72px) / 4);
    background-color: #FFFFFF;
    text-align: center;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    box-shadow: 0px 1px 6px 0px rgba(46, 47, 66, 0.08),
                0px 1px 1px 0px rgba(46, 47, 66, 0.16),
                0px 2px 1px 0px rgba(46, 47, 66, 0.08);
}
.card-text{
    padding: 32px 0;
}
.card-text .header-three {
    margin-bottom: 8px;
}
.card-text .p-text {
    margin-bottom: 8px;
}
.card-text .list {
    display: flex;
    justify-content: center;
    gap: 24px;
}
.ns-logo{
    width: 40px;
    height: 40px;
}
.ns-logo .link{
    padding: 0 0;
    fill: #F4F4FD;
    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);
}

.ns-logo .link:focus,
.ns-logo .link:hover{
    background-color: #404BBF;
}
/*portfolio*/
.portfolio {
    padding: 120px 0;
}
.portfolio .container {
    margin: 0 156px;
}
.portfolio .header-two {
    margin-bottom: 72px;
}
.portfolio-pins {
    width: calc((100% - 48px) / 3);
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-pins:hover{
    box-shadow: 0px 1px 6px 0px rgba(46, 47, 66, 0.08),
                0px 1px 1px 0px rgba(46, 47, 66, 0.16),
                0px 2px 1px 0px rgba(46, 47, 66, 0.08);
}
.portfolio .list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 48px;
    column-gap: 24px;
}
.card-p-text {
    padding: 32px 16px;
    border-left: 1px solid #E7E9FC;
    border-bottom: 1px solid #E7E9FC;
    border-right: 1px solid #E7E9FC;
}
.card-p-text .header-three{
    margin-bottom: 8px;
}
.photo {
    overflow: hidden;
    position: relative;
}
.overlay{
    color: #F4F4FD;
    background-color: #4D5AE5;
    padding: 40px 32px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateY(100%);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-pins:hover .overlay{
    transform: translateY(0);
}
/*down-line*/

.down-line {
    background-color: #2E2F42;
    color: #F4F4FD;
    padding:100px 0;
}
.down-line .logo {
    display: inline-block;
    margin-bottom: 16px;
}
.down-line .container {
    display: flex;
    align-items: baseline;
}
.down-line-div:first-child {
    margin-right: 120px;
}
.down-line-div:nth-child(2) {
    margin-right: 80px;
}
.down-line .list{
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
}
.down-line .ns-logo .link:focus,
.down-line .ns-logo .link:focus,
.down-line .ns-logo .link:hover,
.down-line .ns-logo .link:hover{
    background-color: #31D0AA;
}
.down-line .p-text {
    margin: 0;
    max-width: 264px;
}
.m-text {
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
}
.footer-form {
    background-color: transparent;
    display: flex;
    gap: 24px;
    align-items: baseline;
}

.f-input {
    background-color: transparent;
    border: 1px solid #ffffff;
    border-radius: 4px;
    width: 264px;
    height: 40px;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
    padding-left: 16px;
    padding-bottom: 8px;
    padding-top: 8px;
    color: #ffffff;
    font-size: 12px;
    line-height: 2;
    letter-spacing: 0.04em
}
.f-input::placeholder{
    font-family: inherit;
    font-weight: 400;
    font-size: 12px;
    line-height: 200%;
    letter-spacing: 0.04em;
    color: #ffffff;

}
.footer-button {
    border-radius: 4px;
    padding: 8px 24px;
    width: 165px;
    height: 40px;
    background-color: #4D5AE5;
    font-weight: 500;
    font-size: 16px;
    line-height: 150%;
    letter-spacing: 0.04em;
    text-align: center;
    color: #ffffff;
    align-self: self-end;
    border: none;
    cursor: pointer;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 16px;
    line-height: 150%;
    letter-spacing: 0.04em;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 165px;
}
.button-icon {
    fill: #ffffff;
    margin-left: 16px;
}
.footer-button:hover,
.footer-button:focus{
    background-color: #404BBF;
}





.modal-overlay {
    background-color: rgba(46, 47, 66, 0.4);
    position: fixed;
    top: 0;
    left: 0;
    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);
}
.modal-overlay.is-open {
    opacity: 1;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1), visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #FCFCFC;
    border-radius: 4px;
    max-width: 408px;
    min-height: 584px;
    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);
    overflow-y: auto;
    padding: 72px 24px 24px 24px;
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-form {
    margin-bottom: 8px;
}
.modal-form:nth-child(4){
    margin-bottom: 16px;
}
.close-div{
    position: absolute;
    right: 24px;
    top: 24px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-color: #E7E9FC;
    height: 24px;
    width: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    cursor: pointer;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.close-icon {
    fill: #2E2F42;
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.close-div:hover .close-icon,
.close-div:focus .close-icon {
    fill: #ffffff;
}
.close-div:hover,
.close-div:focus{
    background-color: #404BBF;
    border: none;
}
.modal-text {
    font-family: inherit;
    font-weight: 500;
    font-size: 16px;
    line-height: 150%;
    letter-spacing: 0.02em;
    text-align: center;
    color: #2E2F42;
    margin-bottom: 16px;
}


.modal-label {
    display: block;
    margin-bottom: 4px;
    font-family: inherit;
    font-weight: 400;
    font-size: 12px;
    line-height: 117%;
    letter-spacing: 0.04em;
    color: #8E8F99;
}

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



.modal-comment-input {
    background-color: transparent;
    outline: transparent;
    display: block;
    border: 1px solid rgba(46, 47, 66, 0.4);
    border-radius: 4px;
    width: 100%;
    height: 120px;
    padding: 8px 16px;
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    font-weight: 400;
    font-size: 12px;
    line-height: 117%;
    letter-spacing: 0.04em;
    color: rgba(46, 47, 66, 0.4);
    resize: none;
}


.modal-input:focus-within,
.modal-comment-input:focus-within {
    border-color: #4D5AE5;
}
.modal-input:focus-within + .modal-icon{
    fill: #4D5AE5;
}
.modal-comment-input::placeholder{
    font-family: inherit;
    font-weight: 400;
    font-size: 12px;
    line-height: 117%;
    letter-spacing: 0.04em;
    color: rgba(46, 47, 66, 0.4);
}
.modal-div {
    position: relative;
    top: 0;
    left: 0;
}
.modal-icon {
    fill: #2E2F42;
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}


input[type="checkbox"] {
    border: 1px solid rgba(46, 47, 66, 0.4);
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

input[type="checkbox"]:checked {
    accent-color: #404BBF;
}
.modal-checkbox {
    margin-bottom: 24px;
}

.modal-label-checkbox {
    font-family: inherit;
    font-weight: 400;
    font-size: 12px;
    line-height: 117%;
    letter-spacing: 0.04em;
    color: #8E8F99;
}

.modal-link-policy {
    line-height: 133%;
    text-decoration: underline;
    text-decoration-skip-ink: none;
    color: #4D5AE5;
}

.checkbox-div {
    background-color: transparent;
    border-radius: 2px;
    border: 1px solid rgba(46, 47, 66, 0.4);
    height: 16px;
    width: 16px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    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);
    fill: transparent;
    margin-right: 8px;
}

.modal-checkbox-input:checked + .modal-label-checkbox .checkbox-div {
    background-color: #404bbf;
    border: none;
    fill: #F4F4FD
}

.modal-button {
    cursor: pointer;
    border: none;
    border-radius: 4px;
    padding: 16px 32px;
    min-width: 169px;
    height: 56px;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
    background-color: #4D5AE5;
    font-family: inherit;
    font-weight: 500;
    font-size: 16px;
    line-height: 150%;
    letter-spacing: 0.04em;
    text-align: center;
    color: #ffffff;
    display: block;
    margin: 0 auto;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-button:hover,
.modal-button:focus {
    background-color: #404BBF
}





