/* ---------------------------------------------------------------- base */
:root {
  --brand: #e11d48;
  --ink: #12141a;
  --muted: #6b7280;
  --line: #e6e8ec;
  --bg: #f6f7f9;
  --card: #fff;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 8px 24px -12px rgba(16, 24, 40, .18);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Nirmala UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---------------------------------------------------------------- header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .bar {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 62px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -.4px;
}
.logo .mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), #7c1d3c);
  display: grid; place-items: center;
  color: #fff; font-size: 15px;
}
.nav { display: flex; gap: 18px; margin-left: 6px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  font-size: 14.5px; font-weight: 600; color: #3d4350;
  white-space: nowrap; padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a.active { color: var(--brand); border-color: var(--brand); }

.search-box { display: flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; }
.search-box input { border: 0; background: transparent; outline: none; font-size: 14px; width: 150px; font-family: inherit; }

/* ---------------------------------------------------------------- section */
.section { margin: 30px 0; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.section-title {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 19px; font-weight: 800; margin: 0;
  border: 2px solid var(--ink); padding: 4px 12px; border-radius: 4px;
}
.section-title::before {
  content: ""; width: 0; height: 0;
  border-left: 9px solid var(--brand);
  border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}
.section-link { font-size: 13.5px; font-weight: 700; color: var(--brand); }

/* ---------------------------------------------------------------- cards */
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px;
}
.story-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex; flex-direction: column;
}
.story-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px -10px rgba(16,24,40,.35); }
.story-thumb {
  position: relative;
  aspect-ratio: 9 / 16;
  background: #e9edf2;
  overflow: hidden;
}
.story-thumb img { width: 100%; height: 100%; object-fit: cover; }
.story-thumb .cat-chip {
  position: absolute; top: 10px; left: 10px;
  background: var(--brand); color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 4px 9px; border-radius: 4px;
}
.story-thumb .slide-chip {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(0,0,0,.62); color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
  backdrop-filter: blur(4px);
}
.story-card .body { padding: 11px 12px 14px; }
.story-card h3 {
  margin: 0 0 7px; font-size: 14.5px; line-height: 1.42; font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.story-card .meta { font-size: 11.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; }

/* horizontal rail (aaj tak style) */
.rail-wrap { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 172px;
  gap: 14px; overflow-x: auto; scroll-behavior: smooth;
  scrollbar-width: none; padding-bottom: 2px;
}
.rail::-webkit-scrollbar { display: none; }
.rail-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
  display: grid; place-items: center; cursor: pointer; z-index: 3;
  font-size: 15px; color: #333;
}
.rail-btn.prev { left: -12px; }
.rail-btn.next { right: -12px; }

/* ---------------------------------------------------------------- hero */
.hero {
  background: linear-gradient(120deg, #12141a, #2b1020 55%, #4c0519);
  color: #fff; border-radius: 16px; padding: 26px 24px; margin-top: 22px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
}
.hero h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.5px; }
.hero p { margin: 0; opacity: .78; font-size: 14.5px; }
.hero .stats { display: flex; gap: 26px; }
.hero .stats b { display: block; font-size: 22px; }
.hero .stats span { font-size: 12px; opacity: .7; text-transform: uppercase; letter-spacing: .6px; }

/* ---------------------------------------------------------------- misc */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 28px 0; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 36px; height: 36px; padding: 0 10px;
  display: grid; place-items: center; border-radius: 8px;
  background: #fff; border: 1px solid var(--line); font-size: 14px; font-weight: 600;
}
.pagination .on { background: var(--brand); color: #fff; border-color: var(--brand); }

.empty { background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 46px; text-align: center; color: var(--muted); }

.site-footer {
  margin-top: 40px; background: #12141a; color: #aeb4bf; padding: 26px 0; font-size: 13.5px;
}
.site-footer .cols { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: #e6e8ec; }
.site-footer h4 { color: #fff; font-size: 14px; margin: 0 0 8px; }
.site-footer .links { display: flex; gap: 14px; flex-wrap: wrap; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.chip {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; font-weight: 600; color: #3d4350;
}
.chip.on, .chip:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

@media (max-width: 720px) {
  .story-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .hero { padding: 20px; }
  .hero h1 { font-size: 21px; }
  .search-box input { width: 110px; }
}
