/* Home — ۳ ستون: بلاگ (راست) ، فید (وسط) ، بله (چپ) */
.home-grid-wrap {
  max-width: 1480px;
  margin: 18px auto 0;
  padding: 0 14px;
}

.home-grid-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}
.home-grid-toolbar .tlbl {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  margin-inline-end: 6px;
}
.home-grid-toolbar .chip-sort {
  font-size: 12px;
  padding: 6px 12px;
}

.home-grid {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr;
  gap: 16px;
  align-items: start;
}

.home-col {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  min-width: 0;
}
.home-col-head {
  padding: 12px 14px 10px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}
.home-col-head h2 {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 800;
  color: var(--site-primary, #1e3a5f);
}
.home-col-head p {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}
.home-col-head .ad-only {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 6px;
  background: #fef3c7;
  color: #92400e;
}
.home-col-body {
  max-height: 78vh;
  overflow-y: auto;
}
.home-col-body::-webkit-scrollbar { width: 8px; }
.home-col-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }

@media (max-width: 1100px) {
  .home-grid {
    grid-template-columns: 1fr 1fr;
  }
  .home-col-bale {
    grid-column: 1 / -1;
  }
}
@media (max-width: 720px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
  .home-col-bale {
    grid-column: auto;
  }
  .home-col-body {
    max-height: none;
  }
}

/* Post timeline — card-style pins */
.feed-post {
  display: flex;
  gap: 12px;
  margin: 10px 12px;
  padding: 14px 14px 12px;
  border: 1px solid color-mix(in srgb, var(--site-accent, #0f62fe) 8%, #e2e8f0);
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.feed-post:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--site-accent, #0f62fe) 22%, #cbd5e1);
  box-shadow: 0 10px 28px rgba(15, 98, 254, 0.1), 0 2px 0 rgba(255, 255, 255, 0.95) inset;
}
.home-col-body .feed-post:first-child { margin-top: 8px; }
.home-col-body .feed-post:last-child { margin-bottom: 12px; }
.feed-post-avatar img {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  display: block;
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
}
.feed-post-body {
  flex: 1;
  min-width: 0;
}
.feed-post-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 6px;
  margin-bottom: 6px;
}
.feed-post-name {
  font-weight: 800;
  color: var(--site-primary, #1e3a5f);
  text-decoration: none;
  font-size: 13px;
}
.feed-post-name:hover { text-decoration: underline; }
.feed-post-handle, .feed-post-time {
  font-size: 12px;
  color: #64748b;
}
.feed-post-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}
.feed-post-type-bale .feed-post-badge { background: #dbeafe; color: #1e40af; }
.feed-post-type-rss .feed-post-badge { background: #ffedd5; color: #c2410c; }
.feed-post-type-status .feed-post-badge { background: #ede9fe; color: #5b21b6; }
.feed-post-type-blog .feed-post-badge { background: #d1fae5; color: #047857; }

.feed-post-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}
.feed-post-title a {
  color: var(--site-primary, #1e3a5f);
  text-decoration: none;
}
.feed-post-title a:hover { text-decoration: underline; }
.feed-post-text {
  display: block;
  font-size: 14px;
  line-height: 1.6;
  color: #1e293b;
  text-decoration: none;
  white-space: pre-wrap;
  word-break: break-word;
}
.feed-post-text:hover { color: #0f172a; }
.feed-post-sub {
  margin: 8px 0 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}
.feed-post-pro .feed-post-content {
  margin-bottom: 4px;
}
.feed-post-pro .feed-post-media-bottom {
  margin-top: 12px;
  margin-bottom: 2px;
}
.feed-post-media {
  display: block;
  margin-top: 10px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.feed-post-media img {
  width: 100%;
  display: block;
  max-height: 360px;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.feed-post-media:hover img { transform: scale(1.02); }
.feed-post-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.feed-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #64748b;
  background: none;
  border: 0;
  padding: 4px 6px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
.feed-stat-like:hover {
  background: #fef2f2;
  color: #dc2626;
}
.feed-stat-like.is-liked { color: #dc2626; }
.feed-stat-view { cursor: default; }
.feed-post-link {
  margin-inline-start: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--site-accent, #0f62fe);
  text-decoration: none;
}
.feed-post-link:hover { text-decoration: underline; }

/* Compact look for narrow column (left bale) */
.home-col-bale .feed-post {
  margin: 8px 10px;
  padding: 12px;
  flex-direction: column;
  gap: 6px;
}
.home-col-bale .feed-post-avatar img {
  width: 36px;
  height: 36px;
}
.home-col-bale .feed-post-text {
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-col-bale .feed-post-title {
  font-size: 13px;
}
.home-col-bale .feed-post-media img {
  max-height: 200px;
}

.feed-post-skeleton {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
}
.feed-post-skeleton .sk-av {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
  background-size: 200% 100%;
  animation: pinShimmer 1.2s ease-in-out infinite;
}
.feed-post-skeleton .sk-body { flex: 1; }
.feed-post-skeleton .sk-line {
  height: 10px;
  border-radius: 6px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
  background-size: 200% 100%;
  animation: pinShimmer 1.2s ease-in-out infinite;
}
.feed-post-skeleton .sk-line.w40 { width: 40%; }
.feed-post-skeleton .sk-line.w80 { width: 80%; }
.feed-post-skeleton .sk-line.w60 { width: 60%; }
@keyframes pinShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.pin-muted {
  text-align: center;
  color: #64748b;
  padding: 22px 14px;
  font-size: 13px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  transition: all 0.18s ease;
  font-family: inherit;
}
.chip:hover { border-color: #cbd5e1; color: #1e293b; }
.chip.on {
  background: var(--site-accent, #0f62fe);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(15, 98, 254, 0.28);
}
