/*
Theme Name:   Bhumkal Samachar Pro v16 (Zero-Glitch Mobile Header, Samvad Page Selector & Full Sticky Sidebar Edition)
Theme URI:    https://bhumkalsamachar.com/
Description:  Masterpiece Edition for Bhumkal Samachar Bastar (bhumkalsamachar.com). Features the 12-Section RootsAlert-Style Theme Control Centre, Smart Samvad Ad Raw Code Parser & Fullscreen Lightbox Modal, Cross-Section Post Deduplication, 5 Magazine Section Layouts (Hero Cinema + Wire, 3-Col Cards, Lead + List, Editorial Quote Cards, High-Contrast Dark Spotlight), Sticky Full-Height Right Sidebar (Trending Top 5, 7 Bastar Districts Hub, Bastar Art, YouTube, E-Paper, Citizen Tip-Line & Monthly Archives), and Broken Image Auto-Shield. Uses isolated `bhumkal_v8_` PHP namespace.
Author:       Bhumkal Samachar Editorial Desk (Kamal Shukla)
Author URI:   https://bhumkalsamachar.com/
Version:      16.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  bhumkal-samachar-v16
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+Devanagari:wght@400;500;600;700;800;900&family=Noto+Serif+Devanagari:wght@600;700;800;900&display=swap');

:root,
html[data-bhumkal-mode="classic"] {
  --bm-bg-page: #EFECE3;
  --bm-bg-gradient: radial-gradient(circle at 15% 15%, #F7F4EC 0%, #EFECE3 52%, #E5ECE8 100%);
  --bm-bg-surface: #FFFDF9;
  --bm-bg-subtle: #F6F2E9;
  --bm-bg-crown: #081C17;
  --bm-bg-nav: rgba(255, 253, 249, 0.97);
  --bm-text-primary: #11181C;
  --bm-text-secondary: #334155;
  --bm-text-muted: #64748B;
  --bm-border: #DDD5C4;
  --bm-border-strong: #C59B27;
  --bm-saffron: #C83E0B;
  --bm-green: #0B4F38;
  --bm-font-sans: 'Noto Sans Devanagari', 'Inter', 'Nirmala UI', 'Mangal', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  --bm-font-serif: 'Noto Serif Devanagari', 'Noto Sans Devanagari', Georgia, serif;
}

html[data-bhumkal-mode="jade"] {
  --bm-bg-page: #E6F0EC;
  --bm-bg-gradient: linear-gradient(135deg, #EDF6F2 0%, #E2EDE8 55%, #EAF0EC 100%);
  --bm-bg-surface: #FFFFFF;
  --bm-bg-subtle: #F1F7F4;
}

html[data-bhumkal-mode="sepia"] {
  --bm-bg-page: #F3E9E0;
  --bm-bg-gradient: radial-gradient(circle at 50% 0%, #FAF3EC 0%, #F3E9E0 65%, #EBDCD0 100%);
  --bm-bg-surface: #FFFBF7;
  --bm-bg-subtle: #F7EFE8;
}

html[data-bhumkal-mode="midnight"] {
  --bm-bg-page: #071114;
  --bm-bg-gradient: radial-gradient(circle at 50% 10%, #0D2126 0%, #071114 70%);
  --bm-bg-surface: #0F1E24;
  --bm-bg-subtle: #152830;
  --bm-bg-nav: rgba(15, 30, 36, 0.97);
  --bm-text-primary: #F8FAFC;
  --bm-text-secondary: #CBD5E1;
  --bm-text-muted: #94A3B8;
  --bm-border: #1E3842;
}

* {
  box-sizing: border-box;
}

body, input, select, option, textarea, button {
  font-family: var(--bm-font-sans) !important;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bm-bg-page) !important;
  background-image: var(--bm-bg-gradient) !important;
  background-attachment: fixed !important;
  color: var(--bm-text-primary) !important;
  line-height: 1.65 !important;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--bm-font-serif) !important;
  color: var(--bm-text-primary);
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* CRITICAL CONTRAST FIX: Force bright text inside all Dark Sections, E-Paper Card & Footer */
#colophon h1, #colophon h2, #colophon h3, #colophon h4,
.bm-dark-card h1, .bm-dark-card h2, .bm-dark-card h3, .bm-dark-card h4,
.bm-dark-spotlight h1, .bm-dark-spotlight h2, .bm-dark-spotlight h3, .bm-dark-spotlight h4,
.bm-dark-spotlight .bm-sec-title,
.bm-dark-spotlight .bm-card h3 a {
  color: #FFFDF9 !important;
}

.bm-dark-spotlight .bm-sec-head {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(197, 155, 39, 0.45) !important;
}

.bm-dark-spotlight .bm-sec-subtitle,
.bm-dark-spotlight .bm-card .bm-excerpt {
  color: #E2E8F0 !important;
}

.bm-dark-spotlight .bm-card .bm-meta-bar {
  color: #CBD5E1 !important;
  border-top-color: rgba(255, 255, 255, 0.14) !important;
}

.bm-dark-spotlight .bm-card .bm-read-more {
  color: #FDE68A !important;
}

a {
  color: inherit;
  transition: all 0.18s ease;
}

.bm-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 18px;
}

/* Masterpiece Editorial Card */
.bm-card {
  background: var(--bm-bg-surface);
  border: 1px solid var(--bm-border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 6px 20px -4px rgba(17, 24, 28, 0.055);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s ease, box-shadow 0.22s ease;
  position: relative;
}

.bm-card:hover {
  transform: translateY(-3px);
  border-color: var(--bm-border-strong);
  box-shadow: 0 16px 32px -8px rgba(17, 24, 28, 0.12);
}

/* Card Thumbnail Wrapper with Zoom & Floating Category Badge */
.bm-thumb-wrap {
  position: relative;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #1E293B;
  aspect-ratio: 16 / 10;
}

.bm-thumb-wrap img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
  transition: transform 0.35s ease;
}

.bm-card:hover .bm-thumb-wrap img {
  transform: scale(1.04);
}

/* Section Header Ribbon */
.bm-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: linear-gradient(90deg, var(--bm-bg-surface) 0%, var(--bm-bg-subtle) 100%);
  border: 1px solid var(--bm-border);
  border-left: 5px solid var(--bm-saffron);
  border-bottom: 2px solid var(--bm-border-strong);
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
  box-shadow: 0 3px 10px rgba(17, 24, 28, 0.03);
}

.bm-sec-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--bm-font-serif);
  font-size: 21px;
  font-weight: 900;
  margin: 0;
  line-height: 1.25;
}

/* Masterpiece Single-Row Category Navigation Bar */
.bm-nav-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bm-nav-list,
#site-navigation ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 2px 0;
  gap: 4px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  flex: 1;
}

.bm-nav-list::-webkit-scrollbar,
#site-navigation ul::-webkit-scrollbar {
  display: none;
}

.bm-nav-list li a,
#site-navigation ul li a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
  color: var(--bm-text-primary);
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.bm-nav-list li a:hover,
.bm-nav-list li.current-cat a,
#site-navigation ul li a:hover,
#site-navigation ul li.current-menu-item > a {
  background: var(--bm-saffron);
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(200, 62, 11, 0.25);
}

/* All Desks Mega-Menu Dropdown */
.bm-all-desks-wrap {
  position: relative;
  flex-shrink: 0;
}

.bm-all-desks-btn {
  background: #081C17;
  color: #FDE68A !important;
  border: 1px solid #C59B27;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bm-all-desks-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 320px;
  background: var(--bm-bg-surface);
  border: 2px solid #C59B27;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
  z-index: 100;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.bm-all-desks-wrap:hover .bm-all-desks-menu,
.bm-all-desks-wrap.open .bm-all-desks-menu {
  display: grid;
}

.bm-all-desks-menu a {
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  color: var(--bm-text-primary);
  background: var(--bm-bg-subtle);
}

.bm-all-desks-menu a:hover {
  background: var(--bm-saffron);
  color: #fff !important;
}

/* Category Pills */
.cat-links a,
.post-categories a {
  display: inline-block;
  background: var(--bm-saffron);
  color: #fff !important;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  text-decoration: none;
  margin-right: 4px;
  letter-spacing: 0.02em;
}

.post-categories {
  list-style: none;
  padding: 0;
  margin: 0 0 6px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* Layout 1: Hero Lead + Right Wire Stack */
.bm-hero-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.bm-hero-lead-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top: 4px solid var(--bm-saffron);
}

.bm-hero-wire-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bm-wire-item {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 12px;
  align-items: center;
  padding: 11px;
}

.bm-wire-item .bm-wire-thumb {
  width: 105px;
  height: 76px;
  border-radius: 8px;
  overflow: hidden;
  display: block;
  background: #1E293B;
}

.bm-wire-item .bm-wire-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Layout 3: Left Lead + Right Story List */
.bm-lead-plus-list-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
}

/* Layout 5: Dark Spotlight Section */
.bm-dark-spotlight {
  background: linear-gradient(135deg, #081C17 0%, #0D2E24 65%, #13252C 100%) !important;
  color: #FFFDF9 !important;
  border: 2px solid #C59B27 !important;
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 32px;
  box-shadow: 0 14px 34px rgba(8, 28, 23, 0.18);
}

/* Fullscreen Samvad Lightbox Modal (Fixes raw × Popup Image forever!) */
.bm-samvad-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(7, 17, 20, 0.88);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.bm-samvad-modal.open {
  display: flex;
}

.bm-samvad-modal-box {
  position: relative;
  max-width: 960px;
  width: 100%;
  background: #081C17;
  border: 2px solid #C59B27;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  text-align: center;
}

.bm-samvad-modal-box img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
}

.bm-samvad-close-btn {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #C83E0B;
  color: #fff;
  border: 2px solid #FFFDF9;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Hide any broken inline modal / raw × inside pasted Samvad raw code */
.bm-raw-samvad-sandbox .modal,
.bm-raw-samvad-sandbox #myModal,
.bm-raw-samvad-sandbox .close {
  display: none !important;
}

/* Share Bar & Pagination */
.bm-share-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
  padding: 10px 14px;
  background: var(--bm-bg-subtle);
  border: 1px solid var(--bm-border);
  border-radius: 12px;
  align-items: center;
}

.bm-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  color: #fff !important;
}

.bm-admin-edit-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #081C17;
  color: #FDE68A !important;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  text-decoration: none;
  border: 1px solid #C59B27;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--bm-bg-surface);
  border: 1px solid var(--bm-border);
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
}

.page-numbers.current,
.page-numbers:hover {
  background: var(--bm-saffron);
  color: #fff !important;
  border-color: var(--bm-saffron);
}

@media (max-width: 960px) {
  .bm-grid-main,
  .bm-hero-layout,
  .bm-lead-plus-list-grid {
    grid-template-columns: 1fr !important;
  }
}

/* v9 Interactive Hero Slider + Right Sidebar Samvad Card */
.bm-slider-stage {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #081C17;
  border: 2px solid #C59B27;
  box-shadow: 0 12px 30px rgba(8, 28, 23, 0.16);
}
.bm-slide {
  display: none;
  position: relative;
}
.bm-slide.active {
  display: block;
}
.bm-slide-img-wrap {
  position: relative;
  aspect-ratio: 16 / 9.5;
  width: 100%;
  overflow: hidden;
  background: #0F172A;
}
.bm-slide-img-wrap img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
}
.bm-slide-overlay {
  padding: 18px 20px;
  background: linear-gradient(180deg, #081C17 0%, #0D2A21 100%);
  color: #FFFDF9;
}
.bm-slide-overlay h3, .bm-slide-overlay h3 a {
  color: #FFFDF9 !important;
  font-size: 22px;
  line-height: 1.36;
  margin: 6px 0 8px;
  text-decoration: none;
}
.bm-slide-overlay p {
  color: #D1FAE5 !important;
  font-size: 13.5px;
  margin: 0 0 10px;
}
.bm-slider-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: #061511;
  border-top: 1px solid rgba(197, 155, 39, 0.35);
}
.bm-slider-dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}
.bm-slider-dot.active {
  width: 24px;
  background: #C83E0B;
}
.bm-samvad-sidebar-card {
  background: #FFFDF9;
  border: 2px solid #C59B27 !important;
  border-top: 5px solid #0B4F38 !important;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 10px 26px rgba(17, 24, 28, 0.08);
}

/* v11 CRITICAL FIX: Explicit heights on all card/slider thumbnails so images NEVER collapse inside <a> tags */
.bm-thumb-wrap {
  display: block !important;
  width: 100% !important;
  height: 195px !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  margin-bottom: 12px !important;
  background: #E2E8F0 !important;
  position: relative !important;
}
.bm-thumb-wrap img {
  display: block !important;
  width: 100% !important;
  height: 195px !important;
  object-fit: cover !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.bm-slide-img-wrap {
  display: block !important;
  width: 100% !important;
  height: 310px !important;
  overflow: hidden !important;
  background: #1E293B !important;
}
.bm-slide-img-wrap img {
  display: block !important;
  width: 100% !important;
  height: 310px !important;
  object-fit: cover !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.bm-wire-item .bm-wire-thumb {
  display: block !important;
  width: 110px !important;
  height: 78px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}
.bm-wire-item .bm-wire-thumb img {
  display: block !important;
  width: 110px !important;
  height: 78px !important;
  object-fit: cover !important;
  opacity: 1 !important;
  visibility: visible !important;
}
/* Right Sidebar block layout for true CSS Grid sticky support */
#secondary {
  display: block !important;
  height: 100% !important;
  position: relative !important;
}
#secondary > .bm-card,
#secondary > .bm-samvad-sidebar-card {
  margin-bottom: 22px !important;
}
.bm-sticky-sidebar-track {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 66px !important;
}
.bm-sticky-sidebar-track > .bm-card {
  margin-bottom: 22px !important;
}

/* v12 OFFICIAL CHHATTISGARH SAMVAD DISPLAYPANEL (pretor.css / myad.css / #bannerAdCarouselContainer / #imageModal) */
#bannerAdCarouselContainer {
  width: 100% !important;
  min-height: 210px !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #FFFDF9 !important;
  display: block !important;
  position: relative !important;
}
#bannerAdCarouselContainer img {
  width: 100% !important;
  height: auto !important;
  max-height: 320px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
  cursor: pointer !important;
}
#imageModal.modal {
  display: none;
  position: fixed !important;
  z-index: 99999 !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: auto !important;
  background-color: rgba(8, 28, 23, 0.86) !important;
  backdrop-filter: blur(6px) !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
}
#imageModal.modal[style*="block"],
#imageModal.modal[style*="flex"],
#imageModal.modal.open {
  display: flex !important;
}
#imageModal .modal-content {
  position: relative !important;
  background: #081C17 !important;
  margin: auto !important;
  padding: 16px !important;
  border: 2px solid #C59B27 !important;
  border-radius: 16px !important;
  max-width: 760px !important;
  width: 94% !important;
  text-align: center !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65) !important;
}
#imageModal .close-btn,
#closeModal {
  position: absolute !important;
  top: -14px !important;
  right: -14px !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background: #DC2626 !important;
  color: #FFFFFF !important;
  font-size: 24px !important;
  font-weight: 900 !important;
  line-height: 34px !important;
  text-align: center !important;
  cursor: pointer !important;
  border: 2px solid #FFFFFF !important;
  z-index: 10 !important;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4) !important;
}
#imageModal #popupImage {
  max-width: 100% !important;
  max-height: 75vh !important;
  height: auto !important;
  width: auto !important;
  display: block !important;
  margin: 0 auto !important;
  border-radius: 10px !important;
}
/* Protect newspaper typography and link colors from pretor.css / myad.css global overrides */
body {
  background-color: var(--bm-bg-page) !important;
  color: var(--bm-text-primary) !important;
  font-family: 'Noto Sans Devanagari', 'Inter', sans-serif !important;
}
.bm-card h1 a, .bm-card h2 a, .bm-card h3 a, .bm-card h4 a {
  color: var(--bm-text-primary) !important;
  text-decoration: none !important;
}

/* v13 MASTERPIECE: Dual CSS Background + Eager Img Guarantee (Zero Gray/Dark Boxes Ever!) */
.bm-thumb-wrap,
.bm-slide-img-wrap,
.bm-wire-thumb,
.bm-single-hero-media {
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}
.bm-thumb-wrap img.lazyload,
.bm-thumb-wrap img.lazyloading,
.bm-slide-img-wrap img.lazyload,
.bm-slide-img-wrap img.lazyloading,
.bm-wire-thumb img.lazyload,
.bm-wire-thumb img.lazyloading {
  opacity: 1 !important;
  visibility: visible !important;
}
/* Masthead brand lockup */
.bm-masthead-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none !important;
}
.bm-masthead-logo-frame {
  background: #FFFDF9;
  padding: 6px 14px;
  border-radius: 14px;
  border: 2px solid #C59B27;
  box-shadow: 0 8px 22px rgba(0,0,0,0.28);
  display: flex;
  align-items: center;
  gap: 12px;
}
.bm-masthead-title-stack {
  display: flex;
  flex-direction: column;
}
.bm-masthead-hi-title {
  font-size: 28px;
  font-weight: 900;
  color: #081C17;
  line-height: 1.05;
  letter-spacing: -0.3px;
}
.bm-masthead-hi-sub {
  font-size: 11.5px;
  font-weight: 800;
  color: #C83E0B;
  margin-top: 2px;
}
@media (max-width: 640px) {
  .bm-masthead-hi-title { font-size: 21px; }
}

/* v14.0 MASTHEAD LOGO FIX: Clean single wide logo badge without duplicate crest or text collision */
.bm-logo-card {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #FFFDF9 !important;
  padding: 10px 22px !important;
  border-radius: 16px !important;
  border: 2px solid #C59B27 !important;
  box-shadow: 0 8px 24px rgba(17, 24, 28, 0.09) !important;
  text-decoration: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.bm-logo-card:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 12px 28px rgba(197, 155, 39, 0.22) !important;
}
.bm-logo-card img.bm-main-logo-img {
  height: 76px !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain !important;
  display: block !important;
}
@media (max-width: 640px) {
  .bm-logo-card { padding: 8px 14px !important; }
  .bm-logo-card img.bm-main-logo-img { height: 56px !important; }
}

/* v14.0 PURE SAMVAD DISPLAYPANEL STYLING (No hardcoded R.O. or theme fallback image flash) */
#bannerAdCarouselContainer {
  width: 100% !important;
  min-height: 180px !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #F8F6F0 !important;
  border: 1.5px solid #C59B27 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 6px !important;
  text-align: center !important;
}
#bannerAdCarouselContainer img {
  width: 100% !important;
  height: auto !important;
  max-height: 320px !important;
  object-fit: contain !important;
  border-radius: 8px !important;
  cursor: pointer !important;
}
/* Top Reading Progress Bar */
#bm-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, #C83E0B 0%, #C59B27 50%, #0B4F38 100%);
  z-index: 100000;
  transition: width 0.1s ease-out;
}
/* Smooth Back-to-Top Floating Button */
#bm-back-to-top {
  position: fixed;
  bottom: 22px;
  left: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0B4F38;
  color: #FDE68A;
  border: 2px solid #C59B27;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(8, 28, 23, 0.38);
  z-index: 9980;
  transition: transform 0.2s ease, background 0.2s ease;
}
#bm-back-to-top:hover {
  background: #C83E0B;
  color: #FFFFFF;
  transform: translateY(-3px);
}

/* ==========================================================================
   v15.0 CRITICAL FIXES:
   1. Eliminate Spliced/Double-Stacked Image Bug on All Cards & Hero Frames
   2. Crisp Proportional Masthead Logo (Zero Excess Vertical Padding)
   3. Compact Mobile Header with Slide-Out Drawer (☰) & Search Toggle (🔍)
   4. Touch-Scrollable Horizontal Category Navbar on Mobile (min-width: 0)
   5. 44x44px Mobile Touch Targets & Sticky Mobile Bottom Action Bar
   ========================================================================== */

/* 1. Fix Spliced / Multi-Image Stacking Bug: Single clean <img> fills aspect-ratio frame */
.bm-thumb-wrap,
.bm-slide-img-wrap,
.bm-wire-thumb,
.bm-single-hero-media {
  background-image: none !important;
  position: relative !important;
  overflow: hidden !important;
  display: block !important;
}
.bm-thumb-wrap {
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  min-height: 170px !important;
  max-height: 220px !important;
  background-color: #0F172A !important;
}
.bm-slide-img-wrap {
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  min-height: 230px !important;
  max-height: 410px !important;
  background-color: #0F172A !important;
}
.bm-single-hero-media {
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  min-height: 220px !important;
  max-height: 450px !important;
  background-color: #0F172A !important;
}
.bm-thumb-wrap > img,
.bm-slide-img-wrap > img,
.bm-single-hero-media > img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center top !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 2. Crisp Proportional Masthead Logo (Zero vertical whitespace padding bug!) */
.bm-logo-card {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #FFFDF9 !important;
  padding: 7px 16px !important;
  border-radius: 14px !important;
  border: 2px solid #C59B27 !important;
  box-shadow: 0 6px 18px rgba(17, 24, 28, 0.08) !important;
  line-height: 1 !important;
}
.bm-logo-card img.bm-main-logo-img {
  width: var(--bm-logo-desktop-w, 390px) !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  display: block !important;
}

/* 3. Horizontal Category Navbar Touch Scroll Fix (Prevents truncation on 375px mobile!) */
.bm-nav-bar-inner {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
}
ul.bm-nav-list {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  gap: 5px !important;
  margin: 0 !important;
  padding: 2px 4px !important;
}
ul.bm-nav-list::-webkit-scrollbar {
  display: none !important;
}
ul.bm-nav-list > li {
  flex: 0 0 auto !important;
}
ul.bm-nav-list > li > a {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 36px !important;
  padding: 6px 13px !important;
  white-space: nowrap !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
}

/* 4. 44x44px Touch Targets for Hero Slider & Font Resizer */
.bm-slider-arrow {
  width: 42px !important;
  height: 42px !important;
  font-size: 20px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.bm-slider-dot {
  width: 12px !important;
  height: 12px !important;
  margin: 0 4px !important;
}
.bm-font-btn {
  min-width: 40px !important;
  min-height: 36px !important;
  padding: 5px 11px !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  border-radius: 8px !important;
  cursor: pointer !important;
}

/* 5. Mobile Header Action Buttons, Slide-Out Drawer & Sticky Bottom Bar */
.bm-mobile-icon-btn {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1.5px solid #C59B27;
  background: #FFFDF9;
  color: #081C17;
  font-size: 19px;
  font-weight: 900;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}
#bm-mobile-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 28, 23, 0.72);
  backdrop-filter: blur(4px);
  z-index: 99990;
}
#bm-mobile-drawer-backdrop.open {
  display: block;
}
#bm-mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  max-width: 86vw;
  background: #081C17;
  color: #FFFDF9;
  z-index: 99995;
  transform: translateX(-102%);
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  border-right: 2px solid #C59B27;
  padding: 18px 16px 32px;
  box-shadow: 12px 0 36px rgba(0,0,0,0.5);
}
#bm-mobile-drawer.open {
  transform: translateX(0);
}
#bm-mobile-bottom-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background: #081C17;
  border-top: 2px solid #C59B27;
  z-index: 9985;
  grid-template-columns: repeat(4, 1fr);
  box-shadow: 0 -6px 20px rgba(0,0,0,0.3);
}
#bm-mobile-bottom-bar a,
#bm-mobile-bottom-bar button {
  background: transparent;
  border: none;
  color: #F8FAFC;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  padding: 4px 2px;
}
#bm-mobile-bottom-bar a:active,
#bm-mobile-bottom-bar button:active {
  background: rgba(197, 155, 39, 0.2);
  color: #FDE68A;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 62px !important;
  }
  .bm-hide-on-mobile {
    display: none !important;
  }
  .bm-mobile-icon-btn {
    display: inline-flex !important;
  }
  #masthead {
    padding: 8px 0 !important;
  }
  .bm-masthead-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }
  .bm-logo-card {
    padding: 5px 10px !important;
    border-radius: 10px !important;
    border-width: 1.5px !important;
  }
  .bm-logo-card img.bm-main-logo-img {
    width: var(--bm-logo-mobile-w, 225px) !important;
    height: auto !important;
  }
  .bm-search-drawer-wrap {
    display: none;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 8px !important;
  }
  .bm-search-drawer-wrap.open {
    display: block !important;
  }
  #bm-mobile-bottom-bar {
    display: grid !important;
  }
  #bm-back-to-top {
    bottom: 70px !important;
    left: 14px !important;
    width: 40px !important;
    height: 40px !important;
  }
  .bm-floating-admin-wrap {
    bottom: 68px !important;
    right: 12px !important;
  }
  #imageModal .modal-content {
    width: 95vw !important;
    padding: 12px !important;
    margin: 10px auto !important;
  }
  #imageModal .close-btn,
  #closeModal {
    top: 6px !important;
    right: 6px !important;
    width: 40px !important;
    height: 40px !important;
    line-height: 36px !important;
  }
}

/* ==========================================================================
   v16.0 MASTERPIECE MOBILE & DESKTOP LAYOUT ENGINE
   1. Fix Mobile Header/Viewport Width Glitch (minmax(0, 1fr) + overflow-x: clip)
   2. Symmetrical Mobile Masthead & Full-Width Swipable Category Bar
   3. True Sticky Right Sidebar Track (Works because overflow-x: clip is used!)
   ========================================================================== */
html, body {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: clip !important;
  margin: 0 !important;
  padding: 0 !important;
}
#masthead,
#site-navigation,
.bm-ticker-bar,
#main,
#colophon {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.bm-container {
  width: 100% !important;
  max-width: var(--bm-container-w, 1300px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
  box-sizing: border-box !important;
}

/* Prevent ANY CSS Grid track from expanding wider than the screen on Mobile or Desktop */
.bm-grid-main {
  display: grid !important;
  grid-template-columns: minmax(0, 2.12fr) minmax(0, 1fr) !important;
  gap: 26px !important;
  align-items: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
}
.bm-grid-main.bm-sidebar-left {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.12fr) !important;
}
.bm-grid-main.bm-sidebar-none {
  display: block !important;
}
.bm-grid-main > *,
.bm-hero-layout > *,
.bm-lead-plus-list-grid > *,
.bm-cards-grid > * {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.bm-hero-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) !important;
  gap: 18px !important;
  width: 100% !important;
}
.bm-cards-grid-2 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 18px !important;
  width: 100% !important;
}
.bm-cards-grid-3 {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;
  width: 100% !important;
}
.bm-cards-grid-4 {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
}

/* Section Header Clean Responsive Alignment */
.bm-sec-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 8px 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* True Sticky Right Sidebar Track (Glides smoothly down long pages so sidebar is NEVER empty!) */
#secondary {
  display: flex !important;
  flex-direction: column !important;
  gap: 22px !important;
  min-width: 0 !important;
  max-width: 100% !important;
}
.bm-sticky-sidebar-track {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 64px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 22px !important;
  z-index: 10;
}

@media (max-width: 960px) {
  .bm-grid-main,
  .bm-grid-main.bm-sidebar-left,
  .bm-hero-layout,
  .bm-lead-plus-list-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .bm-cards-grid-3,
  .bm-cards-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .bm-sticky-sidebar-track {
    position: static !important;
  }
}

@media (max-width: 768px) {
  .bm-container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  /* Symmetrical 3-column Mobile Header Bar: [☰ 42px] [Centered Logo Card] [🔍 42px] */
  .bm-masthead-row {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 42px !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .bm-masthead-logo-center {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-width: 0 !important;
    width: 100% !important;
  }
  .bm-logo-card {
    width: 100% !important;
    max-width: 245px !important;
    padding: 6px 12px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }
  .bm-logo-card img.bm-main-logo-img {
    width: 100% !important;
    max-width: var(--bm-logo-mobile-w, 220px) !important;
    height: auto !important;
  }
  /* On Mobile, hide the wide "सभी डेस्क ▾" pill in the top navbar (since ☰ and bottom bar "📂 सभी डेस्क" are right there!) so all category tabs scroll full-width edge-to-edge! */
  .bm-all-desks-wrap {
    display: none !important;
  }
  .bm-cards-grid-2,
  .bm-cards-grid-3,
  .bm-cards-grid-4 {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }
  .bm-sec-head {
    padding: 10px 12px !important;
  }
  .bm-sec-title {
    font-size: 18px !important;
  }
}
