/* ============================================================
   Live Feed — HAXD-styled
   Uses HAXD CSS variables: --primary (#2563eb electric blue),
   --secondary (#10b981 emerald), --accent (#4361ee indigo),
   --text, --text-light, --glass-95.
   ============================================================ */

/* Page wrapper — push content below the fixed banner + navbar (~80px tall). */
.livefeed-page {
  padding-top: 6rem !important;
}
@media (max-width: 700px) {
  .livefeed-page { padding-top: 5.5rem !important; }
}

/* Page hero block */
.livefeed-hero {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #4361ee 100%);
  color: #fff;
  border-radius: 20px;
  padding: 2rem 2rem 1.75rem;
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(37, 99, 235, 0.18);
}
.livefeed-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 20%, rgba(255,255,255,0.18), transparent 55%);
  pointer-events: none;
}
.livefeed-hero h2 { color: #fff; font-weight: 800; letter-spacing: -0.01em; margin: 0; }
.livefeed-hero .lead { color: rgba(255,255,255,0.92); margin-top: 0.35rem; margin-bottom: 0; }
.livefeed-hero .live-dot { background: #fb923c; box-shadow: 0 0 8px rgba(251,146,60,0.55); }

/* Feed card */
.feed-item {
  background: var(--glass-95, #ffffff);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 18px;
  padding: 1.5rem 1.5rem 1.25rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.feed-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.10);
  border-color: rgba(37, 99, 235, 0.18);
}
.feed-item h4 {
  font-weight: 800;
  color: var(--text, #1e293b);
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
  line-height: 1.3;
}
.feed-item .feed-meta,
.feed-item .small.text-muted {
  color: var(--text-light, #64748b) !important;
  font-size: 0.875rem;
  font-weight: 500;
}
.feed-content {
  color: var(--text, #1e293b);
  font-size: 1rem;
  line-height: 1.6;
  margin-top: 0.5rem;
}

/* Type-based accent stripes */
.feed-type-announcement {
  border-left: 5px solid #f97316;
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.04), rgba(255, 255, 255, 0.85));
}
.feed-type-announcement .badge {
  background: linear-gradient(90deg, #f97316, #fb923c) !important;
  color: #fff !important;
  border: none;
}
.feed-type-info {
  border-left: 5px solid #2563eb;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.04), rgba(255, 255, 255, 0.85));
}
.feed-type-info .badge {
  background: linear-gradient(90deg, #2563eb, #4361ee) !important;
  color: #fff !important;
  border: none;
}

.feed-item .badge {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Live dot — match HAXD's emerald accent */
.live-dot {
  position: relative;
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10b981;
  vertical-align: middle;
  margin-right: 0.5rem;
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #10b981;
  opacity: 0.6;
  animation: livePulse 1.6s ease-out infinite;
  will-change: transform, opacity;
}
@keyframes livePulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  70%  { transform: scale(2.6); opacity: 0;   }
  100% { transform: scale(2.6); opacity: 0;   }
}

/* Images grid in feed card */
.images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 1rem;
}
.images-grid .img-wrap {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 0;
  background: #f8fafc;
  cursor: pointer;
}
.images-grid img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.images-grid img:hover { transform: scale(1.06); }

@media (min-width: 576px) { .images-grid img { height: 160px; } }
@media (min-width: 768px) { .images-grid img { height: 200px; } }

/* Teaser (homepage) */
.livefeed-teaser {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(16, 185, 129, 0.04));
  border-radius: 16px;
  padding: 1.75rem;
}
.live-teaser-list .teaser-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  border-radius: 14px;
  background: var(--glass-95, #fff);
  border: 1px solid rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.live-teaser-list .teaser-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.10);
}
.live-teaser-list .teaser-thumb {
  width: 120px;
  height: 80px;
  flex: 0 0 120px;
  border-radius: 10px;
  overflow: hidden;
}
.live-teaser-list .teaser-thumb img { width: 100%; height: 100%; object-fit: cover; }
.live-teaser-list .teaser-body h5 { margin: 0 0 0.25rem; font-weight: 700; color: var(--text, #1e293b); }
.live-teaser-list .teaser-time { color: var(--text-light, #64748b); font-size: 0.875rem; }

/* ============================================================
   Image lightbox overlay
   ============================================================ */
.lf-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 20000;
}
.lf-inner {
  position: relative;
  max-width: 95vw; max-height: 95vh;
  display: flex; align-items: center; justify-content: center;
}
.lf-img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  transition: opacity 0.2s ease;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
.lf-close {
  position: absolute;
  top: 16px; right: 16px;
  background: #fff;
  border-radius: 50%;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  font-size: 28px; font-weight: 700; line-height: 1;
  color: var(--text, #1e293b);
  z-index: 20001;
}
.lf-control {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  font-size: 22px; font-weight: 800;
  color: var(--primary, #2563eb);
  -webkit-user-select: none;
  user-select: none;
}
.lf-control:hover { background: #fff; }
.lf-prev { left: 24px; }
.lf-next { right: 24px; }
.lf-spinner { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.lf-hidden { display: none !important; }
.lf-counter {
  position: absolute;
  bottom: 24px; left: 50%; transform: translateX(-50%);
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.875rem;
}
.lf-control[aria-disabled="true"] { opacity: 0.35; pointer-events: none; }

/* Mobile tweaks */
@media (max-width: 600px) {
  .livefeed-hero { padding: 1.5rem 1.25rem 1.25rem; border-radius: 16px; }
  .livefeed-hero h2 { font-size: 1.5rem; }
  .feed-item { padding: 1.25rem; border-radius: 14px; }
  .feed-item h4 { font-size: 1.15rem; }
  .lf-prev { left: 8px; }
  .lf-next { right: 8px; }
  .lf-control { width: 44px; height: 44px; }
}
