/*
  INDEX SAYFASI OZEL CSS
  Bu dosya ana sayfa ve arama sonucu (index context) icin kullanilir.
  Buradaki kurallar one cikan icerik, son eklenenler listesi/gridleri,
  liste arasi reklamlar, ana sayfa sayfalama ve mobil 2'li kart gorunumunu kontrol eder.
*/

/* Ana sayfadaki one cikan icerik blogu */
.page-index .hero-inline {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

/* One cikan gorsel ve yazilarin thumb kutulari */
.page-index .hero-inline__media,
.page-index .post-item__thumb {
  background: linear-gradient(135deg, #dbe7ee 0%, #ffffff 100%);
  border: 1px solid var(--line);
 
}

/* One cikan yazinin gorsel yuksekligi */
.page-index .hero-inline__media {
  min-height: 190px;
}

.page-index .hero-inline__content h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
}

.page-index .hero__text {
  font-size: 1rem;
}

/* Son eklenenler ana liste alani */
.page-index .posts {
  padding: 5px;
}

.page-index .post-list {
  display: block;
}

/* Yonetim panelinden secilen 3'lu / 4'lu grid gorunumu */
.page-index .post-list--grid3,
.page-index .post-list--grid4 {
  display: grid;
  gap: 16px;
  padding: 5px;
  box-sizing: border-box;
  margin-bottom: 10px;
}

/* Grid kartlarinin kolon sayilari */
.page-index .post-list--grid3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.page-index .post-list--grid4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Grid kart kutusu: kenarlik, radius, padding ve arka plan */
.page-index .post-list--grid3 .post-item,
.page-index .post-list--grid4 .post-item {
  display: block;
  border: 0px solid var(--line-soft);
  border-radius: 5px;
  padding: 0px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 250, 252, 0.95) 100%);
  align-content: start;
}

/* Grid kart gorsel alani */
.page-index .post-list--grid3 .post-item__thumb,
.page-index .post-list--grid4 .post-item__thumb {
  height: auto;
  min-height: 190px;
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: 3px; border: 0px;
}

/* Grid kart baslik/ozet/meta punto ayarlari */
.page-index .post-list--grid3 .post-item__body h3,
.page-index .post-list--grid4 .post-item__body h3 {
  font-size: 1.01rem; text-align: center;
  margin-bottom: 6px;
}

.page-index .post-list--grid3 .post-item__body p,
.page-index .post-list--grid4 .post-item__body p {
  font-size: 0.75rem;text-align: center;
  line-height: 1.5;
}

.page-index .post-list--grid3 .post-item .meta,
.page-index .post-list--grid4 .post-item .meta {
  font-size: 0.82rem;
  margin-bottom: 6px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 3.15em;
  line-height: 1.35;
  padding: 0 4px;
}

.page-index .post-list--grid3 .post-item:nth-child(6n+1) .meta,
.page-index .post-list--grid4 .post-item:nth-child(6n+1) .meta {
  color: #6c4a8a;
}

.page-index .post-list--grid3 .post-item:nth-child(6n+2) .meta,
.page-index .post-list--grid4 .post-item:nth-child(6n+2) .meta {
  color: #2f6f7b;
}

.page-index .post-list--grid3 .post-item:nth-child(6n+3) .meta,
.page-index .post-list--grid4 .post-item:nth-child(6n+3) .meta {
  color: #7a5a2f;
}

.page-index .post-list--grid3 .post-item:nth-child(6n+4) .meta,
.page-index .post-list--grid4 .post-item:nth-child(6n+4) .meta {
  color: #2f6a4f;
}

.page-index .post-list--grid3 .post-item:nth-child(6n+5) .meta,
.page-index .post-list--grid4 .post-item:nth-child(6n+5) .meta {
  color: #7a3f54;
}

.page-index .post-list--grid3 .post-item:nth-child(6n) .meta,
.page-index .post-list--grid4 .post-item:nth-child(6n) .meta {
    color: #355b86;
}

/* Tam kart tıklama davranışı: indeks kartının tamamı link gibi davranır. */
.page-index .post-item--clickable {
    cursor: pointer;
}

/* Normal liste gorunumunde sol gorsel + sag metin yerlesimi */
.page-index .post-list:not(.post-list--grid3):not(.post-list--grid4) .post-item {
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: start;
}

/* Normal liste gorunumundeki gorsel boyutu */
.page-index .post-list:not(.post-list--grid3):not(.post-list--grid4) .post-item__thumb {
  width: 270px;
  height: auto;
  min-height: 220px;
    
}

/* Her yazinin ana kart satiri */
.page-index .post-item {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 110px;
  gap: 12px;
  padding: 12px;
  align-items: center;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

/* Kart hover efekti */
.page-index .post-item:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(249, 252, 254, 0.96) 100%);
  box-shadow: 0 10px 24px rgba(23, 52, 71, 0.05);
  transform: translateY(-2px);
}

/* Tum yazı gorsellerinin dis kutusu */
.page-index .post-item__thumb {
  min-height: 98px;
  padding: 0px;
  overflow: hidden;
}

.page-index .post-item__body h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.page-index .post-item__meta {
  justify-content: space-between;
  align-items: flex-end;
  flex-direction: column;
}

/* Liste arasi reklam kutusu */
.page-index .content-ad {
  margin: 8px 8px 0;
  padding: 12px;
  border: 0px dashed var(--line-strong);
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 250, 252, 0.92) 100%);
  overflow: hidden;
}

/* Grid modunda reklam tam satiri kaplar */
.page-index .post-list--grid3 .content-ad,
.page-index .post-list--grid4 .content-ad {
  grid-column: 1 / -1;
  margin: 0;
}

/* Indeks besleme reklami her gorunumde yatay satir gibi dursun */
.page-index .content-ad--feed {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 72px;
  text-align: center;
}

.page-index .post-list--grid3 .content-ad--feed,
.page-index .post-list--grid4 .content-ad--feed,
.page-index .post-list--mobile-2 .content-ad--feed {
  grid-column: 1 / -1;
  width: 100%;
}

.page-index .content-ad iframe,
.page-index .content-ad ins {
  max-width: 100%;
}

/* Ana sayfa ve grid/liste gorsel netlik-renk ayari */
.page-index .hero-inline__media img,
.page-index .post-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: saturate(0.7) contrast(1.04) brightness(0.95);
  border-radius: 1px;
  background: #eef4f8;
}

/* Ana sayfa sayfalama alani */
.page-index .pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 8px;
  padding: 18px;
  border-top: 0px solid var(--line);
  background:
    radial-gradient(circle at top left, rgba(38, 87, 128, 0.08), transparent 36%),
    linear-gradient(180deg, #fbfdff 0%, #f3f8fb 100%);
}

.page-index .pagination__summary {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.page-index .pagination__track {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.page-index .pagination__link,
.page-index .pagination__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 700;
}

.page-index .pagination__link {
  border: 1px solid rgba(38, 87, 128, 0.16);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  box-shadow: 0 8px 18px rgba(23, 52, 71, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.page-index .pagination__link:hover {
  transform: translateY(-1px);
  border-color: rgba(38, 87, 128, 0.34);
  box-shadow: 0 12px 22px rgba(23, 52, 71, 0.1);
}

.page-index .pagination__link--active {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent) 0%, #d33d44 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(197, 28, 34, 0.22);
}

.page-index .pagination__link--nav {
  padding-inline: 20px;
}

.page-index .pagination__ellipsis {
  color: var(--muted);
}

.page-index .index-footer-widgets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line-soft);
  background: #fbfdff;
}

.page-index .index-footer-widgets__item {
  padding: 18px;
  border-right: 1px solid var(--line-soft);
}

.page-index .index-footer-widgets__item:last-child {
  border-right: 0;
}

/* Mobil ve tablet kirilimlari */
@media (max-width: 1200px) {
  .page-index .post-list:not(.post-list--grid3):not(.post-list--grid4) .post-item {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .page-index .post-list:not(.post-list--grid3):not(.post-list--grid4) .post-item__thumb {
    width: 250px;
    height: 184px;
    min-height: 184px;
  }
}

@media (max-width: 980px) {
  .page-index .hero-inline,
  .page-index .post-item {
    grid-template-columns: 1fr;
  }

  .page-index .post-item__meta {
    align-items: flex-start;
    flex-direction: row;
  }

  .page-index .post-list--grid3,
  .page-index .post-list--grid4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-index .index-footer-widgets {
    grid-template-columns: 1fr;
  }

  .page-index .index-footer-widgets__item {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .page-index .index-footer-widgets__item:last-child {
    border-bottom: 0;
  }

  .page-index .pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .page-index .pagination__summary {
    text-align: center;
  }

  .page-index .pagination__track {
    justify-content: center;
  }
}

@media (max-width: 900px) {
  .page-index .post-list:not(.post-list--grid3):not(.post-list--grid4) .post-item {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .page-index .post-list:not(.post-list--grid3):not(.post-list--grid4) .post-item__thumb {
    width: 200px;
    height: 148px;
    min-height: 148px;
  }
}

@media (max-width: 760px) {
  .page-index .hero-inline,
  .page-index .post-item {
    padding: 14px;
  }

  .page-index .post-list--grid3,
  .page-index .post-list--grid4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-index .post-list:not(.post-list--grid3):not(.post-list--grid4) .post-item {
    grid-template-columns: 1fr;
  }

  .page-index .post-list:not(.post-list--grid3):not(.post-list--grid4) .post-item__thumb {
    width: 100%;
    height: 170px;
    min-height: 170px;
  }

  .page-index .post-list--mobile-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 5px;
  }

  .page-index .post-list--mobile-2 .post-item {
    display: block;
    border: 1px solid var(--line-soft);
    border-radius: 5px;
    padding: 8px;
  }

  .page-index .post-list--mobile-2 .post-item__thumb {
    min-height: 110px;
    margin-bottom: 8px;
  }

  .page-index .post-list--mobile-2 .post-item__body h3 {
    font-size: 0.98rem;
    margin-bottom: 6px;
  }

  .page-index .post-list--mobile-2 .post-item__body p,
  .page-index .post-list--mobile-2 .post-item .meta {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .page-index .post-list--mobile-2 .content-ad {
    grid-column: 1 / -1;
    margin: 0;
  }
}
