/* =====================================================================
   আশেপাশে (Ashepashe) — Theme Stylesheet
   Bengali typography, soft palette, dark/light mode, rounded cards
   ===================================================================== */

:root {
  --brand: #3E5975;
  --brand-dark: #2E4258;
  --brand-hover: #567DA5;
  --accent: #C9E265;
  --highlight: #F39C12;
  --bg: #F6F6F6;
  --surface: #ffffff;
  --text: #333333;
  --text-muted: #6b7280;
  --border: #DDDDDD;
  --radius: 14px;
}

[data-bs-theme="dark"] {
  --bg: #0f1115;
  --surface: #171a21;
  --text: #f1f1f1;
  --text-muted: #9aa0a8;
  --border: #2a2e37;
}

* { font-family: 'Hind Siliguri', 'Noto Sans Bengali', -apple-system, sans-serif; }

body {
  background: var(--bg);
  color: var(--text);
  transition: background .25s ease, color .25s ease;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }

/* ---- Header ---- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 1030;
}
.navbar-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.4rem; }
.brand-icon { color: var(--brand); }
.brand-text { color: var(--text); }
.nav-link { color: var(--text); font-weight: 500; }
.nav-link:hover { color: var(--brand); }
.search-form input { border-radius: 999px; padding-left: 16px; }
.btn-icon { border: none; background: transparent; color: var(--text); font-size: 1.1rem; }

/* ---- Hero ---- */
.hero-section {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
}
.hero-title { font-size: 3rem; font-weight: 700; }
.hero-subtitle { font-size: 1.2rem; opacity: .9; }

/* ---- Section titles ---- */
.section-title {
  font-weight: 700;
  border-left: 5px solid var(--brand);
  padding-left: 12px;
  margin-bottom: 20px;
}

/* ---- Cards ---- */
.post-card, .sidebar-widget, .auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.08); }
.post-card-img { height: 200px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.post-title-link { color: var(--text); }
.sidebar-widget { padding: 20px; margin-bottom: 20px; }
.auth-card { box-shadow: 0 12px 40px rgba(0,0,0,.06); }

.post-card-featured { position: relative; border-radius: var(--radius); overflow: hidden; }
.post-card-featured img { height: 380px; object-fit: cover; }
.post-card-featured-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  color: #fff; padding: 30px;
}
.post-card-mini img { height: 100px; object-fit: cover; }

.trending-rank {
  font-size: 1.5rem; font-weight: 700; color: var(--brand); min-width: 30px;
}
.category-pill, .tag-pill {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  font-size: .85rem; margin-bottom: 6px;
}
.category-pill:hover, .tag-pill:hover { background: var(--brand); color: #fff; }

.avatar-sm { width: 32px; height: 32px; object-fit: cover; }
.avatar-xs { width: 24px; height: 24px; object-fit: cover; }
.related-thumb { width: 70px; height: 55px; object-fit: cover; }

/* ---- Post detail ---- */
.post-detail-title { font-size: 2.2rem; font-weight: 700; line-height: 1.3; }
.post-content { font-size: 1.1rem; line-height: 1.9; }
.post-content img { max-width: 100%; border-radius: 12px; margin: 16px 0; }
.post-content blockquote { border-left: 4px solid var(--brand); padding-left: 16px; color: var(--text-muted); font-style: italic; }
.post-content pre { background: #1e1e1e; color: #f1f1f1; padding: 16px; border-radius: 8px; overflow-x: auto; }
.post-content table { width: 100%; border-collapse: collapse; }
.post-content table td, .post-content table th { border: 1px solid var(--border); padding: 8px; }

.comment-bubble { background: var(--bg); }
.btn-link-plain { border: none; background: none; padding: 0; color: var(--text-muted); font-size: .85rem; }
.btn-link-plain:hover { color: var(--brand); }

/* ---- Footer ---- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); }
.site-footer h5, .site-footer h6 { color: var(--text); }
.site-footer ul li { margin-bottom: 6px; }
.social-links a { display: inline-block; margin-right: 12px; font-size: 1.3rem; color: var(--text-muted); }
.social-links a:hover { color: var(--brand); }

/* ---- Top bar (logo/tagline + welcome text + login form) ---- */
.top-bar { background: var(--brand-dark); color: #fff; font-size: .85rem; }
.top-bar .tagline { opacity: .85; }
.top-bar .welcome-text { opacity: .9; }
.top-bar-login input {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25);
  color: #fff; font-size: .8rem; padding: 4px 10px; border-radius: 6px;
}
.top-bar-login input::placeholder { color: rgba(255,255,255,.6); }
.top-bar-login .btn-login { background: var(--highlight); border: none; color: #fff; font-size: .8rem; padding: 4px 14px; border-radius: 6px; }
.top-bar-login a { color: rgba(255,255,255,.85); font-size: .78rem; }
.top-bar-login a:hover { color: #fff; }

/* ---- Second nav bar (menu + search), sticky ---- */
.main-nav { background: var(--brand); }
.main-nav .nav-link { color: rgba(255,255,255,.92) !important; font-weight: 500; padding: 12px 14px !important; }
.main-nav .nav-link:hover, .main-nav .nav-link.active { background: var(--brand-hover); border-radius: 6px; }
.main-nav .search-form input { border-radius: 999px 0 0 999px; border: none; }
.main-nav .search-form button { border-radius: 0 999px 999px 0; background: var(--highlight); border: none; color: #fff; }

/* ---- Hero banner ---- */
.hero-banner {
  position: relative; background-size: cover; background-position: center;
  background-color: var(--brand);
  padding: 70px 0;
}
.hero-banner::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(62,89,117,.92), rgba(46,66,88,.88));
}
.hero-banner .hero-inner { position: relative; z-index: 2; color: #fff; text-align: center; }
.hero-banner .hero-inner h1 { font-size: 2.6rem; font-weight: 700; }
.hero-banner .hero-inner p { font-size: 1.1rem; opacity: .92; }
.hero-cta .btn-accent { background: var(--accent); color: #2E4258; border: none; font-weight: 600; }
.hero-cta .btn-outline-light:hover { color: var(--brand); }

/* ---- Green section header (per spec) ---- */
.section-header-green {
  background: var(--accent); color: #2E4258; font-weight: 700;
  padding: 10px 18px; border-radius: 10px; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: space-between;
}

/* ---- Post card meta actions (like/comment/views/share) ---- */
.post-meta-actions { display: flex; gap: 16px; font-size: .82rem; color: var(--text-muted); }
.post-meta-actions span { display: flex; align-items: center; gap: 4px; }
.post-meta-actions i { color: var(--brand); }

/* ---- Badges ---- */
.badge-verified { background: var(--brand); }
.badge-popular { background: var(--highlight); }
.badge-featured { background: var(--accent); color: #2E4258; }

/* ---- Left sidebar vertical menu ---- */
.vertical-menu .nav-link { color: var(--text); padding: 8px 12px; border-radius: 8px; }
.vertical-menu .nav-link:hover, .vertical-menu .nav-link.active { background: var(--bg); color: var(--brand); }
.vertical-menu .nav-link i { width: 20px; color: var(--brand); }

/* ---- Reading progress bar ---- */
#readingProgress {
  position: fixed; top: 0; left: 0; height: 3px; background: var(--highlight);
  z-index: 2000; width: 0%; transition: width .1s ease;
}

/* ---- Footer (4 columns + bottom bar) ---- */
.footer-bottom { background: var(--brand-dark); color: rgba(255,255,255,.85); font-size: .85rem; }
.footer-bottom a { color: rgba(255,255,255,.85); }
.footer-bottom a:hover { color: #fff; }

/* ---- Ads ---- */
.ad-widget { text-align: center; }

/* ---- CKEditor: clean, minimal writing surface ---- */
.ck.ck-editor__main > .ck-editor__editable {
  min-height: 400px;
  padding: 24px !important;
  font-size: 1.15rem;
  line-height: 1.9;
  font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
  border: none !important;
  box-shadow: none !important;
  background: var(--surface);
}
.ck.ck-toolbar {
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  background: var(--bg) !important;
  padding: 10px 12px !important;
  border-radius: var(--radius) var(--radius) 0 0 !important;
}
.ck.ck-editor__main {
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}
.ck.ck-editor {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.ck.ck-button, .ck.ck-dropdown .ck-button {
  border-radius: 8px !important;
}
.ck.ck-button.ck-on {
  background: rgba(15, 118, 110, 0.12) !important;
  color: var(--brand) !important;
}

/* ---- Bangla typing toggle switch ---- */
.bangla-toggle { cursor: pointer; }
.form-check-label { cursor: pointer; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  .post-detail-title { font-size: 1.6rem; }
  .post-card-featured img { height: 220px; }
}
