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

/* task-1 */
#categories {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 24px;

  margin: 0;
  border-radius: 8px;
  padding: 24px;
  width: 440px;
  height: 888px;

  background: #fff;
}

.item {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 16px;

  border-radius: 8px;
  padding: 16px;
  width: 392px;
  height: 264px;

  background: #f6f6fe;
}

.item:first-child+.item {
  height: 216px;
}

.item:last-child {
  height: 312px;
}

.item>h2 {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.33;
  letter-spacing: 0.04em;
  color: #2e2f42;
  margin: 0;
}

.item>ul {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 8px;
  padding: 0;

  width: 360px;
  height: 184px;
}

.item>ul>li {
  border: 1px solid #808080;
  border-radius: 4px;
  width: 360px;
  height: 40px;

  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
  list-style-type: none;

  padding: 8px;
}


/* task-2 */
.gallery {
  width: 1440px;
  height: 848px;
  background: #fff;
  margin: 0;
  padding: 100px 156px;

  display: flex;
  flex-wrap: wrap;
  gap: 48px 24px;
  justify-content: center;
}

.gallery-item {
  width: calc((100% - 48px) / 3);
  list-style-type: none;
}

.item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* task-3 */
#name-input {
  padding-left: 16px;
  width: 360px;
  height: 40px;
  border-radius: 4px;
  border: 1px solid #808080;
  outline: none;
}

#name-input::placeholder {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
  font-family: "Montserrat", sans-serif;
}

h1 {
  margin: 16px 0;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.33333;
  letter-spacing: 0.04em;
  color: #2e2f42;
}


/* task-4 */
.login-form {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 8px;

  border-radius: 8px;
  padding: 24px;
  width: 408px;
  height: 256px;
  background: #fff;
}

.login-form label {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 8px;

  width: 360px;
  height: 72px;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  font-family: "Montserrat", sans-serif;
  letter-spacing: 0.04em;
}

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

.login-form label>input::placeholder {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: transparent;
}

.login-form label>input:hover {
  border-color: #000;
}

.login-form label>input:focus {
  border: 1px solid #808080;
}

.login-form label>input:focus::placeholder {
  color: #2e2f42;
}

.login-form button {
  border-radius: 8px;
  margin-top: 8px;
  padding: 8px 16px;
  width: 86px;
  height: 40px;
  border-color: #4e75ff;
  background-color: #4e75ff;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
}

.login-form button:hover {
  border-color: #6c8cff;
  background: #6c8cff;
}

/* task-5 */
.widget {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;

  border-radius: 8px;
  padding: 100px auto;
  width: 345px;
  height: 280px;
  background: #fff;
}

.widget p {
  margin: 0 auto;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
}

.change-color {
  border-radius: 8px;
  border-color: #4e75ff;
  padding: 8px 16px;
  width: 148px;
  height: 40px;
  background-color: #4e75ff;
  box-shadow: none;

  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
}

.change-color:hover {
  border-color: #6c8cff;
  background: #6c8cff;
}