/* ════════════════════════════════════════════════════════
   GadiDriver — Khabari (news + engagement) styles
   Light editorial · matches site.css design system
   Loaded AFTER ../assets/site.css
   ════════════════════════════════════════════════════════ */

/* ── Masthead ──────────────────────────────────────────── */
.masthead {
  position: relative; overflow: hidden;
  padding: 150px 0 56px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 50% at 80% 0%, rgba(217,45,38,.07), transparent 70%),
    radial-gradient(ellipse 50% 50% at 0% 100%, rgba(247,181,0,.07), transparent 70%),
    var(--paper);
}
.masthead .grid-lines {
  position:absolute; inset:0; z-index:0; opacity:.5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000, transparent 70%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000, transparent 70%);
}
.masthead-inner { position: relative; z-index: 2; max-width: 760px; }
.masthead h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(44px, 7vw, 86px); line-height: .96; letter-spacing: -.03em;
  margin: 20px 0 18px;
}
.masthead h1 em { color: var(--red); font-style: normal; }
.masthead p { font-size: clamp(16px,1.5vw,19px); color: var(--ink-soft); max-width: 56ch; }
.masthead-meta { display:flex; align-items:center; gap: 18px; margin-top: 26px; flex-wrap: wrap; }
.live-pill {
  display:inline-flex; align-items:center; gap: 9px;
  font-family: var(--mono); font-size: 12px; letter-spacing:.08em; text-transform:uppercase;
  color: var(--green-deep); background: var(--green-soft); border:1px solid rgba(21,156,75,.2);
  padding: 7px 14px; border-radius: 100px; font-weight:600;
}
.live-pill .dot { background: var(--green); }
.masthead-count { font-size: 14px; color: var(--muted); }
.masthead-count b { color: var(--ink); font-family: var(--display); }

/* ── Controls bar (sticky) ─────────────────────────────── */
.controls {
  position: sticky; top: 64px; z-index: 60;
  background: rgba(251,249,245,.86);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--line);
}
.controls-inner { display:flex; align-items:center; justify-content:space-between; gap: 18px; padding: 14px 0; flex-wrap: wrap; }
.chips { display:flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display:inline-flex; align-items:center; gap: 7px;
  font-family: var(--body); font-size: 14px; font-weight: 600;
  padding: 9px 16px; border-radius: 100px; cursor: pointer;
  border: 1.5px solid var(--line-2); background: var(--card); color: var(--ink-soft);
  transition: color .2s, background .2s, border-color .2s, transform .2s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.chip.active { background: var(--ink); color:#fff; border-color: var(--ink); }
.chip .cc { width: 8px; height: 8px; border-radius: 50%; }
.cc-news { background: var(--red); } .cc-alert { background: var(--yellow); }
.cc-tip { background: var(--green); } .cc-job { background: #2A6FDB; }

.search-box {
  display:flex; align-items:center; gap: 10px;
  background: var(--card); border:1.5px solid var(--line-2); border-radius: 100px;
  padding: 9px 16px; min-width: 230px; transition: border-color .2s, box-shadow .2s;
}
.search-box:focus-within { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.search-box svg { width: 17px; height: 17px; color: var(--muted); flex-shrink:0; }
.search-box input { border:none; outline:none; background:transparent; font-family: var(--body); font-size: 14.5px; color: var(--ink); width: 100%; }
.search-box input::placeholder { color: var(--muted); }

/* ── Feed wrap ─────────────────────────────────────────── */
.khabari-body { padding: 44px 0 96px; }

/* ── Featured lead story ───────────────────────────────── */
.featured { margin-bottom: 44px; }
.featured-card {
  display:grid; grid-template-columns: 1.15fr .85fr; gap: 0;
  background: var(--card); border:1px solid var(--line); border-radius: var(--r-xl);
  overflow: hidden; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.featured-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.featured-media { position: relative; min-height: 340px; background: var(--paper-2); overflow:hidden; }
.featured-media img, .featured-media video { position:absolute; inset:0; width:100%; height:100%; object-fit: cover; }
.featured-media .ph, .card-media .ph {
  position:absolute; inset:0; display:grid; place-items:center; text-align:center;
  background: repeating-linear-gradient(45deg, rgba(27,23,20,.03) 0 14px, transparent 14px 28px), var(--paper-2);
  color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing:.1em; text-transform: uppercase;
}
.featured-media .ph span, .card-media .ph span { border:1px dashed var(--line-2); padding: 8px 14px; border-radius: 10px; }
.featured-flag {
  position:absolute; top: 18px; left: 18px; z-index: 2;
  display:inline-flex; align-items:center; gap: 7px;
  background: var(--red); color:#fff; font-size: 12px; font-weight: 700; letter-spacing:.03em;
  padding: 7px 14px; border-radius: 100px; box-shadow: var(--shadow-red);
}
.featured-content { padding: 38px 40px; display:flex; flex-direction: column; justify-content: center; }
.featured-content .cat { margin-bottom: 16px; }
.featured-content h2 {
  font-family: var(--display); font-weight: 700; font-size: clamp(24px, 2.8vw, 36px);
  line-height: 1.12; letter-spacing: -.02em; margin-bottom: 14px; text-wrap: balance;
}
.featured-content p { font-size: 15.5px; color: var(--ink-soft); line-height: 1.6; margin-bottom: 22px; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.featured-foot { display:flex; align-items:center; justify-content: space-between; gap: 14px; margin-top: auto; }
@media (max-width: 860px){
  .featured-card { grid-template-columns: 1fr; }
  .featured-media { min-height: 220px; }
  .featured-content { padding: 28px 26px; }
}

/* ── Category label ────────────────────────────────────── */
.cat {
  display:inline-flex; align-items:center; gap: 7px;
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing:.1em; text-transform: uppercase;
}
.cat .cc { width: 7px; height:7px; border-radius:50%; }
.cat.news { color: var(--red); } .cat.news .cc { background: var(--red); }
.cat.alert { color:#9a6a00; } .cat.alert .cc { background: var(--yellow); }
.cat.tip { color: var(--green-deep); } .cat.tip .cc { background: var(--green); }
.cat.job { color:#2A6FDB; } .cat.job .cc { background:#2A6FDB; }

/* ── Section label row ─────────────────────────────────── */
.feed-head { display:flex; align-items:center; justify-content: space-between; margin-bottom: 22px; gap: 16px; }
.feed-head h3 { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing:-.01em; }
.feed-head .count { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

/* ── Feed grid ─────────────────────────────────────────── */
.feed { display:grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 960px){ .feed { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px){ .feed { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border:1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; cursor: pointer; display:flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.card-media { position: relative; width:100%; padding-top: 58%; background: var(--paper-2); overflow:hidden; }
.card-media img, .card-media video { position:absolute; inset:0; width:100%; height:100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 20px; display:flex; flex-direction: column; gap: 10px; flex:1; }
.card-title { font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.3; letter-spacing:-.01em; }
.card-excerpt { font-size: 14px; color: var(--ink-soft); line-height: 1.6; flex:1; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.card-foot { display:flex; align-items:center; justify-content: space-between; gap: 10px; padding-top: 14px; margin-top: 4px; border-top:1px solid var(--line); }
.card-date { font-size: 12.5px; color: var(--muted); }
.react-row { display:flex; align-items:center; gap: 6px; }
.react-pill {
  display:inline-flex; align-items:center; gap: 5px;
  font-size: 12.5px; color: var(--ink-soft); font-weight:600;
  background: var(--paper-2); border:1px solid var(--line); padding: 4px 10px; border-radius: 100px;
}
.react-pill .e { font-size: 13px; }

/* ── States ────────────────────────────────────────────── */
.state-center { grid-column: 1/-1; min-height: 320px; display:flex; flex-direction: column; align-items:center; justify-content:center; gap: 14px; text-align:center; }
.state-icon { width: 64px; height:64px; border-radius: 18px; display:grid; place-items:center; background: var(--red-soft); color: var(--red); }
.state-icon svg { width: 30px; height:30px; }
.state-title { font-family: var(--display); font-weight:700; font-size: 19px; }
.state-sub { font-size: 14.5px; color: var(--muted); max-width: 320px; }
.spinner { width: 42px; height:42px; border: 3px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── App engagement band ───────────────────────────────── */
.news-cta { padding: 0 0 110px; }
.news-cta-card {
  position: relative; overflow:hidden;
  background: var(--night); color:#fff; border-radius: var(--r-xl);
  padding: 56px 48px; display:grid; grid-template-columns: 1.3fr .7fr; gap: 36px; align-items:center;
  box-shadow: var(--shadow-lg);
}
.news-cta-card::after { content:""; position:absolute; width: 360px; height:360px; border-radius:50%; filter: blur(110px); background: radial-gradient(circle, rgba(217,45,38,.25), transparent 70%); top:-160px; right:-120px; }
.news-cta-card > * { position: relative; z-index:2; }
.news-cta-card .eyebrow { color: var(--yellow); } .news-cta-card .eyebrow::before { background: var(--yellow); }
.news-cta-card h3 { font-family: var(--display); font-weight:700; font-size: clamp(26px,3.2vw,40px); letter-spacing:-.02em; line-height:1.08; margin:16px 0 12px; }
.news-cta-card p { color: rgba(255,255,255,.62); font-size: 15.5px; line-height:1.6; }
.news-cta-actions { display:flex; flex-direction: column; gap: 12px; }
.reaction-demo { display:flex; gap: 8px; margin-top: 20px; }
.reaction-demo span { width: 46px; height:46px; border-radius: 14px; display:grid; place-items:center; font-size: 22px; background: rgba(255,255,255,.06); border:1px solid var(--night-line); transition: transform .25s var(--ease), background .25s; cursor: default; }
.reaction-demo span:hover { transform: translateY(-4px) scale(1.08); background: rgba(255,255,255,.12); }
@media (max-width: 760px){ .news-cta-card { grid-template-columns: 1fr; padding: 40px 28px; } }

/* ════════════════════════════════════════════════════════
   READER PANEL — light, slides from right (bottom on mobile)
   ════════════════════════════════════════════════════════ */
.reader-backdrop { position: fixed; inset:0; background: rgba(24,18,16,.5); backdrop-filter: blur(5px); z-index: 800; visibility: hidden; opacity:0; transition: opacity .3s var(--ease), visibility 0s .3s; }
.reader-backdrop.open { visibility: visible; opacity:1; transition: opacity .3s var(--ease); }
.reader-panel {
  position: fixed; top:0; right:0; bottom:0; width: min(680px, 100vw);
  background: var(--paper); z-index: 801; overflow-y:auto;
  transform: translateX(100%); transition: transform .42s var(--ease);
  display:flex; flex-direction: column; box-shadow: -30px 0 80px rgba(24,18,16,.25);
}
.reader-panel.open { transform: translateX(0); }
.reader-topbar { position: sticky; top:0; z-index: 10; display:flex; align-items:center; justify-content: space-between; padding: 16px 24px; background: rgba(251,249,245,.9); backdrop-filter: blur(12px); border-bottom:1px solid var(--line); flex-shrink:0; }
.reader-brand { display:flex; align-items:center; gap: 9px; font-family: var(--display); font-weight:700; font-size: 15px; }
.reader-brand b { color: var(--red); }
.reader-close { width: 38px; height:38px; border-radius:50%; background: var(--card); border:1px solid var(--line-2); color: var(--ink); font-size: 17px; cursor:pointer; display:grid; place-items:center; transition: background .2s, transform .2s; }
.reader-close:hover { background: var(--paper-2); transform: rotate(90deg); }
.reader-hero { width:100%; flex-shrink:0; background: var(--paper-2); }
.reader-hero img, .reader-hero video { width:100%; max-height: 360px; object-fit: cover; display:block; }
.reader-hero .ph { width:100%; height: 220px; display:grid; place-items:center; background: repeating-linear-gradient(45deg, rgba(27,23,20,.03) 0 14px, transparent 14px 28px), var(--paper-2); color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing:.1em; text-transform:uppercase; }
.reader-content { flex:1; padding: 32px 36px 56px; }
.reader-meta { display:flex; align-items:center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.reader-date { font-size: 13px; color: var(--muted); font-family: var(--mono); }
.reader-title { font-family: var(--display); font-weight: 700; font-size: clamp(24px, 3.6vw, 34px); line-height: 1.18; letter-spacing:-.02em; margin-bottom: 18px; text-wrap: balance; }
.reader-divider { height: 3px; width: 52px; background: var(--red); border-radius: 2px; margin-bottom: 22px; }
.reader-body { font-size: 16.5px; color: var(--ink-soft); line-height: 1.78; white-space: pre-wrap; word-break: break-word; }
.reader-link { display:inline-flex; align-items:center; gap: 9px; margin-top: 28px; background: var(--card); border:1.5px solid var(--line-2); color: var(--ink); font-size: 14.5px; font-weight:600; padding: 12px 22px; border-radius: 13px; transition: border-color .2s, transform .2s; }
.reader-link:hover { border-color: var(--red); color: var(--red); transform: translateY(-2px); }
.reader-react { margin-top: 34px; padding-top: 26px; border-top:1px solid var(--line); }
.reader-react .lbl { font-family: var(--mono); font-size: 11.5px; letter-spacing:.1em; text-transform:uppercase; color: var(--muted); margin-bottom: 14px; }
.reader-react-row { display:flex; gap: 10px; flex-wrap: wrap; }
.react-btn { display:flex; align-items:center; gap: 8px; background: var(--card); border:1.5px solid var(--line-2); padding: 9px 18px; border-radius: 100px; font-size: 14.5px; font-weight:600; color: var(--ink-soft); cursor: pointer; transition: transform .2s var(--ease), border-color .2s, background .2s, color .2s; }
.react-btn:hover { transform: translateY(-2px); border-color: var(--red); }
.react-btn.on { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.react-btn .e { font-size: 17px; }
.reader-applet { margin-top: 30px; padding: 24px; background: var(--night); color:#fff; border-radius: var(--r-lg); text-align:center; }
.reader-applet p { font-size: 14px; color: rgba(255,255,255,.65); margin-bottom: 16px; line-height:1.6; }
.reader-applet a { display:inline-flex; align-items:center; gap:9px; }

@media (max-width: 680px){
  .reader-panel { top:auto; left:0; right:0; bottom:0; width:100%; height: 93vh; border-radius: 24px 24px 0 0; transform: translateY(100%); }
  .reader-panel.open { transform: translateY(0); }
  .reader-content { padding: 26px 22px 48px; }
}

@media (prefers-reduced-motion: reduce){
  .reader-panel, .reader-backdrop { transition: none !important; }
}
