/* ================== GLOBAL STYLES & RESETS ================== */
body {
  font-family: "Roboto", sans-serif;
  color: #434455;
  background-color: #ffffff;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

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

a {
  text-decoration: none;
  color: inherit;
}

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

/* ================== COMMON CLASSES ================== */
.container {
  max-width: 1158px; /* B8: Ширина контейнера відповідає макету */
  margin: 0 auto;
  padding: 0 15px;
}

.section {
  padding-top: 120px; /* B15: Загальні падінги для секцій */
  padding-bottom: 120px;
}

/* ================== HEADER ================== */
.page-header {
  border-bottom: 1px solid #e7e9fc; /* B13: Нижня рамка хедера */
}

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

.header-nav {
  display: flex;
  align-items: center;
}

.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-nav .logo {
  margin-right: 76px; /* B3: Вертикальний відступ між елементами */
}

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

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

.nav-link {
  display: block;
  padding: 24px 0; /* B4: Проміжок між рамкою батька і дитиною */
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

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

.contacts {
  font-style: normal;
}

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

.contacts-link {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}

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

/* ================== HERO SECTION ================== */
.effective-solutions {
  background: #2e2f42;
  padding: 188px 0;
  text-align: center;
}

.effective-solutions-text {
  max-width: 496px;
  margin: 0 auto 48px; /* B3: Вертикальний відступ */
  color: #ffffff;
  font-size: 56px;
  line-height: 1.07;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.btn {
  display: block;
  min-width: 169px;
  height: 56px;
  margin: 0 auto;
  padding: 16px 32px; /* B4: Проміжок між рамкою і контентом */
  border: none;
  border-radius: 4px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: #4d5ae5;
  color: #ffffff;
  cursor: pointer;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0.04em;
}

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

/* ================== BENEFITS SECTION ================== */
/* Падінги для цієї секції задані через загальний клас .section */
.benefits-scroll {
  display: flex;
  gap: 24px;
}

.benefits-item {
  flex-basis: calc((100% - 72px) / 4);
}

.benefits-list {
  margin-bottom: 8px; /* B3: Вертикальний відступ */
  color: #2e2f42;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.benefits-text {
  color: #434455;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* ================== TEAM SECTION ================== */
.team-section {
  background-color: #f4f4fd;
}

.team-page {
  margin-bottom: 72px; /* B3: Вертикальний відступ */
  color: #2e2f42;
  font-size: 36px;
  line-height: 1.11;
  text-align: center;
  text-transform: capitalize;
}

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

.team-list {
  flex-basis: calc((100% - 72px) / 4);
  background-color: #ffffff;
  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);
}

.card-content {
  padding-top: 32px;
  padding-bottom: 32px;
  text-align: center;
}

.team-name {
  margin-bottom: 8px; /* B3: Вертикальний відступ */
  color: #2e2f42;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.team-job-title {
  color: #434455;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* ================== PORTFOLIO SECTION ================== */
/* Падінги для цієї секції задані через загальний клас .section */
.potfolio-page {
  margin-bottom: 72px; /* B3: Вертикальний відступ */
  color: #2e2f42;
  font-size: 36px;
  line-height: 1.11;
  text-align: center;
  text-transform: capitalize;
}

.potfolio-scroll {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
  row-gap: 48px;
}

.potfolio-scroll > li {
  flex-basis: calc((100% - 48px) / 3);
}

.potfolio-content {
  padding: 32px 16px; /* B4: Проміжок між рамкою і контентом */
  border: 1px solid #e7e9fc; /* B16: Рамка для нижньої частини */
  border-top: none;
}

.portfolio-list {
  margin-bottom: 8px; /* B3: Вертикальний відступ */
  color: #2e2f42;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0.02em;
}

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

/* ================== FOOTER ================== */
.page-footer {
  background: #2e2f42;
  padding: 100px 0;
}

.page-footer .logo {
  display: inline-block;
  margin-bottom: 16px; /* B3: Вертикальний відступ */
}

.logo-part-too {
  color: #f4f4fd;
}

.page-footer-text {
  max-width: 264px;
  font-size: 16px;
  line-height: 1.5;
  color: #f4f4fd;
  letter-spacing: 0.02em;
}
