/* Media page styles - scoped to media listing */

/* Feed grid (scoped to .news-feed used on media page) */
.news-feed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  max-width: 1120px;
  margin: 18px auto 40px auto;
  padding: 12px;
  box-sizing: border-box;
}

/* Make the feed occupy the full main content width on media page */
.news-content .news-feed {
  max-width: none;
  width: 100%;
  grid-template-columns: 1fr; /* single-column layout to use full width */
}

/* Wrapper link for entire card */
.media-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.14s ease;
}

.media-card-link:hover {
  transform: translateY(-4px);
}

/* Individual media card using dedicated classes to avoid conflicting news styles */

.media-card {
  background: rgba(8,9,11,0.66);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.03);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  min-height: 130px;
  width: 100%;
}

.media-card:hover {
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
}

/* Intro description under the header */
.media-intro {
  max-width: 980px;
  margin: 8px auto 18px auto;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.16));
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.03);
}
.media-intro p {
  margin: 0;
  color: #d8d8d8;
  font-size: 15px;
  line-height: 1.6;
}

/* header row inside media body: title + CTA */
.media-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.media-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-badge {
  display: inline-block;
  background: linear-gradient(180deg,#ff3b3b,#e91e63);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  letter-spacing: 0.6px;
  box-shadow: 0 6px 18px rgba(233,30,99,0.12);
}

.media-cta-wrap { display:flex; align-items:center; }
.open-stream-btn {
  background: rgba(233,30,99,0.12);
  color: #ff8fb5;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(233,30,99,0.08);
  white-space: nowrap;
  flex-shrink: 0;
}
.open-stream-btn i { font-size: 10px; opacity: 0.9; }
.media-card-link:hover .open-stream-btn { background: linear-gradient(90deg,#ff2d7a,#e91e63); color: #fff; transform: translateY(-2px); }

/* Mobile: stack CTA under title and make it full width */
@media (max-width: 760px) {
  .media-header-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .open-stream-btn { width: 100%; display: inline-flex; justify-content: center; padding: 12px 14px; font-size: 15px; border-radius: 10px; }
}

.media-thumb {
  flex: 0 0 260px;
  height: 130px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(233,30,99,0.03), rgba(0,0,0,0.35));
  box-shadow: inset 0 2px 18px rgba(0,0,0,0.6);
  position: relative;
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 180ms ease, transform 180ms ease;
}

.media-thumb .placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.55));
}

.media-thumb i { 
  color: rgba(255,255,255,0.9); 
}

.media-body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 10px;
  flex: 1 1 auto;
}

.media-title {
  margin: 0;
  color: #fff;
  font-size: 22px;
  line-height: 1.12;
  font-weight: 900;
  max-height: 2.6em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.media-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 0 0;
  border-radius: 6px;
  align-self: flex-start;
}

.media-user::before {
  content: '';
  display: block;
  height: 1px;
  width: 100%;
  background: rgba(255,255,255,0.02);
  margin-bottom: 8px;
  border-radius: 2px;
}

.media-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(233,30,99,0.10), 0 1px 4px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.03);
}

.media-avatar.avatar-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e91e63, #9c27b0);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
}

.media-avatar.fas {
  font-size: 28px;
  color: rgba(255,255,255,0.85);
}

.media-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.media-username {
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.06;
}

.media-time {
  color: #b8b8b8;
  font-size: 11px;
  font-weight: 600;
}
.media-caption {
  margin: 0;
  color: #cfcfcf;
  font-size: 13px;
  line-height: 1.5;
  max-height: 4.2em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}


/* hover polish: subtle thumbnail brighten */
.media-card-link:hover .media-thumb img {
  filter: brightness(1.06) saturate(1.04);
  transform: scale(1.01);
}


.media-body .actions { display:flex; gap:12px; align-items:center; margin-top:10px; }

.stream-link {
  background: linear-gradient(135deg,#ff2d7a,#e91e63);
  color: #fff;
  padding: 10px 14px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 8px 28px rgba(233,30,99,0.14);
  display: inline-block;
}

.stream-link:hover { transform: translateY(-2px); }

/* Responsive: stack cards on narrow screens */

@media (max-width: 760px) {
  .media-card { flex-direction: column; padding: 10px; align-items: stretch; }
  .media-thumb { width: 100%; height: 220px; flex: none; border-radius: 10px; }
  .media-body h3 { font-size: 18px; }
  .media-body { padding: 8px 0 0 0; }
  .media-avatar { width: 28px; height: 28px; }
  .media-title { font-size: 18px; }
  .open-stream-btn { width: 100%; padding: 12px 14px; font-size: 15px; border-radius: 10px; display: inline-flex; justify-content:center; }
  .media-user::before { display:none; }
}

@media (max-width: 420px) {
  .news-feed { gap: 12px; }
  .media-thumb { height: 180px; }
  .media-body p { font-size: 13px; }
}

/* Match news page mobile layout: center feed and constrain width like news.css */
@media (max-width: 480px) {
  .container {
    display: block !important;
    grid-template-columns: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    max-width: 100% !important;
  }

  .sidebar {
    display: none !important;
  }

  .news-content {
    margin: 0 auto !important;
    width: 100% !important;
    padding: 1rem 1rem 90px 1rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
  }

  .news-feed {
    gap: 1.25rem !important;
    width: 100% !important;
    max-width: 380px !important;
    margin: 0 auto !important;
    padding: 0 0 90px 0 !important;
  }

  .media-card {
    border-radius: 18px !important;
    width: 100% !important;
    max-width: 380px !important;
    margin: 0 auto 12px auto !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    border: 1.5px solid rgba(233,30,99,0.12) !important;
    overflow: hidden !important;
  }

  .media-thumb { height: 200px !important; border-radius: 16px 16px 0 0 !important; }
  .media-body { padding: 16px 18px 12px 18px !important; }
  .media-title { font-size: 18px !important; line-height: 1.3 !important; }
  .media-caption { font-size: 14px !important; color: #bbb !important; }
  .open-stream-btn { padding: 10px 14px !important; font-size: 14px !important; }
}

/* Mobile - hide global sidebar and make content full-width */
@media (max-width: 760px) {
  /* hide the left navigation to free space */
  .sidebar {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
  }

  /* container: let main content use full width */
  .container {
    display: block !important;
    grid-template-columns: none !important;
    padding: 6px !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  .main-content, .news-content {
    margin: 0 !important;
    width: 100% !important;
    padding: 6px 8px 90px 8px !important;
    max-width: 100% !important;
  }

  /* make feed use full width and reduce outer gaps */
  .news-feed {
    max-width: none !important;
    margin: 6px 0 !important;
    gap: 12px !important;
    padding: 0 0 90px 0 !important;
    box-sizing: border-box !important;
  }

  /* cards: full width, larger touch targets */
  .media-card {
    padding: 12px 10px !important;
    gap: 12px !important;
    border-radius: 12px !important;
    width: 100% !important;
  }

  .media-thumb {
    width: 100% !important;
    height: 200px !important;
    flex: none !important;
    border-radius: 10px !important;
  }

  .media-body {
    padding: 10px 6px 6px 6px !important;
    gap: 8px !important;
  }

  .media-title { font-size: 18px !important; }
  .media-caption { font-size: 13px !important; }

  /* ensure bottom nav is visible and not overlapped */
  .bottom-nav { z-index: 1200 !important; }
}
