:root {
  --h-color: #2e2f42;
  --paragraph-color: #434455;
  --accent-color: #4d5ae5;
  --background-color: #ffffff;
  --logo-color: #f4f4fd;
  --focus-color: #404bbf;
}

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

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

ul {
  margin: 0;
  padding: 0;
}

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

main {
  display: block;
  margin: 0;
  padding: 0;
  /* width: 100%; */
}

.container {
  width: 100%;
  max-width: 1440px;
  padding-left: 156px;
  padding-right: 156px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

body {
  font-family: "Roboto", sans-serif;
  background: var(--background-color);
  color: var(--paragraph-color);
  overflow-x: hidden;
  margin: 0;
}

address {
  font-style: normal;
}

button {
  all: unset;
  cursor: pointer;
  font: inherit;
  color: inherit;
  background-color: transparent;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(100%);
  white-space: nowrap;
  border: 0;
}

.section {
  padding-top: 120px;
  padding-bottom: 120px;
}

.list {
  list-style: none;
}

.link {
  text-decoration: none;
}

/* header*/

.flex-header {
  border-bottom: 1px solid #e7e9fc;
  background-color: var(--background-color);
}

/* Контейнер */
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 1158px;
  padding: 0 15px;
  margin: 0 auto;
}

/* Логотип */
.header-logo {
  display: inline-block;
  font-family: "Raleway", sans-serif;
  font-weight: bold;
  font-size: 18px;
  line-height: 1.17;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--accent-color);
  margin-right: 76px;
}

.header-logo-studio {
  font-family: "Raleway", sans-serif;
  font-weight: bold;
  font-size: 18px;
  text-transform: uppercase;
  line-height: 1.17;
  letter-spacing: 0.03em;
  color: var(--h-color);
}

/* Навігація */
.header-nav {
  display: flex;
  align-items: center;
}

/* Список навігації */
.header-list {
  display: flex;
  gap: 40px;
}

/* Пункти навігації */
.header-item {
  display: block;
}

/* Посилання */
.header-link {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--h-color);
  padding: 24px 0;
}

.header-link:hover,
.header-link:focus,
.header-link:active {
  color: var(--focus-color);
}

/* Адреса */
.header-address {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--paragraph-color);
  padding: 24px 0 24px 0;
}

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

.header-address:hover,
.header-address:focus {
  color: var(--focus-color);
}

/* hero*/

.hero {
  background: var(--h-color);
  text-align: center;
  padding: 188px 0 188px 0px;
}

.hero-title {
  max-width: 496px;
  font-weight: 700;
  font-size: 56px;
  line-height: 1.07;
  text-align: center;
  letter-spacing: 0.02em;
  color: var(--background-color);
  margin-bottom: 48px;
}

.hero-container {
  /* margin-left: 352px; */
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-btn {
  display: block;
  box-sizing: border-box;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--background-color);
  background: #4d5ae5;
  /* text-align: center; */
  min-width: 169px;
  height: 56px;
  padding: 16px 32px 16px 32px;
  border-radius: 4px;
  /* margin-left: 164px; */
}

.hero-btn:hover,
.hero-btn:focus {
  background: var(--focus-color);
}

/*advantage */

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

.advantage-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--h-color);
  margin-bottom: 8px;
}
.advantage-after-title {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--paragraph-color);
  max-width: 264px;
}

/*our_team*/

.our-team {
  background-color: var(--logo-color);
}

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

.our-team-title {
  font-weight: bold;
  font-size: 36px;
  line-height: 1.11;
  text-align: center;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  color: var(--h-color);
  margin-bottom: 72px;
}

.subtitle {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--h-color);
}
.after-title {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--paragraph-color);
}

.team-list {
  background-color: var(--background-color);
  border-radius: 0px 0px 4px 4px;
  box-shadow: 0px 2px 4px rgba(46, 47, 66, 0.08),
    0px 1px 1px rgba(46, 47, 66, 0.16);
}

.team-list img {
  display: block;
}

.team-card {
  text-align: center;
  padding: 32px 0 32px 0;
}

.subtitle {
  margin-bottom: 8px;
}

/* our portfolio */

.portfolio-list {
  display: flex;
  column-gap: 24px;
  flex-wrap: wrap;
  /* flex-direction: row; */
  /* justify-content: space-between; */
  /* flex-wrap: wrap; */
}

.portfolio-card {
  padding: 32px 16px;
  padding-bottom: 32px;
  border-bottom: 1px solid #e7e9fc;
  border-left: 1px solid #e7e9fc;
  border-right: 1px solid #e7e9fc;
}

.portfolio-item {
  background-color: var(--background-color);
  width: fit-content;
  margin-bottom: 48px;
}

.portfolio-item:nth-last-child(-n + 3) {
  margin-bottom: 0;
}

/*footer*/

.footer-logo {
  font-family: "Raleway", sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  display: inline-block;
  color: var(--accent-color);
  margin-bottom: 16px;
}

.footer-background {
  background: var(--h-color);
  padding: 100px 0 100px 0;
}

.footer-logo-studio {
  font-family: "Raleway", sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  color: var(--logo-color);
}

.footer-after-title {
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--logo-color);
  width: 264px;
}
