* {
  box-sizing: border-box;
}
body {
  font-family: "Roboto", sans-serif;
  color: #434455;
  background-color: #ffffff;
}
h1,
h2,
h3,
p {
  margin: 0;
}
a {
  text-decoration: none;
}
ul {
  list-style-type: none;
  margin: 0;
  padding-left: 0;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
.container {
  max-width: 1158px;
  padding: 0 15px;
  margin: 0 auto;
}
.main-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);
  background: #fff;
}
.header__container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-nav {
  display: flex;
  align-items: center;
}
.logo {
  font-family: Raleway, sans-serif;
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.17;
  color: #2e2f42;
}
.header-link {
  padding: 24px 0;
  margin-right: 76px;
}
.accent {
  color: #4d5ae5;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav-link {
  display: block;
  padding: 24px 0;
  font-weight: 500;
  font-size: 16px;
  color: #2e2f42;
  letter-spacing: 0.02em;
  line-height: 1.5;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.nav-link:hover,
.nav-link:focus {
  color: #404bbf;
}
.nav-link.active-link {
  color: #404bbf;
}
.nav-link.active-link::after {
  content: "";
  display: block;
  border-radius: 2px;
  width: 100%;
  height: 4px;
  background: #404bbf;
  position: absolute;
  bottom: -2px;
  left: 0;
}
.contact-address {
  font-style: normal;
  margin-left: auto;
}
.address-list {
  display: flex;
  align-items: center;
  gap: 40px;
}
.address-link {
  display: block;
  padding: 24px 0;
  font-size: 16px;
  letter-spacing: 0.02em;
  line-height: 1.5;
  color: #434455;
  font-style: normal;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.main-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-image:
    linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
    url(./../images/people-office.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-color: #2e2f42;
  padding: 188px 0 188px 0;
  max-width: 1440px;
  margin: 0 auto;
}
.main__container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 48px;
  margin: 0 auto;
}

.main-title {
  display: block;
  font-weight: 700;
  font-size: 56px;
  color: #ffffff;
  letter-spacing: 0.02em;
  line-height: 1.07;
  max-width: 496px;
  text-align: center;
}
.btn-hero {
  border: none;
  display: block;
  padding: 16px 32px;
  font-weight: 500;
  font-size: 16px;
  color: #ffffff;
  background-color: #4d5ae5;
  line-height: 1.5;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-hero:hover,
.btn-hero:focus {
  background-color: #404bbf;
}
.features-section,
.team-section,
.portfolio-section {
  padding-top: 120px;
  padding-bottom: 120px;
}

.features__container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 24px;
  width: 100%;
}
.icon-features {
  fill: #2e2f42;
}
.icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #8e8f99;
  border-radius: 4px;
  width: 264px;
  height: 112px;
  padding: 24px 100px;
  background: #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;
}

.section-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin: 0;
}
.section-list-item {
  width: calc((100% - 72px) / 4);
  max-width: 264px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: #ffffff;
}

.section-title {
  display: flex;
  flex-direction: column;
  font-weight: 700;
  font-size: 36px;
  color: #2e2f42;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
}

.subsection-title {
  display: flex;
  gap: 8px;
  font-weight: 500;
  font-size: 20px;
  color: #2e2f42;
  line-height: 1.2;
  letter-spacing: 0.02em;
}
.section-text {
  display: flex;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.team-section {
  background-color: #f4f4fd;
}
.team__container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 72px;
  width: 100%;
}

.features-section,
.portfolio-section {
  text-align: left;
}

.team-list-item {
  display: flex;
  width: 264px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 8px;
  background-color: #ffffff;
  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);
  border-radius: 0 0 4px 4px;
}
.team-box {
  padding: 32px 16px;
}
.team-box .subsection-title,
.team-box .section-text {
  justify-content: center;
  text-align: center;
}
.social-list {
  display: flex;
  justify-content: center;
  text-align: center;
  gap: 24px;
  list-style: none;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px;
  background-color: #4d5ae5;
  border-radius: 50%;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  padding: 12px;
  cursor: pointer;
}
.social-link:hover,
.social-link:focus {
  background-color: #404bbf;
}
.icon-team {
  display: flex;
  fill: #f4f4fd;
}
.portfolio__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 72px;
  width: 100%;
}
.portfolio-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  row-gap: 48px;
}
.portfolio-list-item {
  flex: 0 0 calc((100% - 48px) / 3);
  max-width: 360px;
  background-color: #ffffff;
  cursor: pointer;
  transition:
    box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1),
    background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-list-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);
  background: #fff;
}
.box {
  border: 1px solid #e7e9fc;
  border-top: none;
  padding: 32px 16px;
}
.box-overlay {
  position: relative;
  overflow: hidden;
}
.overlay-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  background: #4d5ae5;
  padding: 40px 32px;
}
.portfolio-list-item:hover .overlay-text {
  transform: translateY(0);
}
.site-footer {
  background-color: #2e2f42;
}
.footer-wrapper {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 120px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 100px 0;
}
.footer__container {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 16px;
  max-width: 256px;
}
.footer__container__social {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 16px;
  max-width: 208px;
}

.footer-link {
  color: #f4f4fd;
  font-family: Raleway, sans-serif;
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.17;
}
.footer-text {
  color: #f4f4fd;
  line-height: 1.5;
  letter-spacing: 0.02em;
  width: 264px;
}
.footer-social-title {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #fff;
}
.footer-social-list {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  text-align: center;
  list-style: none;
}
.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px;
  background-color: #4d5ae5;
  border-radius: 50%;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.icon-footer {
  display: flex;
  fill: #f4f4fd;
}

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