/* ===================================================================
   social-feed.css — Thumbnail strips for Social page
   Layouts: sf-grid (6-col strip for top content) and sf-strip (stories)
   Matches brand: pink hairlines, sharp corners, pink numbers for metrics.
   Viral cards get an animated gold shimmer border.
   =================================================================== */

/* 6-col horizontal strip for TOP 6 CONTENT (mixed IG + FB posts + reels) */
.sf-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin: 4px 0 24px;
}

@media (max-width: 1280px) {
  .sf-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .sf-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .sf-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .sf-grid { grid-template-columns: 1fr; }
}

/* Dedicated strip for IG Stories (9:16 aspect, wider cards ok) */
.sf-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin: 4px 0 24px;
}
@media (max-width: 1280px) { .sf-strip { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px)  { .sf-strip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .sf-strip { grid-template-columns: repeat(2, 1fr); } }

/* Card ---------------------------------------------------------- */
.sf-card {
  position: relative;
  display: block;
  background: var(--bg-elev);
  border: 1px solid var(--hair);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.sf-card:hover {
  border-color: var(--color-brand);
  transform: translateY(-2px);
}

/* Thumbnail: square for posts/reels, 9:16 for stories ------------ */
.sf-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #0E0E10 center/cover no-repeat;
  overflow: hidden;
}

.sf-card.is-story .sf-thumb {
  aspect-ratio: 9 / 16;
}

/* Platform + type badges on thumbnail */
.sf-thumb .sf-plat {
  position: absolute;
  top: 6px;
  left: 6px;
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 2px 6px;
  color: #fff;
  background: #E1306C;
  border-radius: 0;
}
.sf-card[data-platform="FB"] .sf-thumb .sf-plat { background: #4267B2; }

.sf-thumb .sf-type {
  position: absolute;
  top: 6px;
  right: 6px;
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 2px 6px;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 0;
  text-transform: uppercase;
}

.sf-thumb .sf-viral {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 2px 6px;
  color: #000;
  background: var(--color-brand);
  border-radius: 0;
  text-transform: uppercase;
}

/* Hover overlay with stats ---------------------------------------- */
.sf-thumb .sf-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sf-card:hover .sf-overlay { opacity: 1; }

.sf-overlay .sf-ov-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: #fff;
  text-transform: uppercase;
}

.sf-overlay .sf-ov-row strong {
  color: var(--color-brand);
  font-weight: 700;
}

/* Body: caption + metrics ----------------------------------------- */
.sf-body {
  padding: 8px 10px 10px;
  border-top: 1px solid var(--hair);
}

.sf-caption {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--t2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 28px;
  margin-bottom: 6px;
}

.sf-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 8px;
  align-items: end;
}

.sf-metric {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.sf-metric .sf-m-num {
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-brand);
  line-height: 1;
}

.sf-metric .sf-m-lbl {
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t4);
}

.sf-metric.is-eng .sf-m-num { color: #22C55E; }
.sf-metric.is-eng.low .sf-m-num { color: #F77737; }
.sf-metric.is-total .sf-m-num { color: #FFD700; }

.sf-date {
  margin-top: 6px;
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t4);
}

/* Viral treatment — animated gold shimmer border + star ---------- */
/* We wrap the original card (which keeps overflow:hidden for the thumb)
   with a 2px animated gradient by using a padding-box trick: paint the
   inner background on the padding-box and a moving gold gradient on the
   border-box. Box-shadow gives the outer glow. */
.sf-card.is-viral {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--bg-elev), var(--bg-elev)) padding-box,
    linear-gradient(125deg, #D4A843 0%, #F5E6A8 25%, #FFD700 50%, #F5E6A8 75%, #D4A843 100%) border-box;
  background-size: 100% 100%, 300% 300%;
  animation: sf-gold-shimmer 4.5s ease-in-out infinite;
  box-shadow: 0 0 0 1px rgba(212, 168, 67, 0.25), 0 4px 18px rgba(212, 168, 67, 0.22);
}

@keyframes sf-gold-shimmer {
  0%   { background-position: 0 0, 0% 50%; }
  50%  { background-position: 0 0, 100% 50%; }
  100% { background-position: 0 0, 0% 50%; }
}

.sf-card.is-viral .sf-thumb .sf-viral {
  background: linear-gradient(90deg, #FFD700, #F5E6A8, #D4A843);
  color: #000;
  font-weight: 900;
}

.sf-card { position: relative; }
.sf-card.is-viral .sf-viral-star {
  position: absolute;
  /* Float star just below the type badge inside the thumb area */
  top: 24px;
  right: 6px;
  font-size: 14px;
  color: #FFD700;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.7), 0 1px 3px rgba(0,0,0,0.85);
  line-height: 1;
  pointer-events: none;
  z-index: 3;
}
