* {
  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;
}

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

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

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

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

button {
  border: none;
  background-color: transparent;
}

/* Task 1 */

#categories {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.item h2 {
  font-family: "Montserrat", sans-serif;

  font-weight: 600;
  font-size: 24px;

  line-height: 1.33;
  letter-spacing: 0.04em;
  color: #2e2f42;

  margin-bottom: 16px;
}

.item ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item ul > li {
  font-family: "Montserrat", sans-serif;

  font-weight: 400;
  font-size: 16px;

  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;

  border: 1px solid #808080;
  border-radius: 4px;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 16px;
}

/* Task 2 */

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

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

/* Task 3 */

.input {
  border: 1px solid #808080;
  border-radius: 4px;
  width: 360px;
  padding: 8px 16px;

  margin-bottom: 16px;
}

.input::placeholder {
  font-family: "Montserrat", sans-serif;

  font-weight: 400;
  font-size: 16px;

  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
}

.title {
  font-family: "Montserrat", sans-serif;

  font-weight: 600;
  font-size: 24px;

  line-height: 1.33;
  letter-spacing: 0.04em;
  color: #2e2f42;
}

/* Task 4 */

.login-form {
  display: flex;
  flex-direction: column;
}

.form-label {
  display: flex;
  flex-direction: column;
  font-family: "Montserrat", sans-serif;

  font-weight: 400;
  font-size: 16px;

  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
}

.form-input {
  border: 1px solid #808080;
  border-radius: 4px;
  width: 360px;
  height: 40px;
  padding-left: 16px;
}

.form-label:last-of-type {
  margin-bottom: 16px;
}

.login-form > button {
  border-radius: 8px;
  padding-block: 8px;
  padding-inline: 16px;
  width: 86px;
  background: #4e75ff;

  font-family: "Montserrat", sans-serif;

  font-weight: 500;
  font-size: 16px;

  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
}

/* Task 5 */

.widget {
  width: 345px;
  height: 280px;
  margin: 0 auto;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  background-color: #ffffff;
}

.widget p {
  font-family: "Montserrat", sans-serif;

  font-weight: 400;
  font-size: 16px;

  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
  margin-bottom: 16px;
}

.widget button {
  border-radius: 8px;
  padding-block: 8px;
  padding-inline: 16px;
  width: 148px;
  background: #4e75ff;

  font-family: "Montserrat", sans-serif;

  font-weight: 500;
  font-size: 16px;

  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
}
