/**
 * Case Post Grid — yazı uzunluğundan bağımsız sabit kart yüksekliği (CSS).
 * Masonry kapalı (grid.js); iki ayrı widget/sütunda da aynı kurallar geçer.
 */

.pxl-blog-grid {
  --aimo-card-height: 200px;
}

.pxl-blog-grid .grid-sizer {
  display: none !important;
}

.pxl-blog-grid .pxl-grid-masonry.row {
  align-items: stretch;
}

.pxl-blog-grid .pxl-grid-item {
  display: flex;
  flex-direction: column;
}

/* Tüm layout’larda kart gövdesi: sabit yükseklik + taşan metin kısaltılır */
.pxl-blog-grid .pxl-post--inner {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: var(--aimo-card-height);
  max-height: var(--aimo-card-height);
  min-height: var(--aimo-card-height);
  overflow: hidden;
}

/* Başlık: en fazla 3 satır */
.pxl-blog-grid .pxl-post--title {
  overflow: hidden;
}

.pxl-blog-grid .pxl-post--title a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  word-break: break-word;
}

/* Özet: en fazla 4 satır */
.pxl-blog-grid .pxl-item--content {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
  word-break: break-word;
  flex-shrink: 0;
}

/* --- Layout 1 (görsel + başlık + meta) --- */
.pxl-blog-grid-layout1 .pxl-post--featured {
  flex: 0 0 auto;
  max-height: 42%;
  overflow: hidden;
  margin-bottom: 12px;
}

.pxl-blog-grid-layout1 .pxl-post--featured img {
  width: 100%;
  height: 100%;
  max-height: 75px;
  object-fit: cover;
}

.pxl-blog-grid-layout1 .pxl-post--meta {
  margin-top: auto;
  flex-shrink: 0;
}

/* --- Layout 2 (yatay: görsel + holder) --- */
.pxl-blog-grid-layout2 .pxl-post--inner {
  flex-direction: row !important;
  align-items: stretch !important;
  gap: 9px;
  padding: 9px 12px !important;
}

.pxl-blog-grid-layout2 .pxl-post--inner .pxl-post--featured {
  flex: 0 0 140px;
  width: 140px;
  max-width: 140px;
  min-height: 0;
  align-self: stretch;
  display: flex;
  margin-bottom: 0 !important;
}

.pxl-blog-grid-layout2 .pxl-post--inner .pxl-post--featured a {
  display: flex;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

.pxl-blog-grid-layout2 .pxl-post--inner .pxl-post--featured img {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  object-fit: cover;
  border-radius: 8px;
}

.pxl-blog-grid-layout2 .pxl-post--inner .pxl-holder {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}

/* Layout 2: başlık altı hover çizgisi (gradient underline) kapalı */
.pxl-blog-grid-layout2 .pxl-post--inner .pxl-post--title {
  display: block;
  background-image: none !important;
  background-size: 0 !important;
  transition: none;
}

.pxl-blog-grid-layout2 .pxl-post--inner:hover .pxl-post--title {
  background-size: 0 !important;
}

.pxl-blog-grid-layout2 .pxl-post--inner .pxl-post--meta {
  margin-top: auto;
  flex-shrink: 0;
}

/* --- Layout 3 --- */
.pxl-blog-grid-layout3 .pxl-post--featured {
  flex: 0 0 auto;
  max-height: 38%;
  overflow: hidden;
  margin-bottom: 12px;
}

.pxl-blog-grid-layout3 .pxl-post--featured img {
  width: 100%;
  object-fit: cover;
  max-height: 75px;
}

.pxl-blog-grid-layout3 .pxl-holder {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Küçük ekran: sabit yükseklik çok sıkışmasın */
@media (max-width: 767px) {
  .pxl-blog-grid {
    --aimo-card-height: auto;
  }

  .pxl-blog-grid .pxl-post--inner {
    height: auto;
    max-height: none;
    min-height: 150px;
  }

  .pxl-blog-grid-layout2 .pxl-post--inner {
    flex-direction: column !important;
  }

  .pxl-blog-grid-layout2 .pxl-post--inner .pxl-post--featured {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    max-height: 200px;
  }

  .pxl-blog-grid-layout2 .pxl-post--inner .pxl-post--featured img {
    max-height: 200px;
  }
}
