/* Estilos gerais */
a,
a:hover {
  text-decoration: none;
  transition: color 0.3s ease-in-out;
}

#pageHeaderTitle {
  margin: 2rem 0;
  text-transform: uppercase;
  text-align: center;
  font-size: 28px;
}

/* Cards */
.postcard {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 2rem 0;
  overflow: hidden;
  position: relative;
  justify-content: space-between;
}

.postcard__img-wrapper {
  flex: 2; /* 40% do espaço total */
  max-width: 40%; /* Limita o máximo de largura */
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 12px;
}

.postcard a {
  color: inherit;
}

.postcard h1,
.postcard .h1 {
  margin-bottom: 0.5rem;
  font-weight: 500;
  line-height: 1.2;
  font-size: 25px !important;
}

.postcard .small {
  font-size: 80%;
}

.postcard .postcard__title {
  font-size: 1.75rem;
}

.postcard__img {
  width: 100%;
  height: auto;
  border-radius: 0.3rem !important;
  object-fit: cover;
}

.postcard .postcard__content {
  display: contents;
}

.postcard .postcard__bar {
  width: 50px;
  height: 3px;
  margin: 10px 0;
  border-radius: 5px;
  background-color: #424242;
  transition: width 0.2s ease;
}

.postcard__text {
  flex: 3; /* 60% do espaço total */
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  max-width: 60%;
}

.postcard .postcard__text {
  padding: 6rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

.postcard .postcard__preview-txt {
  padding-top: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  height: 100%;
  font-size: 19px !important;
}

.postcard:hover .postcard__bar {
  width: 100px;
}

.learn-more{
  font-size: 16px;
}
.learn-more:hover {
  color: var(--bs-secondary-rgb);
  transition: color 0.3s ease-in-out;
}

/* Responsividade */
@media screen and (max-width: 768px) {
  /* Empilhar os elementos na vertical em dispositivos menores */
  .postcard {
    flex-direction: column; /* Imagem em cima, texto em baixo */
  }

  .postcard .postcard__text {
    padding: 3rem;
  }

  /* Ajuste do wrapper da imagem e texto */
  .postcard__img-wrapper,
  .postcard__text {
    flex: 1; /* Cada um ocupa 100% da largura */
    max-width: 100%;
  }

  .postcard__img {
    width: 100%;
    max-height: 200px;
  }

  /* Garantir que a imagem venha antes do texto em telas pequenas */
  .postcard__img-wrapper {
    order: 1; /* Imagem acima */
    padding-right: 0
  }

  .postcard__text {
    order: 2; /* Texto abaixo da imagem */
  }
}

/* Responsividade para telas maiores (acima de 769px) */
@media screen and (min-width: 769px) {
  .postcard {
    flex-wrap: inherit;
    flex-direction: row; /* Layout com a imagem e texto lado a lado */
  }

  .postcard__img-wrapper {
    flex: 0 0 40%; /* 40% de largura */
  }

  .postcard__text {
    flex: 1; /* 60% de largura */
    padding: 3rem;
  }

  .postcard__img {
    /*max-width: 320px;  Limita a largura da imagem */
    max-height: 250px; /* Limita a altura da imagem */
    transition: transform 0.3s ease;
    border-radius: 0.3rem !important;
  }

  .postcard:hover .postcard__img {
    transform: scale(1.05);
    border-radius: 0.3rem !important;
  }

  .postcard:nth-child(2n+1) {
    flex-direction: row;
  }

  .postcard:nth-child(2n+0) {
    flex-direction: row-reverse;
  }
}
