*,
*::before,
*::after {
  box-sizing: border-box;
}

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

img {
  display: block;
  border: none;
}

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

button {
  cursor: pointer;
}

.head-box {
  border-bottom: 1px solid #e7e9fc;
  box-shadow: 0px 2px 1px rgba(46, 47, 66, 0.08), 0px 1px 1px rgba(46, 47, 66, 0.16), 0px 1px 6px rgba(46, 47, 66, 0.08);
}

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

.container {
  width: 1158px;
  margin: 0 auto;
  padding: 0 15px 0 15px;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-list {
  display: flex;
  gap: 40px;
}

.logo,
.logo-footer {
  text-decoration: none;
  color: #4d5ae5;
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-right: 76px;
}

.studio-logo {
  color: #2e2f42;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

li {
  list-style-type: none;
  font-family: "Roboto", sans-serif;
}

.list-item {
  text-decoration: none;
  color: #2e2f42;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  padding: 24px 0;
  display: block;
  position: relative;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:first-child a {
  color: #404bbf;
   transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:first-child a::after {
  content: "";
  width: 100%;
  height: 4px;
  background-color: #404bbf;
  position: absolute;
  left: 0;
  bottom: -1px;
  border-radius: 2px;
}

.list-item:hover,
.list-item:focus {
  color: #404bbf;
  text-decoration: none;
}

.list-item:hover::after {
  content: "";
  width: 100%;
  height: 4px;
  background-color: #404bbf;
  position: absolute;
  left: 0;
  bottom: -1px;
  border-radius: 2px;
}

.studio:active {
  color: #404bbf;
  text-decoration: underline;
}

.address {
  font-style: normal;
  display: flex;
}

.address-list {
  display: flex;
  gap: 40px;
}

.address-item {
  text-decoration: none;
  color: #434455;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  font-family: "Roboto", sans-serif;
  padding: 24px 0;
  position: relative;
  display: block;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.address-item:hover::after {
  content: "";
  width: 100%;
  height: 4px;
  background-color: #404bbf;
  position: absolute;
  left: 0;
  bottom: -1px;
  border-radius: 2px;
}

.address-item:hover,
.address-item:focus,
.address-item:active {
  color: #404bbf;
  text-decoration: none;
}

.main-screen {
  background-color: #2e2f42;
  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;
  max-width: 1440px;
  margin: 0 auto;
  padding: 188px 0;
}

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

.button {
  color: #ffffff;
  background-color: #4d5ae5;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  height: 56px;
  min-width: 169px;
  align-self: center;
  border-radius: 4px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  border: none;
  display: block;
  min-width: 169px;
  cursor: pointer;
  margin-right: auto;
  margin-left: auto;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

.about-us {
  padding: 120px 0;
}

.about-us-list {
  display: flex;
  justify-content: flex-start;
  gap: 24px;
}

.about-us-text {
  text-align: left;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

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

.about-us-block {
  border: 1px solid #8e8f99;
  border-radius: 4px;
  width: 264px;
  height: 112px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
  background-color: #f4f4fd;
}

.team-info {
  text-align: center;
  background-color: #f4f4fd;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 732px;
  padding: 120px 0;
}

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

.team-item {
  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;
  width: calc((100% - 72px) / 4);
}

.team-card-info {
  padding: 32px 0;
  background-color: #ffffff;
}

.name {
  text-align: center;
  margin-bottom: 8px;
}

.team-text {
  font-size: 16px;
  text-align: center;
  margin-bottom: 8px;
}

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

.card-social-list {
  display: flex;
  width: 100%;
  justify-content: center;
  gap: 24px;
}

.card-social {
  display: flex;
  justify-content: center;
  align-items: center;
  fill: #f4f4fd;
}

.social-container {
  background-color: #4d5ae5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

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

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

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

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

.card-top {
  position: relative;
  overflow: hidden;
}

.overlay-text{
 position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: #4d5ae5;
  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;
  padding: 40px 32px;
}

.portfolio-item:hover .card-top p {
  transform: translateY(0);
}

.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-item {
  width: calc((100% - 48px) / 3);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.portfolio-name {
  margin-bottom: 8px;
}

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

.logo-footer {
  display: inline-block;
}

.footer-info {
  font-family: "Roboto", sans-serif;
  text-align: left;
  color: #f4f4fd;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  flex-wrap: wrap;
  width: 264px;
}

.studio-footer {
  text-decoration: none;
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17%;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  justify-content: flex-start;
  color: #f4f4fd;
}

.footer-copy a {
  display: inline-block;
  margin-bottom: 16px;
  justify-content: flex-start;
}

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

.social-footer {
  display: inline-block;
}

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

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

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

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

.card-social-list-footer {
  gap: 16px;
  display: flex;
}

.card-social-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  fill: #f4f4fd;
}
