/* ============================================================
   নীলপাতা — Front-end styles
   ============================================================ */
:root{
  --blue:#1f5fa8; --blue-dark:#163f6e; --blue-soft:#eaf2fb;
  --ink:#1b2733; --muted:#5d6b7a; --line:#e6ebf1;
  --bg:#ffffff; --bg-soft:#f6f9fc; --gold:#d9a441;
  --radius:16px; --shadow:0 8px 30px rgba(20,40,70,.08);
  --serif:'Noto Serif Bengali',serif; --sans:'Hind Siliguri',sans-serif;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:var(--sans);color:var(--ink);background:var(--bg);line-height:1.7;font-size:16px}
img{max-width:100%;display:block}
a{color:var(--blue);text-decoration:none}
a:hover{color:var(--blue-dark)}
h1,h2,h3,h4{font-family:var(--serif);line-height:1.3;color:var(--ink)}
.container{width:min(1140px,92%);margin-inline:auto}

/* ---------- Header / nav ---------- */
.site-header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.96);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}
.nav-wrap{display:flex;align-items:center;gap:1rem;padding:.8rem 0}
.brand{display:flex;align-items:center;gap:.55rem;font-weight:700;color:var(--ink)}
.brand img{height:38px;width:auto}
.brand-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:var(--blue);color:#fff;font-family:var(--serif);font-weight:700}
.brand-name{font-family:var(--serif);font-size:1.35rem;font-weight:700}
.main-nav{margin-inline-start:auto;display:flex;align-items:center;gap:1.4rem}
.main-nav>a,.nav-drop-toggle{font-weight:500;color:var(--ink)}
.main-nav>a:hover,.nav-drop-toggle:hover{color:var(--blue)}
.nav-dropdown{position:relative}
.nav-menu{position:absolute;top:130%;left:0;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);min-width:180px;padding:.4rem;display:none;flex-direction:column}
.nav-menu a{padding:.5rem .7rem;border-radius:8px;color:var(--ink)}
.nav-menu a:hover{background:var(--blue-soft);color:var(--blue)}
.nav-dropdown:hover .nav-menu,.nav-dropdown.open .nav-menu{display:flex}
.nav-search{display:flex;align-items:center;border:1px solid var(--line);border-radius:30px;overflow:hidden;background:var(--bg-soft)}
.nav-search input{border:0;background:transparent;padding:.5rem .9rem;outline:none;font-family:var(--sans);width:130px}
.nav-search button{border:0;background:transparent;padding:.5rem .8rem;font-size:1.1rem;cursor:pointer;color:var(--blue)}
.nav-toggle{display:none;flex-direction:column;gap:5px;background:none;border:0;cursor:pointer;padding:.3rem}
.nav-toggle span{width:24px;height:2px;background:var(--ink);border-radius:2px;transition:.3s}

/* ---------- Mobile category cards (shown only on small screens) ---------- */
.mobile-cats{display:none;background:#fff;border-bottom:1px solid var(--line);padding:.9rem 0}
.mc-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:.7rem}
.mc-card{display:flex;flex-direction:column;align-items:center;gap:.4rem;padding:.8rem .4rem;background:var(--bg-soft);border:1px solid var(--line);border-radius:14px;color:var(--ink);text-align:center}
.mc-card:hover,.mc-card:active{background:var(--blue-soft);color:var(--blue);border-color:var(--blue)}
.mc-logo{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:var(--blue);color:#fff;font-family:var(--serif);font-weight:700;font-size:1.2rem}
.mc-card:hover .mc-logo{background:var(--blue-dark)}
.mc-name{font-size:.85rem;font-weight:500;line-height:1.2}
.mc-hidden{display:none}
.mc-grid.expanded .mc-hidden{display:flex}
.mc-more{display:block;width:100%;margin-top:.8rem;background:var(--blue-soft);color:var(--blue);border:0;border-radius:30px;padding:.6rem;font-family:var(--sans);font-weight:600;cursor:pointer}

/* ---------- Highlight ticker ---------- */
.ticker{background:var(--blue-dark);color:#fff;overflow:hidden}
.ticker-inner{display:flex;align-items:center;gap:0}
.ticker-label{flex:none;background:var(--gold);color:#3b2a07;font-weight:700;font-size:.85rem;padding:.55rem 1rem;margin-right:1rem;border-radius:0 0 8px 8px}
.ticker-viewport{flex:1;overflow:hidden;position:relative}
.ticker-track{display:inline-flex;white-space:nowrap;will-change:transform;animation:ticker 40s linear infinite}
.ticker:hover .ticker-track{animation-play-state:paused}
.ticker-item{color:rgba(255,255,255,.92);padding:.55rem 1.4rem;font-size:.92rem;position:relative}
.ticker-item::before{content:'•';position:absolute;left:0;color:var(--gold)}
.ticker-item:hover{color:#fff}
@keyframes ticker{from{transform:translateX(0)}to{transform:translateX(-50%)}}

/* ---------- Hero slider (boxed image, post-driven) ---------- */
.hero{position:relative;background:linear-gradient(135deg,#163f6e 0%,#1f5fa8 55%,#2b74c2 100%)}
.hero::before{content:'';position:absolute;top:-120px;right:-80px;width:360px;height:360px;background:radial-gradient(circle,rgba(217,164,65,.30),transparent 70%);border-radius:50%}
.hero-slider{position:relative;overflow:hidden}
.hero-track{display:flex;transition:transform .6s cubic-bezier(.65,.05,.36,1)}
.hero-slide{position:relative;flex:0 0 100%;display:flex;align-items:center}
.hero-inner{display:grid;grid-template-columns:1fr .9fr;gap:2.5rem;align-items:center;padding:3rem 0}
.hero-text{position:relative;color:#fff;max-width:560px}
.hero-kicker{display:inline-block;background:var(--gold);color:#3b2a07;padding:.32rem .9rem;border-radius:30px;font-size:.85rem;font-weight:600;margin-bottom:1rem}
a.hero-kicker:hover{color:#3b2a07;opacity:.9}
.hero-text h1{color:#fff;font-size:clamp(1.7rem,3.6vw,2.7rem);margin-bottom:1rem;line-height:1.25}
.hero-text h1 a{color:#fff}
.hero-text p{color:rgba(255,255,255,.9);font-size:1.02rem;margin-bottom:1.4rem;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.hero-figure{display:block;margin:0}
.hero-figure img{width:100%;aspect-ratio:16/11;object-fit:cover;border-radius:18px;border:5px solid rgba(255,255,255,.9);box-shadow:0 18px 45px rgba(0,0,0,.32);transition:.3s}
.hero-figure:hover img{transform:translateY(-3px)}
.hero-arrow{position:absolute;top:50%;transform:translateY(-50%);background:rgba(255,255,255,.85);border:0;width:44px;height:44px;border-radius:50%;font-size:1.6rem;line-height:1;cursor:pointer;color:var(--blue-dark);display:grid;place-items:center;transition:.2s;z-index:3}
.hero-arrow:hover{background:#fff}
.hero-arrow.prev{left:18px}.hero-arrow.next{right:18px}
.hero-dots{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);display:flex;gap:.5rem;z-index:3}
.hero-dots button{width:10px;height:10px;border-radius:50%;border:0;background:rgba(255,255,255,.5);cursor:pointer;padding:0}
.hero-dots button.active{background:#fff;width:26px;border-radius:6px}

/* ---------- Buttons ---------- */
.btn{display:inline-block;background:#fff;color:var(--blue-dark);padding:.7rem 1.5rem;border-radius:30px;font-weight:600;border:1px solid var(--line);cursor:pointer;transition:.2s}
.btn:hover{transform:translateY(-1px);box-shadow:var(--shadow)}
.hero-content .btn{background:var(--gold);color:#3b2a07;border-color:transparent}

/* ---------- Sections ---------- */
.section{padding:3.5rem 0}
.section-head{text-align:center;margin-bottom:2.2rem}
.section-head h2{font-size:2rem}
.section-head p{color:var(--muted)}

/* ---------- Cards ---------- */
.card-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.8rem}
.featured-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1.8rem}
.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;transition:.25s;display:flex;flex-direction:column}
.card:hover{transform:translateY(-4px);box-shadow:var(--shadow)}
.card-thumb{position:relative;display:block;aspect-ratio:16/10;overflow:hidden;background:var(--bg-soft)}
.card-thumb img{width:100%;height:100%;object-fit:cover;transition:.4s}
.card:hover .card-thumb img{transform:scale(1.06)}
.card-badge{position:absolute;top:12px;left:12px;background:var(--blue);color:#fff;font-size:.75rem;padding:.3rem .8rem;border-radius:30px}
.card-body{padding:1.2rem 1.3rem 1.4rem;display:flex;flex-direction:column;gap:.6rem;flex:1}
.card-title{font-size:1.22rem}
.featured-grid .card-title{font-size:1.5rem}
.card-title a{color:var(--ink)}.card-title a:hover{color:var(--blue)}
.card-excerpt{color:var(--muted);font-size:.95rem}
.card-meta{margin-top:auto;display:flex;gap:.5rem;color:var(--muted);font-size:.85rem}

/* ---------- Mini cards (same-category posts at end of a post) ---------- */
.cat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1.2rem}
.mini-card{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden;transition:.25s;color:var(--ink)}
.mini-card:hover{transform:translateY(-4px);box-shadow:var(--shadow);color:var(--ink)}
.mini-thumb{position:relative;display:block;aspect-ratio:16/11;overflow:hidden;background:var(--bg-soft)}
.mini-thumb img{width:100%;height:100%;object-fit:cover;transition:.4s}
.mini-card:hover .mini-thumb img{transform:scale(1.06)}
.mini-cat{position:absolute;top:8px;left:8px;background:var(--blue);color:#fff;font-size:.7rem;padding:.2rem .6rem;border-radius:20px}
.mini-body{padding:.8rem .9rem 1rem;display:flex;flex-direction:column;gap:.35rem}
.mini-title{font-family:var(--serif);font-weight:600;font-size:1.02rem;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.mini-date{color:var(--muted);font-size:.8rem}

/* ---------- Page head ---------- */
.page-head{background:var(--blue-soft);padding:3rem 0;border-bottom:1px solid var(--line)}
.page-kicker{color:var(--blue);font-weight:600;letter-spacing:.04em}
.page-head h1{font-size:2.4rem;margin:.4rem 0}
.page-head p{color:var(--muted);max-width:600px}
.page-search,.subscribe-form{display:flex;gap:.6rem;margin-top:1rem;max-width:480px}
.page-search input,.subscribe-form input{flex:1;padding:.8rem 1.1rem;border:1px solid var(--line);border-radius:30px;font-family:var(--sans)}
.page-search button,.subscribe-form button{background:var(--blue);color:#fff;border:0;padding:.8rem 1.6rem;border-radius:30px;cursor:pointer;font-weight:600}

/* ---------- Single post ---------- */
.single-hero{position:relative;overflow:hidden;padding:3rem 0;background:linear-gradient(135deg,#163f6e 0%,#1f5fa8 55%,#2b74c2 100%)}
/* decorative soft glows on the coloured band */
.single-hero::before{content:'';position:absolute;top:-120px;right:-80px;width:340px;height:340px;background:radial-gradient(circle,rgba(217,164,65,.35),transparent 70%);border-radius:50%}
.single-hero::after{content:'';position:absolute;bottom:-140px;left:-60px;width:320px;height:320px;background:radial-gradient(circle,rgba(255,255,255,.12),transparent 70%);border-radius:50%}
.single-hero-inner{position:relative;display:grid;grid-template-columns:1fr .9fr;gap:2.5rem;align-items:center}
.single-hero.no-image .single-hero-inner{grid-template-columns:1fr;text-align:center;max-width:820px;margin-inline:auto}
.single-hero-text{position:relative;color:#fff}
.single-cat{display:inline-block;background:var(--gold);color:#3b2a07;padding:.3rem .9rem;border-radius:30px;font-size:.85rem;font-weight:600;margin-bottom:1rem}
.single-hero-text h1{color:#fff;font-size:clamp(1.7rem,3.8vw,2.7rem)}
.single-meta{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:1rem;color:rgba(255,255,255,.92);font-size:.95rem}
.single-hero.no-image .single-meta{justify-content:center}
.single-hero-figure{margin:0}
.single-hero-figure img{width:100%;aspect-ratio:16/11;object-fit:cover;border-radius:18px;border:5px solid rgba(255,255,255,.9);box-shadow:0 18px 45px rgba(0,0,0,.3)}
.admin-edit-btn{display:inline-block;margin-top:1.2rem;background:var(--gold);color:#3b2a07;padding:.55rem 1.2rem;border-radius:30px;font-weight:600;font-size:.95rem}
.admin-edit-btn:hover{color:#3b2a07;box-shadow:var(--shadow);transform:translateY(-1px)}
.single-body{max-width:760px;padding:3rem 0}
.narrow{max-width:760px}
.prose{font-size:1.12rem;line-height:1.9}
.prose p{margin:0 0 1.3rem}
.prose h2{font-size:1.7rem;margin:2.2rem 0 1rem}
.prose h3{font-size:1.35rem;margin:1.8rem 0 .8rem}
.prose img{border-radius:12px;margin:1.6rem 0}
.prose blockquote{border-left:4px solid var(--blue);background:var(--blue-soft);padding:1rem 1.4rem;border-radius:0 12px 12px 0;margin:1.6rem 0;font-style:italic;color:var(--blue-dark)}
.prose ul,.prose ol{margin:0 0 1.3rem 1.4rem}
.prose a{text-decoration:underline}
.share{display:flex;align-items:center;gap:.8rem;margin-top:2.5rem;padding-top:1.5rem;border-top:1px solid var(--line);flex-wrap:wrap}
.share span{color:var(--muted)}
.share a{background:var(--bg-soft);padding:.5rem 1.1rem;border-radius:30px;font-weight:500}

/* ---------- Newsletter ---------- */
.newsletter{background:linear-gradient(135deg,var(--blue),var(--blue-dark));color:#fff;padding:3.5rem 0;text-align:center}
.newsletter h2{color:#fff;font-size:1.9rem}
.newsletter p{color:rgba(255,255,255,.9);max-width:520px;margin:.6rem auto 1.5rem}
.newsletter .subscribe-form{margin-inline:auto}
.newsletter .subscribe-form input{border:0}
.newsletter .subscribe-form button{background:var(--gold);color:#3b2a07}
.form-note{margin-top:1rem;font-weight:600}

/* ---------- Footer ---------- */
.site-footer{background:#0f1b2a;color:#c7d2de;padding:3rem 0 1.5rem}
.footer-grid{display:grid;grid-template-columns:1.6fr 1fr 1fr 1fr;gap:2rem}
.site-footer .brand-name{color:#fff;font-size:1.4rem}
.site-footer p{color:#9fb0c2;margin-top:.5rem}
.site-footer h4{color:#fff;margin-bottom:.9rem;font-family:var(--sans);font-size:1rem}
.site-footer ul{list-style:none}
.site-footer li{margin-bottom:.5rem}
.site-footer a{color:#c7d2de}.site-footer a:hover{color:#fff}
.social{display:flex;flex-direction:column;gap:.5rem}
.footer-bottom{text-align:center;margin-top:2.5rem;padding-top:1.5rem;border-top:1px solid rgba(255,255,255,.1);color:#9fb0c2;font-size:.9rem}

/* ---------- Misc ---------- */
.empty{text-align:center;color:var(--muted);padding:2.5rem 0}
.search-count{color:var(--muted);margin-bottom:1.4rem}
.pagination{display:flex;gap:.5rem;justify-content:center;margin-top:2.5rem}
.pagination a{padding:.5rem .9rem;border:1px solid var(--line);border-radius:10px;color:var(--ink)}
.pagination a.active{background:var(--blue);color:#fff;border-color:var(--blue)}
.form-card{display:flex;flex-direction:column;gap:1rem;max-width:560px}
.form-card label{display:flex;flex-direction:column;gap:.4rem;font-weight:500}
.form-card input,.form-card textarea{padding:.8rem 1rem;border:1px solid var(--line);border-radius:12px;font-family:var(--sans);font-size:1rem}
.alert{padding:.9rem 1.2rem;border-radius:12px;margin-bottom:1.4rem}
.alert.success{background:#e7f6ec;color:#1b7a3d}
.alert.error{background:#fdecec;color:#c0392b}

/* ---------- Responsive ---------- */
@media(max-width:1024px){
  .cat-grid{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:768px){
  /* Mobile: show only 2 boxes per the requested layout */
  .cat-grid{grid-template-columns:repeat(2,1fr)}
  .cat-grid .mini-card:nth-child(n+3){display:none}
}
@media(max-width:880px){
  .card-grid{grid-template-columns:repeat(2,1fr)}
  .featured-grid{grid-template-columns:1fr}
  .single-hero-inner{grid-template-columns:1fr;gap:1.6rem}
  .single-hero-figure{order:-1}
  .single-hero-figure img{aspect-ratio:16/9}
  .hero-inner{grid-template-columns:1fr;gap:1.4rem;padding:2rem 0;text-align:center}
  .hero-text{max-width:none}
  .hero-figure{order:-1}
  .hero-figure img{aspect-ratio:16/9}
  .hero-arrow{display:none}
  .ticker-label{margin-right:.6rem}
  .footer-grid{grid-template-columns:1fr 1fr}
  .nav-toggle{display:none}
  .main-nav{display:none}
  .mobile-cats{display:block}
  .brand{margin-inline:auto}
  .hero-slide{min-height:420px}
  /* Post reading: hide header menu + buttons on mobile */
  body.page-single .site-header,
  body.page-single .mobile-cats,
  body.page-single .ad-header,
  body.page-single .reader-bar,
  body.page-single .breadcrumb{display:none!important}
  body.page-single .post-read-back{display:flex}
  body.page-single .site-main{padding-top:0}
}
@media(max-width:560px){
  .card-grid{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr}
  .hero-slide{min-height:360px}
  .hero-arrow{width:38px;height:38px}

  /* Homepage recent posts pattern on mobile:
     4 full-width, then 2 side-by-side, then the rest full-width */
  .recent-grid{grid-template-columns:1fr 1fr;gap:1rem}
  .recent-grid .card{grid-column:1 / -1}
  .recent-grid .card:nth-child(5),
  .recent-grid .card:nth-child(6){grid-column:auto}
  .recent-grid .card:nth-child(5) .card-excerpt,
  .recent-grid .card:nth-child(6) .card-excerpt{display:none}
}

/* ---- Feature pack: reader tools, TOC, comments, dark mode, etc. ---- */
.breadcrumb{padding:1rem 0 .5rem;color:var(--muted);font-size:.9rem}
.breadcrumb a{color:var(--blue)}
.post-read-back{display:none;position:sticky;top:0;z-index:55;align-items:center;padding:.65rem 4%;background:rgba(255,255,255,.95);backdrop-filter:blur(8px);border-bottom:1px solid var(--line);color:var(--ink);font-weight:600;font-size:.95rem}
body.dark .post-read-back{background:rgba(22,36,54,.95)}
.sponsored-badge{display:inline-block;background:#ffe08a;color:#5a4200;padding:.2rem .7rem;border-radius:20px;font-size:.8rem;margin-bottom:.5rem}
.toc-box{background:var(--bg-soft);border:1px solid var(--line);border-radius:12px;padding:1rem 1.2rem;margin-bottom:1.5rem}
.toc-box ul{list-style:none;margin:.5rem 0 0}
.toc-l3{padding-left:1rem}
.post-tags{display:flex;flex-wrap:wrap;gap:.5rem;margin:1.2rem 0}
.post-tags a{background:var(--blue-soft);padding:.3rem .8rem;border-radius:20px;font-size:.85rem}
.comments-section{margin-top:2.5rem;padding-top:1.5rem;border-top:1px solid var(--line)}
.comment-item{padding:.8rem 0;border-bottom:1px solid var(--line)}
.reader-bar{position:fixed;bottom:18px;right:18px;display:flex;gap:.4rem;z-index:60}
.reader-bar button{width:40px;height:40px;border-radius:50%;border:1px solid var(--line);background:#fff;cursor:pointer;box-shadow:var(--shadow)}
.reader-bar button.active{background:var(--gold)}
.read-progress{position:fixed;top:0;left:0;height:3px;background:var(--gold);width:0;z-index:70}
.load-more-btn{display:block;margin:2rem auto 0}
.search-advanced{display:grid;grid-template-columns:2fr 1fr 1fr 1fr auto;gap:.6rem}
.ad-zone{text-align:center;padding:.5rem 0}
.ad-header{border-bottom:1px solid var(--line)}
.donation-box{text-align:center;padding:1rem 0 1.5rem}
.author-head{display:flex;gap:1.2rem;align-items:center}
.author-avatar{width:90px;height:90px;border-radius:50%;object-fit:cover}
body.dark{--bg:#0f1b2a;--ink:#e8eef5;--line:#2a3a4d;--bg-soft:#162436;background:var(--bg);color:var(--ink)}
body.dark .site-header,body.dark .card,body.dark .mini-card{background:#162436;border-color:var(--line)}
@media print{.site-header,.mobile-cats,.newsletter,.site-footer,.reader-bar,.read-progress,.share,.comments-section{display:none!important}}
@media(max-width:768px){.search-advanced{grid-template-columns:1fr}}
