* {
  box-sizing: border-box;
}

body {
  margin: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #fafafa;
  color: #212121;
  line-height: 1.5;
}

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

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

/* ---- task1 ----- */
#categories {
  display: flex;
  flex-direction: column;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}

#categories .item {
  background-color: #f6f6fe;
  padding: 16px;
  border-radius: 8px;
  width: 392px;
}

#categories .item h2 {
  font-weight: 600;
  font-size: 24px;
  line-height: 1.33;
  letter-spacing: 0.04em;
  color: #2e2f42;
  margin-bottom: 16px;
}

#categories .item ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  padding: 0;
}

#categories .item ul li {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
  border: 1px solid #808080;
  border-radius: 4px;
  width: 360px;
  height: 40px;
  display: flex;
  align-items: center;
  padding-left: 16px;
}
/*------ task2----- */

.gallery {
display: flex;
flex-wrap: wrap;
gap: 48px 24px;
justify-content: center;
width: 100%;
}

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

}

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