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

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

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

a{
    text-decoration: none;
    color: inherit;
}

address{
    font-style: normal;
}

button {
    cursor: pointer;
}

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

/* Common */

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

.section {
    padding: 120px 0;
}

/* Header */

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

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

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

.contacts {
    margin-left: auto;
}

.contacts-list {
    display: flex;
    align-items: center;
    gap: 40px;
}

.link-contact {
    display: block;
    padding: 24px 0;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.link-contact:hover,
.link-contact:focus,
.nav-link:hover,
.nav-link:focus,
.nav-link.current {
    color: #404BBF;
}

.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: 24px 0;
    margin-right: 76px;
}

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

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

.nav-link.current  {
    position: relative;
}

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



/* Hero page */
.hero {
    max-width: 1440px;
    margin: 0 auto;
    background-image:
    linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
    url(../images/hero-image.jpg);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-color: #2E2F42;
    text-align: center;
    padding: 188px 0;
}


.hero-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 56px;
    line-height: 1.07;
    letter-spacing: 0.02em;
    max-width: 496px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btn {
    font-family: "Roboto", sans-serif;
    background-color: #4D5AE5;
    color: #ffffff;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
    border: none;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    padding: 16px 32px;
    border-radius: 4px;
    display: block;
    margin-top: 48px;
    margin-left: auto;
    margin-right: auto;
    min-width: 169px;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Features */
.features-title {
    color: #2E2F42;
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    letter-spacing: 0.02em;
  
}

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

.features-list-title {
    color: #2E2F42;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.features-text {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
}

.features-list{
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

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

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


/* Our team */
.our-team {
    background-color: #F4F4FD;
}

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

.team-list {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.team-card{
    background-color: #ffffff;
    border-radius: 0 0 4px 4px;
    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);
    flex-basis: calc((100% - 72px) / 4)
}

.team-info {
    padding: 32px 16px;
}

.team-card-title {
    color: #2E2F42;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-align: center;
    margin-bottom: 8px;
}

.team-card-text {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    text-align: center;
    margin-bottom: 8px;
}

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

.team-icon-container{
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: #4d5ae5;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-basis: calc((100% - 72px) / 4);
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.team-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    fill: #f4f4fd;  
}

.team-icon-container:hover,
.team-icon-container:focus {
    background-color: #404BBF;
}

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

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

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

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

.thumb {
    position: relative;
    margin: 0 auto;

    overflow: hidden;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #4D5AE5;
    color: #F4F4FD;
    padding: 40px 32px;

    transform: translateY(100%);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-text-box {
    border-bottom: 1px solid #E7E9FC;
    border-left: 1px solid #E7E9FC;
    border-right: 1px solid #E7E9FC;
    padding: 32px 16px;
}

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

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

.portfolio-card-text {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
}


/* Footer */
.foot {
    background-color: #2E2F42;
    padding: 100px 0;
}

.foot-cont {
    display: flex;
    align-items: baseline;
}

.footer-main-text {
    margin-right: 120px;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 16px;
}

.logo-footer-color {
    color: #F4F4FD;
}

.footer-text {
    color: #F4F4FD;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    max-width: 262px;
}

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

.footer-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: #4d5ae5;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-basis: calc((100% - 72px) / 4);
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    fill: #f4f4fd;
}

.footer-icon-container:hover,
.footer-icon-container:focus {
    background-color: #31D0AA;
}

.footer-link-text {
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 16px;
}

.footer-link-cont {
    margin-right: 80px;
}

/* .footer-form-container {
    display:inline-block;
    align-items: center;
    justify-content: center;
} */

.footer-form {
    display: flex;
    gap: 24px;
}

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

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

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

.footer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: none;
    padding: 8px 24px;
    min-width: 165px;
    height: 40px;
    background-color: #4D5AE5;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: #fff;
}

.icon-send {
    fill: #fff;
    margin-left: 16px;
}

/* Overlay */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(46, 47, 66, 0.4);
    z-index: 999;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    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;
    visibility: visible;
    pointer-events: auto;
}

.modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    flex-direction: column;
    background-color: #fcfcfc;
    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);
    border-radius: 4px;
    width: 408px;
    min-height: 584px;
    /* overflow: auto; */
    padding: 72px 24px 24px 24px;
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.form-close-btn:hover .icon-form-close,
.form-close-btn:focus .icon-form-close {
    fill: #ffffff;
}

.icon-form-close {
    fill: #2E2F42;
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-header {
    font-weight: 500;
    font-size: 16px;
    margin-bottom: 16px;
    color: #2e2f42;
    text-align: center; 
}

.form-element {
    margin-bottom: 8px;
}

.comment {
    margin-bottom: 16px;
}

.checkbox-field {
    margin-bottom: 24px;
}

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

.input-wrap {
    position: relative;
    
}

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

.form-textarea {
    border: none;
    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);
}

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

.form-element input:focus,
.form-element textarea:focus {
    border-color:#4D5AE5;
}

.form-input:focus+svg {
    fill: #4d5ae5;
}

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

.privacy-link {
    color: #4d5ae5;
    text-decoration: underline;
}

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

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

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

