/* ViewGems — BioStudio latest posts carousel
   Shows the user's last 3 Sngine posts with privacy = 'public' only.
   Modern horizontal snap carousel: swipe on mobile, arrows on desktop. */

.vg-posts { width: 100%; margin-top: 28px; }
.vg-posts-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; padding: 0 2px;
}
.vg-posts-head h2 {
  margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -0.01em;
  color: #fff; display: flex; align-items: center; gap: 8px;
}
.vg-posts-head h2::before {
  content: ""; width: 8px; height: 8px; border-radius: 99px;
  background: linear-gradient(135deg, #f59e0b, #f43f5e, #d946ef);
}
.vg-posts-all {
  font-size: 13px; font-weight: 700; color: #c4b5fd; text-decoration: none;
  white-space: nowrap;
}
.vg-posts-all:hover { color: #fff; }

.vg-posts-wrap { position: relative; }
.vg-posts-track {
  display: flex; gap: 14px; overflow-x: auto;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  padding: 4px 2px 14px;
  scrollbar-width: none;
  touch-action: pan-x pan-y; user-select: none; -webkit-user-select: none;
}
.vg-posts-track::-webkit-scrollbar { display: none; }
.vg-post-card img { -webkit-user-drag: none; user-drag: none; }

.vg-post-card {
  flex: 0 0 min(300px, 84vw); scroll-snap-align: start;
  display: block; border-radius: 22px; overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: #fff; text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.vg-post-card:hover, .vg-post-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(196, 181, 253, 0.55);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  outline: none;
}
.vg-post-media { position: relative; aspect-ratio: 4 / 3; background: #0f172a; overflow: hidden; }
.vg-post-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vg-post-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent 55%);
}
.vg-post-media-text {
  display: flex; align-items: center; justify-content: center;
  font-size: 64px; line-height: 1; color: rgba(255, 255, 255, 0.85);
  background: linear-gradient(135deg, #312e81, #7c3aed 55%, #db2777);
}
.vg-post-type {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  padding: 4px 9px; border-radius: 99px;
  background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px);
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em; color: #fff;
}
.vg-post-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff;
}
.vg-post-body { padding: 14px 16px 16px; }
.vg-post-text {
  margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, 0.92);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 63px;
}
.vg-post-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; color: rgba(255, 255, 255, 0.65);
}
.vg-post-meta time { margin-right: auto; }
.vg-post-meta span { white-space: nowrap; }

.vg-posts-arrow {
  position: absolute; top: 38%; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.75); backdrop-filter: blur(8px);
  color: #fff; font-size: 17px; line-height: 1; cursor: pointer;
  display: none; align-items: center; justify-content: center;
}
.vg-posts-arrow:hover { background: rgba(124, 58, 237, 0.85); }
.vg-posts-prev { left: -8px; }
.vg-posts-next { right: -8px; }
@media (hover: hover) and (pointer: fine) {
  .vg-posts-arrow { display: flex; }
}
.vg-posts-dots { display: flex; justify-content: center; gap: 6px; margin-top: 2px; }
.vg-posts-dots button {
  width: 7px; height: 7px; border-radius: 99px; border: 0; padding: 0;
  background: rgba(255, 255, 255, 0.3); cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}
.vg-posts-dots button.vg-active { width: 22px; background: #fff; }
