/* HighFelt homepage post cards — matches blog.highfelt.com Son Yazılar */
/* px (not rem): Ease sets html { font-size: 62.5% } so rem ≠ live site 16px root */

/* Single post feature image — same radius as .hf-post-card-media */
.post-template .gh-article-image {
  overflow: hidden;
  border-radius: 15px;
}

.post-template .gh-article-image img {
  border-radius: 15px;
}

.home-template .site-content {
  padding-top: 0;
}

.hf-posts {
  --hf-posts-gap: max(20px, 5.5vw);
  --hf-posts-width: 1920px;
  --hf-posts-content: min(var(--hf-posts-width), 100% - var(--hf-posts-gap) * 2);
  --hf-font: "tiktoksans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hf-ink: #120b14;

  display: grid;
  width: 100%;
  grid-template-columns:
    [full-start] minmax(var(--hf-posts-gap), 1fr)
    [site-start] var(--hf-posts-content)
    [site-end] minmax(var(--hf-posts-gap), 1fr)
    [full-end];
  background: #fff;
  color: var(--hf-ink);
  font-family: var(--hf-font);
  box-sizing: border-box;
}

.hf-posts *,
.hf-posts *::before,
.hf-posts *::after {
  box-sizing: border-box;
}

.hf-posts-inner {
  grid-column: site;
  padding: 0 0 clamp(48px, 6vw, 96px);
}

.hf-posts-heading {
  margin: 0 0 16px;
  padding: 10px 0 0;
  border-top: 1px solid #ededed;
  font-family: var(--hf-font);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: normal;
  color: var(--hf-ink);
}

.hf-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 1.4vw, 24px);
}

.hf-post-card {
  position: relative;
  display: grid;
  gap: 13px;
  margin: 0;
  min-width: 0;
}

.hf-post-card-tag {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  display: inline-block;
  max-width: calc(100% - 24px);
  padding: 2px 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--hf-ink);
  font-family: var(--hf-font);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hf-post-card-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 15px;
  text-decoration: none;
  background: #f0f0f0;
  /* Matches blog.highfelt.com `.g-hover`: lift media 3px */
  transition: transform 0.3s ease;
}

.hf-post-card-media:hover,
.hf-post-card-media:focus-visible,
.hf-post-card:has(.hf-post-card-title a:focus-visible) .hf-post-card-media {
  transform: translateY(-3px);
}

.hf-post-card-img,
.hf-post-card-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
}

@media (prefers-reduced-motion: reduce) {
  .hf-post-card-media {
    transition: none;
  }

  .hf-post-card-media:hover,
  .hf-post-card-media:focus-visible,
  .hf-post-card:has(.hf-post-card-title a:focus-visible) .hf-post-card-media {
    transform: none;
  }
}

.hf-post-card-placeholder {
  background: linear-gradient(135deg, #ececec 0%, #d8d8d8 100%);
}

.hf-post-card-body {
  min-width: 0;
}

.hf-post-card-title {
  margin: 0;
  font-family: var(--hf-font);
  font-size: clamp(18px, 1.2vw, 22.4px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: normal;
  color: var(--hf-ink);
  word-break: break-word;
}

.hf-post-card-title a {
  color: inherit;
  text-decoration: none;
}

.hf-post-card-title a:hover {
  opacity: 0.72;
}

.hf-post-card-meta {
  margin-top: 6px;
  font-family: var(--hf-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--hf-ink);
}

.hf-post-card-author {
  display: inline-block;
  color: inherit;
  text-decoration: none;
}

.hf-post-card-author:hover {
  opacity: 0.72;
}

.hf-post-card-date {
  display: block;
  color: inherit;
}

.hf-posts-empty {
  margin: 0;
  grid-column: 1 / -1;
  font-family: var(--hf-font);
  font-size: 16px;
  color: #9a9a9a;
}

/* Tag archive header: title above line, subtitle below */
.hf-tag-header {
  margin: 0 0 20px;
}

.hf-tag-header .hf-posts-heading {
  margin: 0;
  padding: 0 0 12px;
  border-top: none;
  border-bottom: 1px solid #ededed;
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 600;
  line-height: 1.25;
}

.hf-tag-desc {
  margin: 12px 0 0;
  max-width: 36em;
  font-family: var(--hf-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #666;
}

/* Pagination inside Son Yazılar */
.hf-posts .pagination {
  margin-top: clamp(32px, 4vw, 56px);
}

@media (max-width: 1100px) {
  .hf-posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hf-posts-grid {
    grid-template-columns: 1fr;
  }

  .hf-posts-heading {
    font-size: 18px;
  }

  .hf-tag-header .hf-posts-heading {
    font-size: 22px;
  }

  .hf-post-card-title {
    font-size: 18px;
  }

  .hf-post-card-meta {
    font-size: 15px;
  }
}
