/* common */

body {
  font-family: "Roboto", sans-serif;
  color: #434455;
  background-color: #ffffff;
}

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

a {
  text-decoration: none;
}

ul,
ol {
  list-style-type: none;
  margin: 0;
  padding: 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;
}

/* header */

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

.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-part {
  color: #2e2f42;
}

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

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

.header-nav-link {
  display: block;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
  padding: 24px 0;

  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.header-nav-link::after {
  position: absolute;
  left: 0;
  bottom: -1px;

  content: "";
  border-radius: 2px;
  width: 100%;
  height: 4px;
  background-color: transparent;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.header-nav-link.current::after {
  background-color: #404bbf;
}

.header-nav-link:hover::after,
.header-nav-link:focus::after {
  background-color: #404bbf;
}

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

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

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

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

/* hero section */

.hero-section {
  max-width: 1440px;
  margin: 0 auto;
  background-color: #2e2f42;
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/hero-section/hero-img.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  padding: 188px 0;
}

.hero-title {
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  text-align: center;
  color: #fff;
  max-width: 496px;
  margin: 0 auto 0 auto;
}

.hero-btn {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  background-color: #4d5ae5;
  display: block;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  height: 56px;
  min-width: 169px;
  margin: 48px auto 0 auto;

  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-btn:hover,
.hero-btn:focus {
  background-color: #404bbf;
}

/* benefits section */

.benefits-section {
  padding: 120px 0;
}

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

.benefits-item {
  width: calc((100% - 72px) / 4);
}

.benefits-item-icon-bg {
  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #8e8f99;
  border-radius: 4px;

  height: 112px;
  background-color: #f4f4fd;

  margin-bottom: 8px;
  position: relative;
}

.benefits-item-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

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

.benefits-item-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* team section */

.team-section {
  background-color: #f4f4fd;
  padding: 120px 0;
}

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

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

.team-card {
  padding: 32px 0;
}

.team-item {
  background-color: #ffffff;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 2px 1px 0 rgba(46, 47, 66, 0.08),
    0 1px 1px 0 rgba(46, 47, 66, 0.16), 0 1px 6px 0 rgba(46, 47, 66, 0.08);
  width: calc((100% - 72px) / 4);
}

.team-item-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;

  margin-bottom: 8px;
}

.team-item-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;

  margin-bottom: 8px;
}

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

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

.socials-item-circle {
  display: flex;
  align-items: center;
  justify-content: center;

  background-color: #4d5ae5;
  border-radius: 50%;
  width: 100%;
  height: 100%;

  position: relative;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.socials-item-circle:hover,
.socials-item-circle:focus {
  background-color: #404bbf;
}

.socials-item-icon {
  position: absolute;
  fill: #f4f4fd;
}

/* portfolio section */

.portfolio-section {
  padding: 120px 0;
}

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

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

.portfolio-card {
  border: 1px solid #e7e9fc;
  border-top: none;
  padding: 32px 16px;
}

.porftolio-item {
  width: calc((100% - 48px) / 3);

  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item-img-n-overlay {
  position: relative;
  overflow: hidden;
}

.portfolio-item-img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  background-color: #4d5ae5;

  padding: 40px 32px;

  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.porftolio-item:hover .portfolio-item-img-overlay {
  transform: translateY(0%);
}

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

.portfolio-item-img-overlay-text {
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;

  max-width: 296px;
  margin: 40px 32px 0 32px;
}

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

.portfolio-item-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* footer */

.page-footer {
  background-color: #2e2f42;
  padding: 100px 0;
}

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

.footer-slogan {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  width: 264px;
}

.logo-n-slogan {
  margin-right: 120px;
}

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

.footer-social-media {
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #fff;

  margin-bottom: 16px;
}

.footer-socials-list {
  gap: 16px;
}

.footer-socials-item-circle:hover,
.footer-socials-item-circle:focus {
  background-color: #31d0aa;
}
