/* =========================================================
   ScoreB - news.html stylesheet
   Same premium look as the Favourites page: brushed silver
   surfaces + sky blue (#0EA5E9). Header, fonts and base styles
   come from style.css; only what is specific to News lives here.
   (Dark mode is generated into theme-dark.css by
   dev-tools/make-dark-theme.py - colours below are plain values
   on purpose so the generator can convert them.)
   ========================================================= */

/* ---------- Page ---------- */
body.news-page-body {
  background-color: #e2e7ec;
  background-image: linear-gradient(180deg, #f8f9fb 0%, #eceff3 45%, #e2e7ec 100%);
}
html body.news-page-body.match-page-body {
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.news-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.news-inner {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* graphite top bar with a fine sky-blue edge */
.news-page .match-page-header {
  background: linear-gradient(180deg, #1c222d 0%, #131820 100%);
  border-bottom: 1px solid #0EA5E9;
  box-shadow: 0 8px 22px -12px rgba(14, 165, 233, 0.65);
}
.news-page .match-page-title { color: #C9D1D9; }

/* ---------- Title ---------- */
.news-title {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 26px 0 16px;
  color: #1f2933;
}

.news-title > i {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid #c9d0d8;
  background: linear-gradient(145deg, #ffffff 0%, #dde2e8 100%);
  color: #0EA5E9;
  font-size: 19px;
  box-shadow: inset 0 1px 0 #ffffff, 0 8px 16px -8px rgba(14, 165, 233, 0.55);
}

.news-title-text { min-width: 0; }
.news-title h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
  color: #1f2933;
}
.news-title p {
  margin: 3px 0 0;
  font-size: 13.5px;
  color: #6b7785;
}

/* ---------- Category chips ---------- */
.news-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 14px;
  margin-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.news-filters::-webkit-scrollbar { display: none; }

.news-chip {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #c9d0d8;
  background: linear-gradient(180deg, #ffffff 0%, #eef1f4 100%);
  color: #3a4654;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 1px 0 #ffffff inset;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.news-chip:hover { border-color: #0EA5E9; color: #0b7db0; }
.news-chip:focus-visible { outline: 2px solid #0EA5E9; outline-offset: 2px; }
.news-chip.active {
  background: #0EA5E9;
  border-color: #0EA5E9;
  color: #ffffff;
  box-shadow: 0 8px 16px -8px rgba(14, 165, 233, 0.7);
}

/* ---------- Cards ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.news-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid #d3d9e0;
  background: #ffffff;
  color: #1f2933;
  box-shadow: 0 10px 24px -16px rgba(31, 41, 51, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
a.news-card:hover {
  transform: translateY(-3px);
  border-color: #0EA5E9;
  box-shadow: 0 16px 30px -16px rgba(14, 165, 233, 0.55);
}
a.news-card:focus-visible { outline: 2px solid #0EA5E9; outline-offset: 2px; }

/* picture panel */
.news-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  height: 138px;
  background: linear-gradient(135deg, #1c222d 0%, #26303d 55%, #0b6d9c 100%);
  overflow: hidden;
}
.news-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 45%);
  pointer-events: none;
}
.news-media-live { background: linear-gradient(135deg, #1c222d 0%, #2a2530 55%, #a8323a 100%); }
.news-media-previews { background: linear-gradient(135deg, #2b3440 0%, #3b4757 55%, #0EA5E9 100%); }
.news-media-team { background: linear-gradient(135deg, #1c222d 0%, #263140 60%, #0EA5E9 100%); }
.news-media-transfers { background: linear-gradient(135deg, #1c222d 0%, #1f3a4d 55%, #0EA5E9 100%); gap: 14px; }
.news-media-transfers .news-crest-sm { width: 44px; height: 44px; }
.news-media-transfers .news-player { width: 80px; height: 80px; }

.news-crest {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.6);
  z-index: 1;
}
.news-logo { width: 42px; height: 42px; object-fit: contain; }

.news-score {
  z-index: 1;
  min-width: 74px;
  padding: 6px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
}
.news-score i { font-style: normal; opacity: 0.6; padding: 0 5px; }

.news-vs {
  z-index: 1;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.news-live {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ff4d4f;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.news-live b {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  animation: news-pulse 1.4s ease-in-out infinite;
}
@keyframes news-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* team news picture */
.news-player {
  position: relative;
  z-index: 1;
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: #dde2e8;
  border: 3px solid #ffffff;
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.7);
  color: #8a96a3;
  font-size: 34px;
}
.news-player-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-team-badge {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  padding: 7px;
  object-fit: contain;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.6);
}
.news-status {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.news-status.out { background: #d6393f; }
.news-status.doubt { background: #e49a1b; }
.news-status.transfer { background: #0EA5E9; }
.news-status.transfer.money { background: #16a34a; font-weight: 700; letter-spacing: 0.2px; }

/* text */
.news-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 16px;
  min-width: 0;
  flex: 1;
}

.news-tag {
  align-self: flex-start;
  padding: 3px 9px;
  border-radius: 6px;
  background: #e3f4fc;
  color: #0b7db0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.news-tag.tag-live { background: #fde5e6; color: #c2272d; }
.news-tag.tag-team { background: #fdf0d8; color: #a8690a; }
.news-tag.tag-previews { background: #e6eaef; color: #4a5766; }
.news-tag.tag-transfers { background: #e3f4fc; color: #0b7db0; }

.news-headline {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
  color: #1f2933;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
a.news-card:hover .news-headline { color: #0b7db0; }

.news-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: #5d6a78;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 6px;
  font-size: 12.5px;
  color: #7a8794;
  min-width: 0;
}
.news-league-logo { width: 16px; height: 16px; object-fit: contain; flex-shrink: 0; }
.news-league {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: #4a5766;
}
.news-dot { opacity: 0.6; }
.news-when { white-space: nowrap; }

/* ---------- Top story ---------- */
.news-hero { flex-direction: row; margin-top: 4px; }
.news-hero .news-media { flex: 0 0 46%; height: auto; min-height: 250px; gap: 26px; }
.news-hero .news-crest { width: 92px; height: 92px; }
.news-hero .news-logo { width: 62px; height: 62px; }
.news-hero .news-score { font-size: 38px; min-width: 104px; padding: 8px 18px; border-radius: 16px; }
.news-hero .news-vs { font-size: 16px; padding: 8px 16px; }
.news-hero .news-player { width: 128px; height: 128px; font-size: 48px; }
.news-hero .news-team-badge { width: 56px; height: 56px; }
.news-hero .news-body { padding: 24px 26px; justify-content: center; gap: 12px; }
.news-hero .news-headline { font-size: 25px; line-height: 1.25; -webkit-line-clamp: 4; }
.news-hero .news-text { font-size: 15px; -webkit-line-clamp: 3; }
.news-hero .news-meta { font-size: 13px; }

/* ---------- Show more ---------- */
.news-more { display: flex; justify-content: center; padding: 22px 0 6px; }
.news-more-btn {
  padding: 11px 26px;
  border-radius: 999px;
  border: 1px solid #0EA5E9;
  background: #ffffff;
  color: #0b7db0;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.18s ease, color 0.18s ease;
}
.news-more-btn:hover { background: #0EA5E9; color: #ffffff; }
.news-more-btn:focus-visible { outline: 2px solid #0EA5E9; outline-offset: 2px; }

/* ---------- Empty / error ---------- */
.news-empty {
  margin-top: 18px;
  padding: 44px 20px;
  text-align: center;
  border-radius: 16px;
  border: 1px dashed #c3ccd5;
  background: #f4f6f8;
  color: #5d6a78;
}
.news-empty > i { font-size: 30px; color: #0EA5E9; margin-bottom: 12px; }
.news-empty h3 { margin: 0 0 6px; font-size: 17px; color: #1f2933; }
.news-empty p { margin: 0; font-size: 14px; }
.news-retry {
  margin-top: 16px;
  padding: 10px 22px;
  border: 0;
  border-radius: 999px;
  background: #0EA5E9;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}
.news-retry:hover { background: #0c8fc9; }

/* ---------- Loading skeleton ---------- */
.news-skel { pointer-events: none; }
.news-skel .news-media { background: #e4e8ed; }
.news-skel .news-media::after { display: none; }
.skel-line {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #e6eaee 0%, #f3f5f7 50%, #e6eaee 100%);
  background-size: 200% 100%;
  animation: news-shimmer 1.3s linear infinite;
}
.skel-line.w30 { width: 30%; }
.skel-line.w50 { width: 50%; }
.skel-line.w70 { width: 70%; }
.skel-line.w90 { width: 90%; }
.news-skel .news-media { animation: news-shimmer 1.3s linear infinite; background: linear-gradient(90deg, #e4e8ed 0%, #f1f3f6 50%, #e4e8ed 100%); background-size: 200% 100%; }
@keyframes news-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- Tablet / mobile ---------- */
@media (max-width: 760px) {
  .news-hero { flex-direction: column; }
  .news-hero .news-media { flex: none; min-height: 170px; gap: 20px; }
  .news-hero .news-crest { width: 74px; height: 74px; }
  .news-hero .news-logo { width: 50px; height: 50px; }
  .news-hero .news-score { font-size: 30px; min-width: 88px; }
  .news-hero .news-player { width: 104px; height: 104px; }
  .news-hero .news-body { padding: 16px; }
  .news-hero .news-headline { font-size: 20px; }
}

@media (max-width: 640px) {
  .news-inner { padding: 0 12px 32px; }
  .news-title { padding: 20px 0 12px; gap: 12px; }
  .news-title h2 { font-size: 21px; }
  .news-title p { font-size: 12.5px; }
  .news-grid { grid-template-columns: 1fr; gap: 12px; }
  .news-media { height: 120px; }
  .news-crest { width: 56px; height: 56px; }
  .news-logo { width: 36px; height: 36px; }
  .news-headline { font-size: 16px; }
}

/* transfers: keep the hero card picture compact so it fits small screens */
.news-hero .news-media-transfers .news-crest-sm { width: 60px; height: 60px; }
.news-hero .news-media-transfers .news-player { width: 104px; height: 104px; }
@media (max-width: 480px) {
  .news-hero .news-media-transfers .news-crest-sm { width: 48px; height: 48px; }
  .news-hero .news-media-transfers .news-player { width: 88px; height: 88px; }
}
