/* #region Common */
body {
    font-family: 'Roboto', sans-serif;
    color: #434455;
    background-color: #fff;
}

img {
    display: block;
}

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

a {
    text-decoration: none;
}

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

h1 {
    font-size: 56px;
    line-height: 1.07;
    text-align: center;
    letter-spacing: 0.02em;
}

.container {
    max-width: 1158px;
    padding: 0 15px;
    margin: 0 auto;
}
/* #endregion */
/* #region Header */
.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;
}

.footer-logo .footer-logo-part {
    color: #f4f4fd;
}

.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;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 4px;
    background-color: #404BBF;
    border-radius: 2px;
}

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

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

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

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

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

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

.nav-list {
    display: flex;
    align-items: center;
    gap: 40px;
}
/* #endregion */
/* #region First section */
.first-section {
    padding: 188px 0;
    color: #FFFFFF;
    background-image: linear-gradient(rgba(46, 47, 66, 0.7),
                rgba(46, 47, 66, 0.7)),
            url(../images/background/background.jpg);
    max-width: 1440px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    margin: 0 auto;
}

.first-section-order-button {
    display: block;
    min-width: 169px;
    height: 56px;
    border: none;
    border-radius: 4px;
    background-color: #4D5AE5;
    color: #FFFFFF;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.first-section-order-button:hover,
.first-section-order-button:focus {
    background-color: #404BBF;
    letter-spacing: 0.04em;
}

.first-section-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.first-section-header {
    max-width: 496px;
    margin-bottom: 48px;
}
/* #endregion */
/* #region Second section */
.second-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;
}

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

.second-section-list {
    display: flex;
    gap: 24px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.second-section-element {
    width: calc((100% - 72px) / 4);
}

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

.second-section-paragraphs {
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #434455;
}
/* #endregion */
/* #region Third section */
.third-section {
    background-color: #F4F4FD;
    padding: 120px 0;
}

.third-section-header {
    margin-bottom: 72px;
    font-size: 36px;
    line-height: 1.11;
    text-align: center;
    letter-spacing: 0.02em;
    text-transform: capitalize;
    color: #2e2f42;
}

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

.third-section-list-item {
    background-color: #FFFFFF;
    width: calc((100% - 72px) / 4);
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 4px;
    
}

.container-name-title {
    padding: 32px 0;
}

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

.third-section-paragraph {
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    text-align: center;
}

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

.social-item {
    width: 40px;
    height: 40px;
}

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

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

.social-icon {
    fill: var(--icon-color, #f4f4fd);
}

.third-section-list-item:first-child {
    box-shadow:
        0px 1px 6px rgba(46, 47, 66, 0.08),
        0px 1px 1px rgba(46, 47, 66, 0.16),
        0px 2px 1px rgba(46, 47, 66, 0.08);
}
/* #endregion */
/* #region Fourth section */
.fourth-section {
    padding-top: 120px;
    padding-bottom: 120px;
}

.third-section-header {
    margin-bottom: 72px;
}

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

.fourth-section-list-item {
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.container-fourth-section-name {
    padding: 32px 16px;
    border: 1px solid #e7e9fc;
    border-top: none;
}

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

.fourth-section-paragraph {
    line-height: 1.5;
    letter-spacing: 0.02em;
}

.img-wrap {
    position: relative;
    overflow: hidden;
}

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

.fourth-section-list-item:hover {
    box-shadow: 0px 1px 6px rgba(46, 47, 66, 0.08),
        0px 1px 1px rgba(46, 47, 66, 0.16),
        0px 2px 1px rgba(46, 47, 66, 0.08);
}

.fourth-section-list-item:hover .overlay-text {
    transform: translateY(0%);
}
/* #endregion */
/* #region Footer */
.footer {
    background-color: #2e2f42;
    padding: 100px 0;
}

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

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

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

.social-media-text {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--white-color, #ffffff);
    margin-bottom: 16px;
}

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

.social-media-item {
    width: 40px;
    height: 40px;
}

.social-media-link {
    width: 100%;
    height: 100%;
    background-color: var(--icon-bg-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);
}

.social-media-link:hover,
.social-media-link:focus {
    background-color: #31d0aa;
}

.social-media-icon {
    fill: var(--icon-color, #f4f4fd);
}
/* #endregion */