/* ------------------------------------------------------------------
 * Shrey Journal, news-portal layout, 2026-09-11.
 *
 * Trending bar, masthead with date and search, a category bar, top
 * stories (lead + two secondary + headline list), then the latest list
 * beside a sidebar. Scoped to .nw so the shared shell is untouched.
 *
 * Class names the filter script relies on are kept (ep-filter,
 * ep-modern-feature, ep-modern-side, ep-modern-latest,
 * ep-modern-section-head, ep-posts, article[data-category]); the
 * editorial-pages.css rules on those classes are neutralised below.
 * No decorative rules on headings, by request.
 * ------------------------------------------------------------------ */

.shrey-news-page .nw {
    --ink: #0E1C3C;
    --blue: #134BC3;
    --blue-dark: #0F3C9E;
    --muted: #55627A;
    --line: #DDE3EE;
    --soft: #F2F5FB;
    background: #fff;
    color: var(--ink);
}
.shrey-news-page .nw [hidden] { display: none !important; }
.nw-shell { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }
.shrey-news-page .nw a { color: inherit; text-decoration: none; }
.shrey-news-page .nw h1,
.shrey-news-page .nw h2,
.shrey-news-page .nw h3 { color: var(--ink) !important; letter-spacing: -.01em; text-transform: none; }
.shrey-news-page .nw :is(h1, h2, h3)::before,
.shrey-news-page .nw :is(h1, h2, h3)::after { content: none !important; display: none !important; }
.shrey-news-page .nw a:focus-visible,
.shrey-news-page .nw button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* Trending */
.nw-trending { background: var(--ink); font-size: 13.5px; }
.nw-trending .nw-shell {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 42px;
    overflow-x: auto;
    scrollbar-width: none;
}
.nw-trending strong {
    flex: none;
    padding: 3px 9px;
    border-radius: 4px;
    background: var(--blue);
    color: #fff;
    font-size: 11.5px;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.nw-trending ul { display: flex; gap: 22px; margin: 0; padding: 0; list-style: none; white-space: nowrap; }
.shrey-news-page .nw-trending a { color: #DCE4F5; }
.shrey-news-page .nw-trending a:hover { color: #fff; text-decoration: underline; }

/* Masthead */
.nw-masthead { padding: 28px 0 22px; border-bottom: 1px solid var(--line); }
.nw-masthead-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 24px;
    align-items: end;
}
.nw-kicker {
    margin: 0 0 6px;
    color: var(--blue);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.shrey-news-page .nw-masthead h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 56px) !important;
    font-weight: 800;
    line-height: 1.05;
}
.nw-date { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.nw-date:empty { display: none; }
.shrey-news-page .nw .blog-journal-search { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.shrey-news-page .nw .blog-search-field {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid #C9D2E3;
    border-radius: 999px;
    background: #fff;
}
.shrey-news-page .nw .blog-search-field input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--ink);
    font-size: 15px;
    outline: 0;
}
.shrey-news-page .nw .blog-search-field input::placeholder { color: var(--muted); }
.shrey-news-page .nw .blog-search-field i { color: var(--muted); }
.shrey-news-page .nw .blog-search-field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(19, 75, 195, .18); }

/* Category bar */
.nw-sections { border-bottom: 1px solid var(--line); background: #fff; }
.shrey-news-page .nw .ep-filter {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 8px 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.shrey-news-page .nw .ep-filter button {
    flex: none;
    min-height: 40px !important;
    height: 40px;
    line-height: 1 !important;
    margin: 0;
    padding: 0 16px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: var(--ink) !important;
    font-size: 14.5px !important;
    font-weight: 600;
    cursor: pointer;
    box-shadow: none !important;
}
.shrey-news-page .nw .ep-filter button::before,
.shrey-news-page .nw .ep-filter button::after { display: none !important; }
.shrey-news-page .nw .ep-filter button:hover { background: var(--soft) !important; }
.shrey-news-page .nw .ep-filter button.is-active { background: var(--ink) !important; color: #fff !important; }

/* Shared story bits */
.nw-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 16px; }
.shrey-news-page .nw-head h2 { margin: 0; font-size: 22px !important; font-weight: 800; }
.shrey-news-page .nw .ep-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin: 0;
    color: var(--muted);
    font-size: 12.5px;
}
.shrey-news-page .nw .ep-card-meta span:first-child {
    color: var(--blue);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.shrey-news-page .nw .journal-format,
.shrey-news-page .nw .ep-card-meta time { color: var(--muted); font-weight: 500; }
.shrey-news-page .nw h3 a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.nw-media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: var(--soft);
}
.nw-media img,
.nw-list .ep-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.nw article:hover .nw-media img,
.nw-list .ep-card:hover .ep-card-media img { transform: scale(1.03); }

/* Top stories */
.nw-top { padding: 28px 0 36px; background: #fff; }
.nw-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(250px, .9fr);
    gap: 28px;
    align-items: start;
}
.shrey-news-page .nw .ep-modern-lead {
    position: static;
    min-height: 0;
    overflow: visible;
    border-radius: 0;
    background: none;
}
.shrey-news-page .nw .ep-modern-lead::before,
.shrey-news-page .nw .ep-modern-lead::after { display: none !important; }
.shrey-news-page .nw .ep-modern-lead > a { position: relative !important; inset: auto !important; }
.nw-lead .nw-body { padding-top: 14px; }
.shrey-news-page .nw .nw-lead-title {
    margin: 8px 0 !important;
    font-size: clamp(24px, 2.4vw, 32px) !important;
    font-weight: 800;
    line-height: 1.18;
}
.shrey-news-page .nw-lead p { margin: 0; color: var(--muted) !important; font-size: 16px; line-height: 1.6; }
.nw-second { display: grid; gap: 22px; }
.nw-second .nw-media { margin-bottom: 10px; }
.shrey-news-page .nw-second h3 { margin: 6px 0 0 !important; font-size: 18px !important; font-weight: 700; line-height: 1.3; }
.shrey-news-page .nw .ep-modern-side {
    display: block;
    padding: 18px 20px 6px;
    border: 0;
    border-radius: 12px;
    background: var(--soft);
}
.shrey-news-page .nw .nw-side-title { margin: 0 0 6px !important; font-size: 16px !important; font-weight: 800; }
.shrey-news-page .nw .ep-modern-side article {
    display: block;
    margin: 0;
    padding: 12px 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: none;
}
.shrey-news-page .nw .ep-modern-side article:first-of-type { border-top: 0; }
/* editorial-pages.css pads every div in a side article and sets a
   132px floor on phones, built for its old thumbnail cards. */
.shrey-news-page .nw .ep-modern-side article { min-height: 0 !important; }
.shrey-news-page .nw .ep-modern-side article > div { padding: 0 !important; }
.shrey-news-page .nw .ep-modern-side h3 { margin: 4px 0 0 !important; font-size: 15.5px !important; font-weight: 700; line-height: 1.35; }

/* Latest list + sidebar */
.nw-latest { padding: 36px 0 64px; border-top: 1px solid var(--line); background: var(--soft); }
.nw-latest-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 36px;
    align-items: start;
}
.shrey-news-page .nw .journal-results { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.shrey-news-page .nw .journal-results:empty { display: none; }
.shrey-news-page .nw .nw-list {
    display: flex !important;
    flex-direction: column;
    gap: 0 !important;
    grid-template-columns: none !important;
}
.shrey-news-page .nw .nw-list .ep-card {
    display: grid !important;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 20px 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.shrey-news-page .nw .nw-list .ep-card:first-child { padding-top: 0 !important; }
.shrey-news-page .nw .nw-list .ep-card-media {
    display: block;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
}
.shrey-news-page .nw .nw-list .ep-card-body { padding: 0 !important; }
.shrey-news-page .nw .nw-list h3 { margin: 6px 0 !important; font-size: 20px !important; font-weight: 700; line-height: 1.28; }
.shrey-news-page .nw .nw-list p { margin: 0 !important; color: var(--muted) !important; font-size: 15px; line-height: 1.6; }
.shrey-news-page .nw .nw-list .ep-link { display: none; }
.shrey-news-page .nw .blog-empty-state {
    margin: 0;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font-size: 16px;
}

.nw-aside { position: sticky; top: 100px; display: grid; gap: 20px; }
.nw-box { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.shrey-news-page .nw-box h2 { margin: 0 0 12px !important; font-size: 17px !important; font-weight: 800; }
.nw-ranked { margin: 0; padding: 0; list-style: none; counter-reset: rank; }
.nw-ranked li {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
    counter-increment: rank;
}
.nw-ranked li:first-child { padding-top: 0; border-top: 0; }
.nw-ranked li::before { content: counter(rank); color: #9AA8C4; font-size: 22px; font-weight: 800; line-height: 1; }
.shrey-news-page .nw-ranked a { font-size: 15px; font-weight: 600; line-height: 1.35; }
.shrey-news-page .nw-ranked a:hover { color: var(--blue); text-decoration: underline; }
.nw-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.shrey-news-page .nw-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    background: var(--soft);
    font-size: 14px;
    font-weight: 600;
}
.shrey-news-page .nw-tags a:hover { background: #E3EAF8; }
.shrey-news-page .nw-box.nw-cta { border-color: var(--ink); background: var(--ink); }
.shrey-news-page .nw-cta h2 { color: #fff !important; }
.nw-cta p { margin: 0 0 14px; color: #D5DDEE; font-size: 15px; line-height: 1.55; }
.shrey-news-page .nw-btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--blue);
    color: #fff !important;
    font-size: 14.5px;
    font-weight: 700;
}
.shrey-news-page .nw-btn:hover { background: var(--blue-dark); }

@media (max-width: 1080px) {
    .nw-top-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
    .shrey-news-page .nw .ep-modern-side { grid-column: 1 / -1; }
    .nw-latest-grid { grid-template-columns: 1fr; }
    .nw-aside { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width: 700px) {
    .nw-shell { width: calc(100% - 32px); }
    .nw-masthead { padding: 22px 0 18px; }
    .nw-masthead-grid { grid-template-columns: 1fr; gap: 16px; }
    .nw-top { padding: 22px 0 28px; }
    .nw-top-grid { grid-template-columns: 1fr; gap: 24px; }
    .nw-second { grid-template-columns: 1fr 1fr; gap: 16px; }
    .shrey-news-page .nw-second h3 { font-size: 16px !important; }
    .shrey-news-page .nw .nw-list .ep-card { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 16px 0 !important; }
    .shrey-news-page .nw .nw-list h3 { margin-top: 4px !important; font-size: 16.5px !important; }
    .shrey-news-page .nw .nw-list p { display: none; }
    .nw-latest { padding: 28px 0 48px; }
}
@media (max-width: 420px) {
    .nw-second { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .nw-media img,
    .nw-list .ep-card-media img { transition: none; }
}
