/* Home news section — editorial "newsroom" layout: lead story + stacked headlines */
#section-news {
  --news-ink: #0b1c30;
  --news-ink-2: #10263d;
  --news-amber: #e5b775;
  --news-amber-soft: #e5b77526;
  --news-cream: #f5f3ee;
  --news-muted: #a9b8c7;
  --news-line: #ffffff1a;
  --news-glass: #ffffff0a;
  --news-radius: 20px;
  position: relative;
  isolation: isolate;
  background: radial-gradient(ellipse at 8% 0%, #1b4561 0%, transparent 50%), radial-gradient(ellipse at 100% 100%, #16405a 0%, transparent 45%), var(--news-ink);
}
/* Faint isobar rings — a quiet nod to weather maps */
#section-news::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-radial-gradient(circle at 92% 6%, transparent 0 46px, #ffffff0b 46px 47px);
  -webkit-mask-image: radial-gradient(circle at 92% 6%, #000 0%, transparent 62%);
  mask-image: radial-gradient(circle at 92% 6%, #000 0%, transparent 62%);
}
#section-news .news-shell { box-sizing: border-box; width: 100%; max-width: 1560px; height: 100dvh; margin: 0 auto; padding: clamp(18px, 3.4vh, 36px) clamp(20px, 4vw, 72px); display: flex; flex-direction: column; gap: clamp(14px, 2.4vh, 26px); }

/* Header */
.news-header { flex: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: clamp(12px, 2vh, 20px); border-bottom: 1px solid var(--news-line); }
.news-header-text { min-width: 0; }
#section-news .news-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 6px; color: var(--news-amber); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; line-height: 1.4; }
.news-live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--news-amber); }
.news-live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--news-amber); animation: news-pulse 2.4s ease-out infinite; }
#section-news .news-heading { margin: 0; color: var(--news-cream); font-family: "Poppins", "Noto Sans Devanagari", sans-serif; font-size: clamp(32px, 3.2vw, 50px); font-weight: 600; line-height: 1.15; letter-spacing: -.03em; }
#section-news .news-subtitle { margin: 6px 0 0; color: var(--news-muted); font-size: clamp(14px, 1vw, 16px); line-height: 1.5; }

/* Pagination (sits in the header) */
.news-pagination { flex: none; display: flex; align-items: center; gap: 6px; padding: 5px; border: 1px solid var(--news-line); border-radius: 999px; background: var(--news-glass); }
.news-page-status { margin: 0 8px; color: #e3eaf1; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.news-pagination button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid #ffffff2e; border-radius: 50%; background: #ffffff0d; color: var(--news-cream); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.news-pagination button svg { width: 18px; height: 18px; }
.news-pagination button:hover:not(:disabled) { background: var(--news-amber); border-color: var(--news-amber); color: var(--news-ink); }
.news-pagination button:disabled { opacity: .35; cursor: default; }

/* Grid: lead story on the left, remaining stories stacked on the right */
.news-pages { flex: 1; min-height: 0; min-width: 0; }
.news-grid { height: 100%; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); grid-template-rows: repeat(var(--news-rows, 1), minmax(0, 1fr)); gap: clamp(12px, 1.8vh, 18px); }
.news-grid[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
.news-grid[hidden], .news-pagination[hidden], .news-card-image img[hidden] { display: none; }

/* Card base */
.news-card { position: relative; isolation: isolate; min-width: 0; min-height: 0; display: flex; overflow: hidden; border: 1px solid var(--news-line); border-radius: var(--news-radius); background: var(--news-glass); color: var(--news-cream); text-decoration: none; transition: border-color .25s, background-color .25s, box-shadow .25s, transform .25s; }
a.news-card { cursor: pointer; }
a.news-card:hover { border-color: #e5b77599; background-color: #ffffff12; box-shadow: 0 18px 40px #0000004d; transform: translateY(-2px); }
a.news-card:focus-visible, .news-pagination button:focus-visible { outline: 3px solid var(--news-amber); outline-offset: 3px; }
.news-card-image { position: relative; flex: none; overflow: hidden; background: linear-gradient(135deg, #24506d, #173449) center / cover; }
.news-card-image::before { content: ""; position: absolute; inset: 0; background: url('/images/bmsk-logo.png') center / 56px auto no-repeat; opacity: .55; }
.news-card-image img { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
a.news-card:hover .news-card-image img { transform: scale(1.05); }
.news-card-body { position: relative; z-index: 2; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: clamp(12px, 1.8vh, 20px) clamp(14px, 1.3vw, 22px); }
#section-news .news-card-meta { display: flex; align-items: center; gap: 10px; margin: 0; min-width: 0; font-size: 12px; line-height: 1.4; }
.news-card-number { flex: none; color: var(--news-amber); font-weight: 700; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.news-card-number::after { content: ""; display: inline-block; width: 18px; height: 1px; margin-left: 10px; vertical-align: middle; background: currentColor; opacity: .6; }
#section-news .news-source { display: inline-flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; color: var(--news-muted); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; text-overflow: ellipsis; }
.news-source svg { flex: none; width: 13px; height: 13px; }
#section-news .news-card h3 { margin: 0; color: inherit; font-family: "Poppins", "Noto Sans Devanagari", sans-serif; font-size: clamp(15px, 1.15vw, 19px); font-weight: 500; line-height: 1.45; letter-spacing: -.01em; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; padding-bottom: .08em; transition: color .2s; }
a.news-card:hover h3 { color: #fff; }
.news-card-cta { display: inline-flex; align-items: center; gap: 8px; color: var(--news-amber); font-size: 14px; font-weight: 600; }
.news-card-cta svg { width: 18px; height: 18px; transition: transform .25s; }
a.news-card:hover .news-card-cta svg { transform: translate(3px, -3px); }
.news-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Lead story: full-bleed photo with the headline set over a gradient */
.news-card--lead { grid-column: 1; grid-row: 1 / -1; flex-direction: column; justify-content: flex-end; min-height: 280px; background: var(--news-ink-2); }
.news-card--lead .news-card-image { position: absolute; inset: 0; }
.news-card--lead .news-card-image::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, #06121f00 30%, #06121fb3 62%, #06121ff5 100%); }
.news-card-badge { position: absolute; top: clamp(14px, 2vh, 22px); left: clamp(14px, 1.6vw, 26px); z-index: 2; padding: 6px 14px; border-radius: 999px; background: var(--news-amber); color: var(--news-ink); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; box-shadow: 0 6px 18px #0000004d; }
.news-card--lead .news-card-body { gap: 12px; padding: clamp(20px, 3.4vh, 40px) clamp(20px, 2.6vw, 44px); }
#section-news .news-card--lead .news-source { color: #d9e2ea; }
#section-news .news-card--lead h3 { max-width: 30ch; color: #fff; font-size: clamp(24px, 2.4vw, 40px); font-weight: 600; line-height: 1.25; letter-spacing: -.025em; text-shadow: 0 2px 20px #0006; }
.news-card--lead .news-card-cta { align-self: flex-start; margin-top: 6px; padding: 10px 18px; border: 1px solid #e5b77580; border-radius: 999px; background: #0b1c3066; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background .25s, color .25s; }
a.news-card--lead:hover .news-card-cta { background: var(--news-amber); color: var(--news-ink); }
.news-grid[data-count="1"] .news-card--lead { grid-column: 1 / -1; }
#section-news .news-grid[data-count="1"] .news-card--lead h3 { font-size: clamp(28px, 3vw, 52px); }

/* Secondary stories: thumbnail + text rows */
.news-card:not(.news-card--lead) { flex-direction: row; align-items: stretch; }
.news-card:not(.news-card--lead) .news-card-image { height: 100%; aspect-ratio: 4 / 3; max-width: 42%; }
.news-card:not(.news-card--lead) .news-card-body { flex: 1; justify-content: center; padding-right: 52px; }
.news-card:not(.news-card--lead) .news-card-cta { position: absolute; right: 14px; bottom: 14px; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #ffffff33; border-radius: 50%; color: var(--news-cream); transition: background .25s, color .25s, border-color .25s; }
.news-card:not(.news-card--lead) .news-card-cta svg { width: 15px; height: 15px; }
a.news-card:not(.news-card--lead):hover .news-card-cta { background: var(--news-amber); border-color: var(--news-amber); color: var(--news-ink); }
a.news-card:not(.news-card--lead):hover .news-card-cta svg { transform: none; }

/* With only one or two side stories, give them tall picture cards instead of thin rows */
@media (min-width: 768px) {
  .news-grid:is([data-count="2"], [data-count="3"]) .news-card:not(.news-card--lead) { flex-direction: column; }
  .news-grid:is([data-count="2"], [data-count="3"]) .news-card:not(.news-card--lead) .news-card-image { flex: 1; height: auto; min-height: 0; aspect-ratio: auto; max-width: none; }
  .news-grid:is([data-count="2"], [data-count="3"]) .news-card:not(.news-card--lead) .news-card-body { flex: none; padding-bottom: clamp(14px, 2vh, 22px); }
  #section-news .news-grid[data-count="2"] .news-card:not(.news-card--lead) h3 { font-size: clamp(17px, 1.4vw, 22px); }
}

/* Switching pages: new cards rise into place */
.news-grid:not([hidden]) .news-card { animation: news-rise .55s cubic-bezier(.2, .7, .2, 1) backwards; }
.news-grid .news-card:nth-child(2) { animation-delay: .06s; }
.news-grid .news-card:nth-child(3) { animation-delay: .12s; }
.news-grid .news-card:nth-child(4) { animation-delay: .18s; }
.news-grid .news-card:nth-child(5) { animation-delay: .24s; }
.news-grid .news-card:nth-child(6) { animation-delay: .3s; }
@keyframes news-rise { from { transform: translateY(14px); } to { transform: none; } }
/* Lead-story rotation (home-news.js): cards fade back in at their new positions */
.news-grid:not([hidden]) .news-card.news-card--swap { animation: news-swap .6s ease backwards; }
@keyframes news-swap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes news-pulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }

@media (max-width: 767px) {
  #section-news .news-shell { height: auto; min-height: 100dvh; padding: 28px 16px; gap: 18px; }
  .news-header { align-items: flex-end; gap: 12px; }
  #section-news .news-heading { font-size: 30px; }
  #section-news .news-subtitle { font-size: 14px; }
  #section-news .news-eyebrow { font-size: 11px; }
  .news-page-status { display: none; }
  .news-pagination button { width: 38px; height: 38px; }
  .news-grid { height: auto; grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-rows: auto; gap: 12px; }
  .news-card { border-radius: 16px; }
  .news-card--lead { grid-column: 1; grid-row: auto; min-height: 0; aspect-ratio: 4 / 5; max-height: 72vh; }
  .news-grid[data-count="1"] .news-card--lead { aspect-ratio: 4 / 4.4; }
  .news-card--lead .news-card-body { padding: 20px; }
  #section-news .news-card--lead h3, #section-news .news-grid[data-count="1"] .news-card--lead h3 { font-size: 22px; }
  .news-card--lead .news-card-cta { padding: 8px 14px; font-size: 13px; }
  .news-card:not(.news-card--lead) { min-height: 104px; }
  .news-card:not(.news-card--lead) .news-card-image { width: 112px; height: auto; max-width: none; aspect-ratio: auto; }
  .news-card:not(.news-card--lead) .news-card-body { gap: 6px; padding: 12px 44px 12px 14px; }
  #section-news .news-card:not(.news-card--lead) h3 { font-size: 14px; -webkit-line-clamp: 3; }
  #section-news .news-card-meta { font-size: 11px; }
  .news-card:not(.news-card--lead) .news-card-cta { right: 10px; bottom: 10px; width: 28px; height: 28px; }
  a.news-card:hover { transform: none; }
}
/* Short desktop viewports: the five side rows get ~95-120px each, too little for a
   three-line (often Hindi) headline at full size — tighten the row so it fits. */
@media (min-width: 768px) and (min-height: 641px) and (max-height: 960px) {
  .news-card:not(.news-card--lead) .news-card-body { gap: 4px; padding-block: 6px; }
  #section-news .news-card:not(.news-card--lead) h3 { font-size: clamp(13px, 1.9vh, 17px); line-height: 1.32; }
  #section-news .news-card:not(.news-card--lead) .news-card-meta { font-size: 11px; }
}
@media (min-width: 768px) and (max-height: 640px) {
  #section-news .news-shell { padding-block: 12px; gap: 10px; }
  .news-header { padding-bottom: 8px; }
  #section-news .news-heading { font-size: 26px; }
  #section-news .news-subtitle { display: none; }
  #section-news .news-eyebrow { margin-bottom: 2px; font-size: 10px; }
  .news-card-body { gap: 4px; padding-block: 8px; }
  #section-news .news-card h3 { font-size: 14px; -webkit-line-clamp: 2; }
  #section-news .news-card--lead h3 { font-size: 22px; }
  .news-card--lead .news-card-cta { padding: 6px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .news-card, .news-card-image img, .news-card-cta, .news-card-cta svg { transition: none; }
  .news-grid:not([hidden]) .news-card, .news-live-dot::after { animation: none; }
  a.news-card:hover, a.news-card:hover .news-card-image img { transform: none; }
}
