@charset "UTF-8";

section.blog {
  margin: 70px auto 0 auto;
  width: 90%;
  max-width: 1200px;

  & > div:first-child {
    display: flex;
    align-items: center;
    justify-content: center;

    & > h1 {
      font-family: var(--font-title);
      font-weight: var(--title-weight);
      font-size: var(--title-size);
      color: var(--color-2);
      width: max-content;
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: center;

      &::after,
      &::before {
        content: "";
        display: flex;
        width: 80px;
        height: 2px;
        margin-inline: auto;
        margin-inline: 40px;
        background-color: var(--color-1);
      }
    }
  }
}

.post_botao {
  background-color: var(--color-2);
  color: var(--color-white);
  padding: 10px 20px;
  text-decoration: none;
  transition: 0.3s all ease-in-out;
  border-radius: 10px;
  &:hover {
    background-color: var(--color-1);
  }
}
.imagem_destaque > img {
  width: 100%;
  max-width: 550px;
  height: auto;
  border-radius: 20px;
  box-shadow: 0px 0px 10px #0002;
  object-fit: cover;
}

.post_container {
  margin: auto;
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

.post_content {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  box-shadow: 0px 0px 5px #0002;
  overflow: hidden;
  transition: 0.2s all ease-in-out;

  & > a {
    height: 200px;
    overflow: hidden;
    transition: 0.2s ease-in-out all;
    & > img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    &:hover {
      opacity: 0.8;
    }
  }

  & > div {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;

    & > h2 {
      text-transform: uppercase;
      color: var(--color-2);
      font-size: calc(var(--title-size) - 12px);
      display: -webkit-box;
      -webkit-line-clamp: 1;
      -webkit-box-orient: vertical;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    & > section {
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    & > div {
      display: flex;
      justify-content: space-between;
      font-size: 14px;
      margin-top: 10px;
      & > p {
        opacity: 0.7;
      }
      & > a {
        color: var(--color-2);
        text-decoration: none;
        &:hover {
          text-decoration: underline;
          color: var(--color-2);
        }
      }
    }
  }

  &:hover {
    box-shadow: 0px 0px 7px #0003;
  }
}

.button_blog {
  display: flex;
  align-items: center;
  justify-content: center;

  & > a {
    margin-block: 40px;
    text-decoration: none;

    & > button {
      color: var(--color-1);
      padding: 10px 20px 10px 30px;
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: transparent;
      border: 1px solid var(--color-1);
      border-radius: 10px;
      font-size: 20px;
      cursor: pointer;
      transition: 0.4s all ease-in-out;

      & > i {
        margin-left: 15px;
        font-size: 25px;
      }

      &:hover {
        background-color: var(--color-1);
        color: var(--color-white);
      }
    }
  }
}

/* Responsividade */
@media (max-width: 750px) {
  section.blog {
    padding: 0 16px;
  }

  .post_destaque {
    display: none;
  }

  .nl_title {
    font-size: 28px !important;
  }

  .post_container {
    grid-template-columns: minmax(0, 1fr);
  }
  .post_content {
    flex-direction: column;
    height: auto;
  }
  .post_content div {
    width: 100%;
    justify-content: center;
  }
  .post_content > a {
    height: 180px;
  }
  .post_content > a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .post_content > div {
    padding: 14px;
  }
  .post_content div h2 {
    order: 2;
    font-size: 22px;
  }
  .post_content div section {
    order: 3;
    & > p,
    a,
    h1,
    h2,
    h3,
    h4,
    h5 {
      font-size: 16px !important;
    }
  }
  .post_content div div {
    order: 1;
    flex-direction: column;
    width: 100%;
    margin: 0;
  }
  .post_content div div p {
    font-size: 14px;
  }
  .post_content div div a {
    display: none;
  }
}
