/*
Theme Name: Bangla24News
Theme URI: https://bangla24news.com
Author: Bangla24News Media Team
Author URI: https://bangla24news.com
Description: A professional, modern, fully responsive and dynamic WordPress News Portal Theme designed for Bangladeshi online newspapers. Features Bengali typography (Hind Siliguri), breaking news ticker, lead story layout, category grids, video news, photo gallery, Adsterra/banner advertisement zones, social sharing, and 0% loading delay performance.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bangla24news
Tags: news, blog, newspaper, bangla, responsive-layout, translation-ready, custom-menu, featured-images, custom-logo, theme-options
*/

/* ==========================================================================
   TABLE OF CONTENTS:
   1. Reset & Global Variables
   2. Typography & Bengali Font Setup
   3. Header & Utility Bar
   4. Breaking News Ticker
   5. Navigation & Mobile Drawer
   6. Hero Featured & Lead Stories
   7. Category Grids & News Cards
   8. Single Article Detail View
   9. Comments & Reactions
   10. Sidebar & Widgets
   11. Advertisements Slots
   12. Footer & Copyright
   13. Dark Mode
   14. Print Styles & Responsive Breakpoints
   ========================================================================== */

:root {
  --b24-primary: #0f172a;       /* Dark Navy Blue */
  --b24-primary-light: #1e293b;
  --b24-secondary: #dc2626;     /* Professional Red */
  --b24-secondary-hover: #b91c1c;
  --b24-accent: #2563eb;        /* Royal Blue */
  --b24-bg: #ffffff;
  --b24-bg-soft: #f8fafc;
  --b24-bg-card: #ffffff;
  --b24-text: #0f172a;
  --b24-text-muted: #64748b;
  --b24-text-light: #94a3b8;
  --b24-border: #e2e8f0;
  --b24-border-soft: #f1f5f9;
  --b24-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --b24-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --b24-radius: 8px;
  --b24-font-sans: 'Hind Siliguri', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --b24-font-serif: 'Noto Serif Bengali', Georgia, serif;
}

[data-theme="dark"], body.dark-mode {
  --b24-bg: #090d16;
  --b24-bg-soft: #0f172a;
  --b24-bg-card: #131d31;
  --b24-text: #f1f5f9;
  --b24-text-muted: #94a3b8;
  --b24-text-light: #64748b;
  --b24-border: #1e293b;
  --b24-border-soft: #182234;
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--b24-font-sans);
  background-color: var(--b24-bg);
  color: var(--b24-text);
  line-height: 1.6;
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--b24-secondary);
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font: inherit;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* ==========================================================================
   2. Top Utility Bar
   ========================================================================== */
.b24-topbar {
  background-color: var(--b24-primary);
  color: #cbd5e1;
  font-size: 0.8125rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.b24-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  flex-wrap: wrap;
  gap: 8px;
}

.b24-topbar-left, .b24-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.b24-topbar-date {
  font-weight: 500;
}

.b24-topbar-sep {
  opacity: 0.3;
}

.b24-topbar-social a {
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
}

.b24-topbar-social a:hover {
  color: #ffffff;
}

.b24-theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #f8fafc;
  padding: 2px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.b24-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   3. Main Header
   ========================================================================== */
.b24-header {
  padding: 16px 0;
  background-color: var(--b24-bg-card);
  border-bottom: 1px solid var(--b24-border);
}

.b24-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.b24-brand {
  display: flex;
  flex-direction: column;
}

.b24-logo-text {
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--b24-primary);
}

[data-theme="dark"] .b24-logo-text,
body.dark-mode .b24-logo-text {
  color: #ffffff;
}

.b24-logo-highlight {
  color: var(--b24-secondary);
}

.b24-tagline {
  font-size: 0.8125rem;
  color: var(--b24-text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.b24-header-ad {
  max-width: 728px;
  width: 100%;
}

.b24-ad-box {
  background: var(--b24-bg-soft);
  border: 1px dashed var(--b24-border);
  border-radius: 6px;
  text-align: center;
  padding: 8px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--b24-text-light);
}

/* ==========================================================================
   4. Navigation Menu
   ========================================================================== */
.b24-nav-wrapper {
  background-color: var(--b24-primary);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--b24-shadow-md);
}

.b24-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.b24-menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.b24-menu li {
  position: relative;
}

.b24-menu > li > a {
  display: block;
  padding: 12px 14px;
  color: #f8fafc;
  font-weight: 600;
  font-size: 0.9375rem;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

.b24-menu > li > a:hover,
.b24-menu > li.current-menu-item > a {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.08);
  border-bottom-color: var(--b24-secondary);
}

/* Submenu */
.b24-menu ul.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--b24-primary-light);
  min-width: 180px;
  box-shadow: var(--b24-shadow-md);
  z-index: 50;
  border-radius: 0 0 6px 6px;
  overflow: hidden;
}

.b24-menu li:hover > ul.sub-menu {
  display: block;
}

.b24-menu ul.sub-menu li a {
  padding: 10px 16px;
  display: block;
  color: #cbd5e1;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.b24-menu ul.sub-menu li a:hover {
  background-color: var(--b24-secondary);
  color: #ffffff;
}

.b24-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.b24-search-btn {
  background: none;
  border: none;
  color: #f8fafc;
  padding: 8px;
  cursor: pointer;
  border-radius: 4px;
}

.b24-search-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.b24-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  padding: 8px;
  cursor: pointer;
}

/* ==========================================================================
   5. Breaking News Ticker
   ========================================================================== */
.b24-ticker-bar {
  background-color: var(--b24-bg-soft);
  border-bottom: 1px solid var(--b24-border);
  font-size: 0.875rem;
  overflow: hidden;
}

.b24-ticker-inner {
  display: flex;
  align-items: center;
}

.b24-ticker-badge {
  background-color: var(--b24-secondary);
  color: #ffffff;
  padding: 6px 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.b24-ticker-badge::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  animation: b24-pulse 1.2s infinite;
}

@keyframes b24-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.b24-ticker-content {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  padding: 6px 14px;
}

.b24-ticker-list {
  display: inline-flex;
  gap: 32px;
  animation: b24-scroll-left 45s linear infinite;
}

.b24-ticker-list:hover {
  animation-play-state: paused;
}

@keyframes b24-scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.b24-ticker-item {
  color: var(--b24-text);
  font-weight: 500;
}

.b24-ticker-item:hover {
  color: var(--b24-secondary);
}

/* ==========================================================================
   6. Hero Featured Section
   ========================================================================== */
.b24-section {
  padding: 24px 0;
}

.b24-hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.b24-lead-card {
  background: var(--b24-bg-card);
  border-radius: var(--b24-radius);
  overflow: hidden;
  border: 1px solid var(--b24-border);
  box-shadow: var(--b24-shadow-sm);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.b24-lead-card:hover {
  box-shadow: var(--b24-shadow-md);
}

.b24-lead-img-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

.b24-lead-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.b24-lead-card:hover .b24-lead-img-wrapper img {
  transform: scale(1.03);
}

.b24-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--b24-secondary);
  color: #ffffff;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.b24-lead-body {
  padding: 18px 20px;
}

.b24-lead-title {
  font-size: 1.625rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 10px;
  color: var(--b24-text);
}

.b24-lead-excerpt {
  font-size: 0.9375rem;
  color: var(--b24-text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.b24-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--b24-text-muted);
}

.b24-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.b24-side-stories {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.b24-mini-card {
  display: flex;
  gap: 12px;
  background: var(--b24-bg-card);
  padding: 12px;
  border: 1px solid var(--b24-border);
  border-radius: var(--b24-radius);
  transition: background-color 0.2s ease;
}

.b24-mini-card:hover {
  background-color: var(--b24-bg-soft);
}

.b24-mini-thumb {
  width: 100px;
  height: 70px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #1e293b;
}

.b24-mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.b24-mini-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.b24-mini-title {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--b24-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   7. Category Sections & Section Headings
   ========================================================================== */
.b24-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--b24-border);
  margin-bottom: 18px;
  position: relative;
}

.b24-section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--b24-text);
  padding-bottom: 8px;
  position: relative;
}

.b24-section-title::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--b24-secondary);
}

.b24-more-link {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--b24-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

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

.b24-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.b24-news-card {
  background: var(--b24-bg-card);
  border: 1px solid var(--b24-border);
  border-radius: var(--b24-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.b24-card-thumb {
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  background: #1e293b;
}

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

.b24-news-card:hover .b24-card-thumb img {
  transform: scale(1.05);
}

.b24-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.b24-card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--b24-text);
}

.b24-card-excerpt {
  font-size: 0.875rem;
  color: var(--b24-text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
  flex: 1;
}

/* ==========================================================================
   8. Main Layout with Sidebar
   ========================================================================== */
.b24-main-layout,
.b24-grid-main-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 28px;
  align-items: start;
}

.b24-content-area,
.b24-main-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.b24-two-col-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.b24-col-half {
  min-width: 0;
}

.b24-three-col-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.b24-col-third {
  min-width: 0;
}

.b24-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 20px;
}

.b24-split-lead,
.b24-split-list {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.b24-district-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.b24-district-tags::-webkit-scrollbar {
  display: none;
}

.b24-dist-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--b24-bg-soft);
  border: 1px solid var(--b24-border);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--b24-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.b24-dist-tag:hover,
.b24-dist-tag.active {
  background: var(--b24-secondary);
  color: #ffffff;
  border-color: var(--b24-secondary);
}

.b24-video-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 20px;
  background: #090d16;
  padding: 20px;
  border-radius: var(--b24-radius);
  color: #ffffff;
}

.b24-video-lead,
.b24-video-list {
  min-width: 0;
}

.b24-video-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.b24-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.b24-widget {
  background: var(--b24-bg-card);
  border: 1px solid var(--b24-border);
  border-radius: var(--b24-radius);
  padding: 18px;
}

.b24-widget-title {
  font-size: 1.125rem;
  font-weight: 800;
  border-bottom: 2px solid var(--b24-secondary);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

/* Tabbed widget */
.b24-tabs {
  display: flex;
  border-bottom: 1px solid var(--b24-border);
  margin-bottom: 14px;
}

.b24-tab-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--b24-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.b24-tab-btn.active {
  color: var(--b24-secondary);
  border-bottom-color: var(--b24-secondary);
}

/* ==========================================================================
   9. Single Article View
   ========================================================================== */
.b24-single-article {
  background: var(--b24-bg-card);
  border: 1px solid var(--b24-border);
  border-radius: var(--b24-radius);
  padding: 24px;
}

.b24-breadcrumb {
  font-size: 0.8125rem;
  color: var(--b24-text-muted);
  margin-bottom: 14px;
}

.b24-single-headline {
  font-size: 2.125rem;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--b24-text);
}

.b24-single-subhead {
  font-size: 1.125rem;
  color: var(--b24-text-muted);
  margin-bottom: 18px;
  line-height: 1.5;
  font-weight: 500;
}

.b24-author-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--b24-border);
  border-bottom: 1px solid var(--b24-border);
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.b24-author-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.b24-author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.b24-author-name {
  font-weight: 700;
  font-size: 0.9375rem;
}

.b24-author-meta {
  font-size: 0.8125rem;
  color: var(--b24-text-muted);
}

.b24-share-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.b24-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  border: none;
  cursor: pointer;
}

.b24-share-fb { background-color: #1877f2; }
.b24-share-wa { background-color: #25d366; }
.b24-share-x { background-color: #0f1419; }
.b24-share-print { background-color: #475569; }

.b24-featured-media {
  margin-bottom: 24px;
}

.b24-featured-media img {
  width: 100%;
  border-radius: 6px;
}

.b24-media-caption {
  font-size: 0.8125rem;
  color: var(--b24-text-muted);
  margin-top: 6px;
  font-style: italic;
  display: flex;
  justify-content: space-between;
}

.b24-article-content {
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--b24-text);
}

.b24-article-content p {
  margin-bottom: 1.25em;
}

.b24-article-content h2, .b24-article-content h3 {
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  font-weight: 800;
}

.b24-article-content blockquote {
  border-left: 4px solid var(--b24-secondary);
  padding: 12px 18px;
  background: var(--b24-bg-soft);
  font-style: italic;
  margin: 1.5em 0;
  border-radius: 0 4px 4px 0;
}

/* ==========================================================================
   10. Footer
   ========================================================================== */
.b24-footer {
  background-color: var(--b24-primary);
  color: #cbd5e1;
  padding-top: 40px;
  margin-top: auto;
  border-top: 3px solid var(--b24-secondary);
}

.b24-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-bottom: 32px;
}

.b24-footer-col h4 {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  border-left: 3px solid var(--b24-secondary);
  padding-left: 8px;
}

.b24-footer-col ul li {
  margin-bottom: 8px;
}

.b24-footer-col a {
  color: #94a3b8;
  font-size: 0.875rem;
}

.b24-footer-col a:hover {
  color: #ffffff;
}

.b24-bottom-bar {
  background-color: #020617;
  padding: 16px 0;
  font-size: 0.8125rem;
  color: #64748b;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.b24-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   11. Pagination
   ========================================================================== */
.b24-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
}

.b24-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--b24-bg-card);
  border: 1px solid var(--b24-border);
  color: var(--b24-text);
  font-weight: 700;
  font-size: 0.875rem;
}

.b24-pagination .page-numbers.current {
  background: var(--b24-secondary);
  color: #ffffff;
  border-color: var(--b24-secondary);
}

.b24-pagination .page-numbers:hover:not(.current) {
  background: var(--b24-bg-soft);
  color: var(--b24-secondary);
}

/* ==========================================================================
   12. Comprehensive Multi-Device Responsive Breakpoints
   (PC, Desktops, Laptops, Tablets, iPads, Mobile Phones)
   ========================================================================== */

/* --- A. LAPTOPS & SMALLER COMPUTERS (1025px - 1280px) --- */
@media (max-width: 1280px) {
  .b24-container {
    max-width: 100%;
    padding: 0 20px;
  }
  .b24-grid-main-sidebar,
  .b24-main-layout {
    grid-template-columns: minmax(0, 7.5fr) minmax(0, 4.5fr);
    gap: 20px;
  }
  .b24-grid-4 {
    gap: 14px;
  }
}

/* --- B. TABLETS & IPADS (769px - 1024px) --- */
@media (max-width: 1024px) {
  .b24-container {
    padding: 0 16px;
  }

  /* Main layout collapses sidebar underneath or full width */
  .b24-grid-main-sidebar,
  .b24-main-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Sidebars on tablet display widgets in a clean 2-column grid */
  .b24-sidebar,
  .b24-sidebar-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .b24-widget-ad,
  .b24-banner-ad {
    grid-column: span 2;
  }

  /* Hero Featured: stack lead with side stories in horizontal 3-column row */
  .b24-hero-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .b24-side-stories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }

  .b24-mini-card {
    flex-direction: column;
    padding: 10px;
  }

  .b24-mini-thumb {
    width: 100%;
    height: 120px;
  }

  /* Grid card adaptations for tablet */
  .b24-grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .b24-grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .b24-two-col-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .b24-three-col-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .b24-three-col-row > *:last-child {
    grid-column: span 2;
  }

  .b24-split-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .b24-video-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .b24-footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  /* Header adjustments on tablet */
  .b24-header-inner {
    padding: 14px 0;
  }
}

/* --- C. SMALL TABLETS & LARGE MOBILE PHONES (481px - 768px) --- */
@media (max-width: 768px) {
  .b24-container {
    padding: 0 14px;
  }

  /* Top bar elements wrap cleanly */
  .b24-top-bar {
    padding: 6px 0;
    font-size: 0.75rem;
  }

  .b24-top-inner {
    flex-direction: column;
    gap: 6px;
    align-items: center;
    text-align: center;
  }

  .b24-header-inner {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }

  .b24-header-ad {
    max-width: 100%;
    overflow: hidden;
  }

  /* Primary nav: hide desktop list, show mobile hamburger trigger */
  .b24-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    padding: 10px 0;
  }

  .b24-menu.is-active {
    display: flex;
  }

  .b24-mobile-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--b24-secondary);
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    margin: 6px 0;
  }

  /* Ticker adapts */
  .b24-ticker-badge {
    padding: 4px 10px;
    font-size: 0.75rem;
  }

  /* Hero Section: side stories become 1 column */
  .b24-side-stories {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .b24-mini-card {
    flex-direction: row;
    padding: 10px;
  }

  .b24-mini-thumb {
    width: 100px;
    height: 70px;
  }

  /* 2-col and 3-col rows collapse */
  .b24-two-col-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .b24-three-col-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .b24-three-col-row > *:last-child {
    grid-column: span 1;
  }

  /* Sidebar widgets stack 1 col */
  .b24-sidebar,
  .b24-sidebar-col {
    grid-template-columns: 1fr;
  }

  .b24-widget-ad,
  .b24-banner-ad {
    grid-column: span 1;
  }

  /* Footer */
  .b24-footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .b24-bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  /* Single Article on Tablet/Mobile */
  .b24-single-article {
    padding: 16px;
  }

  .b24-single-headline {
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    line-height: 1.3;
  }

  .b24-author-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .b24-share-buttons {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .b24-share-btn {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
    min-height: 38px;
  }

  .b24-post-nav {
    flex-direction: column;
    gap: 12px;
  }
}

/* --- D. MOBILE PHONES (320px - 480px) --- */
@media (max-width: 480px) {
  .b24-container {
    padding: 0 10px;
  }

  .b24-lead-title {
    font-size: 1.25rem;
    line-height: 1.35;
  }

  .b24-lead-body {
    padding: 12px;
  }

  .b24-grid-3,
  .b24-grid-4 {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .b24-card-title {
    font-size: 0.9375rem;
  }

  .b24-card-body {
    padding: 10px;
  }

  /* Single article readable typography */
  .b24-article-content {
    font-size: 1rem;
    line-height: 1.75;
  }

  .b24-single-headline {
    font-size: 1.375rem;
  }

  .b24-single-subhead {
    font-size: 0.9375rem;
  }

  /* Touch-friendly buttons */
  .b24-share-btn {
    min-height: 42px;
    font-size: 0.8125rem;
  }

  .b24-btn-primary {
    width: 100%;
    text-align: center;
    padding: 10px 16px;
  }

  .b24-tab-btn {
    padding: 8px 6px;
    font-size: 0.8125rem;
  }
}

