:root {
    --slate: #434455;
    --white-background: #ffffff;
    --white-color: #ffffff;
    --cornflower: #e7e9fc;
    --iris: #4d5ae5;
    --navyblue: #2e2f42;
    --cloud: #f4f4fd;
    --ocean: #404bbf;
    --success: #31d0aa;
}

/* region Common styles */
body {
    font-family: "Roboto", sans-serif;
    color: var(--slate);
    background-color: var(--white-background);
}

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

a {
    text-decoration: none;
}

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

img {
    display: block;
}

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

/* region Header */
.header {
    border-bottom: 1px solid var(--cornflower);
    border-bottom: 1px solid #e7e9fc;
    box-shadow: 0 2px 1px rgba(46, 47, 66, 0.08), 0 1px 1px rgba(46, 47, 66, 0.16), 0 1px 6px rgba(46, 47, 66, 0.08);
}
.container.header-container {
    display: flex;
    justify-content: space-between;
    max-width: 1158px;
}
.menu {
    display: flex;
    align-items: center;
}
.logo {
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    font-size: 18px;
    text-transform: uppercase;
    line-height: 1.17;
    letter-spacing: 0.03em;
    color: var(--iris);
    margin-right: 76px;
}
.logo-studio {
    color: var(--navyblue);
}
.logo, .logo-studio {
    padding: 24px 0;
}
.menu-nav {
    text-decoration: none;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-direction: row;
    gap: 40px;
    line-height: 1.5;
}
.menu-nav-item {
    color: var(--ocean)
}
.menu-nav-item:nth-child(1) .menu-nav-link::after {
    content: '';
    width: 100%;
    position: absolute;
    left: 0;
    bottom: -1px;
    height: 4px;
    background-color: var(--ocean);
    border-radius: 2px;
}
.menu-nav-link {
    display: block;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--navyblue);
    padding: 24px 0;
    position: relative;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.menu-nav-link:hover,
.menu-nav-link:focus {
    color: var(--ocean);
}
address {
    font-style: normal;
    line-height: 1.5;
    letter-spacing: 0.02em;
}
.contact-menu {
    display: flex;
    gap: 40px;
}
.contact-menu-item {
    padding: 24px 0;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.contact-menu-link {
    color: var(--slate);
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.contact-menu-link:hover,
.contact-menu-link:focus {
    color: var(--ocean);
}
/* endregion Header */

/* region Hero */
.hero {
    max-width: 1440px;
    margin: 0 auto;
    color: var(--white-background);
    background-color: var(--navyblue);
    background-image:
            linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
            url("../images/background-hero.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    border: 1px solid black;
    padding: 188px 0 188px;
}
.container.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero-slogan {
    font-weight: 700;
    font-size: 56px;
    line-height: 1.07;
    letter-spacing: 0.02em;
    text-align: center;
    margin-bottom: 48px;
    max-width: 496px;
}
.hero-button {
    font-family: inherit;
    font-weight: 500;
    font-size: 16px;
    color: white;
    background-color: var(--iris);
    line-height: 1.5;
    letter-spacing: 0.04em;
    cursor: pointer;
    min-width: 169px;
    height: 56px;
    padding: 16px 32px;
    border: none;
    border-radius: 4px;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-button:hover,
.hero-button:focus {
    background-color: var(--ocean);
}
/* endregion Hero */

/* region Feature */
.feature {
    color: var(--navyblue);
    padding: 120px 0 120px;
}
.feature-list {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}
.feature-heading {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}
.feature-list-item {
    display: flex;
    flex-direction: column;
    width: calc((100% - 24px * 3) / 4);
}
.icon-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    height: 112px;
    border: 1px solid #8E8F99;
    border-radius: 4px;
    background-color: var(--cloud);
}
.feature-text {
    color: var(--slate);
    line-height: 1.5;
    letter-spacing: 0.02em;
}
/* endregion Feature*/

/* region Team */
.team {
    background-color: var(--cloud);
    letter-spacing: 0.02em;
    padding: 120px 0 120px;
}
.container.team-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.team-heading {
    font-weight: 700;
    font-size: 36px;
    color: var(--navyblue);
    line-height: 1.11;
    letter-spacing: 0.02em;
    text-align: center;
    text-transform: capitalize;
    margin-bottom: 72px;
}
.team-cards {
    display: flex;
    gap: 24px;
    /*padding-bottom: 120px;*/
}
.team-card {
    background-color: var(--white-background);
    flex-basis: calc((100% - 3 * 24px) / 4);
    text-align: center;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 1px 6px rgba(46, 47, 66, 0.08),
        0 1px 1px rgba(46, 47, 66, 0.16),
        0 2px 1px rgba(46, 47, 66, 0.08);
}
.team-card-img {
    display: block;
    max-width: 100%;
    height: auto;
}
.team-card-description {
    padding: 32px 0;
}
.team-card-title {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: var(--navyblue);
    margin-bottom: 8px;
    text-align: center;
}
.team-card-text {
    line-height: 1.5;
    color: var(--slate);
    margin-top: 8px;
    text-align: center;
}
.team-socials {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 8px;
}
.team-socials-item {
    width: 40px;
    height: 40px;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.team-socials-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    /*color: var(--iris);*/
    background-color: var(--iris);
    border-radius: 50%;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.team-socials-link:hover,
.team-socials-link:focus {
    background-color: var(--ocean);
}
.team-socials-icon {
    fill: var(--cloud);
}
/* endregion Team */

/* region Portfolio */
.portfolio {
    padding: 120px 0 120px;
}
.container.portfolio-container {
    display: flex;
    flex-direction: column;
}
.portfolio-title {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    letter-spacing: 0.02em;
    color: var(--navyblue);
    text-align: center;
    text-transform: capitalize;
    margin-bottom: 72px;
}
.portfolio-cards {
    background-color: var(--white-background);
    display: flex;
    flex-wrap: wrap;
    row-gap: 48px;
    column-gap: 24px;
}
.portfolio-card {
    background-color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    width: calc((100% - 48px) / 3);
}
.portfolio-card:hover {
    box-shadow: 0 1px 6px rgba(46, 47, 66, 0.08),
    0 1px 1px rgba(46, 47, 66, 0.16), 0 2px 1px rgba(46, 47, 66, 0.08);
}
.portfolio-card:hover .portfolio-card-p {
    transform: translateY(0%);
}
.portfolio-card:nth-child(1) {
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-card-image-block {
    width: 360px;
    position: relative;
    overflow: hidden;
}
.portfolio-card-p {
    width: 100%;
    height: 100%;
    background-color: var(--iris);
    position: absolute;
    top: 0;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--cloud);
    padding: 40px 32px;
    transform: translateY(100%);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-card-description {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: start;
    flex-direction: column;
    gap: 8px;
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);

    border: 1px solid var(--cornflower);
    border-top: none;
    padding: 32px 16px;
}
.portfolio-card-description:hover {
    cursor: pointer;
    box-shadow: 0 1px 6px rgba(46, 47, 66, 0.08),
    0 1px 1px rgba(46, 47, 66, 0.16), 0 2px 1px rgba(46, 47, 66, 0.08);
}
.portfolio-card-title {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: var(--navyblue);
    padding-left: 16px;
    padding-top: 32px;
    margin-bottom: 8px;
}
.portfolio-card-text {
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--slate);
    padding-left: 16px;
}
.portfolio-card-img {
    display: block;
    max-width: 100%;
    height: auto;
}
/* endregion Portfolio */

/* region Footer */
.footer {
    background-color: var(--navyblue);
    padding: 100px 0 100px;
}
.footer-container {
    display: flex;
    align-items: baseline;
}
.footer-info {
    margin-right: 120px;
}
.footer-logo {
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.17;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--iris);
    margin-bottom: 16px;
    display: inline-block;
}
.footer-studio {
    color: var(--cloud);
    display: inline-block;
}
.footer-text {
    color: var(--cloud);
    line-height: 1.5;
    letter-spacing: 0.02em;
    width: 264px;
}
.footer-social-title {
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--white-color);
    margin-bottom: 16px;
}
.footer-social-title {
    color: var(--white-color);
}
.socials {
    display: flex;
    gap: 16px;
}
.socials-item {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--iris);
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.footer-socials-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 16px;
    height: 16px;
    fill: var(--cloud);
}
.footer-socials-link {
    display: flex;
    margin-bottom: 16px;
    width: 100%;
    height: 100%;
    background-color: var(--iris);
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.footer-socials-link:hover,
.footer-socials-link:focus {
    background-color: var(--success);
}
/* endregion Footer */
