/*
Theme Name: BanglaNews
Theme URI: https://www.banglanews24.com/
Author: BanglaNews Theme
Author URI: https://www.banglanews24.com/
Description: A modern Bengali news WordPress theme inspired by Banglanews24. Features category sections (বাংলানিউজ স্পেশাল, জাতীয়, রাজনীতি, etc.), Bootstrap 5 layout, responsive design, and template parts for home, single, and category pages.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: banglanews
Tags: news, blog, bangla, bangladesh, custom-menu, featured-images, threaded-comments, translation-ready, two-columns, custom-logo, custom-header
*/

/* ==========================================================================
   Base & Typography (Bengali-friendly)
   ========================================================================== */
:root {
  --bn-primary: #c41e3a;
  --bn-primary-dark: #9a182e;
  --bn-secondary: #1a1a2e;
  --bn-text: #212529;
  --bn-muted: #6c757d;
  --bn-border: #dee2e6;
  --bn-bg-light: #f8f9fa;
  --bn-link: #0d6efd;
  --bn-font: "Noto Sans Bengali", "Hind Siliguri", "SolaimanLipi", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--bn-font);
  color: var(--bn-text);
  line-height: 1.6;
  background: #fff;
  margin: 0;
  padding: 0;
  font-size: 16px;
}

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

a:hover {
  color: var(--bn-primary);
}

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

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--bn-border);
}

.mainLogo {
  max-height: 70px;
  width: auto;
}

.headerNews .bg-light {
  background: var(--bn-bg-light) !important;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.headerNews .bg-light:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.headerNews h6 {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
}

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

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

/* ==========================================================================
   Navigation
   ========================================================================== */
.mainNav {
  background: #fff !important;
  border-bottom: 2px solid var(--bn-primary);
  z-index: 1030;
}

.mainNav .navbar-nav .nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 0.9rem !important;
  color: var(--bn-secondary) !important;
  white-space: nowrap;
}

.mainNav .navbar-nav .nav-link:hover,
.mainNav .navbar-nav .nav-link.active {
  color: var(--bn-primary) !important;
  background: transparent;
}

.mainNav .navbar-brand {
  font-weight: 700;
  color: var(--bn-primary) !important;
}

.mobile-cat-scroll {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #fff;
  border-bottom: 1px solid var(--bn-border);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mobile-cat-scroll::-webkit-scrollbar {
  display: none;
}

.mobile-cat-scroll a {
  flex-shrink: 0;
  padding: 0.35rem 0.85rem;
  background: var(--bn-bg-light);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bn-secondary);
}

.mobile-cat-scroll a:hover,
.mobile-cat-scroll a.active {
  background: var(--bn-primary);
  color: #fff;
}

/* ==========================================================================
   Breaking / Ticker
   ========================================================================== */
.ticker-area {
  overflow: hidden;
  width: 100%;
  background: var(--bn-secondary);
  color: #fff;
  padding: 0.4rem 0;
  font-size: 0.9rem;
}

.ticker-label {
  background: var(--bn-primary);
  color: #fff;
  padding: 0.4rem 1rem;
  font-weight: 700;
  white-space: nowrap;
}

.ticker-content {
  display: flex;
  animation: ticker-scroll 40s linear infinite;
  white-space: nowrap;
}

.ticker-content a {
  color: #fff;
  margin-right: 2.5rem;
}

.ticker-content a:hover {
  color: #ffc107;
}

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

/* ==========================================================================
   Trending tags
   ========================================================================== */
.trending-bar {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--bn-border);
}

.trending-bar .badge {
  background: var(--bn-bg-light);
  color: var(--bn-text);
  font-weight: 500;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  margin-right: 0.35rem;
  margin-bottom: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.trending-bar .badge:hover {
  background: var(--bn-primary);
  color: #fff;
}

.trending-label {
  font-weight: 700;
  color: var(--bn-primary);
  margin-right: 0.5rem;
}

/* ==========================================================================
   Section headings (category blocks)
   ========================================================================== */
.section-title {
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--bn-border);
  position: relative;
  font-size: 1.35rem;
  font-weight: 700;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 80px;
  height: 2px;
  background: var(--bn-primary);
}

.section-title .see-all {
  float: right;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--bn-muted);
  margin-top: 0.35rem;
}

.section-title .see-all:hover {
  color: var(--bn-primary);
}

.section-title a.stretched-link {
  z-index: 1;
}

/* ==========================================================================
   News cards / modules
   ========================================================================== */
.news-card {
  position: relative;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--bn-border);
}

.news-card:last-child {
  border-bottom: none;
}

.zoom-container {
  overflow: hidden;
  border-radius: 4px;
  position: relative;
}

.zoom-image {
  transition: transform 0.4s ease;
  width: 100%;
  height: auto;
  object-fit: cover;
  border: 1px solid var(--bn-border);
  border-top: none;
  border-left: none;
  border-right: none;
}

.zoom-container:hover .zoom-image {
  transform: scale(1.05);
}

.news-card .n_head {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 0.6rem;
}

.news-card .homeSubDesc {
  font-size: 0.875rem;
  color: var(--bn-muted);
  margin-top: 0.5rem;
}

.news-card a.stretched-link {
  z-index: 1;
}

/* Featured large card */
.featured-card .n_head {
  font-size: 1.25rem;
}

/* List style (sidebar-like) */
.news-list-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--bn-border);
  position: relative;
}

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

.news-list-item img {
  width: 100px;
  height: 70px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.news-list-item h6 {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}

/* Lead story area */
.lead-story {
  margin-bottom: 1.5rem;
}

.lead-story .lead-title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.35;
}

.lead-story .lead-excerpt {
  color: var(--bn-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   Category / Archive page
   ========================================================================== */
.archive-header {
  padding: 1.5rem 0;
  border-bottom: 2px solid var(--bn-primary);
  margin-bottom: 1.5rem;
}

.archive-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0;
}

.post-grid .news-card {
  height: 100%;
}

/* ==========================================================================
   Single post
   ========================================================================== */
.single-post .entry-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 1rem;
}

.single-post .entry-meta {
  color: var(--bn-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--bn-border);
}

.single-post .entry-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.single-post .entry-content p {
  margin-bottom: 1.25rem;
}

.single-post .entry-content img {
  margin: 1.5rem auto;
  border-radius: 4px;
}

.single-post .post-thumbnail {
  margin-bottom: 1.5rem;
  border-radius: 6px;
  overflow: hidden;
}

.related-posts h4 {
  font-size: 1.2rem;
  border-bottom: 2px solid var(--bn-border);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bn-secondary);
  color: #ccc;
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
  font-size: 0.9rem;
}

.site-footer a {
  color: #eee;
}

.site-footer a:hover {
  color: #fff;
}

.site-footer .footer-logo {
  max-height: 50px;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
}

.site-footer h5 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer ul li {
  margin-bottom: 0.4rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 1.5rem;
  padding-top: 1rem;
  text-align: center;
  font-size: 0.85rem;
}

/* ==========================================================================
   Utilities & Ads placeholders
   ========================================================================== */
.ad-placeholder {
  background: var(--bn-bg-light);
  border: 1px dashed var(--bn-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bn-muted);
  font-size: 0.85rem;
  min-height: 90px;
  margin: 1rem 0;
}

.object-fit-cover {
  object-fit: cover;
}

.stretched-link::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  content: "";
}

/* Pagination */
.pagination .page-link {
  color: var(--bn-secondary);
  border-color: var(--bn-border);
}

.pagination .page-item.active .page-link {
  background-color: var(--bn-primary);
  border-color: var(--bn-primary);
}

/* Back to top */
#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  background: var(--bn-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 999;
  border: none;
  cursor: pointer;
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1199.98px) {
  .headerNews {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  .section-title {
    font-size: 1.15rem;
  }
  .news-card .n_head {
    font-size: 0.95rem;
  }
  .lead-story .lead-title {
    font-size: 1.25rem;
  }
  .single-post .entry-title {
    font-size: 1.4rem;
  }
  .mainLogo {
    max-height: 50px;
  }
}
