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

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin-top: 0;
  margin-bottom: 0;
}

h1 {
  font-weight: 700;
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 1.12px;
  text-align: center;
  color: #fff;
}

h2 {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.72px;
  text-align: center;
  color: #2e2f42;
}

h3 {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

p {
  letter-spacing: 0.02em;
  margin: 0;
}

a {
  text-decoration: none;
  color: #2e2f42;
}

ul,
ol {
  list-style-type: none;
  margin: 0 auto;
  padding-left: 0;
}

img {
  display: block;
  max-width: 100%;
}

section {
  padding: 120px 0 120px;
}

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

/* Header */

.page-header {
  border-bottom: 1px solid #e7e9fc;
}

.page-header .container {
  display: flex;
}

.main-nav {
  display: flex;
  align-items: center;
  margin-right: auto;
}

.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;
  margin-right: 76px;
}

.logo-part-studio {
  color: #2e2f42;
}

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

.link {
  display: block;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #2e2f42;
  padding: 24px 0;
}

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

.main-nav .link:active {
  text-decoration: underline;
}

.contact-info {
  display: flex;
  align-items: center;
  font-style: normal;
}

.contact-items {
  display: flex;
  gap: 40px;
}

.contact-info .contact-link {
  letter-spacing: 0.02em;
  color: #434455;
}

.contact-info .contact-link:focus,
.contact-info .contact-link:hover {
  letter-spacing: 0.02em;
  color: #404bbf;
}

/* Hero section */

.hero-section {
  background-color: #2e2f42;
  padding: 188px 0 188px;
  display: flex;
  flex-direction: column; /* Вирівнюємо елементи вертикально (заголовок і кнопка) */
  justify-content: center; /* Вирівнювання по вертикалі */
  align-items: center; /* Вирівнювання по горизонталі */
  text-align: center; /* Центрування тексту */
}

.hero-title {
  margin-bottom: 48px;
  max-width: 496px;
}

.hero-section .hero-button {
  font-family: 'Roboto', sans-serif;
  display: block;
  min-width: 169px;
  height: 56px;
  border: none;
  margin: 0 auto;
  border-radius: 4px;
  background-color: #4d5ae5;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  cursor: pointer;
  text-align: center; /* Текст всередині кнопки центрується */
}

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

/* Feature section */

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

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

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

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

/* Team section */

.team {
  background-color: #f4f4fd;
}

.team .team-member {
  background-color: #ffffff;
}

.team-title {
  text-transform: capitalize;
  margin-bottom: 72px;
}

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

.team-member {
  width: calc((100% - 72px) / 4);
  border-radius: 0 0 4px 4px;
}

.teammate-info {
  padding: 32px 0;
}

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

.teammate-role {
  text-align: center;
}

/* Portfolio section */

.portfolio-title {
  text-transform: capitalize;
  margin-bottom: 72px;
}

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

.portfolio-card {
  width: calc((100% - 48px) / 3);
}

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

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

/* Footer */

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

.site-footer .logo {
  display: inline-block;
  margin-bottom: 16px;
  text-align: left;
}

.site-footer .logo-part-studio {
  color: #f4f4fd;
}

.footer-description {
  max-width: 264px;
  color: #f4f4fd;
}
