/* Xera Tech News — theme matched to xeratech.in (navy #0a2342 / gold accent) */

:root {
  --navy: #0a2342;
  --navy-light: #123a66;
  --gold: #f5a623;
  --gold-dark: #d98c0f;
  --text: #1a1f2b;
  --muted: #5b6472;
  --surface: #ffffff;
  --bg: #f6f7fa;
  --border: #e4e7ec;
  --radius: 12px;
  --sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff;
  padding: 10px 16px; z-index: 999;
}
.skip-link:focus { left: 0; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 24px;
}
.logo img { height: 34px; width: auto; }
.main-nav { display: none; gap: 20px; flex: 1; }
.main-nav a { color: rgba(255,255,255,0.8); font-size: 14px; font-weight: 500; white-space: nowrap; }
.main-nav a:hover, .main-nav a.active { color: var(--gold); }
.cta-btn {
  display: none; background: var(--gold); color: var(--navy); font-weight: 700;
  padding: 8px 16px; border-radius: 20px; font-size: 13px; white-space: nowrap;
}
.nav-toggle {
  margin-left: auto; background: none; border: none; color: #fff; font-size: 22px; cursor: pointer;
}

.main-nav.open {
  display: flex; flex-direction: column; position: absolute; top: 58px; left: 0; right: 0;
  background: var(--navy); padding: 12px 20px; gap: 14px; box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

@media (min-width: 900px) {
  .main-nav { display: flex; margin-left: 20px; }
  .main-nav.open { position: static; flex-direction: row; padding: 0; box-shadow: none; }
  .cta-btn { display: inline-block; margin-left: auto; }
  .nav-toggle { display: none; }
}

/* ── Shell / layout ─────────────────────────────────────── */
.news-shell { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }

.ticker {
  display: flex; align-items: center; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 20px; overflow: hidden; gap: 12px;
}
.ticker-label { background: #fee2e2; color: #b91c1c; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 12px; white-space: nowrap; }
.ticker-track { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; }
.ticker-track::-webkit-scrollbar { display: none; }
.ticker-track a { font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--text); }
.ticker-track a:hover { color: var(--gold-dark); }

.news-hero-eyebrow { color: var(--gold-dark); font-weight: 700; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
.news-h1 { font-size: clamp(28px, 5vw, 42px); color: var(--navy); margin: 0 0 10px; line-height: 1.15; }
.news-lede { color: var(--muted); font-size: 16px; max-width: 640px; margin: 0 0 20px; }

.news-stats-row { display: flex; gap: 28px; margin-bottom: 24px; }
.news-stats-row div { display: flex; flex-direction: column; }
.news-stats-row strong { font-size: 22px; color: var(--navy); }
.news-stats-row span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* ── Featured hero card ─────────────────────────────────── */
.featured-card {
  display: block; background: var(--navy); border-radius: var(--radius); overflow: hidden;
  margin-bottom: 28px; color: #fff; box-shadow: 0 8px 24px rgba(10,35,66,0.25);
}
.featured-media { height: 200px; background-size: cover; background-position: center; background-color: var(--navy-light); }
.featured-body { padding: 20px; }
.featured-body h2 { font-size: 22px; margin: 10px 0; line-height: 1.3; }
.featured-body p { color: rgba(255,255,255,0.75); font-size: 14px; margin: 0 0 10px; }
.featured-body .meta { font-size: 12px; color: rgba(255,255,255,0.55); }

@media (min-width: 720px) {
  .featured-card { display: grid; grid-template-columns: 1.1fr 1fr; }
  .featured-media { height: 100%; min-height: 260px; }
  .featured-body { padding: 28px; display: flex; flex-direction: column; justify-content: center; }
  .featured-body h2 { font-size: 26px; }
}

/* ── Top Stories mosaic (homepage hero) ─────────────────── */
.top-stories { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 30px; }
.top-lead {
  position: relative; display: block; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16/10; background: var(--navy); box-shadow: 0 10px 30px rgba(10,35,66,0.22);
}
.top-lead img { width: 100%; height: 100%; object-fit: cover;    object-position: top; }
.top-lead-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 22px; background: linear-gradient(0deg, rgba(5,17,33,0.92) 0%, rgba(5,17,33,0.35) 55%, transparent 100%);
}
.top-lead-overlay h2 { color: #fff; font-size: clamp(20px, 3.2vw, 30px); margin: 8px 0; line-height: 1.25; }
.top-lead-overlay p { color: rgba(255,255,255,0.75); font-size: 14px; margin: 0 0 6px; max-width: 640px; }
.top-lead-overlay .meta { color: rgba(255,255,255,0.55); font-size: 12px; }

.top-side { display: flex; flex-direction: column; gap: 10px; }
.top-side-item {
  display: flex; gap: 12px; align-items: center; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 8px; transition: box-shadow .15s;
}
.top-side-item:hover { box-shadow: 0 6px 16px rgba(10,35,66,0.1); }
.top-side-item img { width: 66px; height: 66px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.top-side-item .num {
  width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff;
  font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.top-side-item h3 { font-size: 13px; line-height: 1.35; margin: 0 0 2px; color: var(--text); }
.top-side-item time { font-size: 11px; color: var(--muted); }

@media (min-width: 900px) {
  .top-stories { grid-template-columns: 1.6fr 1fr; }
  .top-lead { aspect-ratio: 16/11; }
}

/* ── Category pill ──────────────────────────────────────── */
.cat-pill {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; width: max-content;
  padding: 4px 10px; border-radius: 12px; background: color-mix(in srgb, var(--pill-color) 12%, white);
  color: var(--pill-color); margin-bottom: 10px;
}
.cat-pill.small { font-size: 6px; padding: 2px 6px; }

/* ── Category filter bar ────────────────────────────────── */
.cat-filter-bar {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 16px; margin-bottom: 20px;
  border-bottom: 1px solid var(--border); scrollbar-width: none;
}
.cat-filter-bar::-webkit-scrollbar { display: none; }
.cat-filter-bar a {
  white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--muted);
  padding: 8px 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border);
}
.cat-filter-bar a.active, .cat-filter-bar a:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ── Category rows / card grid ──────────────────────────── */
.cat-row { margin-bottom: 36px; }
.cat-row-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.cat-row-head h2 { font-size: 19px; color: var(--navy); margin: 0; display: flex; align-items: center; gap: 8px; }
.view-all { font-size: 13px; font-weight: 700; color: var(--gold-dark); }

.card-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 560px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1180px) { .card-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }

.news-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; position: relative;
}
.news-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--cat-color, var(--gold)); z-index: 2;
}
.news-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(10,35,66,0.14); }
.news-card a { color: inherit; display: block; }
.card-media { aspect-ratio: 16/10; overflow: hidden; background: var(--bg); }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease;     object-position: top;}
.news-card:hover .card-media img { transform: scale(1.05); }
.card-body { padding: 14px; }
.card-body h3 { font-size: 15px; margin: 0 0 6px; line-height: 1.4; color: var(--text); font-weight: 600; }
.card-body p { font-size: 13px; color: var(--muted); margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-body time { font-size: 12px; color: var(--muted); }
.card-body .cat-pill.small { margin-bottom: 8px; }

/* ── Poster horizontal scroll (homepage teaser) ────────── */
.poster-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.poster-scroll-card { flex: 0 0 140px; border-radius: 10px; overflow: hidden; aspect-ratio: 4/5; box-shadow: 0 4px 12px rgba(10,35,66,0.15); }
.poster-scroll-card img { width: 100%; height: 100%; object-fit: cover;     object-position: top;}

/* ── Sidebar layout (desktop 3-column) ─────────────────── */
.sidebar-layout {
  display: block;
  max-width: 1320px;
}
.sidebar-layout .layout-main { min-width: 0; }
.sidebar { display: none; }

@media (min-width: 1180px) {
  .sidebar-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 300px;
    gap: 32px;
    align-items: start;
  }
  .sidebar-layout.no-left { grid-template-columns: minmax(0, 1fr) 300px; }
  .sidebar { display: block; position: sticky; top: 76px; }
}

.widget {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 18px;
}
.widget h3 { font-size: 14px; color: var(--navy); margin: 0 0 12px; }
.widget-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.widget-list a { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text); line-height: 1.4; }
.widget-list a:hover { color: var(--gold-dark); }
.widget-list a.active { color: var(--gold-dark); font-weight: 700; }
.widget-rank {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--navy); color: #fff;
  font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.widget-cats-list a { justify-content: space-between; }
.widget-count { color: var(--muted); font-size: 12px; background: var(--bg); border-radius: 10px; padding: 1px 8px; }

.widget-poster-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.widget-poster-thumb { display: block; border-radius: 6px; overflow: hidden; aspect-ratio: 4/5; }
.widget-poster-thumb img { width: 100%; height: 100%; object-fit: cover;     object-position: top;}
.widget-more-link { font-size: 12px; font-weight: 700; color: var(--gold-dark); }

.widget-cta { background: var(--navy); color: #fff; text-align: center; }
.widget-cta h3 { color: #fff; }
.widget-cta p { font-size: 12px; color: rgba(255,255,255,0.65); margin: 0 0 12px; }
.widget-cta .btn-primary { display: block; }

/* ── Carousel (real arrow controls, not just scroll) ────── */
.carousel { position: relative; margin-top: 16px; }
.carousel-track {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity;
  scrollbar-width: none; padding-bottom: 4px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { scroll-snap-align: start; }
.card-carousel-track { gap: 16px; }
.carousel-card { flex: 0 0 260px; }
@media (min-width: 640px) { .carousel-card { flex: 0 0 280px; } }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  background: #fff; color: var(--navy); font-size: 18px; cursor: pointer;
  box-shadow: 0 4px 10px rgba(10,35,66,0.15); display: none; align-items: center; justify-content: center;
}
.carousel-arrow:disabled { opacity: 0.3; cursor: default; }
.carousel-prev { left: -14px; }
.carousel-next { right: -14px; }
@media (min-width: 720px) {
  .carousel-arrow { display: flex; }
}

/* ── Pagination ─────────────────────────────────────────── */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 30px 0; }
.pagination a, .pagination span {
  min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 13px; font-weight: 700; padding: 0 10px;
}
.pagination a { background: var(--surface); border: 1px solid var(--border); color: var(--navy); }
.pagination a:hover { background: var(--navy); color: #fff; }
.pagination .current { background: var(--gold); color: var(--navy); }
.pagination .disabled { color: var(--muted); background: var(--bg); }

/* ── Filter / sort bar (post hub) ──────────────────────── */
.filter-sort-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; margin: 18px 0;
}
.filter-sort-bar form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filter-sort-bar label { font-size: 12px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.filter-sort-bar select {
  padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border); font-size: 13px; background: #fff;
}
.result-count { font-size: 13px; color: var(--muted); }

/* ── Table of contents (article page) ───────────────────── */
.article-toc {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; margin: 20px 0;
}
.article-toc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 0 10px; }
.article-toc ol { margin: 0; padding-left: 18px; }
.article-toc li { font-size: 14px; margin-bottom: 6px; }
.article-toc a { color: var(--navy); font-weight: 600; }

.reading-time { color: var(--muted); font-size: 13px; }

/* ── Prev / Next article nav ───────────────────────────── */
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 32px 0; }
.article-nav-link {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; display: block;
}
.article-nav-link .dir { font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.article-nav-link .ttl { font-size: 13px; font-weight: 700; color: var(--navy); margin-top: 4px; line-height: 1.35; }
.article-nav-link.next { text-align: right; }

/* ── Clickable tags ─────────────────────────────────────── */
.tag-list a.tag { text-decoration: none; }
.tag-list a.tag:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ── Archive strip ──────────────────────────────────────── */
.archive-strip { border-top: 1px solid var(--border); padding-top: 20px; }
.archive-strip h2 { font-size: 17px; color: var(--navy); margin-bottom: 10px; }
.archive-links { display: flex; flex-wrap: wrap; gap: 10px; }
.archive-links a { background: var(--surface); border: 1px solid var(--border); padding: 6px 12px; border-radius: 16px; font-size: 13px; }

/* ── Article page ───────────────────────────────────────── */
.article-shell { max-width: 780px; }
.breadcrumbs { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs a { color: var(--muted); }
.article-title { font-size: clamp(24px, 4.5vw, 34px); color: var(--navy); line-height: 1.25; margin: 6px 0 14px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.article-meta address { font-style: normal; }
.article-hero-img { width: 100%; height: auto; border-radius: var(--radius); margin-bottom: 18px; }

.answer-summary {
  background: #fff8e8; border: 1px solid #f3ddaa; border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 22px;
}
.answer-label { font-size: 11px; font-weight: 800; color: var(--gold-dark); text-transform: uppercase; letter-spacing: 0.06em; }
.answer-summary p { margin: 6px 0 0; font-size: 15px; color: var(--text); }

.article-body h2 { font-size: 20px; color: var(--navy); margin: 28px 0 10px; }
.article-body p { font-size: 16px; color: var(--text); margin: 0 0 14px; }
.article-body blockquote {
  border-left: 3px solid var(--gold); margin: 18px 0; padding: 4px 0 4px 16px; font-style: italic; color: var(--muted);
}
.article-body blockquote cite { display: block; font-style: normal; font-size: 13px; margin-top: 6px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.tag { font-size: 12px; background: var(--bg); border: 1px solid var(--border); padding: 4px 10px; border-radius: 12px; color: var(--muted); }

.poster-teaser {
  display: flex; align-items: center; gap: 14px; background: var(--navy); border-radius: var(--radius);
  padding: 12px 16px; margin: 24px 0; color: #fff; font-size: 14px; font-weight: 600;
}
.poster-teaser img { width: 56px; height: 70px; object-fit: cover; border-radius: 6px; flex-shrink: 0;     object-position: top;}

.share-row { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 32px; }
.share-row a { font-weight: 700; color: var(--navy); }

.related-section h2 { font-size: 19px; color: var(--navy); margin-bottom: 14px; }

/* ── Buttons / CTA band ─────────────────────────────────── */
.btn { display: inline-block; padding: 10px 20px; border-radius: 24px; font-weight: 700; font-size: 14px; }
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4); }

.news-cta-band {
  background: var(--navy); color: #fff; text-align: center; padding: 40px 20px; margin-top: 40px;
}
.news-cta-band h2 { font-size: 22px; margin: 0 0 6px; }
.news-cta-band p { color: rgba(255,255,255,0.7); font-size: 13px; margin: 0 0 18px; }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ── 404 / empty ────────────────────────────────────────── */
.not-found { text-align: center; padding: 50px 20px; }
.not-found h1 { color: var(--navy); }
.empty-state { color: var(--muted); text-align: center; padding: 40px 0; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { background: #071a30; color: rgba(255,255,255,0.6); padding: 32px 20px 20px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.footer-brand p { font-size: 13px; margin-top: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; align-content: flex-start; }
.footer-links a { color: rgba(255,255,255,0.6); font-size: 13px; }
.footer-links a:hover { color: var(--gold); }
.copyright { text-align: center; font-size: 12px; margin-top: 24px; color: rgba(255,255,255,0.35); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
