:root {
  --bg: #ffffff;
  --bg2: #f8fafc;
  --card: #ffffff;
  --card2: #f1f5f9;
  --accent1: #2563eb;
  --accent2: #1d4ed8;
  --accent3: #0ea5e9;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
}
* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--text); font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif; }
body { min-height: 100vh; }
a { color: var(--accent1); text-decoration: none; }
a:hover { color: var(--accent2); }

h1,h2,h3,h4,h5,.navbar-brand,.section-title { font-family: 'Sora', 'DM Sans', 'Nirmala UI', 'Vrinda', 'Kalpurush', sans-serif; }
/* Bangla text uses DM Sans (falls back to system Bangla) */
.bn, .bengali { font-family: 'DM Sans', sans-serif; }

.navbar { background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.navbar-brand { font-weight: 700; color: var(--accent1) !important; font-size: 1.3rem; margin-left: -4px; display: inline-flex; align-items: center; gap: 6px; }
.hd-nav .navbar-collapse { align-items: center; }
.hd-nav .navbar-nav { align-items: center; }
.hd-nav .nav-link { padding: 6px 10px; border-radius: 8px; }
.hd-nav .nav-link:hover { background: rgba(37,99,235,.08); }
.hd-nav .btn { white-space: nowrap; }
@media (min-width: 992px) {
  .hd-nav .navbar-collapse { display: flex !important; flex-wrap: nowrap; }
  .hd-search { max-width: 320px; margin-left: -8px; }
}
.nav-link { color: var(--text) !important; opacity: .85; }
.nav-link:hover { opacity: 1; color: var(--accent1) !important; }
.btn-glow { background: linear-gradient(90deg,#2563eb,#1d4ed8); color: #fff; border: none; box-shadow: 0 0 18px rgba(37,99,235,.25); border-radius: 10px; }
.btn-glow:hover { color:#fff; box-shadow: 0 0 28px rgba(37,99,235,.4); transform: translateY(-1px); }
.btn-outline-glow { border: 1px solid #2563eb; color: #2563eb; border-radius: 10px; background: #fff; }
.btn-outline-glow:hover { background: rgba(37,99,235,.08); color:#1d4ed8; }

.hero { padding: 70px 0 50px; background: radial-gradient(ellipse at top, rgba(37,99,235,.08), transparent 60%), var(--bg); }
.hero h1 { font-size: 2.6rem; font-weight: 800; background: linear-gradient(90deg,#0f172a,#2563eb); -webkit-background-clip:text; background-clip:text; color:transparent; }
.hero p { color: var(--muted); font-size: 1.1rem; }
.search-box { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.04); }
.search-box input { background: transparent; border: none; color: var(--text); }
.search-box input:focus { outline: none; box-shadow: none; background: transparent; color: var(--text); }

.section-title { font-weight: 700; font-size: 1.5rem; margin-bottom: 18px; color: var(--text); }
.section-title span { background: linear-gradient(90deg,#2563eb,#1d4ed8); -webkit-background-clip:text; background-clip:text; color:transparent; }

.project-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: transform .25s, box-shadow .25s; height: 100%; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
/* cb card (compact) */
.cb { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px; height: 100%; box-shadow: 0 2px 8px rgba(0,0,0,.04); transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column; }
.cb-thumb { width: 100%; height: 220px; object-fit: cover; border-radius: 10px; }
.cb:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(37,99,235,.12); }
.cb .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: .8rem; margin-bottom: 10px; }
.cb .meta span { background: var(--card2); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); }
.cb .meta .ft { background: linear-gradient(90deg,#2563eb,#1d4ed8); color: #fff; border: none; font-weight: 600; }
.cb h3 { font-size: 1.1rem; font-weight: 600; margin: 0 0 8px; line-height: 1.3; }
.cb h3 a { color: var(--text); }
.cb h3 a:hover { color: var(--accent1); }
.cb p { color: var(--muted); font-size: .9rem; flex: 1; margin-bottom: 12px; }
.cb .meta.sm { font-size: .8rem; margin-bottom: 14px; }
.cb .meta.sm span { background: transparent; border: none; padding: 0; }
.cb .ic { vertical-align: middle; margin-right: 2px; }
.btn.ghost { background: transparent; border: 1px solid var(--accent1); color: var(--accent1); border-radius: 10px; padding: 6px 16px; font-weight: 500; }
.btn.ghost:hover { background: var(--accent1); color: #fff; }
.btn.wide { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.dl-btn { background: linear-gradient(90deg,#2563eb,#1d4ed8); color: #fff !important; border: none; box-shadow: 0 0 18px rgba(37,99,235,.3); }
#cdbtn { color: #fff !important; }
.dl-btn:hover { color: #fff; box-shadow: 0 0 28px rgba(37,99,235,.5); transform: translateY(-1px); }
.dl-btn .ic { stroke: #fff; }
.project-card:hover { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(37,99,235,.12); }
.project-card .thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--card2); }
.project-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.project-card:hover .thumb img { transform: scale(1.05); }
.project-card .badge-cat { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.85); backdrop-filter: blur(6px); color: var(--text); font-size: .75rem; padding: 4px 10px; border-radius: 999px; border:1px solid var(--border); }
.project-card .badge-type { position: absolute; top: 10px; right: 10px; background: linear-gradient(90deg,#2563eb,#1d4ed8); color:#fff; font-size:.7rem; padding:4px 10px; border-radius:999px; font-weight:600; }
.project-card .body { padding: 16px; }
.project-card .title { font-weight: 600; font-size: 1.05rem; margin-bottom: 6px; color: var(--text); }
.project-card .desc { color: var(--muted); font-size: .88rem; line-height: 1.4; min-height: 40px; }
.project-card .meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; margin-top: 10px; }

.ad-banner img { width: 100%; border-radius: 12px; }
.ad-banner, .ad-slot { width: 100%; display: block; text-align: center; overflow: hidden; border-radius: 10px; margin-bottom: 0 !important; max-height: 110px; }
.ad-slot iframe { max-width: 100% !important; width: 100% !important; height: auto !important; margin: 0 auto; display: block; }
.ad-slot iframe { max-width: 100% !important; width: 100% !important; height: auto !important; margin: 0 auto; display: block; }
.ad-placeholder { background: var(--card2); border: 1px dashed var(--border); color: var(--muted); }

footer { background: #000; border-top: 1px solid var(--border); padding: 40px 0 20px; margin-top: 60px; color: #fff; }
footer a { color: #fff; }
footer a:hover { color: #a78bfa; }
footer h5, footer h6, footer strong, footer p, footer span { color: #fff; }

.card-dark { background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.form-control, .form-select { background: var(--card2); border: 1px solid var(--border); color: var(--text); }
.form-control:focus, .form-select:focus { background: #fff; color: var(--text); border-color: #2563eb; box-shadow: 0 0 0 .2rem rgba(37,99,235,.15); }
.form-label { color: var(--muted); }

.pagination .page-link { background: var(--card); border-color: var(--border); color: var(--text); }
.pagination .page-item.active .page-link { background: linear-gradient(90deg,#2563eb,#1d4ed8); border-color: transparent; color:#fff; }

img.main { border-radius: 16px; width: 100%; }
.gallery img { border-radius: 10px; cursor: pointer; }
.stat-box { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.stat-box .num { font-size: 1.6rem; font-weight: 700; background: linear-gradient(90deg,#2563eb,#1d4ed8); -webkit-background-clip:text; background-clip:text; color:transparent; }

@media (max-width: 991.98px) {
  .w-lg-auto { width: 100% !important; }
}
@media (min-width: 992px) {
  .w-lg-auto { width: auto !important; }
}
@media (max-width: 991.98px) {
  .w-lg-auto { width: 100% !important; }
  .navbar-brand { font-size: 1.15rem; }
}
@media (min-width: 992px) {
  .w-lg-auto { width: auto !important; }
}
@media (max-width: 768px) {
  .cb h3 { font-size: 1rem; }
  .cb p { font-size: .85rem; }
  .hero { padding: 40px 0 30px; }
  .hero h1 { font-size: 1.7rem; }
  .hero p { font-size: 1rem; }
  .section-title { font-size: 1.3rem; }
  .project-detail h1 { font-size: 1.5rem; }
  .gallery .col-4 { flex: 0 0 50%; max-width: 50%; }
  .stat-box .num { font-size: 1.3rem; }
  .cb { padding: 14px; }
  .cb-thumb { height: 180px; }
  .jc-card { padding: 22px 18px 18px; }
  .ad-slot iframe { width: 100% !important; height: auto !important; min-height: 90px; }
  .card-dark { padding: 16px !important; }
}
@media (max-width: 576px) {
  .gallery .col-4 { flex: 0 0 100%; max-width: 100%; }
  .project-card .meta { flex-wrap: wrap; gap: 4px; }
  .cb-thumb { height: 160px; }
  .search-box { padding: 4px; }
  .btn-glow, .btn-outline-glow { font-size: .9rem; }
  footer { padding: 30px 0 16px; }
  .ad-slot iframe { min-height: 60px; }
}
@media (max-width: 576px) {
  .gallery .col-4 { flex: 0 0 100%; max-width: 100%; }
  .project-card .meta { flex-wrap: wrap; gap: 4px; }
  .cb-thumb { height: 160px; }
  .search-box { padding: 4px; }
  .btn-glow, .btn-outline-glow { font-size: .9rem; }
  footer { padding: 30px 0 16px; }
}
@media (max-width: 400px) {
  .hero h1 { font-size: 1.45rem; }
  .navbar-brand { font-size: 1rem; }
}
.lazy { opacity: 0; transition: opacity .4s; }
.lazy.loaded { opacity: 1; }
/* user name shimmer */
.user-shimmer { color: #000; font-weight: 600; position: relative; display: inline-block; overflow: hidden; }
.user-shimmer::after { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent); animation: shimmer 2s infinite; }
@keyframes shimmer { 0% { left: -100%; } 100% { left: 100%; } }

/* Join Community popup */
.jc-wrap { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); padding: 16px; }
.jc-card { position: relative; background: #0f172a; color: #e6e9f2; border: 1px solid rgba(255,255,255,.1); border-radius: 18px; padding: 28px 24px 22px; max-width: 420px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.5); text-align: center; font-family: 'DM Sans', 'Nirmala UI', 'Vrinda', 'Kalpurush', sans-serif; }
.jc-x { position: absolute; top: 10px; right: 12px; background: transparent; border: none; color: #9aa3bf; cursor: pointer; }
.jc-x:hover { color: #fff; }
.jc-ic { margin-bottom: 10px; }
.jc-card h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 10px; color: #fff; font-family: 'DM Sans', 'Nirmala UI', 'Vrinda', 'Kalpurush', sans-serif; }
.jc-en, .jc-bn { font-size: .9rem; color: #9aa3bf; margin-bottom: 8px; line-height: 1.5; }
.jc-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 16px 0 12px; }
.jc-b { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border-radius: 10px; font-weight: 600; text-decoration: none; background: linear-gradient(90deg,#2563eb,#1d4ed8); color: #fff; }
.jc-b:hover { color: #fff; box-shadow: 0 0 18px rgba(37,99,235,.5); }
.jc-nd { display: flex; align-items: center; gap: 8px; justify-content: center; font-size: .85rem; color: #9aa3bf; cursor: pointer; margin-top: 6px; }
.jc-ck { width: 16px; height: 16px; border: 1px solid #64748b; border-radius: 4px; display: inline-block; }
.jc-nd input { position: absolute; opacity: 0; width: 0; height: 0; }
.jc-nd input:checked + .jc-ck { background: #2563eb; border-color: #2563eb; }
.jc-nd input:checked + .jc-ck::after { content: '✓'; color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.table-darkish { background: #fff; color: var(--text); }
@media (max-width: 576px) {
  .table-darkish { font-size: .85rem; }
  .table-darkish th, .table-darkish td { padding: .5rem .4rem; }
}
.table-darkish th, .table-darkish td { border-color: var(--border); }
.admin-sidebar { background: var(--bg2); }
