/* ==========================================================================
   amarDesh24.news — additions from the client's correction list
   Loaded after site.css. Kept in its own file so the main stylesheet is not
   rewritten every time a correction lands.
   ========================================================================== */

/* --------------------------------------------------------------------------
   TYPEFACE

   Hind Siliguri's Bangla numerals were being misread — ১ and ২ in particular,
   which matters on a site where every date and count is in Bangla digits.
   Noto Sans Bengali draws them with clearly different shapes and holds up at
   12-13px, which is where most of this page lives.

   Declared here rather than in site.css because this file loads after it,
   so the variables win without the main stylesheet being rewritten.
   -------------------------------------------------------------------------- */

:root {
    --sans:  'Noto Sans Bengali', 'Hind Siliguri', 'Segoe UI', system-ui, sans-serif;
    --serif: 'Noto Serif Bengali', Georgia, serif;
}

/* Bangla digits sit small inside a Latin-sized line, so numbers get a touch
   more room wherever they carry meaning on their own. */
.meta, .pr-time, .wx-range, .wx-aqi-scale, .gc-caption {
    font-feature-settings: 'lnum' 1;
}

/* --------------------------------------------------------------------------
   TOP BAR — weather and stock index (correction 15)
   -------------------------------------------------------------------------- */

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.topbar-widgets {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12.5px;
    line-height: 1;
}

.tw {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    color: #c9ced6;
}

/* A hairline between the two readings, and again before the social row, so
   the strip reads as three groups rather than one run-on line. */
.tw + .tw {
    padding-inline-start: 14px;
    border-inline-start: 1px solid rgba(255, 255, 255, .14);
}

.tw strong { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.tw-label  { opacity: .75; }
.tw-icon   { font-size: 14px; line-height: 1; }

/* Direction is carried by the arrow as well as the colour — on this dark
   strip green and red alone are not enough to rely on. */
.tw-change { font-weight: 700; font-variant-numeric: tabular-nums; }
.tw-change.is-up   { color: #0ca30c; }
.tw-change.is-down { color: #e34948; }

@media (max-width: 880px) {
    .topbar-right   { gap: 10px; }
    .topbar-widgets { gap: 10px; font-size: 12px; }
    .tw + .tw       { padding-inline-start: 10px; }
}

@media (max-width: 620px) {
    /* The strip is too tight for both on a phone: the temperature stays,
       the index goes — a reader on a phone is not watching the market here. */
    .tw-stock      { display: none; }
    .tw-weather .tw-label { display: none; }
}

/* --------------------------------------------------------------------------
   EDITORIAL CARD (correction 22)
   -------------------------------------------------------------------------- */

.author-card .author-role {
    margin: -4px 0 10px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .2px;
    color: var(--accent);
}

/* --------------------------------------------------------------------------
   MOBILE: THREE ITEMS PER SECTION (correction 16)

   The rest stay in the HTML and come back at tablet width, so this is a
   display rule rather than a different page — the "আরও দেখুন" link in each
   section heading is how a reader on a phone reaches the remainder.
   -------------------------------------------------------------------------- */

@media (max-width: 620px) {
    .page .block .grid-2 > *:nth-child(n + 4),
    .page .block .grid-3 > *:nth-child(n + 4),
    .page .block .grid-4 > *:nth-child(n + 4) {
        display: none;
    }

    .page .block .row-card:nth-of-type(n + 4),
    .page .block .rank-card:nth-of-type(n + 4) {
        display: none;
    }

    /* An archive page is the "see more" destination, so cutting it to three
       would leave nowhere to go. Paginated lists keep every card. */
    .page .block .pagination ~ *,
    .page .block:has(.pagination) .grid-3 > *:nth-child(n + 4) {
        display: revert;
    }

    /* The heading's link is the way out of a trimmed section, so it must not
       be the first thing that disappears on a narrow screen. */
    .block-more {
        white-space: nowrap;
        font-weight: 600;
        color: var(--accent);
    }
}

/* --------------------------------------------------------------------------
   GLOBAL COVERAGE (correction 20)

   The current site shows these as a wall of scanned pages, so the thumbnail
   leads and the headline is a caption under it. Portrait, because that is
   the shape of a newspaper page.
   -------------------------------------------------------------------------- */

.gc-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--gap);
}

.gc-card { display: block; color: inherit; }

.gc-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    background: var(--wash);
    border: 1px solid var(--rule);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.gc-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;      /* a scanned page reads from the masthead down */
    transition: transform .45s ease;
}
a.gc-card:hover .gc-cover img { transform: scale(1.04); }

.gc-initials {
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 700;
    color: var(--ink-soft);
    letter-spacing: .5px;
}

/* Says "this opens a file, not a page" before the reader clicks. */
.gc-pdf {
    position: absolute;
    left: 0;
    bottom: 0;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .6px;
    padding: 2px 6px;
}

.gc-caption {
    display: block;
    margin-top: 9px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.5;
}
a.gc-card:hover .gc-caption { color: var(--accent); }

.gc-outlet {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 2px;
}

@media (max-width: 1040px) {
    .gc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .gc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    /* Correction 16: three per section on a phone. Two columns, so the
       fourth card onwards goes. */
    .gc-grid > *:nth-child(n + 5) { display: none; }
}

/* --------------------------------------------------------------------------
   SIDEBAR: WEATHER (correction 15)

   Laid out like the card the client pointed at: place, then the reading at a
   glance, then air quality under a rule.
   -------------------------------------------------------------------------- */

.weather-card { text-align: center; }

.wx-place {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 13px;
    color: var(--ink-soft);
}
.wx-pin { font-size: 8px; color: var(--accent); }

.wx-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 6px 0 14px;
    text-align: start;
}

.wx-icon { font-size: 40px; line-height: 1; flex-shrink: 0; }

.wx-temp {
    font-size: 46px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1px;
    font-variant-numeric: tabular-nums;
}

.wx-side { display: grid; gap: 2px; min-width: 0; }

.wx-label { font-size: 13.5px; font-weight: 700; }
.wx-feels { font-size: 12.5px; color: var(--ink-soft); }

.wx-range {
    display: flex;
    gap: 9px;
    font-size: 12.5px;
    color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
}

/* ---- air quality ---- */

.wx-aqi {
    padding-top: 13px;
    border-top: 1px solid var(--rule);
    text-align: start;
}

.wx-aqi-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.wx-aqi-title { font-size: 13px; font-weight: 700; }
.wx-aqi-value { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* The band is named in words. The bar is a second reading of the same thing,
   never the only one — a colour alone does not tell everyone anything. */
.wx-aqi-band { font-size: 12px; color: var(--ink-soft); margin-top: 1px; }

.wx-aqi-bar {
    position: relative;
    height: 7px;
    margin-top: 9px;
    border-radius: 999px;
    background: linear-gradient(
        to right,
        #0ca30c 0%,
        #fab219 20%,
        #ec835a 30%,
        #d03b3b 40%,
        #7e3bb5 60%,
        #6b1f1f 100%
    );
}

.wx-aqi-dot {
    position: absolute;
    top: 50%;
    width: 13px;
    height: 13px;
    margin-inline-start: -6.5px;
    transform: translateY(-50%);
    border-radius: 50%;
    background: var(--paper);
    border: 2.5px solid var(--ink);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}

.wx-aqi-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 10.5px;
    color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
}

/* ---- humidity / wind ---- */

.wx-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    margin: 0;
    padding-top: 13px;
    border-top: 1px solid var(--rule);
    text-align: start;
}

.wx-grid div { min-width: 0; }
.wx-grid dt { font-size: 11.5px; color: var(--ink-soft); margin: 0; }
.wx-grid dd {
    margin: 2px 0 0;
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   SIDEBAR: STOCK INDEX (correction 15)
   -------------------------------------------------------------------------- */

.stock-figure {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    padding: 4px 0 2px;
}

.stock-name {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .6px;
    color: var(--ink-soft);
}

.stock-value {
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* The arrow carries the direction as well as the colour — red and green
   alone are not enough for everyone to read. */
.stock-change {
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.stock-change.is-up   { color: #006300; }
.stock-change.is-down { color: #d03b3b; }

.stock-note { font-size: 11.5px; color: var(--ink-soft); margin: 8px 0 0; }

/* A pasted provider widget brings its own sizing; this stops it spilling
   out of the sidebar on a narrow screen. */
.stock-embed { overflow: hidden; }
.stock-embed iframe,
.stock-embed > div { max-width: 100% !important; }

.stock-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--accent);
}

/* --------------------------------------------------------------------------
   GLOBAL COVERAGE — in-page viewer (correction 20)

   Opening a scanned page used to throw the reader onto a file in another tab.
   This keeps them on the homepage: a panel over the page, the document inside
   it, and a way out that does not mean using the back button.
   -------------------------------------------------------------------------- */

/* The card is a <button> when it opens the viewer, so its chrome has to go. */
button.gc-card {
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    text-align: start;
    width: 100%;
    cursor: pointer;
}
button.gc-card:hover .gc-caption { color: var(--accent); }
button.gc-card:hover .gc-cover img { transform: scale(1.04); }

.gc-viewer {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
.gc-viewer[hidden] { display: none; }

.gc-viewer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 12, .82);
}

.gc-viewer-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(980px, 100%);
    height: min(90vh, 100%);
    background: var(--paper);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}

.gc-viewer-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--rule);
    background: var(--paper);
}

.gc-viewer-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    /* A long headline must not push the close button off the bar. */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gc-viewer-actions { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }

.gc-viewer-btn {
    border: 1px solid var(--rule);
    background: var(--wash);
    color: var(--ink);
    border-radius: 4px;
    padding: 6px 11px;
    font-family: var(--sans);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
}
.gc-viewer-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.gc-viewer-btn[hidden] { display: none; }

.gc-viewer-x { font-size: 18px; line-height: 1; padding: 4px 11px; }

.gc-viewer-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    background: var(--wash);
    display: flex;
    justify-content: center;
}

/* A page scan is tall and narrow: show it at full width and let the panel
   scroll, which is how someone actually reads a newspaper page. */
.gc-viewer-image {
    width: 100%;
    max-width: 820px;
    height: auto;
    display: block;
    background: #fff;
}

.gc-viewer-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

@media (max-width: 620px) {
    .gc-viewer { padding: 0; }
    .gc-viewer-panel { width: 100%; height: 100%; border-radius: 0; }
    .gc-viewer-title { font-size: 13.5px; }
    .gc-viewer-btn { padding: 6px 9px; font-size: 12px; }
}

/* --------------------------------------------------------------------------
   SIDEBAR: PRAYER TIMES

   Sits under the weather. A table of six rows, with the next prayer marked —
   by a label and a tinted row, not by colour alone.
   -------------------------------------------------------------------------- */

.pr-next {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 9px 11px;
    margin-bottom: 10px;
    background: var(--wash);
    border-inline-start: 3px solid var(--accent);
}
.pr-next[hidden] { display: none; }

.pr-next-name { font-size: 13.5px; font-weight: 700; }
.pr-next-left {
    font-size: 12.5px;
    color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
}

.pr-list { list-style: none; margin: 0; padding: 0; }

.pr-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 6px;
    border-bottom: 1px solid var(--rule);
    font-size: 13.5px;
}
.pr-row:last-child { border-bottom: 0; }

.pr-name { font-weight: 600; }

.pr-time {
    color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* The next prayer is named in the banner above as well, so this is support
   rather than the only signal. */
.pr-row.is-next {
    background: var(--wash);
    margin-inline: -6px;
    padding-inline: 12px;
}
.pr-row.is-next .pr-name { color: var(--accent); }
.pr-row.is-next .pr-time { color: var(--ink); font-weight: 600; }

/* --------------------------------------------------------------------------
   CONNECT CARD — fewer networks, fewer columns
   -------------------------------------------------------------------------- */

.connect-grid.connect-1 { grid-template-columns: 1fr; }
.connect-grid.connect-2 { grid-template-columns: repeat(2, 1fr); }

/* --------------------------------------------------------------------------
   LIGHT MASTHEAD

   With the banner gone, the dark band above the menu was a wide empty stripe
   with a small logo floating in it. White gives the logo its own space and
   lets the red menu bar below carry the weight.

   Done here rather than by changing --bar, because the footer uses the same
   variable and stays dark on purpose.
   -------------------------------------------------------------------------- */

.topbar {
    background: var(--paper);
    color: var(--ink-soft);
    border-bottom: 1px solid var(--rule);
}

.masthead {
    background: var(--paper);
    color: var(--ink);
    border-top: 0;
    /* Less air than the dark band needed — there is nothing beside the logo
       now, so the old 28px top and bottom left it stranded. */
    padding: 16px 0;
}

.masthead .brand-name,
.masthead .brand-name a { color: var(--ink); }
.masthead .brand-name a:hover { color: var(--accent); }
.brand-tag { color: var(--ink-soft); }

/* The social icons keep their own brand colours; only the hairline between
   them and the date needs to change for a light background. */
.topbar .clock { color: var(--ink-soft); }

/* The weather and stock readings sat on a dark strip. */
.tw { color: var(--ink-soft); }
.tw strong { color: var(--ink); }
.tw + .tw { border-inline-start-color: var(--rule); }

@media (max-width: 620px) {
    .masthead { padding: 13px 0; }
}

/* ==========================================================================
   SECOND ROUND OF CLIENT CORRECTIONS
   ========================================================================== */

/* --------------------------------------------------------------------------
   16 — SEARCH IN THE MASTHEAD

   Logo on the left, search on the right. The masthead had nothing on its
   right since the banner came out, and the old search was a 16px glyph in
   the menu bar that people were not finding.
   -------------------------------------------------------------------------- */

.masthead-search {
    display: flex;
    align-items: stretch;
    width: min(360px, 100%);
    border: 1px solid var(--rule);
    border-radius: 3px;
    overflow: hidden;
    background: var(--paper);
}

.masthead-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 10px 14px;
    font-family: var(--sans);
    font-size: 14.5px;
    color: var(--ink);
    background: transparent;
}
.masthead-search input::placeholder { color: var(--ink-soft); }
.masthead-search input:focus { outline: 0; }

/* The ring goes on the whole control, not the bare input, so the focus
   outline follows the shape the reader sees. */
.masthead-search:focus-within { border-color: var(--accent); }

.masthead-search button {
    display: grid;
    place-items: center;
    width: 46px;
    border: 0;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
}
.masthead-search button:hover { background: var(--accent-dk); }

/* --------------------------------------------------------------------------
   3 — A THICKER MENU BAR

   The black bar had thinned out once the masthead above it went white.
   -------------------------------------------------------------------------- */

.nav-links a { padding: 19px 14px; font-size: 15px; }
.nav-latest, .nav-cta { font-size: 14px; }

/* --------------------------------------------------------------------------
   4 and 9 — NO TEXT OVER A PHOTO

   The lead card, the editor's-pick cards and the slider all printed the
   headline across the bottom of the picture. On a dark photo it was
   unreadable, and on a busy one it was worse.

   These three bodies are already siblings of the image in the markup, so
   taking them out of position drops them underneath it — no template
   changes, and putting it back is deleting this block.
   -------------------------------------------------------------------------- */

.lead,
.overlay-card,
.slide { position: static; }

.lead-body,
.overlay-body,
.slide-body {
    position: static;
    background: none;
    color: var(--ink);
    padding: 11px 0 0;
}

.lead-body .card-title,
.overlay-body .card-title,
.slide-body .slide-title,
.lead-body .card-title a,
.overlay-body .card-title a,
.slide-body .slide-title a { color: var(--ink); }

.lead-body .card-title a:hover,
.overlay-body .card-title a:hover,
.slide-body .slide-title a:hover { color: var(--accent); }

.lead-body .meta,
.lead-body .meta span,
.overlay-body .meta,
.overlay-body .meta span,
.slide-body .meta,
.slide-body .meta span { color: var(--ink-soft); }

/* Off the photo and a size that works as a heading rather than a caption. */
.lead-body .card-title { font-size: 23px; line-height: 1.4; }
.slide-title { font-size: 21px; }

/* The category chip was the last text left sitting on the image. */
.thumb-badges { display: none; }

/* --------------------------------------------------------------------------
   5 — HOMEPAGE CARDS: PICTURE LEFT, HEADLINE RIGHT

   Only in the main column of the homepage. Category and search pages keep
   their grid of upright cards, where the picture is doing the browsing work
   and a column of wide cards would read as a very long list.
   -------------------------------------------------------------------------- */

.stack .block .card,
.express .card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.stack .block .card .thumb,
.express .card .thumb { aspect-ratio: 4 / 3; }

.stack .block .card .card-title,
.express .card .card-title { margin-top: 0; font-size: 16.5px; }

/* Two across rather than three or four: a wide card needs the room. */
.stack .grid-3,
.stack .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* --------------------------------------------------------------------------
   10 — "আরও দেখুন" UNDER THE SECTION

   It was tucked beside the heading, where it reads as part of the title.
   At the foot of the block it is where a reader arrives having run out of
   stories, which is when they want it.

   Done by moving the link rather than by editing a dozen section templates;
   :has() scopes it to blocks that actually have one. A browser without
   :has() simply keeps it beside the heading — no layout breaks either way.
   -------------------------------------------------------------------------- */

.block:has(> .block-head > .block-more) {
    position: relative;
    padding-bottom: 48px;
}

/* site.css puts position:relative on the heading row; the link has to
   resolve against the block, not the heading. */
.block:has(> .block-head > .block-more) > .block-head { position: static; }

.block:has(> .block-head > .block-more) > .block-head > .block-more {
    position: absolute;
    inset-inline: 16px;
    bottom: 0;
    padding: 13px 0;
    border-top: 1px solid var(--rule);
    text-align: center;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--accent);
}
.block:has(> .block-head > .block-more) > .block-head > .block-more:hover {
    background: var(--wash);
}

/* --------------------------------------------------------------------------
   15 and 19 — BIGGER PICTURES IN THE SIDE LISTS

   78px was a postage stamp, and the full-size photo was being squeezed into
   it — slow to load and too small to read.
   -------------------------------------------------------------------------- */

.row-card,
.rank-card { grid-template-columns: 104px minmax(0, 1fr); gap: 13px; }
.row-card .card-title,
.rank-card .card-title { font-size: 14.5px; }
.row-card .media-flag { width: 28px; height: 28px; font-size: 12px; }

/* --------------------------------------------------------------------------
   21 — THE RED RULE UNDER A SECTION HEADING

   Heavier, the way Al Jazeera mark their sections.
   -------------------------------------------------------------------------- */

.block-title {
    font-size: 16px;
    font-weight: 700;
    padding-bottom: 11px;
    border-bottom-width: 4px;
}

/* --------------------------------------------------------------------------
   MOBILE

   Every change above has to hold on a phone, which is where most of this
   site is read.
   -------------------------------------------------------------------------- */

@media (max-width: 880px) {
    .masthead .wrap { gap: 12px; }
    .masthead-search { width: 100%; }
    .nav-links a { padding: 15px 16px; }
}

@media (max-width: 620px) {
    /* One card per row, picture still on the left but narrower so the
       headline keeps enough width to break sensibly. */
    .stack .grid-3,
    .stack .grid-4 { grid-template-columns: 1fr; }

    .stack .block .card,
    .express .card { grid-template-columns: 116px minmax(0, 1fr); gap: 11px; }

    .stack .block .card .card-title,
    .express .card .card-title { font-size: 14.5px; }

    .lead-body .card-title { font-size: 19px; }
    .slide-title { font-size: 17px; }

    .row-card,
    .rank-card { grid-template-columns: 92px minmax(0, 1fr); }

    .block:has(> .block-head > .block-more) { padding-bottom: 44px; }
    .block:has(> .block-head > .block-more) > .block-head > .block-more { inset-inline: 12px; }
}

/* --------------------------------------------------------------------------
   6 — THE ARTICLE PAGE: PICTURE, THEN HEADLINE, THEN STORY

   The photo now opens the page, so it needs the spacing of an opening
   element rather than something dropped in mid-column.
   -------------------------------------------------------------------------- */

.article > .article-figure:first-child { margin: 0 0 18px; }
.article > .article-figure:first-child img { width: 100%; }

/* --------------------------------------------------------------------------
   17 — "Translate" instead of a globe

   A globe does not say what the control does; the word does. It keeps the
   switcher's translate="no", so it stays the same word in every language —
   which is the point of a control that changes the language.
   -------------------------------------------------------------------------- */

.lang-word {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .2px;
    white-space: nowrap;
}

/* A word is wider than an icon, so the button needs a little less padding
   to keep the bar from wrapping on a small laptop. */
.lang-btn { padding: 0 12px; gap: 8px; }

@media (max-width: 880px) {
    /* On a phone the word stays and the language name goes — the word is
       the part that tells a reader what the button is for. */
    .lang-word { font-size: 12.5px; }
    .lang-btn { padding: 0 10px; gap: 6px; }
}

/* --------------------------------------------------------------------------
   13 — THE ARTICLE'S VIDEO

   Sits where the lead picture would, at the width of the article column.
   The embed keeps a 16:9 box so the page does not jump when the iframe
   finishes loading.
   -------------------------------------------------------------------------- */

.post-video { margin: 0 0 20px; background: #000; }

.post-video video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 70vh;
}

.post-video-embed {
    position: relative;
    aspect-ratio: 16 / 9;
}
.post-video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --------------------------------------------------------------------------
   প্রধান সংবাদ — the lead block as a carousel
   --------------------------------------------------------------------------
   The markup is the site's ordinary slider, so autoplay and the arrow
   buttons already work. What is different here is that one story fills the
   width instead of two or three sitting side by side, and the arrows ride
   on the picture rather than in the heading.

   The picture is given an explicit 16:9 box. That is not decoration: the
   arrow overlay is positioned against the same ratio, so the two line up
   whatever shape the photograph arrives in — and the block stops jumping
   as each image loads.
   -------------------------------------------------------------------------- */

.mn-slider { position: relative; }

.mn-slider .slider-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.mn-slider .slider-track::-webkit-scrollbar { display: none; }

.mn-slider .slide {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    scroll-snap-align: start;
}

.mn-slider .slide > .thumb {
    display: block;
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 6px;
}
.mn-slider .slide > .thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Covers the picture only, never the headline underneath it. */
.mn-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    pointer-events: none;
}

.mn-arrow {
    pointer-events: auto;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(17, 17, 17, .55);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease;
}
.mn-arrow:hover,
.mn-arrow:focus-visible { background: rgba(200, 16, 46, .92); }

.mn-rest { margin-top: 16px; }

@media (max-width: 640px) {
    .mn-nav { padding: 0 6px; }
    .mn-arrow { width: 32px; height: 32px; font-size: 20px; }
}

/* --------------------------------------------------------------------------
   23 — A TALLER MENU BAR, AND A LIVE DOT THAT LOOKS LIVE
   --------------------------------------------------------------------------
   The black bar grows again, and everything in it grows with it: the links,
   the সাম্প্রতিক control and the red সর্বশেষ ভিডিও block all take the same
   vertical padding, so the red block still reaches the full height of the
   bar instead of floating inside it.
   -------------------------------------------------------------------------- */

.nav-links a { padding: 25px 14px; }

.nav-latest,
.nav-cta {
    display: inline-flex;
    align-items: center;
    padding-top: 25px;
    padding-bottom: 25px;
}

/* The dot that says সাম্প্রতিক is live.
   It pulses rather than blinks: a ring that grows and fades reads as a
   signal, where an on/off blink reads as a fault. Anyone who has asked
   their system for reduced motion gets a plain dot. */
.nav-latest-dot {
    display: inline-block;
    width: 13px;
    height: 13px;
    margin-right: 8px;
    border-radius: 50%;
    background: #e02424;
    box-shadow: 0 0 0 0 rgba(224, 36, 36, .65);
    animation: navLatestPulse 1.9s cubic-bezier(.4, 0, .2, 1) infinite;
}

@keyframes navLatestPulse {
    0%   { box-shadow: 0 0 0 0   rgba(224, 36, 36, .65); }
    70%  { box-shadow: 0 0 0 12px rgba(224, 36, 36, 0); }
    100% { box-shadow: 0 0 0 0   rgba(224, 36, 36, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .nav-latest-dot { animation: none; }
}

/* --------------------------------------------------------------------------
   25 — A HEAVIER RED RULE UNDER প্রধান সংবাদ ONLY

   Every other section keeps the 4px rule from the last round. Weight is
   how a page says which block matters most, and if every heading is heavy
   then none of them is.
   -------------------------------------------------------------------------- */

.block-main > .block-head > .block-title { border-bottom-width: 7px; }

@media (max-width: 880px) {
    .nav-links a { padding: 15px 16px; }
    .nav-latest,
    .nav-cta { padding-top: 15px; padding-bottom: 15px; }
}

/* --------------------------------------------------------------------------
   MOBILE OVERFLOW — the page was 35px wider than the phone
   --------------------------------------------------------------------------
   `grid-template-columns: 1fr` means `minmax(auto, 1fr)`, and `auto` as a
   minimum is the content's min-content width: the column refuses to shrink
   below the longest unbreakable thing inside it. One long headline in the
   সংবাদ স্লাইডার was enough to push the whole page past the screen, which
   is what produced the sideways scroll and the blank strip down the right.

   `minmax(0, 1fr)` lets the column shrink and leaves the clipping to the
   elements that are built to clip. Everywhere else in site.css the author
   already wrote it this way; these are the few places that were missed.
   -------------------------------------------------------------------------- */

.stack { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 1040px) {
    .body-row { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 880px) {
    .body-row,
    .express { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
    .hero-row,
    .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------------------------------------------------
   MOBILE — less dead space at the top of every block

   16px of padding above each heading is right on a desktop, where the page
   is wide and the white space separates columns. On a phone it is 16px of
   nothing repeated down the whole page, and it pushes the first headline of
   each section below the fold.

   4px rather than 0: at zero the heading's own line-box sits on the border
   and the block reads as broken rather than tight.
   -------------------------------------------------------------------------- */

@media (max-width: 620px) {
    .block { padding-top: 4px; }
    .block-head { margin-bottom: 12px; }
}

/* --------------------------------------------------------------------------
   TICKER — room before each picture

   Every item begins with a photograph, and the eye reads picture-and-text
   as one unit. At 34px a headline ended close enough to the next picture to
   look joined to it.

   Done with the track's own gap rather than padding on the items, so there
   is one number to change and nothing to fight over specificity with.
   -------------------------------------------------------------------------- */

.ticker-track { gap: 52px; }

@media (max-width: 620px) {
    .ticker-track { gap: 30px; }
}

/* --------------------------------------------------------------------------
   PHONES — a white page, and the picture on the right
   --------------------------------------------------------------------------
   1. The grey wash behind the blocks goes. On a wide screen it separates
      columns; on a phone there are no columns, so it is just a grey frame
      around everything. The blocks keep their hairline border, which is now
      the only thing marking where one section ends and the next begins.

   2. Picture right, headline left, in the horizontal lists. The headline is
      what a reader scans, so it starts at the edge their eye returns to.
      The trending number moves across with the picture it belongs to.
   -------------------------------------------------------------------------- */

@media (max-width: 620px) {
    body { background: #fff; }

    .row-card,
    .rank-card { grid-template-columns: minmax(0, 1fr) 104px; }

    .row-card > .thumb,
    .rank-card > .thumb { grid-column: 2; grid-row: 1; }

    .row-card > div,
    .rank-card > div { grid-column: 1; grid-row: 1; }

    .rank-num { left: auto; right: 0; }
}
