html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* основний текст #757575 */
/* другоряний колір #212121 */
/* білий #FFFFFF */
/* наведення #2196F3 */
/* адреса  rgba(255, 255, 255, 0.6)*/
/* фон  #E5E5E5*/
/* фон 2 #f5f4fa */
/* фон подвал #2f303a */
/* колір svg #afb1b8*/

:root {
  --primary-text-color: #757575;
  --title-text-color: #212121;
  --primary-white-color: #ffffff;
  --accent-color: #2196f3;
  --adres-text-color: rgba(255, 255, 255, 0.6);
  --background: #ffffff;
  --second-background: #f5f4fa;
  --footer-background: #2f303a;
  --animation: cubic-bezier(0.4, 0, 0.2, 1);
  --svg4: #afb1b8;
  --color4: currentColor;
  --color5: currentColor;
}

/* background-color */

body {
  color: var(--primary-text-color);
  background-color: var(--background);
  font-family: 'Roboto', sans-serif;
  font-weight: normal;
  font-size: 14px;
  line-height: 1.14;
  letter-spacing: 0.03em;
}
/*  */
a {
  text-decoration: none;
}
/*  */
.list {
  padding: 0;
  margin: 0;
  list-style: none;
}
/*  */
.current {
  color: var(--accent-color);
}
.current::after{
  content:"";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background-color: var(--accent-color);
}
/*  */
.container {
  margin-left: auto;
  margin-right: auto;
  width: 1200px;
  padding-left: 15px;
  padding-right: 15px;
}
/*  */
.site-nav {
  display: flex;
}
.site-nav .item + .item {
  margin-left: 50px;
}
.site-nav .item {
  position: relative;
  padding-top: 32px;
  padding-bottom: 32px;
}
/*  */
header {
  background-color: var(--primary-white-color);
  font-weight: 500;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #ececec;
}
.adres-nav {
  display: flex;
  margin-left: auto;
}
.adres-nav .item + .item {
  margin-left: 30px;
}
.adres-nav a {
  color: var(--primary-text-color);
}
.img-adres-nav{
  display: flex;
  justify-content: center;
  align-items: center;
}
.icon-adres-nav{
  margin-right: 10px;
}
/*  */
.title-nav {
  margin-right: 86px;
  font-family: Raleway;
  font-size: 26px;
  line-height: 1.19;
}
.main-nav {
  display: flex;
  align-items: center;
}
nav a {
  color: var(--title-text-color);
  transition: color 250ms var(--animation)
}
nav span {
  color: var(--accent-color);
}
/*  */
.site-nav a:hover,
.site-nav a:focus,
.adres-nav a:hover,
.adres-nav a:focus{
  color: var(--accent-color);
}
/*  */
.hero {
  align-items: center;
  text-align: center;
  padding-top: 200px;
  padding-bottom: 200px;
  max-width: 1600px;
  background-color: var(--primary-text-color);
  background-image: linear-gradient(
      to right,
      rgba(47, 48, 58, 0.8),
      rgba(47, 48, 58, 0.8)
    ),
    url(../images/header.jpg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  margin-left: auto;
  margin-right: auto;
}
.hero h1 {
  font-weight: 900;
  font-size: 44px;
  line-height: 1.36;
  text-align: center;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 0;
  margin-bottom: 46px;
}

h1 {
  color: var(--primary-white-color);
}
/*  */
.btn {
  display: inline-block;
  min-width: 136px;
  padding: 10px 32px;
  color: var(--primary-white-color);
  background-color: var(--accent-color);
  font-weight: bold;
  font-size: 16px;
  line-height: 1.87;
  letter-spacing: 0.06em;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

.button {
  margin-left: 12px;
  display: inline-block;
  padding: 10px 28px;
  border: 1px solid transparent;
  border-radius: 4px;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  text-align: center;
  color: var(--primary-white-color);
  background-color: var(--accent-color);
  font-weight: 900;
  font-size: 16px;
  line-height: 1.87;
  display: flex;
  align-items: center;
  text-align: center;
  letter-spacing: 0.06em;
}
.button::after {
  content: ' ';
  background-image: url(../images/portfolio-img/iconsend.svg);
  background-repeat: no-repeat;
  background-position: center;
  width: 24px;
  height: 24px;
  margin-left: 10px;
}
/*  */
.function {
  display: flex;
  align-items: center;
  padding-top: 94px;
  padding-bottom: 94px;
  border-bottom: 1px solid #ececec;
}
.function .item + .item {
  margin-left: 30px;
}
.function div {
  margin-bottom: 30px;
  background-color: var(--second-background);

  border-radius: 4px;
}
.img-function {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 270px;
  height: 120px;
}
.function h3 {
  margin: 0 0 10px;
  color: var(--title-text-color);
  font-weight: bold;
  text-transform: uppercase;
}
.function p {
  margin: 0;
  color: var(--primary-text-color);
  line-height: 1.71;
}
/*  */
.propose {
  display: flex;
}
.propose .item + .item {
  margin-left: 30px;
}
.propose a{
  position: relative;
}
.propose img,
.propose a {
  display: block;
}
.propose-main {
  padding-bottom: 94px;
  padding-top: 94px;
}
.propose-main h2 {
  margin-top: 0px;
  margin-bottom: 50px;
  color: var(--title-text-color);
  font-weight: bold;
  font-size: 36px;
  line-height: 1.17;
  text-align: center;
}
.propose-main h3 {
  margin: 0;
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 27px;
  color: var(--primary-white-color);
  background-color: rgba(47, 48, 58, 0.8);
  font-weight: bold;
  text-align: center;
  text-transform: uppercase;
  border-radius: 0px 0px 4px 4px;
}
/*  */
.us {
  display: flex;
}
.us .item + .item {
  margin-left: 30px;
}
.us .item {
  width: 270px;
  overflow: hidden;
  background-color: var(--primary-white-color);
  box-shadow: 0px 2px 1px rgba(0, 0, 0, 0.2), 0px 1px 1px rgba(0, 0, 0, 0.14),
    0px 1px 3px rgba(0, 0, 0, 0.12);
  border-radius: 4px;
}
.team {
  padding-top: 94px;
  padding-bottom: 94px;
  background-color: var(--second-background);
}
.team img{
  display: block;
}
.team h2 {
  margin-top: 0;
  margin-bottom: 50px;
  color: var(--title-text-color);
  font-weight: bold;
  font-size: 36px;
  line-height: 1.17;
  text-align: center;
}
.team h3 {
  margin: 0;
  padding-top: 30px;
  padding-bottom: 10px;
  color: var(--title-text-color);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.19;
  text-align: center;
}
.team p {
  margin: 0;
  padding-bottom: 16px;
  color: var(--primary-text-color);
  font-size: 16px;
  line-height: 1.19;
  text-align: center;
}
.social {
  display: flex;
  justify-content: center;
}

.social .item-link + .item-link {
  margin-left: 10px;
}
.us .social {
  padding-bottom: 24px;
}
.img-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--svg4);
  border-radius: 50%;
  transition: background-color 250ms var(--animation),
  color 250ms var(--animation);
  }
.img-social:hover,
.img-social:focus{
  background-color: var(--accent-color);
  color: var(--primary-white-color);
}
.icon-social{
  width: 20px;
  height: 20px;
}
/*  */
.client {
  display: flex;
  justify-content: center;
}
.client .item + .item {
  margin-left: 30px;
}
.img-client:hover,
.img-client:focus{
  border: 1px solid var(--accent-color);
  color: var(--accent-color); 
}
.img-client {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 170px;
  height: 90px;
  color: var(--svg4);
  border: 1px solid #afb1b8;
  border-radius: 4px;
  transition: border 250ms var(--animation),
  color 250ms var(--animation) ; 
}
.company {
  padding-top: 94px;
  padding-bottom: 94px;
  color: var(--title-text-color);
  font-weight: bold;
  font-size: 36px;
  line-height: 1.17;
  text-align: center;
}
.company h2 {
  margin-top: 0;
  margin-bottom: 50px;
}
/*  */

footer {
  color: var(--primary-white-color);
  background-color: var(--footer-background);
}
.logo-adress-main {
  display: flex;
}
.logo-adress {
  padding: 48px 69px 28px 0;
}
.connect {
  padding: 56px 0;
}
.title-footer {
  display: inline-block;
  padding-bottom: 10px;
  font-family: Raleway;
  font-weight: bold;
  font-size: 22px;
  line-height: 1.18;
}
.city,
.mail {
  display: inline-block;
  padding-bottom: 9px;
}

.web {
  color: var(--accent-color);
}

footer a {
  color: var(--primary-white-color);
}

address {
  font-family: Roboto;
  font-style: normal;
  font-weight: normal;
  font-size: 14px;
  line-height: 1.71;
  letter-spacing: 0.03em;
}
.join {
  display: flex;
}
.join .item-link + .item-link {
  margin-left: 10px;
}
.join .item-link {
  display: inline-block;
  width: 44px;
  height: 44px;
}
.join .img-join:hover,
.join .img-join:focus {
  background-color: var(--accent-color);
}
.img-join {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: background-color 250ms var(--animation);
}
.icon-join {
  width: 20px;
  height: 20px;
}

address a {
  color: var(--adres-text-color);
}
footer b {
  display: inline-block;
  padding-bottom: 21px;
  font-weight: bold;
  text-transform: uppercase;
}
.subscribe {
  align-items: center;
  margin-left: auto;
  padding-top: 56px;
  padding-bottom: 50px;
}
.input {
  display: flex;
  align-items: center;
}
input {
  background-color: var(--footer-background);
  color: rgba(255, 255, 255, 0.6);
  padding: 18px 58px 18px 12px;
  width: 358px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-sizing: border-box;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}
footer p {
  margin: 0;
  padding: 18px 0px 21px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--adres-text-color);
  font-size: 12px;
  line-height: 2;
  text-align: center;
}

/* css portfolio */
.menu {
  justify-content: center;
  display: flex;
  color: var(--title-text-color);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.62;
  text-align: center;
  padding-top: 94px;
  padding-bottom: 50px;
}
.menu .item + .item {
  margin-left: 8px;
}
.menu button {
  border: 1px solid transparent;
  padding: 6px 22px;
  background-color: var(--second-background);
  border-radius: 4px;
  transition: background-color 250ms var(--animation),
  color 250ms var(--animation), box-shadow 250ms var(--animation) ;
}
.menu button:hover,
.menu button:focus {
  color: var(--primary-white-color);
  background-color: var(--accent-color);
  box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.12), 0px 1px 2px rgba(0, 0, 0, 0.08),
  0px 3px 1px rgba(0, 0, 0, 0.1);
}
/*  */
.project {
  display: flex;
  flex-wrap: wrap;
}
.project .item {
  display: block;
  width: 370px;
  margin-right: 30px;
  margin-bottom: 30px;
  background: var(--primary-white-color);
  border: 1px solid #eeeeee;
  box-sizing: border-box;
  border-radius: 5px;
}

.card-img{
  position: relative;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}
.card-content {
  border-bottom-right-radius: 5px;
  border-bottom-left-radius: 5px;
}
.project .item:nth-child(3n) {
  margin-right: 0;
}
.project .item:nth-last-child(-n + 3) {
  margin-bottom: 0;
}
.project {
  padding-bottom: 94px;
}
.project .item{
  transition: box-shadow 250ms var(--animation);
}
.project .item:hover,
.project .item:focus{
  box-shadow: 1px 4px 6px rgba(0, 0, 0, 0.16), 0px 4px 4px rgba(0, 0, 0, 0.06),
  0px 1px 1px rgba(0, 0, 0, 0.12);
}
.project h3 {
  margin: 0;
  padding: 20px 24px 4px;
  color: var(--title-text-color);
  font-weight: bold;
  font-size: 18px;
  line-height: 2;
  letter-spacing: 0.06em;
}
.type-card {
  margin: 0;
  padding: 0px 24px 20px;
  color: var(--primary-text-color);
  font-size: 16px;
  line-height: 1.87;
}
.card-img{
  overflow: hidden;
}
.card-img::before{
  display: inline-block;
  content: "";
  position: absolute;
  background-color: rgba(33, 150, 243, 0.9);
}
.card-img-text {
  display: inline-block;
  position: absolute;
  font-size: 18px;
  line-height: 1.55;
  letter-spacing: 0.03em;
  color: var(--primary-white-color);
  padding: 63px 24px;
  margin: 0;
}
.card-img::before,
.card-img-text{
  left: 0;
  top: 0;
  width: 100%;
  height: 100%; 
  opacity: 0;
  transform: translateY(100%);
 transition: transform 250ms var(--animation),
 opacity 250ms var(--animation);
}
.project a:hover .card-img-text,
.project a:hover ::before,
.project a:focus .card-img-text,
.project a:focus ::before{
  transform: translateY(0);
  opacity: 1;
}
.project a,
.project img {
  display: block;
}
