/* =============================================================
   All Courier News — public site
   Palette follows allcourierbd.com: ink, parcel-tape yellow, signal red.
   Each courier brings its own colour through the --c variable.
   ============================================================= */

:root {
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #5b6472;
    --line: #e3e6ea;
    --soft: #f5f6f8;
    --paper: #ffffff;
    --yellow: #facc15;
    --red: #dc2626;
    --focus: #2563eb;

    --font-ui: "Hind Siliguri", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-head: "Noto Serif Bengali", "Hind Siliguri", Georgia, serif;

    --wrap: 1200px;
    --gap: clamp(16px, 2.4vw, 28px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3 { margin: 0; line-height: 1.3; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gap)); margin-inline: auto; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px;
}
.skip-link:focus { top: 12px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 0 20px; border-radius: 8px;
    background: var(--ink); color: #fff; font: 600 16px var(--font-ui); text-decoration: none;
}
.btn:hover { background: var(--ink-2); }

/* ---------- top bar ---------- */
.topbar { background: var(--soft); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 36px; }
.topbar nav { display: flex; gap: 20px; }
.topbar a { text-decoration: none; }
.topbar a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- masthead ---------- */
.masthead { background: var(--paper); border-top: 4px solid var(--yellow); }
.masthead-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding-block: 18px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { width: 190px; height: auto; }
.brand-text { font: 800 26px var(--font-head); }
.brand-tag {
    font-size: 15px; font-weight: 600; color: var(--ink);
    padding: 2px 10px; border-left: 3px solid var(--red);
}

.search { display: flex; width: min(420px, 100%); }
.search input {
    flex: 1; min-width: 0; height: 46px; padding: 0 14px;
    border: 1.5px solid var(--line); border-right: 0; border-radius: 8px 0 0 8px;
    font: 16px var(--font-ui); color: var(--ink); background: var(--paper);
}
.search input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, .25); }
.search button {
    height: 46px; padding: 0 18px; border: 0; border-radius: 0 8px 8px 0;
    background: var(--ink); color: #fff; font: 600 16px var(--font-ui); cursor: pointer;
}
.search button:hover { background: var(--ink-2); }
.search-toggle {
    display: none; width: 44px; height: 44px; border: 1.5px solid var(--line); border-radius: 8px;
    background: var(--paper); color: var(--ink); cursor: pointer; align-items: center; justify-content: center;
}

/* ---------- courier rail (the site's signature) ---------- */
.rail { background: var(--ink); position: sticky; top: 0; z-index: 20; }
.rail-track {
    display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
    -webkit-mask-image: none; mask-image: none;
}
.rail-track::-webkit-scrollbar { display: none; }
.rail-track.fade-end { mask-image: linear-gradient(90deg, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); }
.rail-track.fade-start { mask-image: linear-gradient(90deg, transparent, #000 12%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%); }
.rail-track.fade-start.fade-end { mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }

.rail a {
    --c: var(--yellow);
    position: relative; flex: none;
    padding: 12px 16px 13px; color: #cbd5e1; text-decoration: none;
    font-size: 16px; font-weight: 600; white-space: nowrap;
}
.rail a::after {
    content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 4px;
    background: var(--c); border-radius: 4px 4px 0 0; transform: scaleY(0); transform-origin: bottom;
    transition: transform .18s ease;
}
.rail a:hover { color: #fff; }
.rail a:hover::after { transform: scaleY(.5); }
.rail a[aria-current="page"] { color: #fff; }
.rail a[aria-current="page"]::after { transform: scaleY(1); }
.rail a:focus-visible { outline-offset: -3px; }

/* ---------- shared bits ---------- */
.courier-tag {
    --c: var(--red);
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none;
}
.courier-tag::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--c); }
.courier-tag:hover { text-decoration: underline; }

time { font-size: 14px; color: var(--muted); }

.thumb { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--soft); }
.thumb-empty {
    --c: var(--red);
    display: flex; align-items: flex-end; padding: 14px;
    background:
        repeating-linear-gradient(135deg, transparent 0 18px, rgba(255, 255, 255, .06) 18px 36px),
        var(--c);
}
.thumb-empty span { color: #fff; font: 700 22px var(--font-head); opacity: .95; }

/* ---------- front page ---------- */
main { padding-block: 28px 56px; }

.front {
    display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--gap);
    padding-bottom: 36px; border-bottom: 1px solid var(--line);
}

.lead { display: grid; gap: 18px; align-content: start; }
.lead-media { display: block; border-radius: 10px; overflow: hidden; }
.lead-img { aspect-ratio: 16 / 9; }
.lead-body { display: grid; gap: 10px; justify-items: start; }
.lead h1 { font: 800 clamp(28px, 3.6vw, 44px)/1.25 var(--font-head); letter-spacing: -.005em; }
.lead h1 a { text-decoration: none; }
.lead h1 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.lead p { margin: 0; font-size: 19px; color: var(--ink-2); max-width: 62ch; }

.latest h2 {
    font: 700 22px var(--font-head); padding-bottom: 10px; margin-bottom: 4px;
    border-bottom: 3px solid var(--ink);
}
.latest ol { list-style: none; margin: 0; padding: 0; }
.latest li + li { border-top: 1px solid var(--line); }
.latest li a { display: grid; gap: 4px; padding: 14px 0; text-decoration: none; }
.latest-courier { --c: var(--red); font-size: 13px; font-weight: 700; color: var(--c); }
.latest-title { font: 600 18px/1.45 var(--font-head); }
.latest li a:hover .latest-title { text-decoration: underline; text-underline-offset: 4px; }
.more-link {
    display: inline-block; margin-top: 8px; font-weight: 700; text-decoration: none;
    border-bottom: 2px solid var(--yellow);
}
.more-link:hover { border-color: var(--ink); }

/* ---------- blocks & grids ---------- */
.block { padding-top: 40px; }
.block-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
    padding-bottom: 12px; margin-bottom: 20px; border-bottom: 1px solid var(--line);
}
.block-head h2 { display: flex; align-items: center; gap: 10px; font: 700 24px var(--font-head); }
.block-head h2 img { width: 28px; height: 28px; object-fit: contain; }
.block-head a { font-size: 15px; font-weight: 600; text-decoration: none; color: var(--ink-2); }
.block-head a:hover { color: var(--ink); text-decoration: underline; }

.courier-block .block-head { border-bottom: 3px solid var(--c); }

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

.card { display: grid; gap: 12px; align-content: start; }
.card-media { display: block; border-radius: 8px; overflow: hidden; }
.card-media .thumb { transition: transform .35s ease; }
.card:hover .card-media .thumb { transform: scale(1.03); }
.card-body { display: grid; gap: 6px; justify-items: start; }
.card h3 { font: 700 19px/1.45 var(--font-head); }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.card p { margin: 0; font-size: 16px; color: var(--muted); }

/* ---------- list pages ---------- */
.list-head {
    --c: var(--ink);
    display: flex; align-items: center; gap: 18px;
    padding-bottom: 20px; margin-bottom: 28px; border-bottom: 4px solid var(--c);
}
.list-head h1 { font: 800 clamp(28px, 3.4vw, 40px) var(--font-head); }
.list-head p { margin: 4px 0 0; color: var(--ink-2); max-width: 70ch; }
.list-head p a { font-weight: 600; }
.list-logo { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); padding: 4px; background: #fff; }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 44px; }
.pager a, .pager span {
    min-width: 44px; height: 44px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--line); border-radius: 8px; text-decoration: none; font-weight: 600;
}
.pager a:hover { border-color: var(--ink); }
.pager span[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }

.empty-state { text-align: center; padding: 72px 0; display: grid; gap: 14px; justify-items: center; }
.empty-state h1 { font: 700 30px var(--font-head); }
.empty-state p { margin: 0; color: var(--muted); }

/* ---------- article ---------- */
.article-wrap { max-width: 1200px; }
.article { max-width: 760px; margin-inline: auto; }
.preview-note {
    max-width: 760px; margin: 0 auto 20px; padding: 10px 14px; border-radius: 8px;
    background: #fef9c3; border: 1px solid #fde047; font-size: 15px;
}
.article-head { display: grid; gap: 14px; justify-items: start; }
.article-head h1 { font: 800 clamp(30px, 4.2vw, 46px)/1.25 var(--font-head); }
.article-dek { margin: 0; font-size: 21px; line-height: 1.6; color: var(--ink-2); }
.article-meta {
    display: flex; flex-wrap: wrap; gap: 6px 22px; width: 100%;
    padding-block: 12px; border-block: 1px solid var(--line);
}
.article-meta, .article-meta time { font-size: 15px; color: var(--muted); }

.article-figure { margin: 26px 0 0; }
.article-figure img { width: 100%; border-radius: 10px; }
.article-figure figcaption { margin-top: 8px; font-size: 15px; color: var(--muted); }

.article-body { margin-top: 26px; font-size: 19px; line-height: 1.85; }
.article-body p { margin: 0 0 1.1em; }
.article-body h2 { font: 700 26px var(--font-head); margin: 1.6em 0 .5em; }
.article-body h3 { font: 700 22px var(--font-head); margin: 1.4em 0 .4em; }
.article-body ul { margin: 0 0 1.1em; padding-left: 1.3em; }
.article-body li + li { margin-top: .3em; }
.article-body a { color: #1d4ed8; text-underline-offset: 3px; }
.article-body blockquote {
    margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--yellow);
    font: 600 21px/1.7 var(--font-head);
}
.article-body blockquote p { margin: 0; }

.share {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line);
}
.share span { font-weight: 700; margin-right: 6px; }
.share a, .share button {
    min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center;
    border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper);
    font: 600 15px var(--font-ui); color: var(--ink); text-decoration: none; cursor: pointer;
}
.share a:hover, .share button:hover { border-color: var(--ink); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #cbd5e1; border-top: 4px solid var(--yellow); }
.footer-grid {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px;
    padding-block: 44px 32px;
}
.footer-name { margin: 0 0 8px; font: 700 22px var(--font-head); color: #fff; }
.site-footer p { margin: 0 0 6px; font-size: 16px; }
.site-footer h2 { font-size: 16px; color: #fff; margin-bottom: 12px; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-couriers { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 20px; }
.footer-couriers li { margin-bottom: 6px; }
.footer-bottom {
    display: flex; justify-content: space-between; gap: 16px; padding-block: 16px;
    border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px;
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
    .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .front { grid-template-columns: 1fr; }
    .grid, .grid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
    body { font-size: 16px; }
    .topbar nav a:not(:first-child) { display: none; }
    .masthead-inner { flex-wrap: wrap; padding-block: 12px; gap: 12px; }
    .brand img { width: 150px; }
    .brand-tag { font-size: 14px; }
    .search-toggle { display: inline-flex; }
    .search { display: none; width: 100%; order: 3; }
    .search.is-open { display: flex; }
    .grid { grid-template-columns: 1fr; gap: 0; }
    .grid .card {
        grid-template-columns: 112px minmax(0, 1fr); gap: 14px;
        padding-block: 14px; border-bottom: 1px solid var(--line);
    }
    .grid .card:first-child { padding-top: 0; }
    .grid .card .thumb { aspect-ratio: 1; }
    .grid .card p { display: none; }
    .grid .card h3 { font-size: 17px; }
    .thumb-empty span { font-size: 14px; }
    .grid-list { grid-template-columns: 1fr; }
    .lead p { font-size: 17px; }
    .article-body { font-size: 18px; }
    .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
