/* ========= BASE / RESET ========= */

body {
  font-family: "Roboto", sans-serif;
  color: #434455;
  background-color: #ffffff;
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
}

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

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

a {
  text-decoration: none;
}

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

/* ========= UTILITIES ========= */

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

/* ========= LAYOUT ========= */

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

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

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

/* ========= HEADER ========= */

.header {
  background-color: #ffffff;
  border-bottom: 1px solid #e7e9fc;
}

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

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

.logo span {
  color: #4d5ae5;
}

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

.nav-link {
  display: block;
  padding-top: 24px;
  padding-bottom: 24px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

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

.header-address {
  font-style: normal;
  margin-left: auto;
}

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

.address-link {
  display: block;
  padding-top: 24px;
  padding-bottom: 24px;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}

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

/* ========= HERO ========= */

.hero {
  background-color: #2e2f42;
  padding-top: 188px;
  padding-bottom: 188px;
}

.hero-title {
  max-width: 496px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 48px;

  color: #ffffff;
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  text-align: center;
}

/* B12: без фіксованої висоти (жодного height) */
.btn-primary {
  display: block;
  min-width: 169px;
  margin-left: auto;
  margin-right: auto;

  padding: 16px 32px;

  border: none;
  border-radius: 4px;

  background-color: #4d5ae5;
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  cursor: pointer;
}

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

/* ========= FEATURES ========= */

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

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

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

.features-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* ========= TEAM ========= */

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

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

.team-item {
  width: calc((100% - 72px) / 4);
  background-color: #ffffff;
  border-radius: 0 0 4px 4px;
  overflow: hidden;
}

.team-card {
  padding: 32px 16px;
}

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

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

.team-role {
  text-align: center;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* ========= PORTFOLIO ========= */

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

.portfolio-item {
  width: calc((100% - 48px) / 3);
  background-color: #ffffff;
}

.portfolio-card {
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none; /* B18 */
}

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

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

/* ========= FOOTER ========= */

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

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

  font-family: "Raleway", sans-serif;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  font-weight: 700;
  text-transform: uppercase;
  color: #f4f4fd;
}

.footer-logo span {
  color: #4d5ae5;
}

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