body {
  font-family: 'Roboto', sans-serif;
  color: #434455;
  background-color: #fff;
}
/*  Reset some default styles*/
ul,
ol {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

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

img {
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
}

a {
  text-decoration: none;
}

p {
  margin: 0;
  padding: 0;
}

/* common styles */
.container {
  width: 100%;
  max-width: 1158px;
  margin: 0 auto;
  padding: 0 15px;
}
/* Header styles */
.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 {
  display: flex;
  align-items: center;
  margin-right: 76px;
  padding: 24px 0;
  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 .logo-part {
  color: #2e2f42;
}
.nav-list {
  display: flex;
}

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

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

.nav-link.current {
  position: relative;
}

.nav-link.current::after {
  content: '';
  position: absolute;
  left: 0;
  background-color: #404bbf;
  border-radius: 2px;
  bottom: -1px;
  width: 100%;
  height: 4px;
}

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

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

.contacts-item:not(:last-child) {
  margin-right: 40px;
}
.contacts-link {
  display: block;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  padding: 24px 0;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover,
.nav-link:focus,
.contacts-link:hover,
.contacts-link:focus,
.nav-link.current {
  color: #404bbf;
}
/* Hero section styles */

.hero {
  display: flex;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  background: #2e2f42;
  padding-top: 188px;
  padding-bottom: 188px;
  background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url('../images/people-office.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.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;
}
.hero-title {
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  text-align: center;
  color: #fff;
  max-width: 496px;
  margin: 0 auto;
  margin-bottom: 48px;
}

.hero-button {
  background: #4d5ae5;
  display: block;

  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  border-radius: 4px;
  padding: 16px 32px;
  min-width: 169px;
  height: 56px;
  border: none;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  margin-left: auto;
  margin-right: auto;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-button:hover,
.hero-button:focus {
  background-color: #404bbf;
}
/* Section with description */
.section-description {
  padding: 120px 0;
}
.description-icon {
  display: flex;
  border: 1px solid #8e8f99;
  border-radius: 4px;
  width: 264px;
  height: 112px;
  background-color: #f4f4fd;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

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

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

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

/* Section with team members */

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

.team-container {
  display: flex;
  flex-direction: column;
}

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

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

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

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

.social-icon {
  fill: #f4f4fd;
}

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

.social-item,
.social-item-footer {
  width: 40px;
  height: 40px;
}

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

.team-text {
  margin-bottom: 8px;
}

.team-item {
  background: #fff;
  border-radius: 0 0 4px 4px;
  padding: 0px 0px 32px 0px;
  width: 264px;
  height: 428px;
  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-list:first-child {
  width: calc((100% - 72px) / 4);
}

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

.team-text {
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
}

/* Section with portfolio items */
.section-portfolio {
  padding-top: 120px;
  padding-bottom: 120px;
}
.portfolio-container {
  display: flex;
  flex-direction: column;
}

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

.portfolio-item {
  width: calc((100% - 48px) / 3);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover,
.portfolio-item:focus {
  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-thumb {
  position: relative;
  overflow: hidden;
}

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

.overflow-text {
  position: absolute;
  top: 0;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  padding: 40px 32px;
  background-color: #4d5ae5;
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  width: 100%;
  transform: translateY(100%);
}

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

.portfolio-main-title {
  text-transform: capitalize;
  margin-bottom: 72px;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
}
.portfolio-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin-bottom: 8px;
}
.portfolio-text {
  line-height: 1.5;
  letter-spacing: 0.02em;
}
/* Page footer styles */
.page-footer {
  background-color: #2e2f42;
  padding: 100px 0;
}

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

.footer-logo-container {
  margin-right: 120px;
}
.footer-logo .logo-part {
  color: #f4f4fd;
}

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

.page-footer .logo {
  margin-right: 0;
  padding: 0;
}

.footer-text {
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  max-width: 264px;
}
.footer-list {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 16px;
}

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

.social-media-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.social-item-footer {
  width: 40px;
  height: 40px;
}

.social-item-footer .contacts-link {
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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