:root {
  --main-title-color: #212121;
  --secondary-title-color: #757575;
  --main-text-color: #212121;
  --secondary-text-color: #757575;
  --accent-color: #2196f3;
  --tertiary-text-color: #ffffff;
  --background-color: #e5e5e5;
  --background-btn-color: #f5f4fa;
  --main-background-color: #ffffff;
  --project-gap: 30px;
  --container-gap: 94px;
}

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

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

ul {
  margin: 0;
  padding-left: 0;
}

body {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  letter-spacing: 0.03em;
  color: var(--main-title-color);
}

a {
  text-decoration: none;
}

button {
  border: none;
}

ul li {
  list-style: none;
}

.link {
  text-decoration: none;
}
button {
  border: none;
}

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

/* --------------------ЗАГАЛЬНІ КЛАСИ------------------*/

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
}

/* ----------------------ШАПКА САЙТУ--------------------*/

.header {
  padding-top: 24px;
  padding-bottom: 25px;
  background-color: var(--main-background-color);
  border: 1px solid #ececec;
}

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

.header-navigation {
  display: flex;
}

.logo {
  margin-right: 93px;
  font-family: Raleway, sans-serif;
  display: flex;
  font-weight: bold;
  font-size: 26px;
  line-height: 1.2;
  color: var(--accent-color);
}

.header-logo {
  color: var(--main-text-color);
}

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

.header-item:not(:last-child) {
  margin-right: 50px;
}

.header-link {
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: 0.02em;
  color: var(--main-text-color);
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  padding-top: 32px;
  padding-bottom: 32px;
}

.header-link:hover,
.header-link:focus,
.header-contact-link:hover,
.header-contact-link:focus {
  color: var(--accent-color);
}
.link-current {
  color: var(--accent-color);
  position: relative;
}

.link-current::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background-color: var(--accent-color);
  display: block;
  bottom: -1px;
}

.header-contacts-list {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.header-contacts-item:not(:last-child) {
  margin-right: 50px;
}

.header-contact-link {
  font-weight: 500;
  line-height: 1.14px;
  letter-spacing: 0.02em;
  color: var(--secondary-text-color);
  display: flex;
  align-items: center;
}

.contact-icon {
  margin-right: 10px;
  fill: currentColor;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-icon:hover,
.contact-icon:focus {
  fill: var(--accent-color);
}

/* ----------------------ГЕРОЙ--------------------*/

.hero {
  padding-top: 200px;
  padding-bottom: 200px;
  text-align: center;
  max-width: 1600px;
  margin: 0 auto;
  background-image: linear-gradient(
      to right,
      rgba(47, 48, 58, 0.4),
      rgba(47, 48, 58, 0.4)
    ),
    url(../images/hero.jpg);
  background-color: #c4c4c4;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.hero-title {
  margin: 0 auto;
  max-width: 696px;
  font-weight: 900;
  font-size: 44px;
  line-height: 1.36;
  text-align: center;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tertiary-text-color);
}

.hero-btn {
  margin-top: 30px;
  padding: 10px 32px;
  font-family: inherit;
  font-weight: bold;
  font-size: 16px;
  line-height: 1.87;
  text-align: center;
  letter-spacing: 0.06em;
  border-radius: 4px;
  color: var(--tertiary-text-color);
  background-color: var(--accent-color);
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-btn:hover,
.hero-btn:focus {
  background-color: #188ce8;
}
/* ----------------------ОСОБЛИВОСТІ--------------------*/

.features {
  padding-top: var(--container-gap);
  padding-bottom: var(--container-gap);
}

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

.features-list-item:not(:last-child) {
  margin-right: 30px;
}

.features-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
  width: 270px;
  height: 120px;
  background-color: var(--background-btn-color);
}

.icon-card {
  width: 70px;
  height: 70px;
}

.features-list-title {
  font-weight: bold;
  line-height: 1.14;
  text-transform: uppercase;
}

.features-list-text {
  margin-top: 10px;
  max-width: 270px;
  line-height: 1.71;
  color: var(--secondary-text-color);
}

/*------------------------ПРИКЛАДИ РОБІТ-----------------------*/

.products {
  padding-bottom: var(--container-gap);
  background-color: var(--main-background-color);
}

.products-title {
  font-weight: bold;
  font-size: 36px;
  line-height: 1.17;
  text-align: center;
}

.products-list {
  margin-top: 50px;
  display: flex;
  align-items: center;
  position: relative;
}

.products-list-item:not(:last-child) {
  margin-right: 30px;
}

.product-overlay {
  position: absolute;
  width: 370px;
  height: 70px;
  padding-top: 27px;
  padding-bottom: 27px;
  bottom: 0;
  background: rgba(47, 48, 58, 0.8);
  display: flex;
  text-align: center;
  justify-content: center;
}

.product-overlay-text {
  font-weight: bold;
  line-height: 1.14;
  text-align: center;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--tertiary-text-color);
}

/*--------------------------НАША КОМАНДА------------------------*/

.team {
  padding-top: var(--container-gap);
  padding-bottom: var(--container-gap);
  background-color: #f5f4fa;
}

.team-list {
  margin-top: 50px;
  display: flex;
  align-items: center;
}

.team-list-item {
  padding-bottom: 30px;
  background-color: var(--main-background-color);
  border-radius: 0px 0px 4px 4px;
  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);
}

.team-list-item:not(:last-child) {
  margin-right: 30px;
}

.team-title {
  font-weight: bold;
  font-size: 36px;
  line-height: 1.17;
  text-align: center;
}

.team-list-title {
  margin-top: 30px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.19;
  text-align: center;
}

.team-list-text {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.19;
  text-align: center;
  color: var(--secondary-text-color);
}

.team-social-networks {
  margin-top: 16px;
}

.networks-list {
  display: flex;
  justify-content: center;
}

.networks-item {
  width: 44px;
  height: 44px;
}

.networks-item + .networks-item {
  margin-left: 10px;
}

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

.networks-link:hover,
.networks-link:focus {
  background-color: var(--accent-color);
}

.social-icon {
  width: 20px;
  height: 20px;
  fill: #afb1b8;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.networks-link:hover .social-icon,
.networks-link:focus .social-icon {
  fill: var(--main-background-color);
}

/*------------------------ПОСТІЙНІ КЛІЄНТИ---------------------*/

.customers {
  padding-top: 94px;
  padding-bottom: 94px;
}

.customers-title {
  font-weight: bold;
  font-size: 36px;
  line-height: 1.17;
  text-align: center;
  letter-spacing: 0.03em;
  color: var(--main-title-color);
}

.customers-list {
  display: flex;
  justify-content: center;
  margin-top: 50px;
  text-align: center;
}

.customers-list-item {
  width: 170px;
  height: 92px;
  border: 1px solid #afb1b8;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.customers-list-item:hover,
.customers-list-item:focus {
  border: 1px solid var(--accent-color);
}

.customers-list-item + .customers-list-item {
  margin-left: 30px;
}

.customers-icon {
  width: 106px;
  height: 60px;
  fill: #afb1b8;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.customers-link {
  display: block;
  padding-top: 16px;
  padding-bottom: 16px;
  padding-left: 32px;
  padding-right: 32px;
}

.customers-link:hover .customers-icon,
.customers-link:focus .customers-icon {
  fill: var(--accent-color);
}

/*------------------------------ПІДВАЛ--------------------------*/

.footer {
  padding-top: 60px;
  padding-bottom: 60px;
  background-color: #2f303a;
}

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

.footer-left-container {
  margin-right: 70px;
}

.footer-logo {
  color: var(--tertiary-text-color);
}

.address-list {
  margin-top: 20px;
  line-height: 1.71;
}

.link {
  font-family: inherit;
  font-style: normal;
  font-weight: normal;
  line-height: 1.71;
}

.address-item-contact {
  margin-top: 9px;
}

.address-link {
  color: var(--tertiary-text-color);
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.address-link-contact {
  color: rgba(255, 255, 255, 0.6);
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.address-link:hover,
.address-link:focus,
.address-link-contact:hover,
.address-link-contact:focus {
  color: var(--accent-color);
}

.adress-social {
  font-weight: bold;
  font-size: 14px;
  line-height: 1.14;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #ffffff;
}

.footer-fill {
  fill: #ffffff;
}

.dark-bg {
  background: rgba(255, 255, 255, 0.1);
}

/*--------------------МОДАЛЬНЕ ВІКНО--------------------*/

.backdrop {
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.2);
  top: 0;
  position: fixed;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 250ms ease-in-out, visibility 250ms ease-in-out;
}

.backdrop.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.75);
}

.modal {
  position: relative;
  width: 528px;
  min-height: 581px;
  background-color: var(--main-background-color);
  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: 4px;
  transform: scale(1);
  transition: translate 250ms ease;
}

.button-close {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  right: 8px;
  top: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.button-close:hover,
.button-close:focus {
  fill: var(--accent-color);
}

.icone-close {
  height: 18px;
  width: 18px;
  fill: #000000;
}

/*----------------------ПОРТФОЛІО-----------------------*/

.filter {
  padding-top: var(--container-gap);
  padding-bottom: var(--container-gap);
}

.filter-item:not(:last-child) {
  margin-right: 8px;
}

.filter-list {
  margin-bottom: 50px;
  padding-left: 280px;
  display: flex;
}

.filter-btm {
  padding: 6px 22px 6px 22px;
  font-family: inherit;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.62;
  text-align: center;
  letter-spacing: 0.03em;
  color: var(--main-title-color);
  border-radius: 4px;
  background-color: var(--background-btn-color);
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btm:hover,
.filter-btm.focus {
  background-color: var(--accent-color);
  color: var(--tertiary-text-color);
  box-shadow: 0px 3px 1px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.08),
    0px 2px 2px rgba(0, 0, 0, 0.12);
}

.current {
  background-color: var(--accent-color);
  color: var(--tertiary-text-color);
}

.projects {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-left: calc(-1 * var(--project-gap));
  margin-top: calc(-1 * var(--project-gap));
}

.project-item {
  width: 370px;
  flex-basis: calc(100% / 3 - var(--project-gap));
  margin-left: var(--project-gap);
  margin-top: var(--project-gap);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.project-wrapper {
  position: relative;
  overflow: hidden;
}

.project-item:hover,
.project-item:focus {
  box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.12), 0px 4px 4px rgba(0, 0, 0, 0.06),
    1px 4px 6px rgba(0, 0, 0, 0.16);
}

.project-link:hover .project-overlay {
  transform: translateY(0);
}

.project-description {
  padding: 20px 24px;
  background: #ffffff;
  border-left: 1px solid #eeeeee;
  border-bottom: 1px solid #eeeeee;
  border-right: 1px solid #eeeeee;
}

.project-title {
  margin-bottom: 4px;
  font-weight: bold;
  font-size: 18px;
  line-height: 2;
  letter-spacing: 0.06em;
  color: var(--main-title-color);
}

.project-text {
  font-size: 16px;
  line-height: 1.87;
  color: var(--secondary-text-color);
}

.project-overlay {
  padding: 63px 24px;
  font-size: 18px;
  line-height: 1.56;
  letter-spacing: 0.03em;
  color: #ffffff;
  background-color: rgba(33, 150, 243, 0.9);
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  transform: translateY(101%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
