* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
}

main {
  background: var(--primary-color);
}

.blog__container {
  width: 100%;
  max-width: var(--max-content-width);
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  color: var(--third-color);
  font-family: var(--primary-font);
  padding: 10px 20px;
}

.blog__container h1 {
  font-size: 3rem;
  font-weight: bold;
}

.blog__container > p {
  font-size: 1.12rem;
}

.blog__post__header > a {
  text-decoration: none;
  color: unset;
}

.blog__posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
}

.blog__post {
  display: flex;
  flex-direction: column;
  --box-shadow-21-percent: #00000021;
  max-width: 450px;
  height: 100%;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  box-shadow: 0px 1px 17px var(--box-shadow-21-percent);
}

.blog__post__header {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog__post-image {
  border-radius: 10px 10px 0px 0px;
  overflow: hidden;
  max-height: 250px;
}

.blog__post-image img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: flex;
}

.blog__post__header h2 {
  font-size: 1.5rem;
  margin-left: 5px;
}

.blog__post__body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  background: var(--section-background-color);
}

.blog__post__date__user {
  display: flex;
  flex-direction: row;
  gap: 15px;
}

.cricle {
  width: 10px;
  height: 10px;
  background: var(--secondary-color);
  align-self: center;
  border-radius: 100%;
}

.blog__post__date,
.blog__post__user {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
}

.blog__post__date img,
.blog__post__user img {
  width: 24px;
  height: 24px;
  filter: invert(1);
}

.blog__post__date p,
.blog__post__user p {
  font-size: 1rem;
  font-weight: 400;
}

.blog__post__content p {
  font-size: 1rem;
  margin-top: 10px;
  min-height: 130px;
}

.blog__post__read__more {
  width: 100%;
  margin-top: 15px;
}

.blog__post__read__more a {
  display: inline-block;
  font-size: 1rem;
  color: var(--third-color);
  text-decoration: none;
  cursor: pointer;
  border: solid 1px var(--secondary-color);
  padding: 10px;
  padding-left: 15px;
  padding-right: 15px;
  border-radius: 10px;
  transition: transform 0.3s ease-in-out;
}

.blog__post__read__more a:hover {
  transition: transform 0.3s ease-in-out;
  transform: scale(1.1);
}

img,
figure > img {
  border-radius: 20px;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 768px) {
  .blog__posts {
    display: flex;
    flex-direction: column;
  }

  .blog__post__date__user {
    flex-direction: column;
  }

  .cricle {
    display: none;
  }

  .blog__container {
    width: auto;
  }

  .blog__post {
    width: 100%;
    height: auto;
  }

  .blog__container > h1 {
    margin-left: 10px;
    font-size: 1.5rem;
  }

  .blog__container > h2 {
    font-size: 1.5rem;
  }

  .blog__container > p {
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: calc(1.6 * -webkit-line-clamp);
    margin-left: 10px;
  }

  .blog__post__header > h2 {
    font-size: 1.25rem;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .blog__posts {
    grid-template-columns: unset;
    grid-template-rows: unset;
  }

  .blog__post-image img {
    height: 300px;
    object-fit: cover;
  }

  .blog__post {
    width: auto;
    height: auto;
  }
}

@media (min-width: 1201px) and (max-width: 1600px) {
  .blog__posts {
    grid-template-columns: repeat(2, 1fr);
    margin: auto;
  }
}
