body{
    font-family: "Roboto", sans-serif;
    color: #434455;
    background-color: #fff;
}

/* --------------------------RESET-------------------------- */

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

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

a{
    text-decoration: none;
}

/* --------------------------COMMON-------------------------- */

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

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

.section{
    padding: 120px 0;
}

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

/* --------------------------HEADER-------------------------- */

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

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

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

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

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

.nav-item {}

.nav-link {
    display: block;
    padding: 24px 0;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #2e2f42;
    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%;
    height: 4px;
    left: 0;
    bottom: -1px;
    background-color: #404bbf;
    border-radius: 2px;
}

.contacts {
    font-style: normal;
    margin-left: auto;
}

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

.contacts-item {}

.contacts-link {
    display: block;
    padding: 24px 0;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #434455;
    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;
}

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

.hero-title {
    max-width: 496px;
    margin-bottom:48px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 700;
    font-size: 56px;
    line-height: 1.08;
    letter-spacing: 0.02em;
    text-align: center;
    color: #fff;
}

.hero-btn {
    margin: 0 auto;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: #fff;
    background-color: #4d5ae5;
    cursor: pointer;
    display: block;
    border-radius: 4px;
    padding: 16px 32px;
    border: none;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* --------------------------FEATURES-------------------------- */

.features {}

.features-title {}

.features-list {
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.features-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #8e8f99;
    border-radius: 4px;
    margin-bottom: 8px;
    background-color: #f4f4fd;
    height: 112px;
}

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

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

/* --------------------------TEAM-------------------------- */

.team {
    background-color: #f4f4fd;
}

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

.team-list {
    display: flex;
    align-items: center;
    gap: 24px;
}

.team-item {
    width: calc((100% - 72px) / 4);
    background-color: #fff;
    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);
}

.team-img {}

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

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

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

.team-icons-list {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: center;
}

.icon-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: #4d5ae5;
    border-radius: 50%;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.social-icon {
    fill: #f4f4fd;
}

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

.portfolio {}

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

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

.portfolio-item {
    width: calc((100% - 48px) / 3);
    background-color: #fff;
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-img-wrapper{
    position: relative;
    overflow: hidden;
}

.portfolio-overlay-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateY(100%);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #4d5ae5;
    line-height: 1.5;
    font-size: 16px;
    letter-spacing: 0.02em;
    color: #f4f4fd;
    padding: 40px 32px;
}

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

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

.portfolio-img {}

.portfolio-info {
    padding: 32px 16px;
    border-bottom: 1px solid #e7e9fc;
    border-left: 1px solid #e7e9fc;
    border-right: 1px solid #e7e9fc;
}

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

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

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

.footer {
    background-color: #2e2f42;
    padding: 100px 0;
}

.footer-container {
    display:flex;
    /* justify-content: space-between; */
    align-items: flex-start;
}

.footer-wrapper {
    display:flex;
    gap: 120px;
    align-items: flex-start;
}

.footer-content {}

.footer-logo{
    display: inline-block;
    margin-bottom: 16px;
    padding: 1.5px 0;
}
.footer-logo .logo-part {
    color: #f4f4fd;
}

.footer-text {
    max-width: 264px;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #f4f4fd;
}

.footer-social-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

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

.footer-icons-list {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
}

.footer-icon-link:hover, .footer-icon-link:focus {
    background-color: #31d0aa;
}

.footer-input-content {
    margin-left: auto;
}

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

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

.footer-input {
    background-color: transparent;
    border: 1px solid #fff;
    border-radius: 4px;
    height: 40px;
    width: 264px;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
    padding: 8px 16px;
    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);
}

.footer-input::placeholder {
    font-size: 12px;
    line-height: 2;
    letter-spacing: 0.04em;
    color: #fff;
}

.footer-input:focus {
    border-color: #31d0aa;
}

.footer-btn { 
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    text-align: center;
    color: #fff;
    border-radius: 4px;
    padding: 8px 24px;
    background-color: #4d5ae5;
    cursor: pointer;
    display: flex;
    border: none;
    justify-content: center;
    gap: 16px;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-btn:hover,
.footer-btn:focus {
    background-color: #31d0aa;
}

.footer-btn-icon {
    fill: #fff;
}

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

.backdrop {
    position: fixed;
    top: 0;
    left: 0;

    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%;

    width: 408px;
    min-height: 584px;
    border-radius: 4px;
    padding: 24px;

    transform: translate(-50%, -50%);
    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;

    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.backdrop:not(.is-open) .modal {
    transform: translate(-50%, -100%);
}

.modal-close-btn {
    width: 24px;
    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;
    position: absolute;
    top: 24px;
    right: 24px;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.modal-close-btn:hover .modal-close-icon, .modal-close-btn:focus .modal-close-icon {
    fill: #fff;
}

.modal-title {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    text-align: center;
    color: #2e2f42; 
    margin-top: 48px;
    margin-bottom: 16px;
}

.modal-form {}

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

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

.input-wrapper {
    position: relative;
}

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

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

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

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

.form-textarea-field {
    margin-bottom: 16px;
}

.form-textarea {
    padding: 8px 16px;
    border: 1px solid rgba(46, 47, 66, 0.4);
    border-radius: 4px;
    outline: transparent;
    background-color: transparent;
    width: 100%;
    height: 120px;
    font-size: 14px;
    resize: none; 
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-textarea:focus {
    border-color: #4d5ae5;
}

.form-textarea::placeholder {
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: rgba(46, 47, 66, 0.4);
}

.form-policy-field {
    margin-bottom: 24px;
    width: 360px;
}

.form-checkbox {}

.form-checkbox-label {
    display: flex;
    align-items: center;
    position: relative;
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #8e8f99;
}

.form-checkbox-label a {
    text-decoration: underline;
    color: #4d5ae5;
    line-height: 1.33;
}

.form-checkbox-label span {
    width: 16px;
    height: 16px;
    border-radius: 2px;
    border: 1px solid rgba(46, 47, 66, 0.4);
    margin-right: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    fill: transparent;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-checkbox:checked+.form-checkbox-label span {
    background-color: #404bbf;
    border-radius: 2px;
    fill: #f4f4fd;
}

.form-checkbox-icon {}

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

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