html {
    box-sizing: border-box;
}
*,
*::before,
*::after {
    box-sizing: inherit;
}
/* CSS custom properties */
:root {
    --primary-text-color: #212121;
    --title-text-color: #757575;
    --accent-color: #2196F3;
    --primary-white-color: #FFFFFF;
    --primary-black-color: #000000;
    --hero-bg-color: #2F303A;
    --section-team-bgcolor: #F5F4FA;
    --fotter-contact-color: rgba(255, 255, 255, 0.6);
}
body {
    font-family: Roboto, sans-serif;
    background-color: var(--primary-white-color);
    color: var(--primary-text-color);
    width: 1600px;
    margin: 0 auto;
}
.container {
    width: 1200px;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
}
/* special sheet for resetting */
.list {
    padding: 0;
    margin: 0;
    list-style: none;
}
/* Main-container */
.main-cont {
    display: flex;
}
.header {
    border-bottom: 1px solid #ECECEC;
}
/* logo studio */
.header-logo {
    font-family: Raleway;
    font-weight: 700;
    font-size: 26px;
    line-height: calc(31 / 26);
    color: var(--primary-black-color);
    text-decoration: none;
    letter-spacing: 0.03em;
    display: block;
    padding-top: 24px;
    padding-bottom: 25px;
}
.header-logo-color {
    color: var(--accent-color);
}
/* header-list */
.header-list {
    display: flex;
    margin-left: 93px;
}
.header-list .item:not(:last-child) {
    margin-right: 50px;
}
.header-list .header-link {
    color:var(--primary-text-color);
    font-size: 14px;
    font-weight: 500;
    line-height: calc(16 / 14);
    letter-spacing: 0.02em;
    text-decoration: none;
    display: block;
    padding-top: 32px;
    padding-bottom: 32px;
}
.header-list .header-link:hover, 
.header-list .header-link:focus {
    color: var(--accent-color);
}
.header-list .header-link.current {
    color: var(--accent-color);}

    /* contscts */
.contact {
    display: flex;
    margin-left: auto;
}
.contact .item + .item {
    margin-left: 50px;
}

.contact .mail {
    color: var(--title-text-color);
    font-size: 14px;
    font-weight: 500;
    line-height: calc(16 / 14);
    letter-spacing: 0.02em;
    text-decoration: none;
    display: block;
    padding-top: 32px;
    padding-bottom: 32px;
}   
.contact .mail:hover,
.contact .mail:focus {
    color: var(--accent-color);
}
.contact .tel {
    color: var(--title-text-color);
    font-size: 14px;
    font-weight: 500;
    line-height: calc(16 / 14);
    letter-spacing: 0.02em;
    text-decoration: none;
    display: block;
    padding-top: 32px;
    padding-bottom: 32px;
}
.contact .tel:hover,
.contact .tel:focus  {
    color: var(--accent-color);
}
/* Hero */
.hero {
    background-color: var(--hero-bg-color);
    text-align: center;
    display: block;
    text-transform: uppercase;
    padding-top: 200px;
    padding-bottom: 200px;
}
.hero-title {
    color: var(--primary-white-color);
    width: 696px;
    margin: 0 auto 30px;
    /* margin-bottom: 30px; */
    font-weight: 900;
    font-style: 400;
    font-size: 44px;
    line-height: calc(60 / 44);
    letter-spacing: 0.06em;
}
.button {
    background-color: var(--accent-color);
    color: var(--primary-white-color);
    border-color: var(--accent-color);
    
    font-family: Roboto, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: calc(30 / 16);
    letter-spacing: 0.06em;
    /* min-width: 216px; */
    text-align: center;
    
    display: inline-block;
    border-radius: 4px;
    border: 0;
    cursor: pointer;
    padding: 10px 24px;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
}
/* peculiarities */
.section-peculiarities {
padding-top: 94px;
padding-bottom: 94px;
}
.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;
}
.peculiarities {
    display: flex;
}
.item-peculiar:not(:last-child) {
    margin-right: 30px;
}

.title { 
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 14px; 
    line-height: calc(16 / 14);
    letter-spacing: 0.03em;
}
.text {
    margin-top: 0;
    margin-bottom: 0;
}
.peculiarities .title {
    font-size: 14px;
    font-weight: 700;
    line-height: calc(16 / 14);
    letter-spacing: 0.03em;
}
.peculiarities .text {
    color: var(--title-text-color);
    font-size: 14px;
    font-weight: 400;
    line-height: calc(24 / 14);
    letter-spacing: 0.03em;
}
/* work */
.section-work {
    padding-bottom: 94px;
}
.section-title {
    margin-top: 0;
    margin-bottom: 50px;
    font-weight: 700;
    font-size: 36px;
    line-height: calc(42 / 36);
    letter-spacing: 0.03em;
    text-align: center;
}
.work-list {
    display: flex;
}
.work-item:not(:last-child) {
    margin-right: 30px;
}
/* team */
.section-team {
    background-color: var(--section-team-bgcolor);
    padding-top: 94px;
    padding-bottom: 94px;
}
.team-list {
    display: flex;
}
.team-item:not(:last-child) {
    margin-right: 30px;
}
.team-list .team-item {
    background-color: var(--primary-white-color);}
.team-item {
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.12), 
    0px 1px 1px rgba(0, 0, 0, 0.14), 
    0px 2px 1px rgba(0, 0, 0, 0.2);
    border-radius: 0px 0px 4px 4px;
}
.team-list .title {
    font-size: 16px;
    font-weight: 500;
    line-height: calc(19 / 16);
    letter-spacing: 0.03em;
    text-align: center;
    margin-top: 30px;
    margin-bottom: 0;
}
.team-list .text {
    color: var(--title-text-color);
    font-size: 16px;
    font-weight: 400;
    line-height: calc(19 / 16);
    letter-spacing: 0.03em;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 30px;
}

/* basement */
.footer {
    background-color: var(--hero-bg-color);
    padding-top: 60px;
    padding-bottom: 60px;
}

.footer-logo {
    font-family: Raleway;
    font-weight: 700;
    font-size: 26px;
    line-height: calc(31 / 26);
    letter-spacing: 0.03em;
    color: var(--primary-white-color);
    text-decoration: none;
    display: inline-block;
}
.footer-logo-color {
    color: var(--accent-color);
}
.footer-add {
    font-style: normal;
}
/* contacs and map basement */
.contact-footer .maps {
    color: var(--primary-white-color);
    font-size: 14px;
    font-weight: 400;
    line-height: calc(24 / 14);
    letter-spacing: 0.03em;
    text-decoration: none;
    margin-top: 28px;
}
.footer-item .maps {
    display: inline-block;
}
.contact-footer .maps:hover,
.contact-footer .maps:focus {
    color: var(--accent-color);
}
.contact-footer .mail {
    color: var(--fotter-contact-color);
    font-size: 14px;
    font-weight: 400;
    line-height: calc(24 / 14);
    letter-spacing: 0.03em;
    text-decoration: none;
    margin-top: 12px;
}
.footer-item .mail {
    display: inline-block;

}
.contact-footer .mail:hover,
.contact-footer .mail:focus {
    color: var(--accent-color);
}
.contact-footer .tel {
    color: var(--fotter-contact-color);
    font-size: 14px;
    font-weight: 400;
    line-height: calc(24 / 14);
    letter-spacing: 0.03em;
    text-decoration: none;
    margin-top: 12px;
}
.footer-item .tel {
    display: inline-block;

}
.contact-footer .tel:hover,
.contact-footer .tel:focus {
    color: var(--accent-color);
}

/*  portfolio hero */
.buttons-list {
    display: flex;
    justify-content: center;
    margin-top: 100px;
}
.buttons-item:not(:last-child) {
    margin-right: 8px;
}
.buttons {
    background-color: var(--section-team-bgcolor);
    color: var(--primary-text-color);
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: calc(26 / 16);
    letter-spacing: 0.03em;
    border-radius: 4px;
    border: 0;
    border-color: var(--section-team-bgcolor);
    cursor: pointer;
    padding: 6px 22px;
}
.buttons:hover, 
.buttons:focus {
    background-color: var(--accent-color);
    color: var(--primary-white-color);
}
/* content section hero portfolio */
.content-list {
    display: flex;
    flex-wrap: wrap;
    padding-top: 56px;
    padding-bottom: 94px;
}
.content-item {
    width: 370px;
    margin-right: 30px;
    margin-bottom: 30px;
}
.cards-text {
    border-bottom: 1px solid #EEEEEE;
    border-left: 1px solid #EEEEEE;
    border-right: 1px solid #EEEEEE;
}
.content-item img {
    display: block;
}
/* Alternative */
/* .content-item {
    width: calc((100% - 60px) / 3); як вираховувати (calc ((100% - кількість марджинів у рядку * значення марджина) / кількість елементів у рядку)
    background-color: tomato;} */
/* .content-item:nth-child(3n) {
        margin-right: 0;
    } */
.content-item:nth-child(3n) {
    margin-right: 0;
}
.content-item:nth-last-child(-n + 3) {
    margin-bottom: 0;
}
/* Alternative */
/* .content-item:not(nth-child(3n)) {
    margin-right: 30px;
}
.content-item:not(nth-last-child(-n + 3)) {
    margin-bottom: 30px;
} */
.content-item .title {
    margin-bottom: 0;
}
.content-list .title {
    font-size: 18px;
    font-weight: 700;
    line-height: calc(36 / 18);
    letter-spacing: 0.06em;
    padding-top: 20px;
    padding-left: 24px;
    padding-right: 24px;
}
.content-list .text {
    color: var(--title-text-color);
    font-size: 16px;
    font-weight: 400;
    line-height: calc(30 / 16);
    letter-spacing: 0.03em;
    margin-top: 4px;
    margin-bottom: 20px;
    padding-left: 24px;
    padding-right: 24px;
}
