/* ----- base styles ----*/
/* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
  */
body {
  font-family: 'Roboto', sans-serif;
  color: #434455;
  background-color: #ffffff;
}
ul,
ol {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}
a {
  text-decoration: none;
}

.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;
}
.container {
  max-width: 1158px;
  padding: 0 15px;
  margin: 0 auto;
}
.main-subtitle {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

.section-title {
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
}
/* ------ header -------*/
.page-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;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 40px;
}
.contacts-list {
  display: flex;
  align-items: center;
  gap: 40px;
}
.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 .logo-part {
  color: #2e2f42;
}
.nav-link {
  padding: 24px 0;
  display: block;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.contacts-link:hover,
.contacts-link:focus,
.nav-link:hover,
.nav-link:focus,
.nav-link.current {
  color: #404bbf;
}
.contacts {
  font-style: normal;
  margin-left: auto;
}
.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::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 4px;
  background-color: #404bbf;
  border-radius: 2px;
  opacity: 0;
}

.nav-link:hover::after,
.nav-link:focus::after,
.nav-link.current::after {
  opacity: 1;
}

/* ----- hero section -----*/
.hero-section {
  background-color: #2e2f42;
  padding: 188px 0;
  max-width: 1440px;
  margin: auto;
  background-image:
    linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
    url(../images/hero-section.jpg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
.hero-title {
  font-size: 56px;
  color: #fff;
  width: 496px;
  padding-bottom: 48px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.07;
}

.hero-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row;
  gap: 10px;
  border: none;
  border-radius: 4px;
  padding: 16px 32px;
  width: 169px;
  height: 56px;
  white-space: nowrap;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  font-weight: 500;
  font-size: 16px;
  background: #4d5ae5;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  cursor: pointer;
  margin: 0 auto;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-button:focus,
.hero-button:hover {
  background-color: #404bbf;
}
.hero-container {
  display: block;
  align-items: center;
}
/* ----- benefits section -----*/
.benefits-section {
  padding: 120px 0;
}
.features-context {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  width: calc((1128px - 72px) / 4);
}
.features-list {
  display: flex;
  align-items: center;
  gap: 24px;
}
.features-item {
  width: 264px;
}
.features-title {
  padding-bottom: 8px;
}

.benefits-icon {
  display: flex;
  align-items: center;
  align-content: center;
  justify-content: center;
  margin-bottom: 8px;
  border: 1px solid #8e8f99;
  border-radius: 4px;
  width: 264px;
  height: 112px;
  background: #f4f4fd;
}
/*------ team section ------*/
.team-list {
  display: flex;
  gap: 24px;
  flex-wrap: nowrap;
  align-items: center;
  flex-direction: row;
  align-content: center;
}

.team-section {
  background-color: #f4f4fd;
  padding: 120px 0;
  margin: auto;
}
.team-title {
  font-size: 36px;
  color: #2e2f42;
  padding-bottom: 72px;
  line-height: 1.11;
}

.team-context {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: #434455;
}

.team-item {
  display: flex;
  align-items: center;
  justify-content: center;
  align-content: center;
  flex-direction: column;
  border-radius: 0 0 4px 4px;
  width: calc((100% - 72px) / 4);
  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;
}
.team-photo {
  display: block;
}

.card-text {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 32px 16px;
}
.link-socials {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #4d5ae5;
  display: flex;
  align-content: center;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.link-socials:hover,
.link-socials:focus {
  background-color: #404bbf;
}

.icons {
  width: 16px;
  height: 16px;
  fill: #f4f4fd;
}

.social {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  align-content: center;
  text-decoration: none;
  line-height: 0;
  gap: 24px;
}

/* ---- portfolio section ----*/
.portfolio-section {
  padding: 120px 0;
}
.portfolio-title {
  font-size: 36px;
  color: #2e2f42;
  padding-bottom: 72px;
  line-height: 1.11;
}

.portfolio-context {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}

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

.inside-portfolio {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid #e7e9fc;
  border-left: 1px solid #e7e9fc;
  border-right: 1px solid #e7e9fc;
  padding: 32px 16px;
  width: 360px;
  height: 120px;
}
.portfolio-photo {
  display: block;
}
.portfolio-item {
  width: 360px;
  height: 420px;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-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-thumb {
  position: relative;
  overflow: hidden;
}

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

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

/* ------ footer section -----*/
.page-footer {
  background-color: #2e2f42;
  padding: 100px 0;
}
.footer-logo .logo-part {
  display: inline-block;
  color: #f4f4fd;
  height: 24px;
}

.footer-context {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  width: 264px;
}
.second-context {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #fff;
}
.second-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.first-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 264px;
}
.container.footer {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 120px;
}
.social.footer {
  gap: 16px;
}
.icons.footer {
  width: 24px;
  height: 24px;
}
.link-socials.footer {
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.link-socials.footer:hover,
.link-socials.footer:focus {
  background-color: #31d0aa;
}
