* {
  box-sizing: border-box;
}

body {
  margin: 16px;
  font-family: 'Montserrat', 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 {
  margin: 0;
  padding: 0;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: cover;
}
a {
  text-decoration: none;
  color: inherit;
}
.task {
  display: inline-block;
  padding: 15px;
}
.task:hover,
.task:focus {
  color: blue;
  background-color: cyan;
}

/*-------------------------------------------Task-1-----------------------------------------*/
.link-back {
  display: inline-block;
  color: blue;
  margin-bottom: 30px;
  padding: 10px;
}
.link-back:hover,
.link-back:focus {
  background-color: cyan;
}
.top-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.item {
  background-color: #f6f6fe;
  padding: 16px;
  max-width: 392px;
}
.item-title {
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.33;
  letter-spacing: 0.04em;
  color: #2e2f42;
}
.inside-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.inside-item {
  border: 1px solid #808080;
  border-radius: 4px;
  padding: 8px 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
}

/*-------------------------------------------Task-2-----------------------------------------*/
.gallery {
  max-width: 1128px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
  row-gap: 48px;
}
.image {
  flex-basis: calc((100% - 48px) / 3);
}

/*-------------------------------------------Task-3-----------------------------------------*/
.name {
  background-color: transparent;
  border: 1px solid #808080;
  border-radius: 4px;
  width: 360px;
  height: 40px;
  padding: 8px 16px;
  margin-bottom: 16px;
  outline: none;
  transition: border-color 250ms ease-in-out;
}
.name:hover,
.name:focus {
  border-color: black;
}
.name::placeholder {
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
}
.name-title {
  font-weight: 600;
  font-size: 24px;
  line-height: 1.33;
  letter-spacing: 0.04em;
  color: #2e2f42;
}

/*-------------------------------------------Task-4-----------------------------------------*/
.login-form {
  max-width: 360px;
  display: flex;
  flex-direction: column;
}
.text-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.text-label:nth-child(1) {
  margin-bottom: 8px;
}
.text-label:nth-child(2) {
  margin-bottom: 16px;
}
.text-label span {
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
}
.text-label input {
  background-color: transparent;
  outline: none;
  border: 1px solid #808080;
  border-radius: 4px;
  min-height: 40px;
  padding: 8px 16px;
  transition: border-color 250ms ease-in-out;
}
.text-label input::placeholder {
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
}
.text-label input:hover {
  border-color: black;
}
.form-btn {
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  width: 86px;
  height: 40px;
  background: #4e75ff;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  transition: background-color 250ms ease-in-out;
}
.form-btn:hover,
.form-btn:focus {
  background-color: #6c8cff;
}

/*-------------------------------------------Task-5-----------------------------------------*/
.widget {
  width: 345px;
  height: 280px;
  background-color: #fff;
  margin: auto auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
}
.widget-text {
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #2e2f42;
}
.change-color {
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  width: 148px;
  height: 40px;
  background-color: #4e75ff;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  transition: background-color 250ms ease-in-out;
}
.change-color:hover,
.change-color:focus {
  background-color: #6c8cff;
}
