/* ==========================================================================
   The Daily Post — main stylesheet
   Mobile-first, no build step, plain CSS custom properties for theming.
   ========================================================================== */

:root {
  --color-primary: #b3241a;
  --color-primary-dark: #8c1c14;
  --color-ink: #17181a;
  --color-body: #3a3d42;
  --color-muted: #6b7078;
  --color-border: #e6e5e2;
  --color-bg: #ffffff;
  --color-bg-alt: #f7f6f3;
  --color-tag-bg: #f0efe9;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1200px;
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-body);
  background: var(--color-bg-alt);
  line-height: 1.55;
  /* Body is now the flex column that groups topbar/header/navbar (and
     everything below). This is what makes .site-header's sticky
     containing block span the FULL PAGE instead of a short wrapper —
     see the removed .site-topzone rule below for why that broke it. */
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--color-ink); line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
button, input, select, textarea { font-family: inherit; font-size: 1rem; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 16px; }

/* ---------- Top zone: topbar + sticky logo header + hamburger navbar ----------
   topbar/site-header/navbar used to be wrapped in a `.site-topzone` flex box.
   That wrapper only sized itself to its 3 rows, so it was the containing
   block for .site-header's `position: sticky` — meaning the header could
   never stay stuck past the bottom edge of those 3 rows (basically right
   away). They're now flex children of <body> directly (body spans the full
   page), ordered the same way via `order` below, so the header stays
   pinned for the whole page as intended. */

.topbar { background: var(--color-ink); color: #fff; font-size: .8rem; order: 1; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.topbar a { opacity: .85; }
.topbar a:hover { opacity: 1; text-decoration: underline; }

/* Section 2 (logo/search): always sticky, mobile + desktop. Shrinks via
   .is-stuck (toggled by JS on scroll) so it takes less vertical space
   once the user has scrolled past the top of the page — mainly matters
   on mobile, where header real estate is scarce mid-scroll. */
.site-header {
  background: var(--color-bg); border-bottom: 3px solid var(--color-primary);
  position: sticky; top: 0; z-index: 70; order: 2;
  transition: box-shadow .2s ease;
}
.site-header.is-stuck { box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; gap: 16px;
  transition: padding .15s ease; position: relative;
}
.site-header.is-stuck .container { padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { height: 44px; width: auto; transition: height .15s ease; }
.site-header.is-stuck .brand img { height: 32px; }
.brand-text { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 700; color: var(--color-ink); }
.brand-tagline { font-size: .75rem; color: var(--color-muted); display: block; margin-top: -4px; }

.header-search { display: none; }
@media (min-width: 900px) { .header-search { display: flex; } }
.header-search input {
  border: 1px solid var(--color-border); border-radius: 999px 0 0 999px; padding: 8px 14px; width: 220px;
  border-right: none;
}
.header-search button {
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--color-border); border-left: none; background: var(--color-primary); color: #fff;
  border-radius: 0 999px 999px 0; padding: 8px 16px; cursor: pointer;
}
.header-search button svg { width: 17px; height: 17px; }

/* Mobile search toggle: a round icon button beside the logo. Tapping it
   expands the search field in place (hiding the logo) within the same
   sticky row — the field it expands is the very same .header-search
   form used on desktop, just re-shown and re-styled for this width. */
.search-toggle {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex-shrink: 0; border: none; border-radius: 50%;
  background: var(--color-bg-alt); color: var(--color-ink); cursor: pointer; padding: 0;
  position: relative; z-index: 2; transition: width .15s ease, height .15s ease, background .15s ease;
}
.search-toggle:hover { background: var(--color-tag-bg); }
.search-toggle svg { width: 19px; height: 19px; }
.search-toggle .icon-close { display: none; }

/* Mobile drawer toggle: same round icon-button treatment as .search-toggle,
   sitting on the opposite side of the row so the logo lands visually
   centered between the two. Opens .mobile-drawer (Menu/Account tabs). */
.drawer-toggle {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex-shrink: 0; border: none; border-radius: 50%;
  background: var(--color-bg-alt); color: var(--color-ink); cursor: pointer; padding: 0;
  transition: width .15s ease, height .15s ease, background .15s ease;
}
.drawer-toggle:hover { background: var(--color-tag-bg); }
.drawer-toggle .bars { width: 18px; height: 13px; position: relative; flex-shrink: 0; }
.drawer-toggle .bars span { position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px; }
.drawer-toggle .bars span:nth-child(1) { top: 0; }
.drawer-toggle .bars span:nth-child(2) { top: 5.5px; }
.drawer-toggle .bars span:nth-child(3) { top: 11px; }

@media (max-width: 899.98px) {
  .search-toggle { display: flex; }
  .site-header.is-stuck .search-toggle { width: 32px; height: 32px; }
  .site-header.is-stuck .search-toggle svg { width: 16px; height: 16px; }

  .drawer-toggle { display: flex; }
  .site-header.is-stuck .drawer-toggle { width: 32px; height: 32px; }
  .site-header.is-stuck .drawer-toggle .bars { width: 15px; }

  /* Section 2 becomes the single mobile header row: toggle — logo — search.
     Both icon buttons are the same fixed width, so letting .brand take the
     remaining flexible space and centering its content inside that space
     centers the logo between them without needing a grid. */
  .brand { flex: 1; justify-content: center; }

  .site-header.search-active .drawer-toggle { display: none; }
  .site-header.search-active .brand { display: none; }
  .site-header.search-active .search-toggle .icon-search { display: none; }
  .site-header.search-active .search-toggle .icon-close { display: block; }
  .site-header.search-active .header-search {
    display: flex; flex: 1; min-width: 0;
  }
  .site-header.search-active .header-search input { flex: 1; width: auto; min-width: 0; }
}

/* ---------- Section 3: desktop-only inline menu ----------
   On mobile this whole section renders empty — the same links live inside
   .mobile-drawer's "Menu" tab instead (see .drawer-menu-list below), opened
   via .drawer-toggle in Section 2's row. */
.navbar { background: var(--color-ink); order: 3; }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* Everything else in <body> (optional header ad slot, main content, footer)
   also needs an explicit order now that body is the flex container, so it
   keeps rendering after the topbar/header/navbar group at every breakpoint
   (including on mobile, where navbar/header swap to order 0/1). */
.header-ad-slot { order: 4; }
main { order: 5; }
.site-footer { order: 6; }

.nav-menu { list-style: none; margin: 0; padding: 0; display: none; }
.nav-menu li { position: relative; }
.nav-menu a { display: block; padding: 12px 16px; font-size: .95rem; color: #fff; }
.nav-menu a:hover { background: rgba(255,255,255,.08); }
.nav-menu .submenu {
  list-style: none; margin: 0; padding: 6px 0; background: var(--color-ink); display: none;
  position: absolute; top: 100%; left: 0; min-width: 200px; box-shadow: 0 8px 20px rgba(0,0,0,.25); z-index: 50;
}
.nav-menu li.has-children:hover .submenu { display: block; }
@media (min-width: 900px) {
  .nav-menu { display: flex; flex-direction: row; flex-wrap: wrap; }
}

/* Shared drawer header row (used by .mobile-drawer) */
.drawer-header {
  display: flex; align-items: center; justify-content: space-between; padding: 14px 18px;
  color: #fff; font-weight: 700; background: var(--color-ink);
}
.drawer-close {
  background: none; border: none; color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer;
  padding: 4px 8px; min-height: 36px;
}

/* Backdrop behind the drawer */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 190;
  opacity: 0; visibility: hidden; transition: opacity .2s ease;
}
.drawer-overlay.visible { opacity: 1; visibility: visible; }

.account-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #444; }

/* ---------- Mobile-only combined drawer: Menu + Account tabs ----------
   Single off-canvas panel opened by .drawer-toggle. Replaces what used to
   be two separate drawers (a left hamburger menu and a right avatar/account
   menu) with one panel split into two tabs. */
.mobile-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 82vw; max-width: 320px;
  background: #fff; transform: translateX(-100%); transition: transform .25s ease;
  z-index: 200; overflow-y: auto; box-shadow: 8px 0 24px rgba(0,0,0,.3);
  display: flex; flex-direction: column;
}
.mobile-drawer.open { transform: translateX(0); }

.drawer-tabs { display: flex; border-bottom: 1px solid var(--color-border); flex-shrink: 0; }
.drawer-tab {
  flex: 1; padding: 13px 8px; text-align: center; background: none; border: none; cursor: pointer;
  font-size: .9rem; font-weight: 600; color: var(--color-muted); border-bottom: 3px solid transparent;
}
.drawer-tab.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }

.drawer-tab-panel { padding: 4px 0 24px; }
.drawer-tab-panel[hidden] { display: none; }

.drawer-menu-list { list-style: none; margin: 0; padding: 8px 0; }
.drawer-menu-list li { border-top: 1px solid var(--color-border); position: relative; }
.drawer-menu-list li:first-child { border-top: none; }
.drawer-menu-list a { display: block; padding: 14px 18px; color: var(--color-ink); font-size: .98rem; }
.drawer-menu-list a:active, .drawer-menu-list a:hover { background: var(--color-bg-alt); }
.drawer-menu-list .submenu { list-style: none; margin: 0; padding: 0 0 0 16px; background: var(--color-bg-alt); display: none; }
.drawer-menu-list li.has-children.open .submenu { display: block; }

.drawer-login { padding: 18px; }

/* Right drawer: logged-in account menu */
.user-drawer-profile { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--color-border); }
.user-drawer-menu { list-style: none; margin: 0; padding: 8px 0; }
.user-drawer-menu li { border-bottom: 1px solid var(--color-border); }
.user-drawer-menu a, .user-drawer-menu button {
  display: block; width: 100%; text-align: left; padding: 13px 18px; font-size: .95rem; color: var(--color-ink);
  background: none; border: none; cursor: pointer; font-family: inherit;
}
.user-drawer-menu a:hover, .user-drawer-menu button:hover { background: var(--color-bg-alt); }

/* ---------- Mobile arrangement: hide topbar, merged header/nav row moves to top ---------- */
@media (max-width: 899.98px) {
  .topbar { display: none; }
  .navbar { order: 0; }
  .site-header { order: 1; }
  body.drawer-open { overflow: hidden; }
}

/* ---------- Desktop: full inline menu, no drawer ---------- */
@media (min-width: 900px) {
  .mobile-drawer { display: none; }
  .drawer-overlay { display: none; }
}

/* ---------- Layout grid ---------- */

.page-layout { display: grid; grid-template-columns: 1fr; gap: 28px; padding: 24px 0 48px; }
@media (min-width: 980px) {
  /* Default align-items is stretch: .sidebar (the grid cell) now spans the
     same height as .main-col instead of shrinking to its own content, so
     .sidebar-sticky's containing block covers the full column — the sticky
     sidebar tracks the scroll for the whole length of the main content,
     not just its own (usually shorter) content height. */
  .page-layout { grid-template-columns: minmax(0, 1fr) 320px; }
}
.main-col { min-width: 0; }

/* ---------- Cards ---------- */
.card { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.card + .card { margin-top: 16px; }
.article-card { display: flex; flex-direction: column; }
.article-card .thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--color-bg-alt); position: relative; }
.article-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-card .video-badge {
  position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.7); color: #fff; font-size: .7rem;
  padding: 3px 8px; border-radius: 999px;
}
.article-card .body { padding: 14px 16px; }
.article-card .cat-tag {
  display: inline-block; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--color-primary); font-weight: 700; margin-bottom: 6px;
}
.article-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.article-card .excerpt { color: var(--color-muted); font-size: .9rem; }
.article-card .meta { font-size: .78rem; color: var(--color-muted); margin-top: 8px; display: flex; gap: 10px; flex-wrap: wrap; }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.list-row { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
.list-row:last-child { border-bottom: none; }
.list-row .thumb { width: 96px; flex: 0 0 96px; aspect-ratio: 4/3; border-radius: 6px; overflow: hidden; background: var(--color-bg-alt); }
.list-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-row h4 { font-size: .95rem; margin: 0 0 4px; }

/* ---------- Section headers ---------- */
.section-title {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;
  border-bottom: 2px solid var(--color-ink); padding-bottom: 8px;
}
.section-title h2 { font-size: 1.3rem; margin: 0; }
.section-title a { font-size: .85rem; color: var(--color-primary); font-weight: 600; }

/* ---------- Hero slider ---------- */
.hero { position: relative; }
.hero-slider {
  position: relative; border-radius: var(--radius); overflow: hidden; background: #111;
  box-shadow: 0 10px 30px -12px rgba(0,0,0,.35);
}
.hero-track {
  display: flex; width: 100%; height: 100%;
  transition: transform .55s cubic-bezier(.65,0,.35,1);
  will-change: transform; touch-action: pan-y; cursor: grab;
}
.hero-slider.dragging .hero-track { transition: none; cursor: grabbing; }
.hero-slide {
  position: relative; flex: 0 0 100%; min-width: 100%; overflow: hidden;
  aspect-ratio: 16/9; background: #111;
}
.hero-slide img { width: 100%; height: 100%; object-fit: cover; opacity: .88; user-select: none; -webkit-user-drag: none; }
.hero-slide .overlay {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 18px;
  background: linear-gradient(to top, rgba(0,0,0,.85), transparent);
}
.hero-slide .overlay h2 { color: #fff; font-size: 1.3rem; margin-bottom: 6px; }
.hero-slide .overlay span { color: #eee; font-size: .8rem; }

/* Prev/next arrow controls */
.hero-nav {
  position: absolute; top: 50%; z-index: 3; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(17,17,17,.42); color: #fff; backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .2s ease, background .2s ease, transform .2s ease;
}
.hero-slider:hover .hero-nav, .hero-nav:focus-visible { opacity: 1; }
.hero-nav:hover { background: var(--color-primary); transform: translateY(-50%) scale(1.06); }
.hero-nav-prev { left: 14px; }
.hero-nav-next { right: 14px; }

/* Dot indicators */
.hero-dots {
  position: absolute; left: 0; right: 0; bottom: 14px; z-index: 3;
  display: flex; justify-content: center; gap: 8px;
}
.hero-dot {
  width: 8px; height: 8px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  background: rgba(255,255,255,.45); transition: background .2s ease, width .2s ease;
}
.hero-dot.active { background: #fff; width: 22px; border-radius: 4px; }

@media (min-width: 900px) {
  .hero-slide { aspect-ratio: 21/9; }
  .hero-slide .overlay h2 { font-size: 1.8rem; }
  .hero-nav { width: 46px; height: 46px; }
}
@media (hover: none) {
  /* Touch devices: keep arrows always faintly visible since there's no hover state */
  .hero-nav { opacity: .85; }
}

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-sticky { position: sticky; top: 63px; display: flex; flex-direction: column; gap: 20px; }
.widget { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 16px; }
.widget h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 12px; }
.tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.tabs button {
  flex: 1; background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: 6px;
  padding: 8px 6px; font-size: .8rem; cursor: pointer;
}
.tabs button.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.area-form select { width: 100%; margin-bottom: 8px; padding: 8px; border-radius: 6px; border: 1px solid var(--color-border); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill { background: var(--color-tag-bg); border-radius: 999px; padding: 5px 12px; font-size: .8rem; color: var(--color-body); }
.tag-pill:hover { background: var(--color-primary); color: #fff; }
.archive-list a { display: flex; justify-content: space-between; padding: 6px 0; font-size: .88rem; border-bottom: 1px dashed var(--color-border); }
.cat-count-list a { display: flex; justify-content: space-between; padding: 6px 0; font-size: .9rem; }
.cat-count-list span.count { color: var(--color-muted); font-size: .8rem; }
.ad-slot { text-align: center; }
.ad-slot img, .ad-slot iframe { width: 100%; border-radius: 6px; }

/* ---------- Article page ---------- */
.article-header .cat-tag { display: inline-block; margin-bottom: 10px; }
.article-title { font-size: 1.7rem; margin-bottom: 10px; }
@media (min-width: 768px) { .article-title { font-size: 2.2rem; } }
.article-meta { color: var(--color-muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }

/* ---------- Share & print bar ---------- */
.share-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  padding: 14px 0; margin: 4px 0 22px;
  border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border);
}
.share-label { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--color-muted); }
.share-icons { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--color-border); background: var(--color-bg);
  color: var(--color-muted); cursor: pointer; text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.share-btn:hover { transform: translateY(-2px); }
.share-fb:hover       { background: #1877f2; border-color: #1877f2; color: #fff; }
.share-whatsapp:hover { background: #25d366; border-color: #25d366; color: #fff; }
.share-linkedin:hover { background: #0a66c2; border-color: #0a66c2; color: #fff; }
.share-x:hover         { background: #000;    border-color: #000;    color: #fff; }
.share-telegram:hover { background: #229ed9; border-color: #229ed9; color: #fff; }
.share-email:hover    { background: var(--color-ink); border-color: var(--color-ink); color: #fff; }
.share-copy:hover     { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.share-copy.copied     { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.share-bar .print-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--color-border);
  background: var(--color-bg); color: var(--color-body); font-size: .85rem; font-weight: 600;
  cursor: pointer; transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.share-bar .print-btn:hover { background: var(--color-ink); border-color: var(--color-ink); color: #fff; }
@media (max-width: 480px) {
  .share-bar { justify-content: flex-start; }
  .share-bar .print-btn { margin-left: 0; }
}
.article-featured img { border-radius: var(--radius); margin-bottom: 20px; }
.video-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--radius); margin-bottom: 20px; background:#000; }
.video-embed iframe { position: absolute; top:0; left:0; width: 100%; height: 100%; border: 0; }
.article-body { font-size: 1.08rem; }
.article-body p { margin-bottom: 1.2em; }
.article-body blockquote {
  border-left: 4px solid var(--color-primary); margin: 1.5em 0; padding: 6px 18px; font-style: italic;
  color: var(--color-ink); background: var(--color-bg-alt); border-radius: 0 6px 6px 0;
}
.article-body table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .95rem; }
.article-body table th, .article-body table td { border: 1px solid var(--color-border); padding: 8px 10px; text-align: left; }
.article-body table th { background: var(--color-bg-alt); }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.gallery-strip { display: flex; gap: 10px; overflow-x: auto; margin: 20px 0; }
.gallery-strip img { height: 140px; border-radius: 6px; }

.live-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--color-primary); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.live-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.live-update { border-left: 3px solid var(--color-primary); padding: 10px 14px; margin-bottom: 14px; background: var(--color-bg); border-radius: 0 6px 6px 0; }
.live-update time { font-size: .75rem; color: var(--color-muted); }

/* ---------- Comments ---------- */
.comment { display: flex; gap: 12px; margin-bottom: 18px; }
.comment .avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--color-bg-alt); flex: 0 0 40px; }
.comment .bubble { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 8px; padding: 10px 14px; flex: 1; }
.comment .replies { margin-left: 52px; margin-top: 10px; }
.comment-form textarea { width: 100%; min-height: 90px; padding: 10px; border: 1px solid var(--color-border); border-radius: 8px; }

/* ---------- Forms & buttons (shared with admin) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; border-radius: 6px;
  padding: 10px 18px; font-weight: 600; cursor: pointer; background: var(--color-primary); color: #fff;
  min-height: 44px; font-size: .95rem; touch-action: manipulation;
}
.btn:hover { background: var(--color-primary-dark); }
.btn.secondary { background: var(--color-bg-alt); color: var(--color-ink); border: 1px solid var(--color-border); }
.btn.danger { background: #a02622; }
.btn.small { padding: 6px 12px; min-height: 36px; font-size: .85rem; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
.form-control {
  width: 100%; padding: 11px 12px; border: 1px solid var(--color-border); border-radius: 6px; background: #fff;
}
textarea.form-control { min-height: 120px; }
.form-hint { font-size: .8rem; color: var(--color-muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 700px) { .form-row.cols-2 { grid-template-columns: 1fr 1fr; } .form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; } }
.checkbox-line { display: flex; align-items: center; gap: 8px; }
.checkbox-line input { width: 20px; height: 20px; }

.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: .92rem; }
.alert.success { background: #e7f5ec; color: #1e6b3d; border: 1px solid #bfe3cc; }
.alert.error { background: #fbe9e7; color: #a3271f; border: 1px solid #f3c6c1; }

.pagination { display: flex; gap: 6px; justify-content: center; margin: 28px 0; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 13px; border-radius: 6px; border: 1px solid var(--color-border); font-size: .9rem; background: #fff; }
.pagination a:hover { background: var(--color-bg-alt); }
.pagination .current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.pagination .dots { border: none; background: none; }

/* Honeypot field: visually hidden but present in the DOM (not display:none) */
.hp-wrap { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-bg-alt); color: var(--color-body);
  border-top: 1px solid var(--color-border); margin-top: 48px;
}

/* -- Section 1: logo + tagline, always centered -- */
.footer-intro { text-align: center; padding: 44px 16px 8px; max-width: 640px; margin: 0 auto; }
.footer-logo { display: inline-flex; align-items: center; }
.footer-logo img { height: 40px; width: auto; }
.footer-logo-text { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; color: var(--color-ink); }
.footer-tagline { margin: 16px 0 0; font-size: .92rem; line-height: 1.8; color: var(--color-muted); }
.footer-tagline-brand { font-weight: 700; color: var(--color-primary); white-space: nowrap; }
.footer-tagline-brand:hover { text-decoration: underline; }

/* -- Sections 2-4: categories / follow us / address -- */
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 36px;
  padding: 36px 0 12px;
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1.1fr; gap: 32px; padding: 44px 0 16px; }
}

.footer-col-title {
  margin: 0 0 16px; color: var(--color-ink); font-size: .85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
}

/* Categories: a chip grid instead of a link list */
.footer-cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px;
}
.footer-cat-chip {
  display: block; text-align: center; padding: 8px 10px; border-radius: 999px;
  background: var(--color-bg); border: 1px solid var(--color-border);
  color: var(--color-ink); font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.footer-cat-chip:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* Follow us: icon circles */
.social-links { display: flex; gap: 10px; flex-wrap: wrap; }
.social-link {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--color-bg); border: 1px solid var(--color-border); color: var(--color-ink);
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.social-link svg { width: 18px; height: 18px; }
.social-link:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; transform: translateY(-2px); }

/* Address */
.footer-contact p { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; font-size: .9rem; color: var(--color-body); line-height: 1.5; }
.footer-contact p:last-child { margin-bottom: 0; }
.footer-contact svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 2px; color: var(--color-primary); }
.footer-contact a { color: var(--color-body); }
.footer-contact a:hover { color: var(--color-primary); }

/* -- Mobile: sections 2-4 stack and center (title + content) -- */
@media (max-width: 699.98px) {
  .footer-col-title { text-align: center; }
  .footer-cat-grid { justify-content: center; }
  .social-links { justify-content: center; }
  .footer-contact p { justify-content: center; }
}

/* -- Bangla editor / publisher credit strip -- */
.footer-credit { border-top: 1px solid var(--color-border); background: var(--color-tag-bg); }
.footer-credit-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 16px; font-size: .88rem; color: var(--color-body); text-align: center;
}
.footer-credit-dot { color: var(--color-muted); }

/* -- Bottom bar -- */
.footer-bottom { border-top: 1px solid var(--color-border); padding: 16px 0; }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-bottom-inner p { margin: 0; font-size: .8rem; color: var(--color-muted); }

.back-to-top {
  display: flex; align-items: center; gap: 6px;
  color: var(--color-ink); font-size: .8rem; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--color-border); background: var(--color-bg);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.back-to-top svg { width: 15px; height: 15px; }
.back-to-top:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }


/* ---------- Utility ---------- */
.text-muted { color: var(--color-muted); }
.mt-0 { margin-top: 0; }
.flex-between { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.badge { display: inline-block; background: var(--color-bg-alt); border-radius: 4px; padding: 2px 8px; font-size: .72rem; text-transform: uppercase; }
.badge.status-pending { background: #fff3cd; color: #8a6d1a; }
.badge.status-published { background: #e7f5ec; color: #1e6b3d; }
.badge.status-draft { background: #e9e9e9; color: #555; }
.badge.status-rejected { background: #fbe9e7; color: #a3271f; }
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; background: #fff; }
table.data-table th, table.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--color-border); text-align: left; font-size: .9rem; }
table.data-table th { background: var(--color-bg-alt); }

/* ---------- Print: article pages only, no site chrome ---------- */
@media print {
  .topbar, .site-header, .navbar, .site-footer, .sidebar, #comments,
  .share-bar, .no-print, .gallery-strip, .article-tags,
  .live-badge, .video-embed, .mobile-drawer, .drawer-overlay { display: none !important; }

  body, .container { background: #fff; margin: 0; padding: 0; }
  .page-layout { display: block; }
  .main-col { width: 100%; }
  .article-title { font-size: 22pt; }
  .article-body { font-size: 11pt; line-height: 1.5; }
  .article-body a { color: inherit; text-decoration: underline; }
  .article-featured img { max-width: 100%; }
}