/*
Theme Name: BD24 News Portal
Theme URI: https://bd24.press
Author: BD24 Team
Author URI: https://bd24.press
Description: A modern Bangla news portal theme inspired by StarNews, with full Customizer support.
Version: 2.0
License: GNU General Public License v2 or later
Text Domain: bd24
*/

/* =========================================================
   CSS CUSTOM PROPERTIES
   ========================================================= */
:root {
  --bd24-primary:       #2757fd;
  --bd24-primary-dark:  #1a45e0;
  --bd24-red:           #e03131;
  --bd24-dark-nav:      #1a1a2e;
  --bd24-body-bg:       #ffffff;
  --bd24-body-color:    #1a1a1a;
  --bd24-muted:         #6b7280;
  --bd24-border:        #e5e7eb;
  --bd24-card-bg:       #ffffff;
  --bd24-section-bg:    #f9fafb;
  --bd24-dark-band:     #1f2937;
  --bd24-font:          'Hind Siliguri', 'Noto Serif Bengali', sans-serif;
  --bd24-radius:        4px;
  --bd24-nav-h:         48px;
  --bd24-header-h:      85px;
  --bd24-ticker-h:      36px;
  --bd24-shadow:        0 1px 4px rgba(0,0,0,.08);
  --bd24-shadow-md:     0 4px 16px rgba(0,0,0,.12);
}

[data-theme="dark"] {
  --bd24-body-bg:    #0f0f0f;
  --bd24-body-color: #e5e7eb;
  --bd24-border:     #374151;
  --bd24-card-bg:    #1a1a1a;
  --bd24-section-bg: #111827;
  --bd24-muted:      #9ca3af;
  --bd24-dark-band:  #111827;
}

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--bd24-font);
  background: var(--bd24-body-bg);
  color: var(--bd24-body-color);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}

a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--bd24-primary); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* =========================================================
   CONTAINER
   ========================================================= */
.bd24-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* =========================================================
   BREAKING NEWS TICKER
   ========================================================= */
.bd24-ticker {
  background: var(--bd24-body-bg);
  border-bottom: 1px solid var(--bd24-border);
  height: var(--bd24-ticker-h);
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.ticker-label {
  background: var(--bd24-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  white-space: nowrap;
  flex-shrink: 0;
  height: 100%;
  display: flex;
  align-items: center;
  z-index: 2;
}

.ticker-track-wrap {
  overflow: hidden;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
}

.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: bd24ticker 40s linear infinite;
  gap: 0;
}

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

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 28px 0 0;
  font-size: 13px;
  font-weight: 500;
}

.ticker-item a { color: var(--bd24-body-color); white-space: nowrap; }
.ticker-item a:hover { color: var(--bd24-primary); }

.ticker-sep {
  color: var(--bd24-primary);
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

@keyframes bd24ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* =========================================================
   HEADER
   ========================================================= */
#bd24-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: var(--bd24-body-bg);
  box-shadow: var(--bd24-shadow);
}

/* Logo Bar */
.bd24-logo-bar {
  border-bottom: 1px solid var(--bd24-border);
  min-height: var(--bd24-header-h);
  display: flex;
  align-items: center;
}

.bd24-logo-bar .bd24-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bd24-logo-left,
.bd24-logo-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bd24-hamburger {
  width: 36px; height: 36px;
  display: flex; flex-direction: column;
  justify-content: center; gap: 5px;
  cursor: pointer; flex-shrink: 0;
}

.bd24-hamburger span {
  display: block; height: 2px; width: 22px;
  background: var(--bd24-body-color);
  border-radius: 2px; transition: .3s;
}

.bd24-logo a { display: block; }
.bd24-logo img { height: 48px; width: auto; }

.bd24-mobile-logo { display: none; }
.bd24-mobile-logo img { height: 30px; width: auto; }

.bd24-live-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--bd24-border); border-radius: 20px;
  padding: 4px 14px; font-size: 13px; font-weight: 700;
  color: var(--bd24-body-color); white-space: nowrap;
  transition: background .2s;
}
.bd24-live-btn:hover { background: var(--bd24-section-bg); }

.bd24-live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--bd24-red);
  animation: livepulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes livepulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.bd24-header-social { display: flex; align-items: center; gap: 6px; }

.bd24-header-social a {
  width: 32px; height: 32px; border: 1px solid var(--bd24-border);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 14px;
  transition: background .2s, color .2s;
}
.bd24-header-social a:hover { background: var(--bd24-primary); color: #fff; border-color: var(--bd24-primary); }

.bd24-dark-toggle {
  width: 32px; height: 32px; border: 1px solid var(--bd24-border);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 14px; cursor: pointer;
  background: none; transition: background .2s;
}
.bd24-dark-toggle:hover { background: var(--bd24-section-bg); }

.bd24-search-trigger {
  width: 32px; height: 32px; border: 1px solid var(--bd24-border);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 14px; cursor: pointer;
  background: none; transition: background .2s;
}
.bd24-search-trigger:hover { background: var(--bd24-section-bg); }

/* Desktop Navbar */
.bd24-navbar {
  background: var(--bd24-body-bg);
  border-bottom: 1px solid var(--bd24-border);
  display: none;
}

@media (min-width: 992px) { .bd24-navbar { display: block; } }

.bd24-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  min-height: var(--bd24-nav-h);
  flex-wrap: nowrap;
}

.bd24-nav > li { position: relative; }

.bd24-nav > li > a {
  display: flex; align-items: center; gap: 4px;
  padding: 0 10px; height: var(--bd24-nav-h);
  font-size: 13px; font-weight: 700;
  color: var(--bd24-body-color); white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}

.bd24-nav > li > a:hover,
.bd24-nav > li.current-menu-item > a,
.bd24-nav > li.current-menu-ancestor > a {
  color: var(--bd24-primary);
  border-bottom-color: var(--bd24-primary);
}

.bd24-nav > li > a .caret { font-size: 10px; margin-left: 2px; }

/* Dropdown */
.bd24-dropdown {
  position: absolute; top: 100%; left: 0;
  background: var(--bd24-body-bg);
  border: 1px solid var(--bd24-border);
  border-top: 2px solid var(--bd24-primary);
  min-width: 180px; z-index: 100;
  box-shadow: var(--bd24-shadow-md);
  opacity: 0; visibility: hidden;
  transform: translateY(6px);
  transition: opacity .2s, transform .2s, visibility .2s;
}

.bd24-nav > li:hover .bd24-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}

.bd24-dropdown li a {
  display: block; padding: 9px 16px;
  font-size: 13px; font-weight: 500;
  border-bottom: 1px solid var(--bd24-border);
  color: var(--bd24-body-color);
}

.bd24-dropdown li:last-child a { border-bottom: none; }
.bd24-dropdown li a:hover { background: var(--bd24-section-bg); color: var(--bd24-primary); }

/* =========================================================
   SEARCH MODAL
   ========================================================= */
#bd24-search-modal {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
}

#bd24-search-modal.open { display: flex; }

.bd24-search-box {
  background: var(--bd24-body-bg); width: 90%; max-width: 560px;
  border-radius: 8px; padding: 32px; position: relative;
}

.bd24-search-close {
  position: absolute; top: 12px; right: 12px;
  font-size: 22px; color: var(--bd24-muted); cursor: pointer;
}

.bd24-search-box h3 { text-align: center; font-size: 22px; margin-bottom: 20px; }

.bd24-search-box form {
  display: flex; align-items: center; gap: 10px;
  border-bottom: 2px solid var(--bd24-border); padding-bottom: 8px;
}

.bd24-search-box input {
  flex: 1; border: none; outline: none; font-size: 16px;
  background: transparent; font-family: var(--bd24-font);
  color: var(--bd24-body-color);
}

.bd24-search-box input::placeholder { color: var(--bd24-muted); }

/* =========================================================
   MOBILE OFFCANVAS
   ========================================================= */
#bd24-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 1000; display: none;
}
#bd24-overlay.open { display: block; }

#bd24-offcanvas {
  position: fixed; top: 0; left: -320px; width: 300px;
  height: 100vh; z-index: 1001; background: var(--bd24-body-bg);
  overflow-y: auto; transition: left .3s ease;
  box-shadow: 4px 0 16px rgba(0,0,0,.15);
}
#bd24-offcanvas.open { left: 0; }

.offcanvas-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; border-bottom: 1px solid var(--bd24-border);
}

.offcanvas-head img { height: 28px; }

.offcanvas-close {
  font-size: 22px; color: var(--bd24-muted); cursor: pointer;
  transition: color .2s;
}
.offcanvas-close:hover { color: var(--bd24-primary); }

.offcanvas-body { padding: 16px; }

.offcanvas-nav li { border-bottom: 1px solid var(--bd24-border); }
.offcanvas-nav li a { display: block; padding: 10px 4px; font-size: 15px; font-weight: 600; }
.offcanvas-nav li a:hover { color: var(--bd24-primary); }

.offcanvas-sub { padding-left: 16px; }
.offcanvas-sub li { border-bottom: none; }
.offcanvas-sub li a { font-size: 13px; font-weight: 500; padding: 6px 4px; }

.offcanvas-social {
  display: flex; gap: 10px; margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--bd24-border);
}

.offcanvas-social a {
  width: 36px; height: 36px; border: 1px solid var(--bd24-border);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 15px;
}
.offcanvas-social a:hover { background: var(--bd24-primary); color: #fff; border-color: var(--bd24-primary); }

.offcanvas-dark-toggle {
  display: flex; align-items: center; gap: 10px;
  margin-top: 16px; font-size: 14px;
}

/* =========================================================
   FABs (Floating Action Buttons)
   ========================================================= */
.bd24-fabs {
  position: fixed; bottom: 16px; right: 16px;
  display: flex; flex-direction: column; gap: 8px; z-index: 500;
}

.bd24-fab {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; cursor: pointer; transition: transform .2s, background .2s;
  border: none;
}
.bd24-fab:hover { transform: scale(1.1); }

.fab-dark {
  background: #f3f4f6; color: #374151;
}
[data-theme="dark"] .fab-dark { background: #374151; color: #e5e7eb; }

.fab-top {
  background: var(--bd24-primary); color: #fff;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.fab-top.visible { opacity: 1; pointer-events: auto; }

/* =========================================================
   PWA INSTALL BANNER
   ========================================================= */
#pwa-banner {
  background: #1e3a8a; color: #fff;
  padding: 10px 16px; display: none;
  align-items: center; justify-content: space-between; gap: 12px;
  font-size: 13px;
}
#pwa-banner.show { display: flex; }
#pwa-banner button { font-size: 13px; }
#pwa-banner .pwa-install {
  background: #fff; color: #1e3a8a;
  padding: 4px 14px; border-radius: 4px; font-weight: 700;
}
#pwa-banner .pwa-dismiss { color: rgba(255,255,255,.7); font-size: 18px; }

/* =========================================================
   AD BANNER
   ========================================================= */
.bd24-ad-banner {
  text-align: center; padding: 12px 0;
}
.bd24-ad-banner img { margin: 0 auto; }

/* =========================================================
   SECTION HEADER BAR
   ========================================================= */
.section-bar {
  display: flex; align-items: center; gap: 8px;
  background: #1f2937; color: #fff;
  padding: 8px 12px; margin-bottom: 12px;
  min-height: 40px;
}

.section-bar .bar-dot {
  display: inline-block; width: 8px; height: 8px;
  background: var(--bd24-primary); flex-shrink: 0;
}

.section-bar a {
  color: #fff; font-size: 15px; font-weight: 700;
}
.section-bar a:hover { color: var(--bd24-primary); }

/* =========================================================
   CARDS
   ========================================================= */

/* Hero card with overlay */
.card-hero {
  position: relative; overflow: hidden;
  border-radius: var(--bd24-radius);
  display: block; height: 100%;
}

.card-hero .card-img {
  width: 100%; padding-top: 56.25%; /* 16:9 */
  position: relative; overflow: hidden;
  background: var(--bd24-section-bg);
}

.card-hero .card-img img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .4s;
}
.card-hero:hover .card-img img { transform: scale(1.04); }

.card-overlay {
  position: relative; overflow: hidden;
  border-radius: var(--bd24-radius); display: block;
}

.card-overlay .card-img {
  width: 100%; padding-top: 75%; /* 4:3 */
  position: relative; background: var(--bd24-section-bg);
}

.card-overlay .card-img img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .4s;
}
.card-overlay:hover .card-img img { transform: scale(1.04); }

.card-overlay-grad {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 55%);
}

.card-overlay-body {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 12px; color: #fff;
}

.card-overlay-body .card-title {
  font-size: 14px; font-weight: 700; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

.card-overlay-body .card-date {
  font-size: 11px; color: rgba(255,255,255,.7); margin-top: 4px;
}

.card-overlay-body .card-cat {
  font-size: 11px; color: var(--bd24-primary); font-weight: 600;
}

/* Horizontal card (thumb left, text right) */
.card-h {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--bd24-border);
}
.card-h:last-child { border-bottom: none; }

.card-h .card-thumb {
  flex-shrink: 0; width: 150px; border-radius: var(--bd24-radius);
  overflow: hidden; background: var(--bd24-section-bg);
}

@media (max-width: 767px) { .card-h .card-thumb { width: 100px; } }

.card-h .card-thumb .ratio-3x2 {
  padding-top: 66.66%; position: relative;
}

.card-h .card-thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .3s;
}
.card-h:hover .card-thumb img { transform: scale(1.04); }

.card-h .card-body { flex: 1; }

.card-h .card-title {
  font-size: 14px; font-weight: 700; line-height: 1.5;
  color: var(--bd24-body-color);
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.card-h .card-title:hover { color: var(--bd24-primary); }

.card-h .card-excerpt {
  font-size: 12px; color: var(--bd24-muted); margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

.card-h .card-meta {
  font-size: 11px; color: var(--bd24-muted); margin-top: 6px;
}

.card-h .card-more {
  font-size: 12px; font-weight: 700; color: var(--bd24-body-color);
  border-bottom: 1px solid var(--bd24-body-color);
  display: inline-block; margin-top: 6px; padding-bottom: 1px;
}
.card-h .card-more:hover { color: var(--bd24-primary); border-color: var(--bd24-primary); }

/* Small thumbnail card */
.card-sm {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 0; border-bottom: 1px solid var(--bd24-border);
}
.card-sm:last-child { border-bottom: none; }

.card-sm .card-thumb {
  flex-shrink: 0; width: 72px; height: 72px;
  border-radius: var(--bd24-radius); overflow: hidden;
  background: var(--bd24-section-bg);
}
.card-sm .card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-sm:hover .card-thumb img { transform: scale(1.04); }

.card-sm .card-body { flex: 1; }
.card-sm .card-title {
  font-size: 13px; font-weight: 600; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.card-sm .card-title:hover { color: var(--bd24-primary); }
.card-sm .card-date { font-size: 11px; color: var(--bd24-muted); margin-top: 4px; }

/* Text-only list */
.card-text {
  padding: 8px 0; border-bottom: 1px solid var(--bd24-border);
}
.card-text:last-child { border-bottom: none; }
.card-text a { font-size: 13px; font-weight: 600; color: var(--bd24-body-color); line-height: 1.4; }
.card-text a:hover { color: var(--bd24-primary); }
.card-text .card-date { font-size: 11px; color: var(--bd24-muted); margin-top: 3px; }

/* Numbered popular card */
.popular-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--bd24-border); }
.popular-item:last-child { border-bottom: none; }
.popular-num { font-size: 28px; font-weight: 900; color: var(--bd24-primary); min-width: 28px; font-style: italic; line-height: 1; }
.popular-item .card-title { font-size: 13px; font-weight: 600; line-height: 1.4; }
.popular-item .card-title:hover { color: var(--bd24-primary); }
.popular-item .card-date { font-size: 11px; color: var(--bd24-muted); margin-top: 4px; }

/* =========================================================
   RAMADAN WIDGET
   ========================================================= */
#ramadan-card {
  background: #f5f7f6;
  border: 1px solid #d7e8df !important;
  border-radius: var(--bd24-radius);
  padding: 14px;
  margin-bottom: 12px;
}
[data-theme="dark"] #ramadan-card { background: #1a2e22; border-color: #2d4a37 !important; }

.ramadan-title { color: rgb(51,162,55) !important; font-size: 14px; font-weight: 700; line-height: 1.4; }
.ramadan-day-line { font-size: 14px; font-weight: 700; color: var(--bd24-body-color); }

.ramadan-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  text-align: center; border-top: 1px solid #d7e8df;
  border-bottom: 1px solid #d7e8df; padding: 10px 0; margin: 10px 0;
}
.ramadan-col-l { border-right: 1px solid #d7e8df; }
.ramadan-big { font-size: 24px; font-weight: 700; }
.ramadan-big.sehri { color: #16a34a; }
.ramadan-big.iftar { color: #e03131; }
.ramadan-label { font-size: 12px; font-weight: 700; color: var(--bd24-body-color); }

.ramadan-times { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; font-size: 12px; }
.ramadan-time-item { display: flex; justify-content: space-between; }
.ramadan-time-label { color: var(--bd24-muted); }
.ramadan-time-val { font-weight: 700; color: var(--bd24-body-color); }

.ramadan-select {
  font-size: 12px; padding: 3px 8px; border: 1px solid #d9d9d9;
  border-radius: 4px; background: var(--bd24-body-bg);
  color: var(--bd24-body-color); cursor: pointer; min-width: 90px;
}

/* =========================================================
   TABS (সর্বশেষ / সর্বাধিক পঠিত)
   ========================================================= */
.bd24-tabs {
  background: var(--bd24-section-bg);
  border: 1px solid var(--bd24-border);
  border-radius: var(--bd24-radius);
  padding: 12px;
}

.bd24-tabs-nav {
  display: flex; gap: 0; border-bottom: 2px solid var(--bd24-border);
  margin-bottom: 12px;
}

.bd24-tabs-nav button {
  flex: 1; padding: 8px; font-size: 13px; font-weight: 700;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color .2s, border-color .2s;
  color: var(--bd24-muted); background: none;
}
.bd24-tabs-nav button.active { color: var(--bd24-primary); border-bottom-color: var(--bd24-primary); }
.bd24-tabs-nav button:hover { color: var(--bd24-primary); }

.bd24-tab-pane { display: none; }
.bd24-tab-pane.active { display: block; }

/* =========================================================
   OPINION SECTION
   ========================================================= */
.opinion-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--bd24-border); }
.opinion-item:last-child { border-bottom: none; }
.opinion-thumb { flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; background: var(--bd24-section-bg); }
.opinion-thumb img { width: 100%; height: 100%; object-fit: cover; }
.opinion-item .card-title { font-size: 13px; font-weight: 600; line-height: 1.4; }
.opinion-item .card-date { font-size: 11px; color: var(--bd24-muted); margin-top: 3px; }

/* =========================================================
   ENTERTAINMENT DARK BAND
   ========================================================= */
.ent-section {
  background: var(--bd24-dark-band);
  color: #fff; padding: 32px 0;
}

.ent-section .section-bar { background: rgba(255,255,255,.07); }
.ent-section .section-bar a { color: #fff; }

.ent-main { position: relative; overflow: hidden; border-radius: var(--bd24-radius); }
.ent-main .card-img { padding-top: 56.25%; position: relative; background: #374151; }
.ent-main .card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.ent-main:hover .card-img img { transform: scale(1.04); }

.ent-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 50%);
}

.ent-body {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 16px;
}

.ent-body .card-title { font-size: 18px; font-weight: 700; color: #fff; line-height: 1.4; }
.ent-body .card-cat { font-size: 11px; color: var(--bd24-primary); font-weight: 600; margin-bottom: 4px; }
.ent-body .card-date { font-size: 11px; color: rgba(255,255,255,.65); margin-top: 4px; }

.ent-side-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* =========================================================
   SPORTS CRICKET SCROLL LIST
   ========================================================= */
.cricket-scroll {
  height: 350px; overflow-y: auto;
  scrollbar-width: thin;
}
.cricket-scroll::-webkit-scrollbar { width: 4px; }
.cricket-scroll::-webkit-scrollbar-thumb { background: var(--bd24-border); border-radius: 2px; }

/* =========================================================
   LOAD MORE
   ========================================================= */
.bd24-load-more {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 10px; font-size: 14px; font-weight: 600;
  border: 1px solid var(--bd24-border); border-radius: var(--bd24-radius);
  background: transparent; color: var(--bd24-body-color);
  cursor: pointer; margin-top: 16px; transition: background .2s;
}
.bd24-load-more:hover { background: var(--bd24-section-bg); }
.bd24-load-more:disabled { opacity: .6; cursor: not-allowed; }

/* =========================================================
   SUBSCRIBE WIDGET
   ========================================================= */
.subscribe-widget {
  border: 1px solid var(--bd24-border);
  border-radius: var(--bd24-radius);
  padding: 16px; text-align: center;
}

.subscribe-widget h4 { font-size: 12px; text-transform: uppercase; color: var(--bd24-muted); margin-bottom: 12px; }

.subscribe-widget input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--bd24-border);
  border-radius: var(--bd24-radius); font-size: 14px;
  background: var(--bd24-body-bg); color: var(--bd24-body-color);
  font-family: var(--bd24-font); margin-bottom: 8px;
  outline: none;
}
.subscribe-widget input:focus { border-color: var(--bd24-primary); }

.subscribe-widget .btn-subscribe {
  width: 100%; padding: 9px; background: var(--bd24-primary);
  color: #fff; border-radius: var(--bd24-radius); font-size: 14px;
  font-weight: 700; font-family: var(--bd24-font);
  border: none; cursor: pointer; transition: background .2s;
}
.subscribe-widget .btn-subscribe:hover { background: var(--bd24-primary-dark); }

.subscribe-social { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.subscribe-social a {
  width: 32px; height: 32px; border: 1px solid var(--bd24-border);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 13px; transition: background .2s, color .2s;
}
.subscribe-social a:hover { background: var(--bd24-primary); color: #fff; border-color: var(--bd24-primary); }

/* =========================================================
   SINGLE POST
   ========================================================= */
.reading-bar {
  position: fixed; top: 0; left: 0; height: 3px;
  background: var(--bd24-primary); z-index: 9999;
  width: 0%; transition: width .1s linear;
}

.post-cat-badge {
  display: inline-block; background: var(--bd24-primary); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: 2px; text-transform: uppercase; letter-spacing: .5px;
}

.post-headline { font-size: 26px; font-weight: 800; line-height: 1.4; margin: 12px 0; }
@media (max-width: 767px) { .post-headline { font-size: 20px; } }

.post-meta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--bd24-muted); padding: 12px 0; border-bottom: 1px solid var(--bd24-border); margin-bottom: 16px; }

.post-body { font-size: 16px; line-height: 1.9; }
.post-body p { margin-bottom: 16px; }
.post-body h2, .post-body h3 { font-weight: 700; margin: 24px 0 12px; }
.post-body img { border-radius: var(--bd24-radius); margin: 16px 0; width: 100%; }
.post-body blockquote { border-left: 4px solid var(--bd24-primary); padding: 12px 16px; background: var(--bd24-section-bg); margin: 16px 0; font-style: italic; }

.share-row { display: flex; gap: 8px; flex-wrap: wrap; padding: 16px 0; border-top: 1px solid var(--bd24-border); }

.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 4px; font-size: 13px; font-weight: 700; color: #fff;
}
.share-btn.fb { background: #1877f2; }
.share-btn.tw { background: #1da1f2; }
.share-btn.wa { background: #25d366; }
.share-btn.tg { background: #0088cc; }
.share-btn.cp { background: var(--bd24-muted); }

.tag-badge {
  display: inline-block; border: 1px solid var(--bd24-border);
  padding: 4px 12px; font-size: 12px; border-radius: 2px;
  margin: 4px; color: var(--bd24-body-color); transition: background .2s, color .2s;
}
.tag-badge:hover { background: var(--bd24-primary); color: #fff; border-color: var(--bd24-primary); }

.bd24-breadcrumb { font-size: 13px; color: var(--bd24-muted); padding: 8px 0; }
.bd24-breadcrumb a { color: var(--bd24-muted); }
.bd24-breadcrumb a:hover { color: var(--bd24-primary); }
.bd24-breadcrumb span { margin: 0 6px; }

/* =========================================================
   FOOTER
   ========================================================= */
#bd24-footer {
  background: #f3f4f6; color: #374151;
  padding: 40px 0 0;
  border-top: 1px solid var(--bd24-border);
}
[data-theme="dark"] #bd24-footer { background: #111827; color: #e5e7eb; }

.footer-top {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 32px;
}

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

.footer-logo img { height: 40px; width: auto; margin-bottom: 12px; }
.footer-about { font-size: 13px; line-height: 1.7; color: var(--bd24-muted); margin-bottom: 16px; }

.footer-social { display: flex; gap: 8px; }
.footer-social a {
  width: 32px; height: 32px; border: 1px solid var(--bd24-border);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 13px; transition: background .2s, color .2s;
}
.footer-social a:hover { background: var(--bd24-primary); color: #fff; border-color: var(--bd24-primary); }

.footer-col-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  color: var(--bd24-muted); margin-bottom: 14px; letter-spacing: .5px;
}

.footer-nav li { padding: 6px 0; border-bottom: 1px solid var(--bd24-border); }
.footer-nav li:last-child { border-bottom: none; }
.footer-nav a { font-size: 14px; font-weight: 500; color: var(--bd24-body-color); }
.footer-nav a:hover { color: var(--bd24-primary); }

.footer-bottom {
  margin-top: 32px; border-top: 1px solid var(--bd24-border);
  padding: 16px 0; display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 13px; color: var(--bd24-muted);
}

.footer-bottom a { color: var(--bd24-muted); }
.footer-bottom a:hover { color: var(--bd24-primary); }

.footer-bottom-links { display: flex; gap: 16px; }

/* =========================================================
   GRID UTILITIES
   ========================================================= */
.row { display: flex; flex-wrap: wrap; }
.col-match > * { flex: 1; min-width: 0; }
.g-2 { gap: 8px; }
.g-3 { gap: 12px; }
.g-4 { gap: 16px; }

/* =========================================================
   HOMEPAGE LAYOUT HELPERS
   ========================================================= */
.hp-hero-row {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px; align-items: stretch;
}

@media (max-width: 1199px) { .hp-hero-row { grid-template-columns: 1fr 320px; } }
@media (max-width: 991px)  { .hp-hero-row { grid-template-columns: 1fr; } }

.hp-main-row {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}
@media (max-width: 991px) { .hp-main-row { grid-template-columns: 1fr; } }

.hp-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 991px) { .hp-3col { grid-template-columns: 1fr 1fr; } }
@media (max-width: 575px) { .hp-3col { grid-template-columns: 1fr; } }

.hp-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 991px) { .hp-4col { grid-template-columns: 1fr 1fr; } }
@media (max-width: 575px) { .hp-4col { grid-template-columns: 1fr 1fr; } }

.hp-sports-row {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}
@media (max-width: 991px) { .hp-sports-row { grid-template-columns: 1fr; } }

.hp-sports-inner {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
}
@media (max-width: 767px) { .hp-sports-inner { grid-template-columns: 1fr; } }

.hp-nat-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
@media (max-width: 767px) { .hp-nat-row { grid-template-columns: 1fr; } }

.hp-nat-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 767px) { .hp-nat-main { grid-template-columns: 1fr; } }

/* =========================================================
   SECTION SPACING
   ========================================================= */
.bd24-section { padding: 24px 0; }
.bd24-section-sm { padding: 12px 0; }

/* =========================================================
   MISCELLANEOUS
   ========================================================= */
.ratio-16x9 { position: relative; padding-top: 56.25%; overflow: hidden; }
.ratio-4x3  { position: relative; padding-top: 75%; overflow: hidden; }
.ratio-3x2  { position: relative; padding-top: 66.66%; overflow: hidden; }
.ratio-1x1  { position: relative; padding-top: 100%; overflow: hidden; }

.ratio-16x9 img,
.ratio-4x3  img,
.ratio-3x2  img,
.ratio-1x1  img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .3s;
}

.text-truncate-2 {
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.text-truncate-3 {
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}

.d-none { display: none !important; }
@media (min-width: 992px) { .d-lg-block { display: block !important; } .d-lg-none { display: none !important; } }
@media (max-width: 991px) { .d-mobile-none { display: none !important; } }

/* =========================================================
   DARK MODE OVERRIDES
   ========================================================= */
[data-theme="dark"] .bd24-ticker { background: #0f0f0f; border-color: #374151; }
[data-theme="dark"] #bd24-header { background: #0f0f0f; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
[data-theme="dark"] .bd24-logo-bar { border-color: #374151; }
[data-theme="dark"] .bd24-navbar { background: #0f0f0f; border-color: #374151; }
[data-theme="dark"] .bd24-dropdown { background: #1a1a1a; border-color: #374151; }
[data-theme="dark"] .card-h .card-title { color: #e5e7eb; }
[data-theme="dark"] .section-bar { background: #374151; }
[data-theme="dark"] #bd24-offcanvas { background: #111827; }
[data-theme="dark"] .offcanvas-head { border-color: #374151; }
[data-theme="dark"] .offcanvas-nav li { border-color: #374151; }
[data-theme="dark"] #bd24-footer { background: #111827; }
[data-theme="dark"] .footer-bottom { border-color: #374151; }
