/* css/style-news_entry.css */
/* News entry page — matched to style-news.css (Astrobase dark + glassy cards) */

:root{
  /* Match style-news.css tokens */
  --bg:#0b0d14;
  --panel:#111425;
  --row:#14182e;
  --row-hover:#1a1f3a;
  --line:#262b52;
  --ink:#eef0ff;
  --muted:#9aa0d4;
  --accent:#6f7cff;
  --sans: system-ui,-apple-system,"Segoe UI",Inter,Roboto,Arial;

  /* Layout */
  --maxw: 1100px;

  /* Inline image sizing */
  --inline-img-w: 420px;
  --inline-img-h: 260px;

  /* Effects */
  --shadow: 0 14px 36px rgba(0,0,0,0.38);
}

*{ box-sizing:border-box; }

html,body{
  height:100%;
  margin:0;
  background:radial-gradient(circle at top,#14183a 0%,#070912 60%,#04050c 100%);
  color:var(--ink);
  font-family:var(--sans);

  /* hide scrollbar but keep scrolling */
  scrollbar-width:none;
  -ms-overflow-style:none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar{
  width:0;
  height:0;
}

/* Main container */
.news-shell{
  width:min(var(--maxw), 96vw);
  margin:0 auto;
  padding:12px 10px 24px;
}

.news-main{ width:100%; }

/* Card wrapper */
.card.news-card.news-entry-card{
  background: linear-gradient(180deg, var(--row), #0f1328);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 12px;
  overflow: hidden;
}

/* Header */
.news-card-header{
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(7,9,18,.55);
  backdrop-filter: blur(8px);
}

.news-title{
  width: 100%;
  margin:0 0 6px;
  font-size: clamp(1.55rem, 2.6vw, 2.25rem);
  line-height:1.12;
  font-weight: 750;
  letter-spacing: -0.02em;
}

/* =========================================================
   META ROW — PERFECT SINGLE-LINE ALIGNMENT
   ========================================================= */

.news-meta-row{
  display:flex;
  align-items: baseline;     /* KEY: perfect baseline alignment */
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: nowrap;         /* keep it one line */
}

.news-meta{
  display:flex;
  align-items: baseline;     /* KEY: baseline */
  gap: 10px;
  flex-wrap: nowrap;         /* keep it one line */
  margin-top: 6px;           /* keep your spacing under title */
  font-size: .82rem;
  color: var(--muted);
  min-width: 0;
}

/* make each item behave like text on the same baseline */
.news-date,
.news-category{
  display:inline-block;
  line-height: 1.2;
}

/* Category: plain text (no pill / outline) */
.news-category{
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
  font-weight: 650;
  color: var(--muted);
}

/* Display button → simple inline link text, aligned to baseline */
.news-meta-row .btn-display{
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;

  display: inline-block;     /* behave like text */
  line-height: 1.2;          /* match baseline */
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent);

  cursor: pointer;
  white-space: nowrap;
  vertical-align: baseline;
}

.news-meta-row .btn-display:hover{
  text-decoration: underline;
}

/* Optional subtle separators (pure text) */
.news-date + .news-category::before,
.news-category + .btn-display::before{
  content:"•";
  margin: 0 8px;
  color: rgba(255,255,255,.25);
}

/* Featured text (bold intro) */
.news-feature-text{
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-weight: 800;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ink);
}

/* HERO image (mobile), hidden desktop to avoid duplicate */
.news-hero{
  margin:0;
  display:none;
  border-bottom: 1px solid var(--line);
}

.news-hero img{
  width:100%;
  height: clamp(220px, 34vw, 420px);
  object-fit:cover;
  display:block;
}

/* Body */
.news-body{
  padding: 16px 18px 18px;
}

.news-body p{
  margin:0 0 12px;
  font-size: 1.02rem;
  line-height: 1.7;
  color: rgba(238,240,255,.92);
  max-width:none;
}

/* Inline left image (desktop newspaper flow) */
.news-inline-media{
  float:left;
  width: var(--inline-img-w);
  max-width: 45%;
  margin: 4px 18px 12px 0;
  border: 1px solid var(--line);
  background: #050715;
  border-radius: 10px;
  overflow:hidden;
}

.news-inline-media img{
  width:100%;
  height: var(--inline-img-h);
  object-fit:cover;
  display:block;
}

/* Remaining text continues full width beneath floated image */
.news-body-rest{
  clear: both;
  padding-top: 6px;
  max-width: 100%;
}

/* Footer actions */
.news-footer-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding: 12px 18px 14px;
  border-top: 1px solid var(--line);
  background: rgba(7,9,18,.45);
}

/* Edit link styled like a subtle button in the same theme */
.btn-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: var(--ink);
  text-decoration:none;
  font-weight: 650;
  font-size: .85rem;
  border-radius: 8px;
  transition: .15s ease;
}

.btn-pill:hover{
  background: rgba(255,255,255,.10);
  border-color: rgba(111,124,255,.45);
}

/* Empty state */
.news-empty{
  padding: 0 18px 18px;
  color: var(--muted);
}

/* Responsive: stack on small screens, use hero image */
@media (max-width: 860px){
  .news-shell{
    width:min(var(--maxw), 97vw);
    padding: 10px 10px 22px;
  }

  .news-card-header,
  .news-body,
  .news-footer-actions{
    padding-left: 14px;
    padding-right: 14px;
  }

  .news-hero{ display:block; }

  /* Mobile: show hero image, hide inline image to prevent duplicates */
  .news-inline-media{ display:none; }

  /* keep meta row one line on small screens too */
  .news-meta-row,
  .news-meta{
    flex-wrap: nowrap;
  }

  /* small screens: slightly smaller meta so it fits */
  .news-meta,
  .news-meta-row .btn-display{
    font-size: .80rem;
  }
}


/* =========================================================
   BACK LINK — SAME STYLE AS DISPLAY (INLINE TEXT LINK)
   ========================================================= */

.news-back-link{
  display: inline-block;
  margin-bottom: 6px;

  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.2;

  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

.news-back-link:hover{
  text-decoration: underline;
}
