/* CloudVai CMS 2.0 — Risingbd-style red theme */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:'Hind Siliguri','Noto Sans Bengali',system-ui,sans-serif;background:#f5f5f7;color:#0f172a;line-height:1.6;font-size:15px}
img{max-width:100%;height:auto;display:block}
a{color:#dc2626;text-decoration:none}a:hover{text-decoration:underline}
.container{max-width:1200px;margin:0 auto;padding:0 14px}
.boxed body{background:#e5e5e5}
.boxed .site{max-width:1240px;margin:0 auto;background:#fff;box-shadow:0 0 25px rgba(0,0,0,.08)}

/* Topbar */
.topbar{background:#7f1d1d;color:#fff;font-size:12px;padding:6px 0}
.topbar .container{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.topbar .links a{color:#fecaca;margin-right:10px}
.topbar .lang button{background:transparent;color:#fecaca;border:1px solid #b91c1c;padding:2px 8px;border-radius:3px;cursor:pointer;font-size:11px}
.topbar .lang button.on{background:#fff;color:#7f1d1d}

/* Header (sticky like Lovable preview) */
.site-header{position:sticky;top:0;z-index:40;background:#fff;border-bottom:1px solid #e2e8f0;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.header{background:#fff;padding:12px 0}
.header .container{display:flex;align-items:center;justify-content:space-between;gap:14px}
.logo{font-size:26px;font-weight:800;color:#dc2626;letter-spacing:-.5px;line-height:1.1}
.logo small{display:block;font-size:11px;color:#64748b;font-weight:400;margin-top:2px}
.tagline-chip{background:#f1f5f9;color:#64748b;font-style:italic;font-size:12px;padding:7px 12px;border-radius:3px;text-align:center;flex:1;max-width:420px}
.header-right{display:flex;align-items:center;gap:8px;color:#64748b;font-size:13px}
.header-right form input{padding:7px 10px;border:1px solid #e2e8f0;border-radius:3px;font-size:13px;width:160px}

/* Navigation */
.nav{background:#dc2626;color:#fff}
.nav .container{display:flex;align-items:center;justify-content:space-between}
.nav ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap}
.nav li a{display:block;padding:10px 14px;color:#fff;font-weight:600;font-size:14px}
.nav li a:hover,.nav li a.active{background:#b91c1c;text-decoration:none}
.hamburger{display:none;background:transparent;border:0;color:#fff;font-size:22px;padding:8px 14px;cursor:pointer}

/* Ticker */
.ticker{background:#fff;border-bottom:1px solid #e2e8f0;padding:7px 0;overflow:hidden}
.ticker .container{display:flex;align-items:center;gap:12px;height:30px}
.ticker .label{background:#dc2626;color:#fff;padding:4px 10px;font-size:11px;font-weight:700;border-radius:2px;white-space:nowrap;flex-shrink:0;text-transform:uppercase;letter-spacing:.5px}
.ticker .scroll{flex:1;overflow:hidden;position:relative;white-space:nowrap;-webkit-mask-image:linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent);mask-image:linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent)}
.ticker .scroll-inner{display:inline-block;animation:tick 50s linear infinite;padding-left:100%}
.ticker .scroll-inner a{margin-right:40px;color:#0f172a;font-size:13.5px}
.ticker .scroll-inner a::before{content:'● ';color:#dc2626}
@keyframes tick{0%{transform:translateX(0)}100%{transform:translateX(-100%)}}

/* Layout grid */
.main{padding:18px 0 30px}
.grid-2{display:grid;grid-template-columns:2fr 1fr;gap:22px}
.grid-3{display:grid;grid-template-columns:1fr 2fr 1fr;gap:18px}

/* Hero - Lovable style: title under image, badge corner, side list with header */
.hero{display:grid;grid-template-columns:2fr 1fr;gap:28px;margin-bottom:24px}
.hero-lead .hero-img-wrap{display:block;position:relative;border-radius:4px;overflow:hidden}
.hero-lead .hero-img-wrap img{width:100%;height:480px;object-fit:cover;display:block}
.hero-lead .cat-badge{position:absolute;top:12px;left:12px;background:#dc2626;color:#fff;padding:5px 12px;font-size:12px;font-weight:600;border-radius:2px}
.hero-lead .hero-title{margin:14px 0 6px;font-size:26px;line-height:1.35;font-weight:700}
.hero-lead .hero-title a{color:#0f172a}
.hero-lead .hero-title a:hover{color:#dc2626;text-decoration:none}
.hero-lead .hero-excerpt{margin:0;color:#64748b;font-size:14px;line-height:1.6}
.hero-side{display:flex;flex-direction:column;gap:14px;border-left:1px solid #e2e8f0;padding-left:24px}
.hero-side .side-title{margin:0 0 4px;font-size:15px;font-weight:700;color:#0f172a;border-bottom:2px solid #dc2626;padding-bottom:6px;display:inline-block;align-self:flex-start}
.hero-side .card{display:grid;grid-template-columns:90px 1fr;gap:12px;text-decoration:none;color:inherit;padding-bottom:14px;border-bottom:1px solid #f1f5f9}
.hero-side .card:last-child{border-bottom:0;padding-bottom:0}
.hero-side .card img{width:90px;height:64px;object-fit:cover;border-radius:3px}
.hero-side .card h4{margin:0;font-size:13.5px;line-height:1.4;font-weight:600;color:#0f172a}
.hero-side .card:hover h4{color:#dc2626}
.hero-side .card .meta{font-size:11px;color:#94a3b8;margin-top:5px}

/* Category sections */
.section{margin-bottom:30px}
.sec-head{border-bottom:2px solid #dc2626;margin-bottom:14px;display:flex;justify-content:space-between;align-items:end}
.sec-head h3{margin:0;padding:6px 14px;background:#dc2626;color:#fff;font-size:15px;font-weight:700}
.sec-head a{font-size:12px;color:#dc2626;padding:6px 0}
.sec-grid{display:grid;grid-template-columns:1.4fr 1fr;gap:16px}
.sec-lead{}.sec-lead img{width:100%;height:230px;object-fit:cover;border-radius:3px}
.sec-lead h4{margin:10px 0 4px;font-size:18px;line-height:1.4}
.sec-lead p{margin:0;color:#475569;font-size:13px}
.sec-list{display:flex;flex-direction:column;gap:11px}
.sec-list .item{display:grid;grid-template-columns:95px 1fr;gap:10px;padding-bottom:11px;border-bottom:1px dashed #e2e8f0}
.sec-list .item:last-child{border:0;padding-bottom:0}
.sec-list .item img{width:95px;height:65px;object-fit:cover;border-radius:3px}
.sec-list .item h5{margin:0;font-size:13.5px;line-height:1.45;font-weight:600}

/* Sidebar */
.sidebar .widget{background:#fff;border:1px solid #e2e8f0;border-radius:4px;margin-bottom:18px;padding:16px}
.sidebar .widget h4{margin:-16px -16px 12px;padding:9px 14px;background:#0f172a;color:#fff;font-size:13px;font-weight:700;border-radius:4px 4px 0 0}
.popular-list{list-style:none;margin:0;padding:0}
.popular-list li{display:grid;grid-template-columns:32px 1fr;gap:10px;padding:9px 0;border-bottom:1px dashed #e2e8f0;font-size:13px}
.popular-list li:last-child{border:0}
.popular-list .num{font-size:24px;font-weight:800;color:#dc2626;line-height:1}

/* Ad slot */
.ad{margin:14px 0;text-align:center}
.ad-placeholder{background:#f1f5f9;border:1px dashed #cbd5e1;padding:30px;color:#94a3b8;font-size:12px;border-radius:4px}

/* Single article */
.single{background:#fff;padding:24px;border-radius:4px;border:1px solid #e2e8f0}
.single h1{margin:0 0 8px;font-size:26px;line-height:1.4}
.single .meta{color:#64748b;font-size:13px;margin-bottom:16px;display:flex;flex-wrap:wrap;gap:14px;padding-bottom:14px;border-bottom:1px solid #e2e8f0}
.single .feat{margin:0 0 16px}.single .feat img{width:100%;border-radius:4px}
.single-content{font-size:16px;line-height:1.85;color:#0f172a}
.single-content p{margin:0 0 14px}
.single-content img{margin:14px auto;border-radius:4px}
.single-content iframe{width:100%;aspect-ratio:16/9;margin:14px 0;border:0;border-radius:4px}
.single-content h2,.single-content h3{margin:22px 0 10px}
.single-content blockquote{border-left:4px solid #dc2626;padding:8px 14px;margin:14px 0;background:#fef2f2;font-style:italic}
.tags{margin-top:20px;padding-top:16px;border-top:1px solid #e2e8f0}
.tags a{display:inline-block;background:#f1f5f9;color:#475569;padding:4px 10px;border-radius:3px;font-size:12px;margin:0 6px 6px 0}
.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}
.btn{display:inline-flex;align-items:center;gap:6px;background:#dc2626;color:#fff!important;padding:8px 14px;border-radius:4px;font-size:13px;border:0;cursor:pointer;text-decoration:none!important}
.btn:hover{background:#b91c1c}
.btn-ghost{background:#f1f5f9;color:#0f172a!important}.btn-ghost:hover{background:#e2e8f0}

/* Footer */
.footer{background:#0f172a;color:#cbd5e1;padding:30px 0 0;margin-top:40px}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:24px;padding-bottom:24px}
.footer h5{color:#fff;margin:0 0 12px;font-size:14px}
.footer a{color:#cbd5e1}
.footer ul{list-style:none;padding:0;margin:0}
.footer ul li{padding:4px 0;font-size:13px}
.footer-bottom{border-top:1px solid #1e293b;padding:14px 0;text-align:center;font-size:12px;color:#94a3b8}
.footer-bottom a{color:#fca5a5}

/* E-paper */
.ep-grid{column-count:3;column-gap:14px}
.ep-card{break-inside:avoid;background:#fff;border:1px solid #e2e8f0;border-radius:4px;margin-bottom:14px;overflow:hidden;cursor:pointer}
.ep-card img{width:100%;height:auto}
.ep-card .body{padding:10px}.ep-card h4{margin:0 0 4px;font-size:14px;line-height:1.4}.ep-card p{margin:0;font-size:12px;color:#64748b}
.ep-modal{position:fixed;inset:0;background:rgba(0,0,0,.8);display:none;align-items:center;justify-content:center;z-index:1000;padding:20px}
.ep-modal.open{display:flex}
.ep-modal .panel{background:#fff;max-width:800px;width:100%;max-height:90vh;overflow:auto;border-radius:6px;padding:24px;position:relative}
.ep-modal .close{position:absolute;right:14px;top:10px;background:transparent;border:0;font-size:24px;cursor:pointer}

/* PhotoCard */
.pc-templates{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;margin-bottom:18px}
.pc-tpl{background:#fff;border:2px solid #e2e8f0;border-radius:6px;padding:10px;cursor:pointer}
.pc-tpl.active{border-color:#dc2626}
.pc-canvas{width:600px;max-width:100%;margin:18px auto;background:#fff;border-radius:8px;overflow:hidden;box-shadow:0 8px 30px rgba(0,0,0,.1)}

/* Reporter card */
.id-card{width:330px;height:520px;margin:14px auto;background:#fff;border-radius:14px;box-shadow:0 10px 35px rgba(0,0,0,.18);overflow:hidden;position:relative;font-family:'Hind Siliguri',sans-serif}
.id-card .head{background:linear-gradient(135deg,#dc2626,#7f1d1d);color:#fff;padding:14px;text-align:center}
.id-card .photo{width:130px;height:130px;border-radius:50%;margin:14px auto;background:#f1f5f9;background-size:cover;background-position:center;border:4px solid #fff;box-shadow:0 4px 14px rgba(0,0,0,.15)}
.id-card .info{padding:0 18px;text-align:center}
.id-card .info h3{margin:6px 0 2px;font-size:18px}
.id-card .info .desg{color:#dc2626;font-weight:600;font-size:13px}
.id-card .qr{text-align:center;padding:10px}
.id-card .qr img{width:100px;height:100px;margin:0 auto}

/* Verify */
.verify{max-width:520px;margin:40px auto;background:#fff;padding:30px;border-radius:8px;text-align:center;border:1px solid #e2e8f0}
.verify .badge{display:inline-block;padding:6px 14px;border-radius:20px;font-size:13px;font-weight:600;margin-bottom:14px}
.verify .ok{background:#dcfce7;color:#15803d}.verify .bad{background:#fee2e2;color:#b91c1c}

/* Forms (admin) */
.form-row{margin-bottom:14px}
.form-row label{display:block;font-weight:600;font-size:13px;margin-bottom:4px}
.form-row input,.form-row select,.form-row textarea{width:100%;padding:9px 11px;border:1px solid #cbd5e1;border-radius:4px;font-family:inherit;font-size:14px}
.form-row textarea{min-height:90px;resize:vertical}

/* Photo gallery / video gallery */
.pg-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px}
.pg-card{background:#fff;border:1px solid #e2e8f0;border-radius:4px;overflow:hidden}
.pg-card img{width:100%;height:160px;object-fit:cover}
.pg-card .body{padding:10px}.pg-card h4{margin:0;font-size:14px}

/* Responsive */
@media(max-width:900px){
  .hero{grid-template-columns:1fr;gap:18px}.hero-lead .hero-img-wrap img{height:260px}
  .hero-side{border-left:0;padding-left:0;border-top:1px solid #e2e8f0;padding-top:16px}
  .grid-2{grid-template-columns:1fr}.sec-grid{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr 1fr}.ep-grid{column-count:2}
}
@media(max-width:640px){
  .hamburger{display:block}
  .nav ul{display:none;width:100%;background:#fff;grid-template-columns:1fr 1fr;gap:0;border-top:1px solid #e5e7eb}
  .nav ul.open{display:grid}
  .nav li{border-bottom:1px solid #e5e7eb}
  .nav li:nth-child(odd){border-right:1px solid #e5e7eb}
  .nav li a{display:block;padding:14px 16px;color:#0f172a;font-weight:600;font-size:14px;background:#fff}
  .nav li a:hover,.nav li a.active{background:#fef2f2;color:#dc2626}
  .nav .container{flex-wrap:wrap;padding:0}
  .header .container{flex-direction:column;align-items:flex-start;gap:6px}
  .header-right{font-size:11px}
  .logo{font-size:22px}
  .footer-grid{grid-template-columns:1fr}
  .ep-grid{column-count:1}
  .hero-lead h2{font-size:18px}
  .single{padding:16px}.single h1{font-size:20px}
  .single-content{font-size:15px}
  .id-card{width:100%;max-width:330px}
}

/* Hide chrome on print/photocard pages */
.bare{margin:0;padding:0;background:#f1f5f9}
@media(max-width:900px){.tagline-chip{display:none}}

/* Reading progress bar */
#rp-bar{position:fixed;top:0;left:0;height:3px;width:0;background:#dc2626;z-index:9999;transition:width .1s linear}

/* Dark mode */
html[data-theme="dark"] body{background:#0f172a;color:#e2e8f0}
html[data-theme="dark"] .site,
html[data-theme="dark"] .site-header,
html[data-theme="dark"] .header,
html[data-theme="dark"] .ticker,
html[data-theme="dark"] .pg-card,
html[data-theme="dark"] .widget,
html[data-theme="dark"] .footer{background:#1e293b;color:#e2e8f0;border-color:#334155}
html[data-theme="dark"] .single h1,
html[data-theme="dark"] .pg-card h4 a,
html[data-theme="dark"] .logo{color:#f8fafc}
html[data-theme="dark"] a{color:#fca5a5}
html[data-theme="dark"] .header-right input{background:#0f172a;color:#e2e8f0;border-color:#334155}
html[data-theme="dark"] .tagline-chip{background:#334155;color:#cbd5e1}
html[data-theme="dark"] .meta,
html[data-theme="dark"] .single-content{color:#cbd5e1}
html[data-theme="dark"] section#comments > div[style*="background:#f8fafc"]{background:#0f172a !important;color:#e2e8f0}
html[data-theme="dark"] .pg-card .body{background:#1e293b}
.topbar .lang #themeToggle{background:transparent;color:#fecaca;border:1px solid #b91c1c;padding:2px 8px;border-radius:3px;cursor:pointer;font-size:12px}
