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

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

ul,
li {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

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

img {
  display: block;
}

/* 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;
}

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

.logo {
  font-family: Raleway, sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  color: #2e2f42;
  text-decoration: none;
  letter-spacing: 0.03em;
  font-size: 18px;
  line-height: 1.17;
}

span {
  color: #4d5ae5;
  text-decoration: none;
  display: inline-block;
}

.page-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

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

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

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

.page-nav .link-line:hover,
.page-nav .link-line:focus {
  color: #404bbf;
}
.page-nav .link-line:active {
  text-decoration: underline;
}

.address-list {
  margin-left: auto;
}
.contacts-list {
  display: flex;
  align-items: center;
  gap: 40px;
}

.contacts-link {
  display: block;
  padding: 24px 0;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.contacts-list .link {
  color: #434455;
  text-decoration: none;
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.contacts-list .link:hover,
.contacts-list .link:focus {
  color: #404bbf;
}

/* Main */

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

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

.hero-button {
  background-color: #4d5ae5;
  cursor: pointer;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  padding: 16px 32px;
  border: none;
  margin-top: 48px;
  border-radius: 4px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-button:hover,
.hero-button:focus {
  background-color: #404bbf;
}

/* Hidden "Our Features*/
.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-list */

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

.features {
  padding-top: 120px;
  padding-bottom: 120px;
}
.features-list {
  display: flex;
  gap: 24px;
}

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

.features-text {
  margin-top: 8px;
}

/* Team Section */
.team-container {
  padding: 120px 0;
}
.team-list {
  display: flex;
  gap: 24px;
  align-items: center;
}

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

.image-container {
  padding: 32px 16px;
}

.team-name {
  padding-bottom: 8px;
}

.team-section {
  background-color: #f4f4fd;
}

.team-section h2 {
  text-align: center;
  font-size: 36px;
  letter-spacing: 0.02em;
  line-height: 1.11;
}
.team-section ul li {
  background-color: #ffffff;
}
.team-section ul h3,
.team-section ul p {
  text-align: center;
}

.icon-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  border-radius: 50%;
  margin-top: 8px;
}

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

.icon-list .icon-item {
  width: 40px;
  height: 40px;
}

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

.social-icon-team {
  fill: #f4f4fd;
}
/* Portfolio */
.portfolio-container {
  padding: 120px 0;
}

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

.portfolio-text {
  position: absolute;
  top: 0;
  padding: 40px 32px 164px 32px;
  font-weight: 400;
  font-size: 16px;

  /* line-height: 24px; */
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  background-color: #4d5ae5;
  height: 100%;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.image-portfolio-wrap {
  position: relative;
  overflow: hidden;
}

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

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

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

.post-subtitle {
  padding-bottom: 72px;
  text-align: center;
  font-size: 36px;
  letter-spacing: 0.02em;
  line-height: 1.11;
  font-weight: 700;
}

.image-portfolio-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  border: 1px solid #e7e9fc;
  border-top: none;
  padding: 32px 16px;
}

/* Footer */

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

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

.footer-text {
  max-width: 264px;
}

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

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

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

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

.social-icon {
  fill: #f4f4fd;
}

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

.footer-media-text {
  font-weight: 500;
  font-size: 16px;

  /* line-height: 24px; */
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
  padding-bottom: 16px;
}

/* Global h and p */
h3 {
  color: #2e2f42;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}
h2 {
  color: #2e2f42;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11111;
  letter-spacing: 0.02em;
}

p {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
