/* ================= GLOBAL STYLES ================= */
:root {
  --footer-text-color: #F4F4FD;
}

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

/* Resetting default margins and paddings */
h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

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

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

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

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

/* Section */
.section {
  padding: 120px 0;
}

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

/* ================= HEADER ================= */
.header {
  border-bottom: 1px solid #e7e9fc;
}

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

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

.logo-accent {
  color: #2e2f42;
}

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

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

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

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

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

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

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

/* ================= HERO SECTION ================= */
.hero {
  background-color: #2e2f42;
  padding: 188px 0;
}

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

.hero-button {
  display: block;
  min-width: 169px;
  height: 56px;
  border: none;
  background-color: #4d5ae5;
  border-radius: 4px;
  cursor: pointer;
  margin: 0 auto;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
}

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

/* ================= FEATURES SECTION ================= */
.features-list {
  display: flex;
  gap: 24px;
}

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

.features-title {
  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;
  color: #434455;
}

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

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

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

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

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

.team-name {
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
  text-align: center;
}

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

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

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

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

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

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

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

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

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

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

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