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

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

body {
    font-family: "Roboto", sans-serif;
    font-weight: normal;
    font-size: 16px;
    color: #434455;
    line-height: 1.5;
}

a {
    text-decoration: none;
}

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


.logo {
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.17;
    color: #4d5ae5;
}

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

.logo-light {
    color: #f4f4fd;
}


.header {
    border-bottom: 1px solid #e7e9fc;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

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

.nav-link {
    position: relative;
    display: block;
    padding-top: 24px;
    padding-bottom: 24px;
    font-weight: 500;
    color: #2e2f42;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}


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

.address {
    font-style: normal;
}

.address-list {
    display: flex;
    gap: 40px;
}

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

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

.hero {
    max-width: 1440px;
    margin: 0 auto;
    padding-top: 188px;
    padding-bottom: 188px;
    text-align: center;
    background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
    url('../images/people-office 1.jpg');
}

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

.hero-btn {
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    padding: 16px 32px;
    font-weight: 500;
    color: #ffffff;
    background-color: #4d5ae5;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.section-title {
    margin-bottom: 72px;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.11;
    text-align: center;
    color: #2e2f42;
}

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

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

.advantages-title {
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 500;
    color: #2e2f42;
}

.team {
    background-color: #f4f4fd;
}

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

.team-item {
    background-color: #ffffff;
}

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

.team-name {
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.2;
    color: #2e2f42;
}

.team-role {
    margin-bottom: 8px;
}

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

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

.social-link:hover,
.social-link:focus,
.address-link:hover,
.address-link:focus,
.subscribe-btn:hover,
.subscribe-btn:focus,
.modal-close-btn:hover,
.modal-close-btn:focus,
.modal-submit-btn:hover,
.modal-submit-btn:focus {
    background-color: #404bbf;
}

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


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

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

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

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

.portfolio-title {
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 500;
    color: #2e2f42;
}

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

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

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

.footer-text {
    max-width: 264px;
    color: #f4f4fd;
}

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

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

.visually-hidden {
    position: absolute;
    overflow: hidden;
}

.footer-social {
    margin-left: 120px;
}

.footer-subscribe {
    margin-left: 80px;
}

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

.subscribe-input {
    width: 264px;
    height: 40px;
    color: #ffffff;
    border: 1px solid #ffffff;
    border-radius: 4px;
    background-color: transparent;
}

.subscribe-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 24px;
    color: #ffffff;
    background-color: #4d5ae5;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(46, 47, 66, 0.4);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: relative;
    width: 408px;
    min-height: 584px;
    background-color: #fcfcfc;
    border-radius: 4px;
    padding: 72px 24px 24px;
}

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

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

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

.modal-field-comment {
    margin-bottom: 16px;
}

.modal-label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: #8e8f99;
}

.modal-input-wrap {
    position: relative;
}

.modal-input {
    width: 100%;
    height: 40px;
    border: 1px solid rgba(46, 47, 66, 0.4);
    border-radius: 4px;
    padding-left: 38px;
}

.modal-input-icon {
    position: absolute;
    left: 16px;
    top: 30%;
}

.modal-textarea {
    width: 100%;
    height: 120px;
    border: 1px solid rgba(46, 47, 66, 0.4);
    border-radius: 4px;
    padding: 8px 16px;
}

.modal-input:focus,
.modal-textarea:focus {
    border-color: #4d5ae5;
}

.modal-checkbox-wrap {
    margin-bottom: 24px;
}

.modal-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #8e8f99;
    cursor: pointer;
}

.modal-policy-link {
    color: #4d5ae5;
}

.modal-submit-btn {
    display: block;
    margin: 0 auto;
    min-width: 169px;
    height: 56px;
    font-weight: 500;
    color: #ffffff;
    background-color: #4d5ae5;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
