body {
  font-family: 'Roboto', sans-serif;
  color: #434455;
  min-width: 320px;
  overflow-x: hidden;
  line-height: 1.5;
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
}

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

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

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

a {
  text-decoration: none;
  color: currentColor;
}

.container {
  max-width: 1158px;
  padding-left: 15px;
  padding-right: 15px;
  margin-left: auto;
  margin-right: auto;
}

section {
  padding: 120px 0;
}

.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;
  justify-content: space-between;
}

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-menu-item:not(:last-child),
.header-contacts-item:not(:last-child) {
  margin-right: 40px;
}

.nav-menu-link {
  padding: 24px 0;
  display: block;
  font-family: 'Roboto', sans-serif;
  letter-spacing: 0.02em;
  font-weight: 500;
  color: #2e2f42;
  position: relative;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu-link::after {
  position: absolute;
  content: '';
  background-color: #404bbf;
  height: 4px;
  width: 100%;
  border-radius: 2px;
  bottom: -1px;
  left: 0;
  transform: scaleX(0);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu-link.is-active {
  color: #404bbf;
}

.nav-menu-link:hover,
.nav-menu-link:focus,
.header-contacts {
  font-style: normal;
  margin-left: auto;
}

.nav-menu-link:hover::after,
.nav-menu-link:focus::after,
.nav-menu-link.is-active::after {
  transform: scaleX(1);
}
.nav-menu-link. {
  color: #404bbf;
}

.nav {
  display: flex;
  align-items: center;
}

.header-logo-color {
  color: #2e2f42;
}

.header-contacts-link {
  letter-spacing: 0.02em;
  color: #434455;
  padding: 24px 0;
  display: block;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.header-logo {
  padding: 24px 0;
  margin-right: 76px;
}

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

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

.btn {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  cursor: pointer;
  background-color: #4d5ae5;
  border-radius: 4px;
  padding: 16px 32px;
  min-width: 169px;
  height: 56px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  border: none;
  transition: background-color 0.4s ease-in-out;
  display: block;
  margin: 0 auto;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

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

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

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

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

.features-icon {
  border: 1px solid #8e8f99;
  border-radius: 4px;
  width: 264px;
  height: 112px;
  background-color: #f4f4fd;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 100px;
}

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

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

.features-description {
  letter-spacing: 0.02em;
  color: #434455;
}

.team {
  background: #f4f4fd;
}

.team .section-title {
  margin-bottom: 72px;
}

.team-list {
  justify-content: center;
  display: flex;
  align-items: center;
  gap: 24px;
}

.team-item {
  background-color: #ffffff;
  display: block;
  border-radius: 0 0 4px 4px;
  max-width: calc((100% - 72px) / 4);
  width: 100%;
  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);
}

.team-item-content {
  text-align: center;
  padding: 32px 0 32px;
}

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

.team-description {
  letter-spacing: 0.02em;
  text-align: center;
}

.team-icons-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 24px;
  margin-top: 8px;
}

.team-icons-link {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  background-color: #4d5ae5;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.team-icon {
  fill: #f4f4fd;
}

.team-icons-link:hover,
.team-icons-link:focus {
  background-color: #404bbf;
  box-shadow: 0px 1px 6px rgba(46, 47, 66, 0.08),
    0px 1px 1px rgba(46, 47, 66, 0.16), 0px 2px 1px rgba(46, 47, 66, 0.08);
}

.portfolio-list {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 48px 24px;
}

.portfolio-item {
  max-width: 360px;
  cursor: pointer;
  width: 100%;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.overlay {
  color: #f4f4fd;
  top: 0;
  left: 0;
  font-family: sans-serif;
  position: absolute;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  padding: 40px 32px;
  width: 100%;
  height: 100%;
  background-color: #4d5ae5;
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.portfolio-active {
  overflow: hidden;
  position: relative;
  max-width: 360px;
  width: 100%;
  margin: 0 auto;
}

.portfolio-item-content {
  background-color: #ffffff;
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none;
  min-height: 120px;
}

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

.portfolio-description {
  letter-spacing: 0.02em;
  color: #434455;
}

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

.footer-text {
  color: #f4f4fd;
  letter-spacing: 0.02em;
  max-width: 264px;
}

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

.footer-info {
  margin-right: 120px;
}

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

.footer-social-text {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #fff;
  margin-bottom: 16px;
}

.footer-social-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  fill: white;
  background-color: #4d5ae5;
  transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-social-icon {
  fill: #f4f4fd;
}

.footer-social-link:hover,
.footer-social-link:focus {
  background-color: #31d0aa;
}
