/* Sekcja "Z naszego bloga" na stronie głównej - kafelki wpisów (data / tytuł / zajawka).
   Ładowana tylko na stronie głównej, po theme.css (patrz header.php). */

.home-blog {
  background-color: #F1ECE5;
  padding: 70px 0 80px;
  margin: 40px 0 0;
}

.home-blog__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

.home-blog__title {
  font-family: "PT Serif", serif;
  font-size: 42px;
  line-height: 1.2;
  font-weight: 400;
  color: #262E38;
  margin: 0;
}

.home-blog__title em {
  font-style: italic;
  color: #81784A;
}

.home-blog__all {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #81784A;
  transition: 0.2s;
}

.home-blog__all svg {
  flex: 0 0 auto;
  transition: transform 0.2s;
}

.home-blog__all:hover {
  color: #262E38;
}

.home-blog__all:hover svg {
  transform: translateX(4px);
}

.home-blog__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background-color: #FBF9F6;
  border: 1px solid #E3DBD0;
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.blog-card__image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #E7E0D6;
}

.blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.blog-card__body {
  display: flex;
  flex-direction: column;
  padding: 20px 20px 26px;
}

.blog-card__date {
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9C9478;
  margin-bottom: 12px;
}

.blog-card__title {
  font-family: "PT Serif", serif;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 400;
  color: #262E38;
  margin: 0 0 14px;
  transition: color 0.2s;

  /* maks. 3 wiersze - kafelki w rzędzie zachowują równy rytm */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__excerpt {
  font-size: 15px;
  line-height: 1.55;
  color: #6E6A66;
  margin: 0;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card:hover {
  border-color: #CFC3B2;
  box-shadow: 0 12px 28px rgba(38, 46, 56, 0.08);
  transform: translateY(-2px);
}

.blog-card:hover .blog-card__image img {
  transform: scale(1.04);
}

.blog-card:hover .blog-card__title {
  color: #81784A;
}

@media screen and (max-width: 1100px) {
  .home-blog {
    padding: 55px 0 60px;
  }

  .home-blog__title {
    font-size: 32px;
  }

  .home-blog__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 750px) {
  .home-blog__grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }
}

@media screen and (max-width: 600px) {
  .home-blog {
    padding: 40px 0 45px;
  }

  .home-blog__header {
    margin-bottom: 26px;
    gap: 16px;
  }

  .home-blog__title {
    font-size: 26px;
  }

  .home-blog__all {
    font-size: 12px;
    letter-spacing: 0.1em;
  }

  .blog-card__title {
    font-size: 20px;
  }
}
