/* Modern CSS System for NewsNext9 - No Horizontal Overflow & Clean Bengali Typography */

:root {
  --primary: #dc2626;
  --primary-hover: #b91c1c;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-header: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --hero-gradient: linear-gradient(135deg, #7f1d1d 0%, #450a0a 100%);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --font-bengali: 'Hind Siliguri', 'Noto Serif Bengali', sans-serif;
}

.dark {
  --bg-main: #090d16;
  --bg-card: #151e32;
  --bg-header: #0f172a;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #1e293b;
  --hero-gradient: linear-gradient(135deg, #450a0a 0%, #1a0505 100%);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
}

/* Hide debug status indicator on public reader-facing pages */
#wordpress-status-indicator {
  display: none !important;
}

/* Global Reset & No Extra Scrollbar setup */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip; /* Clip horizontal overflow without breaking position: sticky */
  font-family: var(--font-bengali);
  background-color: var(--bg-main);
  color: var(--text-main);
  font-size: 17.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Hide scrollbars for clean UI while allowing smooth scroll */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header & Topbar */
header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  width: 100%;
}

.top-bar {
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
}

.ad-banner-top {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.04) 0%, rgba(37, 99, 235, 0.04) 100%);
  border: 1px dashed rgba(220, 38, 38, 0.25);
  color: var(--text-muted);
  padding: 10px 24px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: all 0.25s ease;
}

.ad-banner-top:hover {
  border-style: solid;
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(37, 99, 235, 0.08) 100%);
}

.dark .ad-banner-top {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
  border-color: #334155;
  color: #94a3b8;
}

/* Social Icon Link Styling */
.social-icon-link {
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  text-decoration: none;
}

.social-icon-link.fb:hover {
  color: #1877f2;
  transform: translateY(-1px);
}

.social-icon-link.x-twitter:hover {
  color: #000000;
  transform: translateY(-1px);
}

.dark .social-icon-link.x-twitter:hover {
  color: #ffffff;
}

.social-icon-link.yt:hover {
  color: #ff0000;
  transform: translateY(-1px);
}

.social-icon-link.wa:hover {
  color: #25d366;
  transform: translateY(-1px);
}

.social-icon-link.ig:hover {
  color: #e4405f;
  transform: translateY(-1px);
}

.social-icon-link.tg:hover {
  color: #229ed9;
  transform: translateY(-1px);
}

.social-icon-link.gn:hover {
  color: #4285f4;
  transform: translateY(-1px);
}

/* Main Header Row */
.header-main {
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* Brand Logo Container */
.brand-logo {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.brand-logo-img {
  height: 130px !important;
  max-height: 140px !important;
  width: auto !important;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.brand-logo-img:hover {
  transform: scale(1.04);
}

/* Language Switcher Pills */
.lang-switcher {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 9999px;
  gap: 2px;
}

.dark .lang-switcher {
  background: #1e293b;
}

.lang-btn {
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  color: var(--text-main);
  background: transparent;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

/* Sticky Category Menu Bar */
.nav-bar {
  background: var(--bg-header);
  border-bottom: 3px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: visible;
  padding: 6px 0;
  white-space: nowrap;
}

/* Nav Item Styling for both A and Button tags */
a.nav-item, button.nav-item, .nav-item {
  font-size: 1.05rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--text-main) !important;
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

a.nav-item:hover, button.nav-item:hover, .nav-item:hover {
  background: rgba(220, 38, 38, 0.08);
  color: var(--primary) !important;
}

/* ACTIVE SELECTED TAB HIGHLIGHT (Red solid pill background matching Home tab) */
a.nav-item.active, button.nav-item.active, .nav-item.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4) !important;
}

/* Navigation Dropdown Menu Styles */
.nav-dropdown-wrap {
  position: relative;
  display: inline-block;
}

.nav-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-card);
  min-width: 240px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 8px 0;
  z-index: 99999;
  margin-top: 6px;
}

.nav-dropdown-wrap.open .nav-dropdown-content,
.nav-dropdown-wrap:hover .nav-dropdown-content,
.nav-dropdown-wrap:focus-within .nav-dropdown-content {
  display: block !important;
  animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-link {
  display: block;
  padding: 10px 18px;
  font-size: 1.0rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
}

.dropdown-link:hover {
  background: rgba(220, 38, 38, 0.08);
  color: var(--primary);
  border-left-color: var(--primary);
  padding-left: 22px;
}

.dropdown-link.active {
  background: rgba(220, 38, 38, 0.12);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 800;
}

/* ABP Ananda Style Full Article Detail Page Layout */
.abp-article-wrap {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.article-breadcrumb {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.4;
}

.article-breadcrumb a {
  color: var(--text-main);
  text-decoration: none;
}

.article-breadcrumb a:hover {
  color: var(--primary);
}

.article-breadcrumb .breadcrumb-active {
  color: var(--primary);
  font-weight: 700;
}

.article-main-title {
  font-family: 'Noto Serif Bengali', serif;
  font-size: 2.45rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 14px;
}

.article-subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-author {
  color: var(--primary);
  font-weight: 800;
}

.meta-sep {
  color: var(--border-color);
  margin: 0 8px;
}

.share-btn {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.dark .share-btn {
  background: #1e293b;
  color: #ffffff;
}

.share-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.article-featured-img-wrap {
  width: 100%;
  max-height: 520px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.article-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-body-content {
  font-size: 1.22rem;
  line-height: 1.95;
  color: var(--text-main);
}

.article-body-content p {
  margin-bottom: 16px;
}

/* NEWS REELS SECTION */
.reels-section-card {
  background: #090d16;
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 30px;
  border: 1px solid #1e293b;
}

.reels-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.reels-grid-flex {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.reel-card-item {
  width: 175px;
  flex-shrink: 0;
  cursor: pointer;
}

.reel-frame-wrap {
  position: relative;
  width: 175px;
  height: 275px;
  border-radius: 16px;
  background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%);
  padding: 5px;
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reel-card-item:hover .reel-frame-wrap {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(220, 38, 38, 0.45);
}

.reel-inner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.reel-category-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(220, 38, 38, 0.85);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.reel-quote-overlay {
  position: absolute;
  bottom: 20px;
  left: 10px;
  right: 10px;
  background: #ffffff;
  color: #dc2626;
  font-weight: 800;
  font-size: 0.82rem;
  text-align: center;
  padding: 6px 8px;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  font-family: 'Noto Serif Bengali', serif;
}

.reel-title-caption {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-top: 10px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* PHOTO GALLERY WIDGET */
.gallery-widget-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 20px;
  box-shadow: var(--shadow-sm);
}

.gallery-thumb-box {
  position: relative;
  height: 190px;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 10px;
  cursor: pointer;
}

.gallery-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-thumb-box:hover img {
  transform: scale(1.04);
}

.gallery-count-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

/* Slow, Smooth Right-to-Left Auto-Scrolling TRENDING Events Ticker Bar */
.ticker-bar {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 0 12px;
  font-size: 0.88rem;
  line-height: 1;
  border-bottom: 2px solid var(--primary);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  margin: 12px 0;
  height: 44px;
  display: flex;
  align-items: center;
}

.ticker-bar .container {
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  gap: 12px;
}

.ticker-tag {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  font-weight: 800;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  z-index: 10;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: 0.3px;
  height: 28px;
  line-height: 1;
}

.ticker-tags-fixed {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ticker-tags-fixed::-webkit-scrollbar {
  display: none;
}

.ticker-divider {
  color: #475569;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 4px;
  user-select: none;
  flex-shrink: 0;
}

.marquee-container {
  overflow: hidden;
  flex: 1;
  min-width: 0;
  height: 44px;
}

/* Trending Event Pills */
.trending-event-pill {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0 12px;
  height: 26px;
  line-height: 24px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  margin-right: 8px !important;
  margin-bottom: 2px;
  box-sizing: border-box;
}

.trending-event-pill:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  transform: translateY(-1px);
}

/* VIDEO NEWS SECTION */
.video-section-card {
  background: #0f172a;
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 30px;
}

.video-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.video-title-badge {
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
}

.video-player-box {
  position: relative;
  width: 100%;
  height: 420px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  cursor: pointer;
}

.video-player-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.video-player-box:hover img {
  transform: scale(1.03);
  opacity: 0.95;
}

.video-play-btn-large {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ff0000;
  color: #ffffff;
  width: 72px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(255, 0, 0, 0.6);
  transition: transform 0.2s ease, background 0.2s ease;
}

.video-player-box:hover .video-play-btn-large {
  transform: translate(-50%, -50%) scale(1.1);
  background: #cc0000;
}

.video-overlay-details {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.92) 100%);
  padding: 24px 20px 16px 20px;
}

.video-overlay-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.4;
  color: #ffffff;
  margin-bottom: 6px;
  font-family: 'Noto Serif Bengali', serif;
}

/* Video Thumbnails Single Line Horizontal Scroll Row */
.video-thumbs-scroll-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-top: 20px;
  scroll-behavior: smooth;
}

.video-thumbs-scroll-row::-webkit-scrollbar {
  height: 6px;
}
.video-thumbs-scroll-row::-webkit-scrollbar-track {
  background: #1e293b;
  border-radius: 9999px;
}
.video-thumbs-scroll-row::-webkit-scrollbar-thumb {
  background: #dc2626;
  border-radius: 9999px;
}

.video-thumb-card {
  width: 230px;
  flex-shrink: 0;
  background: #1e293b;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.video-thumb-card:hover {
  transform: translateY(-3px);
  background: #334155;
}

.video-thumb-img-wrap {
  position: relative;
  height: 130px;
}

.video-thumb-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumb-duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.video-thumb-body {
  padding: 10px;
}

.video-thumb-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  color: #f8fafc;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
}

/* Utility Tools Widget */
.utility-tools-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 20px;
  box-shadow: var(--shadow-sm);
}

.utility-tools-header {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.calculator-link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.2s ease;
}

.calculator-link-item:hover {
  background: rgba(220, 38, 38, 0.08);
  color: var(--primary);
}

/* Stock Market Widget */
.stock-market-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.stock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
}

.stock-row:last-child {
  border-bottom: none;
}

/* Hero Spotlight Section */
.hero-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-bottom: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.hero-card:hover {
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}

.hero-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 440px;
  min-height: 240px;
  background: #0f172a;
  overflow: hidden;
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.hero-card:hover .hero-image-wrap img {
  transform: scale(1.04);
}

/* Slider Nav Arrows */
.hero-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.25);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.hero-nav-arrow:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.12);
}

.hero-prev-btn { left: 10px; }
.hero-next-btn { right: 10px; }

.hero-content {
  background: linear-gradient(135deg, #7f1d1d 0%, #450a0a 100%);
  color: #ffffff;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
}

.hero-heading {
  font-family: 'Noto Serif Bengali', serif;
  font-size: 1.52rem;
  font-weight: 800;
  line-height: 1.42;
  margin-bottom: 12px;
  color: #ffffff;
}

.hero-bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.hero-bullet-item {
  font-size: 0.98rem;
  color: rgba(255,255,255,0.9);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.hero-bullet-item:hover, .hero-bullet-item.active {
  background: rgba(255, 255, 255, 0.12);
}

.hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-dot.active {
  background: #fef08a;
  width: 18px;
  border-radius: 9999px;
}

/* Layout Grid - 3 Columns (Left Sidebar, Main Content, Right Ad Sidebar) */
.main-layout {
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  gap: 20px;
  margin: 24px 0;
}

/* Left & Right Sidebars */
.main-layout > aside,
.right-ad-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Option 2: The last item in the sidebar stays locked/pinned on screen */
.main-layout > aside > *:last-child,
.right-ad-sidebar > *:last-child {
  position: sticky;
  top: 85px;
  bottom: 20px;
  z-index: 10;
}

@media (max-width: 1280px) {
  .main-layout {
    grid-template-columns: 250px 1fr 250px;
    gap: 16px;
  }
}

@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  .main-layout > aside,
  .right-ad-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
}

/* Left Sidebar "গরম খবর 🔥" */
.trending-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.trending-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.trending-scroll-viewport {
  height: 440px;
  overflow: hidden;
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.trending-vertical-marquee {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: scrollBottomToTop 35s linear infinite;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.trending-vertical-marquee:hover {
  animation-play-state: paused;
}

@keyframes scrollBottomToTop {
  0% {
    transform: translateY(0%);
  }
  100% {
    transform: translateY(-50%);
  }
}

.trending-item {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-color);
  cursor: pointer;
  white-space: normal !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.trending-item h4 {
  white-space: normal !important;
  word-wrap: break-word !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  line-height: 1.4 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  max-width: 100% !important;
}

.trending-item:last-child {
  border-bottom: none;
}

.trending-item:hover h4 {
  color: var(--primary);
}

/* News Cards Grid - 2 Rows Horizontal Slider */
.news-slider-container {
  position: relative;
  width: 100%;
  margin-bottom: 24px;
}

.news-cards-grid {
  display: grid;
  grid-template-rows: repeat(2, 1fr);
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 280px);
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 6px 4px 14px 4px;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Hide scrollbar for clean UI */
.news-cards-grid::-webkit-scrollbar {
  display: none;
}
.news-cards-grid {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.slider-nav-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  user-select: none;
}

.slider-nav-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: scale(1.08);
}

.slider-nav-btn:active {
  transform: scale(0.95);
}

.slider-overlay-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  transition: all 0.2s ease;
  user-select: none;
}

.slider-overlay-left {
  left: -14px;
}

.slider-overlay-right {
  right: -14px;
}

.slider-overlay-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.12);
}

.card-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.48;
  margin-bottom: 8px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-box {
  background: var(--bg-card);
  width: 100%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f1f5f9;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

.dark .modal-close {
  background: #334155;
  color: #fff;
}

/* Premium Left & Right Skyscraper Side Ad Banners */
.side-ad-container {
  position: fixed;
  top: 160px;
  width: 160px;
  height: 600px;
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.side-ad-left {
  left: 16px;
}

.side-ad-right {
  right: 16px;
}

.side-ad-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
}

.side-ad-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
  background: rgba(220, 38, 38, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.side-ad-close {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.side-ad-close:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.side-ad-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  padding: 16px 4px;
}

.side-ad-icon {
  font-size: 1.8rem;
  opacity: 0.7;
}

.side-ad-dimension {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-main);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  font-weight: 700;
}

/* Hide fixed skyscraper side ads on screens narrower than 1600px to prevent overlapping with content container */
@media (max-width: 1599px) {
  .side-ad-container {
    display: none !important;
  }
}

/* Site Footer System */
.site-footer {
  background: var(--bg-header);
  border-top: 2px solid var(--primary);
  margin-top: 48px;
  color: var(--text-main);
  padding: 40px 0 20px 0;
  width: 100%;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 32px;
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-logo-img {
  height: 75px;
  width: auto;
  object-fit: contain;
}

.footer-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-heading {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 6px;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.footer-links a:hover {
  color: var(--primary);
  transform: translateX(4px);
}

.newsletter-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.newsletter-input {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  font-size: 0.85rem;
}

.newsletter-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.newsletter-btn:hover {
  background: var(--primary-hover);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* 12-Slot Commercial Bottom Ad Network Grid */
.bottom-ads-section {
  margin-top: 48px;
  margin-bottom: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.bottom-ads-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.bottom-ads-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.bottom-ads-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1024px) {
  .bottom-ads-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .bottom-ads-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .bottom-ads-grid {
    grid-template-columns: 1fr;
  }
}

.ad-slot-card {
  background: var(--bg-main);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.ad-slot-card:hover {
  border-style: solid;
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.ad-slot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.ad-slot-sponsor {
  background: #fef08a;
  color: #854d0e;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.dark .ad-slot-sponsor {
  background: #713f12;
  color: #fef08a;
}

.ad-slot-image-wrap {
  position: relative;
  width: 100%;
  height: 120px;
  border-radius: 6px;
  overflow: hidden;
  background: #e2e8f0;
}

.ad-slot-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.ad-slot-card:hover .ad-slot-image-wrap img {
  transform: scale(1.05);
}

.ad-slot-headline {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin: 0;
}

.ad-slot-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

.ad-slot-cta:hover {
  color: var(--primary-hover);
}

/* Blank Commercial Ad Slot Placeholder */
.blank-ad-box {
  width: 100%;
  min-height: 120px;
  background: var(--bg-card);
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 12px;
  text-align: center;
  transition: all 0.25s ease;
}

.dark .blank-ad-box {
  border-color: #334155;
  background: #0f172a;
}

.ad-slot-card:hover .blank-ad-box {
  border-color: var(--primary);
  background: rgba(220, 38, 38, 0.03);
}

.blank-ad-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.blank-ad-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.blank-ad-dim {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: monospace;
  background: var(--bg-main);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.back-to-top-btn {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.back-to-top-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ==========================================================================
   Comprehensive Mobile Responsiveness System
   ========================================================================== */

/* Global Responsive Safeguards */
html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

img, video, iframe, object, embed {
  max-width: 100%;
  height: auto;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Mobile Navigation Drawer & Backdrop Overlay */
.mobile-nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-nav-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 290px;
  max-width: 85vw;
  height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  z-index: 10001;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 6px 0 24px rgba(0,0,0,0.25);
}

.mobile-nav-drawer.active {
  transform: translateX(0);
}

.mobile-drawer-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-header);
}

.mobile-drawer-close {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-drawer-close:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.mobile-drawer-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-drawer-nav .nav-item {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.mobile-drawer-nav .nav-item.active,
.mobile-drawer-nav .nav-item:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Tablet & Mobile Media Queries */
@media (max-width: 576px) {
  .header-social-icons {
    display: none !important;
  }
}

@media (max-width: 850px) {
  .mobile-menu-btn {
    display: flex;
  }

  .nav-bar-inline {
    display: none !important;
  }

  .top-bar .container {
    justify-content: center !important;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

  .hero-image-wrap {
    min-height: 260px;
    height: 260px;
  }

  .hero-heading {
    font-size: 1.18rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 12px;
  }

  .brand-logo-img {
    height: 65px !important;
  }

  .top-bar {
    font-size: 0.78rem;
  }

  #search-input {
    width: 130px !important;
    font-size: 0.78rem !important;
  }

  .hero-image-wrap {
    min-height: 210px;
    height: 210px;
  }

  .hero-content {
    padding: 16px;
  }

  .hero-heading {
    font-size: 1.08rem;
    line-height: 1.38;
  }

  .ad-banner-top,
  .leaderboard-ad {
    font-size: 0.72rem;
    padding: 8px 12px;
    word-break: break-word;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
}

/* ==========================================================================
   Mobile Photo Optimization & Aspect Ratio Styling
   ========================================================================== */

/* Universal Image Responsive Rules & Smooth Loading Fallbacks */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Card Images Aspect Ratio Proportions (16:9) */
.card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--bg-card);
}

/* Hero Slider Main Image Wrapper (16:9 Aspect Ratio) */
.hero-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 220px;
  background: #0f172a;
  overflow: hidden;
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

/* Article Featured Header Image (16:9 Proportional Fit) */
.article-featured-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 520px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
  background: var(--bg-card);
}

.article-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Photo Gallery Thumbnail Box (16:9 Aspect Ratio) */
.gallery-thumb-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 10px;
  cursor: pointer;
  background: var(--bg-card);
}

.gallery-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

/* Short Vertical Reels Inner Frame (9:16 Aspect Ratio) */
.reel-frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  height: auto;
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
}

.reel-inner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
}

/* Video Thumbnails (16:9 Aspect Ratio) */
.video-thumb-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 8px;
  overflow: hidden;
  background: #0f172a;
}

.video-thumb-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Commercial Ad Slot Images */
.ad-slot-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 6px;
  overflow: hidden;
  background: #e2e8f0;
}

.ad-slot-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Specific Media Queries for Mobile Photo Perfection */
@media (max-width: 850px) {
  .hero-image-wrap {
    aspect-ratio: 16 / 9;
    min-height: 200px;
    height: auto;
  }

  .article-featured-img-wrap {
    aspect-ratio: 16 / 9;
    max-height: 280px;
  }

  .card-img {
    aspect-ratio: 16 / 9;
    height: auto;
  }
}

@media (max-width: 576px) {
  .hero-image-wrap {
    aspect-ratio: 16 / 9;
    min-height: 180px;
  }

  .article-featured-img-wrap {
    aspect-ratio: 16 / 9;
    max-height: 220px;
    border-radius: 8px;
    margin-bottom: 16px;
  }

  .card-img {
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .gallery-thumb-box {
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .reel-frame-wrap {
    aspect-ratio: 9 / 16;
    max-height: 360px;
  }
}

/* WordPress Admin Post Editor Responsive Grid */
@media (max-width: 990px) {
  .wp-editor-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Comprehensive Mobile Responsive & Text Overflow Prevention */
html, body {
  max-width: 100vw !important;
  overflow-x: hidden !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

*, *:before, *:after {
  box-sizing: border-box;
  max-width: 100%;
}

h1, h2, h3, h4, h5, h6, p, span, a, li, td, th {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

/* -------------------------------------------------------------
   STRICT MOBILE APP RESPONSIVE ENGINE (Screen <= 768px)
------------------------------------------------------------- */
@media (max-width: 768px) {

  /* Containment & No-Scrollbar Horizontal Overflow Safeguard */
  html, body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    box-sizing: border-box !important;
  }

  /* 1. Header & Navigation - ONLY LOGO in Header Bar on Mobile */
  .header-main .nav-bar-inline {
    display: none !important;
  }

  .header-main {
    padding: 8px 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  .brand-logo-img {
    height: 75px !important;
    max-height: 80px !important;
    width: auto !important;
  }

  #search-input {
    width: 110px !important;
    font-size: 0.72rem !important;
    padding: 6px 10px !important;
    border-radius: 9999px !important;
  }

  /* Category Scrollbar Pills */
  .nav-bar-inline {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    white-space: nowrap !important;
    gap: 6px !important;
    padding: 6px 0 !important;
    scrollbar-width: none !important;
  }

  .nav-bar-inline::-webkit-scrollbar {
    display: none !important;
  }

  .nav-item {
    font-size: 0.82rem !important;
    padding: 5px 12px !important;
    border-radius: 9999px !important;
    background: rgba(0,0,0,0.03) !important;
    flex-shrink: 0 !important;
  }

  .dark .nav-item {
    background: rgba(255,255,255,0.06) !important;
  }

  /* 2. Ticker Bar */
  .ticker-bar {
    margin: 8px 0 !important;
    padding: 6px 10px !important;
    border-radius: 10px !important;
  }

  .ticker-tag {
    padding: 4px 10px !important;
    font-size: 0.72rem !important;
    border-radius: 6px !important;
  }

  /* 3. Main Grid Layout Collapsing - "গরম খবর" FIRST, "লেটেস্ট নিউজ" DIRECTLY SECOND on Mobile */
  .main-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    margin: 12px 0 !important;
    width: 100% !important;
  }

  .main-layout > aside {
    display: contents !important; /* Unwraps aside on mobile so widgets flex directly inside main-layout! */
  }

  .trending-box {
    order: 1 !important; /* 1. "গরম খবর 🔥" widget comes FIRST at top of page! */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .main-layout > section {
    order: 2 !important; /* 2. "লেটেস্ট নিউজ" section comes DIRECTLY SECOND after "গরম খবর"! */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  #utility-calculators-container,
  .main-layout > aside > *:not(.trending-box) {
    order: 3 !important; /* 3. Calculators, Podcasts, Photo Gallery come THIRD after "লেটেস্ট নিউজ"! */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .main-layout > .right-ad-sidebar {
    order: 4 !important; /* 4. Right Sidebar ads come FOURTH! */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 4. Trending "গরম খবর" Widget Card */
  .trending-box {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
  }

  .trending-scroll-viewport {
    height: auto !important;
    max-height: 380px !important;
    overflow-y: hidden !important;
  }

  .trending-item {
    padding: 8px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .trending-item h4 {
    font-size: 0.88rem !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: anywhere !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    max-width: 100% !important;
  }

  /* 5. Hero Spotlight Card */
  .hero-card {
    border-radius: 12px !important;
    overflow: hidden !important;
    width: 100% !important;
  }

  .hero-img-wrap {
    height: 200px !important;
    width: 100% !important;
  }

  .hero-heading {
    font-size: 1.05rem !important;
    line-height: 1.4 !important;
  }

  /* 6. Photo Gallery, Video Showcase & Reels Sliders */
  .news-cards-grid {
    grid-auto-columns: minmax(220px, 240px) !important;
    gap: 10px !important;
  }

  .video-player-box {
    height: 210px !important;
  }

  .video-thumbs-scroll-row,
  .reels-scroll-row {
    gap: 10px !important;
  }

  .video-thumb-card {
    width: 190px !important;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
}

/* Mobile Responsive Perfection Enhancements */
@media (max-width: 768px) {
  body {
    padding-bottom: 70px !important;
  }

  .news-cards-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-behavior: smooth !important;
    padding: 8px 4px 16px !important;
    gap: 12px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
    scroll-snap-type: x mandatory !important;
  }

  .news-cards-grid .card-item {
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
    flex-shrink: 0 !important;
    scroll-snap-align: start !important;
  }

  .bottom-ads-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .site-footer {
    margin-bottom: 60px !important;
  }
}




