:root {
  --primary: #d32f2f;
  --primary-dark: #b71c1c;
  --primary-light: #ff6659;
  --secondary: #1a237e;
  --accent: #ff9800;
  
  --bg-color: #f4f6f9;
  --card-bg: #ffffff;
  --text-main: #212529;
  --text-muted: #6c757d;
  --border-color: #e2e8f0;

  --topbar-bg: #1e293b;
  --topbar-text: #f8fafc;
  --nav-bg: #ffffff;
  --nav-link: #334155;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.12);

  --font-family: 'Hind Siliguri', 'Inter', -apple-system, sans-serif;
}

[data-theme="dark"] {
  --bg-color: #0f172a;
  --card-bg: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --nav-bg: #1e293b;
  --nav-link: #cbd5e1;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Custom Header Logo GIF Styling */
.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-custom-logo {
  max-height: 50px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Mobile 3-Line Hamburger Button (Hidden on Desktop) */
.mobile-menu-btn {
  display: none;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 1.2rem;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}
.mobile-menu-btn:hover {
  background: var(--border-color);
}

/* Content Links Styling */
.content-link {
  color: #2563eb;
  font-weight: 600;
  word-break: break-all;
  overflow-wrap: anywhere;
  text-decoration: underline;
  padding: 2px 6px;
  background: rgba(37, 99, 235, 0.08);
  border-radius: 4px;
}
.content-link:hover {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.16);
}

/* Topbar */
.topbar {
  background: var(--topbar-bg);
  color: var(--topbar-text);
  font-size: 0.85rem;
  padding: 8px 0;
}
.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.live-badge {
  background: rgba(220, 38, 38, 0.2);
  color: #f87171;
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.8rem;
}
.text-danger { color: #ef4444; margin-right: 4px; }
.icon-btn {
  background: none;
  border: none;
  color: var(--topbar-text);
  cursor: pointer;
  font-size: 1rem;
}

/* Site Header */
.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
}

.search-box form {
  display: flex;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 25px;
  overflow: hidden;
  padding: 4px 6px;
}
.search-box input {
  border: none;
  background: transparent;
  padding: 6px 14px;
  outline: none;
  font-family: inherit;
  color: var(--text-main);
  width: 220px;
}
.search-box button {
  background: var(--primary);
  color: white;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
}

/* Main Navigation Desktop */
.main-nav {
  background: var(--nav-bg);
  border-top: 1px solid var(--border-color);
  transition: all 0.3s ease;
}
.nav-menu {
  display: flex;
  list-style: none;
  overflow-x: auto;
  white-space: nowrap;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  font-weight: 600;
  color: var(--nav-link);
  border-bottom: 3px solid transparent;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Marquee Ticker */
.ticker-wrapper {
  display: flex;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin: 16px 0;
  overflow: hidden;
  padding: 6px 12px;
}
.ticker-label {
  background: var(--primary);
  color: white;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  white-space: nowrap;
  margin-right: 10px;
}
.ticker-content {
  flex: 1;
  font-weight: 500;
}
.ticker-badge {
  background: rgba(211, 47, 47, 0.1);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-right: 4px;
}

/* Hero Section */
.hero-section {
  margin-bottom: 24px;
}
.hero-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  border: 1px solid var(--border-color);
  width: 100%;
  min-height: 350px;
}
.hero-image-wrap {
  position: relative;
  width: 360px;
  min-width: 360px;
  max-width: 360px;
  height: 100%;
  min-height: 350px;
  background: #0f172a;
  overflow: hidden;
  flex-shrink: 0;
  border-right: 1px solid var(--border-color);
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.category-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--primary);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
}
.hero-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.post-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 14px;
  margin-bottom: 10px;
}
.hero-title {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.hero-title a:hover {
  color: var(--primary);
}
.hero-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
  line-height: 1.6;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: white;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  align-self: flex-start;
  white-space: nowrap;
}

/* Main Layout Grid */
.news-layout-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
}
.section-title {
  font-size: 1.2rem;
  border-left: 4px solid var(--primary);
  padding-left: 10px;
  margin-bottom: 16px;
}
.news-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* News Cards */
.news-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}
.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.card-img-wrap {
  position: relative;
  height: 190px;
  background: rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-cat-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0,0,0,0.75);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
}
.card-content {
  padding: 14px;
  min-width: 0;
}
.post-meta-sm {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.card-title a:hover { color: var(--primary); }
.card-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.card-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
}
.card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

/* Sidebar Widgets */
.widget {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 20px;
  min-width: 0;
}
.widget-title {
  font-size: 1.05rem;
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border-color);
}
.telegram-widget {
  background: linear-gradient(135deg, #0088cc, #005588);
  color: white;
  border: none;
}
.telegram-widget .widget-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.telegram-icon {
  font-size: 1.6rem;
}
.status-box {
  margin-top: 12px;
  background: rgba(255,255,255,0.18);
  padding: 6px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  background: #4caf50;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(76, 175, 80, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
}

.popular-item {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  min-width: 0;
}
.pop-rank {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}
.pop-info { min-width: 0; }
.pop-title {
  font-weight: 600;
  font-size: 0.88rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.pop-title:hover { color: var(--primary); }
.pop-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Single Article Layout */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 12px 0;
  word-break: break-word;
}
.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}
.single-article {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-color);
  min-width: 0;
}
.article-category-badge {
  background: var(--primary);
  color: white;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.article-main-title {
  font-size: 1.8rem;
  line-height: 1.35;
  margin: 12px 0 16px;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.article-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}
.author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.author-avatar { font-size: 2rem; color: var(--primary); }
.author-name { display: block; font-weight: 600; font-size: 0.9rem; }
.publish-date { font-size: 0.78rem; color: var(--text-muted); }

.article-featured-image {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
  background: rgba(0,0,0,0.03);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px;
}
.main-news-img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.social-share-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--bg-color);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}
.share-label { font-weight: 600; font-size: 0.85rem; width: 100%; margin-bottom: 4px; }
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  flex: 1;
  min-width: 120px;
  text-align: center;
}
.share-telegram { background: #0088cc; }
.share-facebook { background: #1877f2; }
.share-whatsapp { background: #25d366; }
.share-copy { background: #64748b; }

.article-content-body p {
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 16px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  margin-top: 40px;
  padding-top: 24px;
}
.footer-bottom { text-align: center; padding: 16px 0; font-size: 0.8rem; }

/* ==========================================================================
   📱 MOBILE EDITION & 3-LINE HAMBURGER MENU STYLES (MAX-WIDTH: 768PX)
   ========================================================================== */
@media (max-width: 768px) {
  .container {
    padding: 0 12px;
  }

  /* Show Hamburger 3-Line Button on Mobile */
  .mobile-menu-btn {
    display: flex;
  }

  /* Topbar on Mobile */
  .topbar-content {
    flex-direction: row;
    font-size: 0.75rem;
  }
  .live-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
  }

  /* Header on Mobile */
  .header-inner {
    padding: 10px 12px;
    gap: 8px;
  }
  .header-custom-logo {
    max-height: 38px;
    max-width: 140px;
  }
  .search-box input {
    width: 120px;
    font-size: 0.8rem;
    padding: 4px 8px;
  }
  .search-box button {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  /* 3-LINE HAMBURGER DROPDOWN SLIDE-DOWN MENU */
  .main-nav {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, padding 0.25s ease;
    background: var(--card-bg);
    border-top: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  }
  .main-nav.mobile-open {
    max-height: 400px;
    opacity: 1;
    padding: 10px 0 14px;
    border-bottom: 2px solid var(--primary);
  }
  .nav-menu {
    flex-direction: column;
    white-space: normal;
    overflow-x: visible;
    gap: 6px;
    padding: 0 12px;
  }
  .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border-bottom: none;
    background: var(--bg-color);
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    width: 100%;
  }
  .nav-link:hover, .nav-link.active {
    background: var(--primary);
    color: white;
    border-bottom: none;
  }

  /* Hero Banner Stacked Card on Mobile */
  .hero-card {
    flex-direction: column;
    min-height: auto;
  }
  .hero-image-wrap {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 220px;
    min-height: 220px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .hero-img {
    height: 100%;
    object-fit: cover;
  }
  .hero-info {
    padding: 18px 14px;
  }
  .hero-title {
    font-size: 1.25rem;
    line-height: 1.35;
  }
  .hero-excerpt {
    font-size: 0.85rem;
    margin-bottom: 14px;
    -webkit-line-clamp: 2;
  }
  .read-more-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  /* News Grid & Layout on Mobile */
  .news-layout-grid, .article-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .news-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .card-img-wrap {
    height: 180px;
  }
  .card-title {
    font-size: 1rem;
  }

  /* Article Single View Mobile Tuning */
  .single-article {
    padding: 16px;
  }
  .article-main-title {
    font-size: 1.35rem;
    margin: 10px 0 14px;
  }
  .share-btn {
    flex: 1 1 45%;
    font-size: 0.78rem;
    padding: 8px 10px;
  }
  .article-content-body p {
    font-size: 1rem;
    line-height: 1.65;
  }
}
